From patchwork Sun Sep 10 11:21:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 812105 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="LpNfQCDn"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3xqpjS15SJz9sDB for ; Sun, 10 Sep 2017 21:29:00 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id C15F1C21F4D; Sun, 10 Sep 2017 11:23:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 258CBC21C39; Sun, 10 Sep 2017 11:23:07 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C6B3EC21DBD; Sun, 10 Sep 2017 11:22:25 +0000 (UTC) Received: from mail-qt0-f193.google.com (mail-qt0-f193.google.com [209.85.216.193]) by lists.denx.de (Postfix) with ESMTPS id 602C3C21E57 for ; Sun, 10 Sep 2017 11:22:21 +0000 (UTC) Received: by mail-qt0-f193.google.com with SMTP id k2so4079906qte.5 for ; Sun, 10 Sep 2017 04:22:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=czY6WGJALjtWSa/9yiEE+o7Vi2maM01LVTuVMqv+lKA=; b=LpNfQCDn0dZ9hh/xDzSXKegpTRZOmRtVWg3sclaUm7JnudUoxVECoJUnVi+558QEzK jPGahGdV8aVuu1Me5wGievzgXM+komYnejIQoQ1U21gkRPW+2eU0Q82if5h/A8eose/W OVapOZrB09NDHWVDd/7Mm9uBS7UIWdmh/zobh3vOo/8TVfRSNQwGb4boaaPV8CDtcBHQ Qbu/mfSEeNpqZi8LDTyn4l8lRRwRjD3emfEaUDXxGpiykfbuVY8FrUIf273URjqQdjEO Tyoo/LCgGP9QFsQOiVsovEdMCjOtcuoN+X8uHp4LnLCVxA4sd5URXxcRuy2Zd6d+zjoA 5yKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=czY6WGJALjtWSa/9yiEE+o7Vi2maM01LVTuVMqv+lKA=; b=KG8hfzpVoquBoll3yulWu34SNdXcLo+r9D0saMnNGE/DUnxYkqMLS973Ogvh+IzWDL x91Hn8AFmY3S1054y66SZpOrrAhMEIyDUlGNuH0P5sceAS/boWRlzhdqSDP3VvB+aEYH VqTQbZJ1t4SC+wpnzEa4j4WGgoW6Xdnc2Vhf/ojghCYsH3YgCct4tq7s/OPRcB+Xah5e WVdLxlJhwKYmmr2ZvyNsHzERw7ohLizoVgQWHJDbtFxlEAdIpgadRdM0jz5Nsdqt7CQm q++yl8Ktc7Er/ynNad9F9tSY3T4g3Qp7PTiniBh4bMNvlTOr/ahb7ujIgsBZQW70lppJ EfHg== X-Gm-Message-State: AHPjjUjN4R3ejX91to497zgNsRpce1kN5bhk1VjAk9ZHSTIgU1X4v10n YfFpqHQH0MiBod2iZTg= X-Google-Smtp-Source: AOwi7QAdrW0bvlJVXLaqQjgc9pibTfcpfU7iPnoCXl34co2DyhljJMhUJuhFpCX4pEZOH8s65notBw== X-Received: by 10.200.63.98 with SMTP id w31mr2402054qtk.174.1505042540122; Sun, 10 Sep 2017 04:22:20 -0700 (PDT) Received: from localhost ([2601:184:4780:aac0:25f8:dd96:a084:785a]) by smtp.gmail.com with ESMTPSA id s141sm4189219qke.62.2017.09.10.04.22.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 10 Sep 2017 04:22:18 -0700 (PDT) From: Rob Clark To: U-Boot Mailing List Date: Sun, 10 Sep 2017 07:21:22 -0400 Message-Id: <20170910112149.21358-6-robdclark@gmail.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170910112149.21358-1-robdclark@gmail.com> References: <20170910112149.21358-1-robdclark@gmail.com> Cc: Heinrich Schuchardt , Peter Jones Subject: [U-Boot] [PATCH v2 03/21] efi: add some missing __packed X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" All of the device-path related structures should be packed. UEFI defines the device-path as a byte-aligned data structure. Signed-off-by: Rob Clark Reviewed-by: Simon Glass --- include/efi_api.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/efi_api.h b/include/efi_api.h index ec1b321e8e..175341348e 100644 --- a/include/efi_api.h +++ b/include/efi_api.h @@ -284,11 +284,11 @@ struct efi_device_path { u8 type; u8 sub_type; u16 length; -}; +} __packed; struct efi_mac_addr { u8 addr[32]; -}; +} __packed; #define DEVICE_PATH_TYPE_MESSAGING_DEVICE 0x03 # define DEVICE_PATH_SUB_TYPE_MSG_MAC_ADDR 0x0b @@ -297,7 +297,7 @@ struct efi_device_path_mac_addr { struct efi_device_path dp; struct efi_mac_addr mac; u8 if_type; -}; +} __packed; #define DEVICE_PATH_TYPE_MEDIA_DEVICE 0x04 # define DEVICE_PATH_SUB_TYPE_FILE_PATH 0x04 @@ -305,7 +305,7 @@ struct efi_device_path_mac_addr { struct efi_device_path_file_path { struct efi_device_path dp; u16 str[32]; -}; +} __packed; #define BLOCK_IO_GUID \ EFI_GUID(0x964e5b21, 0x6459, 0x11d2, \