From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::244; helo=mail-wr0-x244.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x244.google.com (mail-wr0-x244.google.com [IPv6:2a00:1450:400c:c0c::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5E9552217CE4B for ; Fri, 15 Dec 2017 08:54:48 -0800 (PST) Received: by mail-wr0-x244.google.com with SMTP id k61so8600111wrc.4 for ; Fri, 15 Dec 2017 08:59:30 -0800 (PST) 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; bh=tdhDyUB/mi/67RvaAuCUrWgsgleonhHPagHrhrlXyc0=; b=D4azB7CPG6iJ7Nb5E0S2367YCKvaqcGmfT46ieMsxkViQTbOddhRhJXAwyKb9E7nyw 4LxPBPsuSJnhvKu+/oVPQgfVbyZQZ4Vsn+t6jaZY9lPQ6IeK2teLgWKhV4lerF/SESQZ Ef4IPrNT0L5qJPhID0H2hD0VisvTqTmBlo6Ks= 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=tdhDyUB/mi/67RvaAuCUrWgsgleonhHPagHrhrlXyc0=; b=qiVnpIi9Xjf7ZyYg2sJM8g14jzMXh7TiP/G5z/5/aTMRMvbpPk7FdCGix7NFB/2/qm V0cVg0eiA1Culgbl1DndeVEQ5FHzeY9ab/nY80rb75BMJy1yJjhd89qibN5ynldv8EIk T+e4cfGqJE6TyoGb7RtHUF+Nsw+KPqisC5HoSAO/B6b4/Y6ipaOw1pKP6cs/ewEdKfGk g11HMiMw0hN9SEtySKHltnWkMKTTN4pNQ/3F9uR2dM1BsM6W9DcSak5o31SpD96hnp2Y yJJ3T33yjJbmdWxw+rv8bHOF62g9dxNSiUsjHureT0xqePHYdFCGqjh5rUCW7yCpYdeE DNwg== X-Gm-Message-State: AKGB3mJNVx4EhYAqfcUwtOwnLtcsL8YjOTpBtXghCWJv6FKAKWx6bE8B PlWiHxs1q0r0cb46xgycWaJKw176Q1g= X-Google-Smtp-Source: ACJfBotXwiuZFtrvo0ztmXD8duj9gfOfyl3/jfQ07FiHabTDk4Zu/4J2AuHNvsl6p3jhiRSmlr6sDg== X-Received: by 10.223.182.73 with SMTP id i9mr1813980wre.113.1513357169009; Fri, 15 Dec 2017 08:59:29 -0800 (PST) Received: from vanye.hemma.eciton.net (cpc92316-cmbg19-2-0-cust118.5-4.cable.virginm.net. [82.12.0.119]) by smtp.gmail.com with ESMTPSA id f18sm4570440wrg.66.2017.12.15.08.59.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Dec 2017 08:59:27 -0800 (PST) From: Leif Lindholm To: edk2-devel@lists.01.org Cc: Michael D Kinney , Liming Gao Date: Fri, 15 Dec 2017 16:59:23 +0000 Message-Id: <20171215165925.12306-2-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171215165925.12306-1-leif.lindholm@linaro.org> References: <20171215165925.12306-1-leif.lindholm@linaro.org> Subject: [PATCH v2 1/3] MdePkg: restrict UefiMultiPhase.h contents if VFRCOMPILE defined X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 16:54:48 -0000 Turns out all .vfr files in the tree interacting with DynamicPcds manually copy the same set of EFI_VARIABLE_* definitions, since the rest of UefiMultiPhase.h is incompatible with VfrCompile. Instead, reshuffle these definitions to the start of the file, and put the rest of the file behind #ifndef VFRCOMPILE to permit direct inclusion in .vfr source files. Cc: Michael D Kinney Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm --- MdePkg/Include/Uefi/UefiMultiPhase.h | 44 ++++++++++---------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/MdePkg/Include/Uefi/UefiMultiPhase.h b/MdePkg/Include/Uefi/UefiMultiPhase.h index 0dcbb1b9ee..67ecc4c27c 100644 --- a/MdePkg/Include/Uefi/UefiMultiPhase.h +++ b/MdePkg/Include/Uefi/UefiMultiPhase.h @@ -15,6 +15,28 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __UEFI_MULTIPHASE_H__ #define __UEFI_MULTIPHASE_H__ +/// +/// Attributes of variable. +/// +#define EFI_VARIABLE_NON_VOLATILE 0x00000001 +#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002 +#define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004 +/// +/// This attribute is identified by the mnemonic 'HR' +/// elsewhere in this specification. +/// +#define EFI_VARIABLE_HARDWARE_ERROR_RECORD 0x00000008 +/// +/// Attributes of Authenticated Variable +/// +#define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS 0x00000020 +#define EFI_VARIABLE_APPEND_WRITE 0x00000040 +/// +/// NOTE: EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS is deprecated and should be considered reserved. +/// +#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 0x00000010 + +#ifndef VFRCOMPILE #include /// /// Enumeration of memory types introduced in UEFI. @@ -156,27 +178,6 @@ typedef struct { } EFI_TABLE_HEADER; /// -/// Attributes of variable. -/// -#define EFI_VARIABLE_NON_VOLATILE 0x00000001 -#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002 -#define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004 -/// -/// This attribute is identified by the mnemonic 'HR' -/// elsewhere in this specification. -/// -#define EFI_VARIABLE_HARDWARE_ERROR_RECORD 0x00000008 -/// -/// Attributes of Authenticated Variable -/// -#define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS 0x00000020 -#define EFI_VARIABLE_APPEND_WRITE 0x00000040 -/// -/// NOTE: EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS is deprecated and should be considered reserved. -/// -#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 0x00000010 - -/// /// AuthInfo is a WIN_CERTIFICATE using the wCertificateType /// WIN_CERTIFICATE_UEFI_GUID and the CertType /// EFI_CERT_TYPE_RSA2048_SHA256_GUID. If the attribute specifies @@ -229,5 +230,6 @@ typedef struct { /// WIN_CERTIFICATE_UEFI_GUID AuthInfo; } EFI_VARIABLE_AUTHENTICATION_2; +#endif // VFRCOMPILE #endif -- 2.11.0