From patchwork Tue Mar 17 02:12:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 1255993 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=m6OALdoq; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48hGt65N82z9sPF for ; Tue, 17 Mar 2020 13:13:18 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D372C8192F; Tue, 17 Mar 2020 03:12:54 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="m6OALdoq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 24BA781917; Tue, 17 Mar 2020 03:12:36 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7A8908191C for ; Tue, 17 Mar 2020 03:12:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pj1-x1044.google.com with SMTP id ca13so9701195pjb.2 for ; Mon, 16 Mar 2020 19:12:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6PvnheeH6nyEVU4YceyrQ5NWHtjwVcWzmcgRgpDTDN0=; b=m6OALdoq5IZV2kZHV7YmrRF/cpG4tOXZdS3Rm+A4Xu1zLrMHUPJ28ssWLnAo0Od9CH eiDXYAkblv+8aWLLX4a1si58rwfsOwrA9GDSmAic6j7rhkZ7YQZ5miarHdVrIdY+BScK oQC7rceyU3IhVZzbR+rC8GHQaPfWNJ8FXiunlzprwlImOlTAjLsJr2x0XW/r3CEHpZO+ La6b/oKoTVXbRHYX8zpeR3Z+Q0pOT2yYFr8LthLh0NZ7I3ZSyg0A4YWlKtIuEM21kCpO kKZSh+Ad/b8SyweXaOVx8JRUexAdcBHZXR6rpGzpx8K2YdC13fiIhx53ZTNZsEnZQMYw xaow== 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:mime-version:content-transfer-encoding; bh=6PvnheeH6nyEVU4YceyrQ5NWHtjwVcWzmcgRgpDTDN0=; b=gt7QuRBEcbestDrdI39kdWZzZE1cjKqz1XXkTvkUGgj74l38Cb4ANg/zKFoY7ncy8w uf6Ckmz//PU7bgDLVvhTZuptUEfY9UFxO3AtRjMiTF5kKCaQFVGXkYAwXnyO9xLlIlTd OtmKgW6asSq7iB/iGn/b3XFTXQMqEti3g9iLGn6Qwhc4K/ynoLd1zwzQL1t2KET5gIN5 ekLvGLgXE5dX0Aud4wR0M4M4CK95L/+aV7BKCdcCGBeGx9Vsp8+Hob4602iztEPWOvfF uerZ1Fo03xax48YzPWLGQUaEgC4YD+GIHW/fAD0MIiOXZCbMEa1H+OMcpq6qAmPnLcYI VOGw== X-Gm-Message-State: ANhLgQ32UsgtO0JtwrLEUCHWJkqlporkaamJitE825OBITqYzDoBVdv/ g4eCtAjrbQjum3yZEsgoT8JsZg== X-Google-Smtp-Source: ADFU+vsOQcV3C7sjTif+diqCKvXMxLR7WbegjbBNI4OglDj/Eha02z6FUEWqbdnQ7yNQncA0tfbbVg== X-Received: by 2002:a17:90a:33e5:: with SMTP id n92mr2642954pjb.39.1584411146348; Mon, 16 Mar 2020 19:12:26 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id 134sm1134842pfy.27.2020.03.16.19.12.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Mar 2020 19:12:25 -0700 (PDT) From: AKASHI Takahiro To: xypron.glpk@gmx.de, agraf@csgraf.de Cc: ilias.apalodimas@linaro.org, sughosh.ganu@linaro.org, u-boot@lists.denx.de Subject: [RFC 04/14] efi_loader: correct a definition of struct efi_capsule_header Date: Tue, 17 Mar 2020 11:12:37 +0900 Message-Id: <20200317021247.5849-5-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200317021247.5849-1-takahiro.akashi@linaro.org> References: <20200317021247.5849-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean See UEFI specification, section 8.5.3. In addition, the structure, efi_capsule_header, should be "packed" as it is a serialized binary format in a capsule file. Signed-off-by: AKASHI Takahiro Reviewed-by: Heinrich Schuchardt --- include/efi_api.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/efi_api.h b/include/efi_api.h index a99cc7acc475..4040c44855fa 100644 --- a/include/efi_api.h +++ b/include/efi_api.h @@ -218,11 +218,11 @@ enum efi_reset_type { #define CAPSULE_FLAGS_INITIATE_RESET 0x00040000 struct efi_capsule_header { - efi_guid_t *capsule_guid; + efi_guid_t capsule_guid; u32 header_size; u32 flags; u32 capsule_image_size; -}; +} __packed; #define EFI_RT_SUPPORTED_GET_TIME 0x0001 #define EFI_RT_SUPPORTED_SET_TIME 0x0002