From patchwork Wed Sep 13 22:05:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 813645 X-Patchwork-Delegate: agraf@suse.de 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="GNXX2JoC"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3xswsV2TZ3z9sNw for ; Thu, 14 Sep 2017 08:13:17 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id CC0FCC2261F; Wed, 13 Sep 2017 22:06:58 +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 9120DC225AB; Wed, 13 Sep 2017 22:06:41 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 19711C2258E; Wed, 13 Sep 2017 22:06:04 +0000 (UTC) Received: from mail-qk0-f194.google.com (mail-qk0-f194.google.com [209.85.220.194]) by lists.denx.de (Postfix) with ESMTPS id 941D5C22534 for ; Wed, 13 Sep 2017 22:06:00 +0000 (UTC) Received: by mail-qk0-f194.google.com with SMTP id c69so937787qke.5 for ; Wed, 13 Sep 2017 15:06:00 -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=GNXX2JoCj5hLIC/ZqHrwk3yrGWpsIG8FgiVlDbb+XSdJOVE5xxAhQxhsPWz5tm1j4V GNzFetKLyRiaGDYgjCk+oTFRk4AVIUswlZeHNt8I9DA0nNPYXmi5C3Mg8C3AglistLd1 AMywEGWu0kNYWT6SGoGrb+KrY64F6gvRSJbEQ9hhZkJiYieqjqnokmcTuclvOMorbv5T 57K29OUvwaJ/MBc8nLHbxeTcy8N5uKMfAAgZKRy+zyRMoYPrV8mRcx8wnzxqTYvjnl8T GuILZ9MtJHfuMv6s6lmeWoE55cQxR21SrIj3hkYFNFlwJYDsWQhNs0/bvooMscR4jYHa 8CAA== 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=Mg5t31/7CAr+mQ+Fl7r/7L/WE7213xeSZ+tGv6apraiNWRA1kgvKDgg05tZpf14lgy JshaFJIfcifneQbRWGDUCGZ/KsKY2FEm86ZWWZwYN0XT60+9dcex07JdR0FxAhnML3y9 BTnrY3t8CfhzDP6HWFHSNF5ehRLf35BQJ9iT4DCQJitOh3fhTWlSIKbab3SpGcyfwILN I08/sOhMqes8CExMZnh2Q4zTay8/dzmCUBXnmuDzvq4Uhtwz4qPMScYMQG89Rl33WzOJ mVk2cOWHwmd01ngfw+JDXWqByQn2sI4sV5BS8JJpYD+u9bqyNuMLFFqjtR62W4Mf87xd l3EQ== X-Gm-Message-State: AHPjjUhbxookEyXyEYVObjJNW2FZUyRhsJtxg2osS4htU2aOclW3p0mL GcxcDTObjQ8KXKc0gTA= X-Google-Smtp-Source: AOwi7QDyuNnPOCgejgFDI+XLCF8dDPqlSuuRLrFTN0w0zCFSQVy+hTVGhQce3zzKr3lmIrXy2cA6aA== X-Received: by 10.55.163.201 with SMTP id m192mr25312833qke.27.1505340359227; Wed, 13 Sep 2017 15:05:59 -0700 (PDT) Received: from localhost ([2601:184:4780:aac0:25f8:dd96:a084:785a]) by smtp.gmail.com with ESMTPSA id l11sm10122669qke.19.2017.09.13.15.05.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Sep 2017 15:05:58 -0700 (PDT) From: Rob Clark To: U-Boot Mailing List Date: Wed, 13 Sep 2017 18:05:26 -0400 Message-Id: <20170913220546.19560-4-robdclark@gmail.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170913220546.19560-1-robdclark@gmail.com> References: <20170913220546.19560-1-robdclark@gmail.com> Cc: Heinrich Schuchardt , Peter Jones Subject: [U-Boot] [PATCH v3 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 --- 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, \