Re: [edk2] [PATCH 1/2] MdeModulePkg: Add BS+RT+AT variable attribute definition
Reviewed-by: Siyuan Fu-Original Message- From: Zhang, Chao B Sent: Friday, January 29, 2016 2:18 PM To: edk2-de...@ml01.01.org Cc: Zeng, Star ; Fu, Siyuan ; Zhang, Chao B Subject: [PATCH 1/2] MdeModulePkg: Add BS+RT+AT variable attribute definition Add BS+RT+AT variable attribute definition. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang --- MdeModulePkg/Include/Guid/VariableFormat.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Include/Guid/VariableFormat.h b/MdeModulePkg/Include/Guid/VariableFormat.h index 5fa75e6..ce71aab 100644 --- a/MdeModulePkg/Include/Guid/VariableFormat.h +++ b/MdeModulePkg/Include/Guid/VariableFormat.h @@ -2,7 +2,7 @@ The variable data structures are related to EDK II-specific implementation of UEFI variables. VariableFormat.h defines variable data headers and variable storage region headers. -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved. +Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at @@ -116,6 +116,7 @@ typedef struct { #define VARIABLE_ATTRIBUTE_NV_BS(EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS) #define VARIABLE_ATTRIBUTE_BS_RT(EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS) #define VARIABLE_ATTRIBUTE_AT_AW (EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS | EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS) +#define VARIABLE_ATTRIBUTE_BS_RT_AT (VARIABLE_ATTRIBUTE_BS_RT | EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) #define VARIABLE_ATTRIBUTE_NV_BS_RT (VARIABLE_ATTRIBUTE_BS_RT | EFI_VARIABLE_NON_VOLATILE) #define VARIABLE_ATTRIBUTE_NV_BS_RT_HR (VARIABLE_ATTRIBUTE_NV_BS_RT | EFI_VARIABLE_HARDWARE_ERROR_RECORD) #define VARIABLE_ATTRIBUTE_NV_BS_RT_AT (VARIABLE_ATTRIBUTE_NV_BS_RT | EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [patch] MdePkg: Add ACPI6.1 definition.
Reviewed-by: Liming Gao-Original Message- From: Yao, Jiewen Sent: Friday, January 29, 2016 12:44 PM To: edk2-de...@ml01.01.org Cc: Yao, Jiewen; Gao, Liming Subject: [patch] MdePkg: Add ACPI6.1 definition. Add ACPI 6.1 definitions from the ACPI Specification Revision 6.1 January, 2016. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" Cc: "Gao, Liming" --- MdePkg/Include/IndustryStandard/Acpi61.h | 2375 ++ 1 file changed, 2375 insertions(+) create mode 100644 MdePkg/Include/IndustryStandard/Acpi61.h diff --git a/MdePkg/Include/IndustryStandard/Acpi61.h b/MdePkg/Include/IndustryStandard/Acpi61.h new file mode 100644 index 000..c68f140 --- /dev/null +++ b/MdePkg/Include/IndustryStandard/Acpi61.h @@ -0,0 +1,2375 @@ +/** @file + ACPI 6.1 definitions from the ACPI Specification Revision 6.1 January, 2016. + + Copyright (c) 2016, Intel Corporation. All rights reserved. + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +**/ + +#ifndef _ACPI_6_1_H_ +#define _ACPI_6_1_H_ + +#include + +// +// Ensure proper structure formats +// +#pragma pack(1) + +/// +/// ACPI 6.1 Generic Address Space definition +/// +typedef struct { + UINT8 AddressSpaceId; + UINT8 RegisterBitWidth; + UINT8 RegisterBitOffset; + UINT8 AccessSize; + UINT64 Address; +} EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE; + +// +// Generic Address Space Address IDs +// +#define EFI_ACPI_6_1_SYSTEM_MEMORY 0 +#define EFI_ACPI_6_1_SYSTEM_IO 1 +#define EFI_ACPI_6_1_PCI_CONFIGURATION_SPACE2 +#define EFI_ACPI_6_1_EMBEDDED_CONTROLLER3 +#define EFI_ACPI_6_1_SMBUS 4 +#define EFI_ACPI_6_1_PLATFORM_COMMUNICATION_CHANNEL 0x0A +#define EFI_ACPI_6_1_FUNCTIONAL_FIXED_HARDWARE 0x7F + +// +// Generic Address Space Access Sizes +// +#define EFI_ACPI_6_1_UNDEFINED 0 +#define EFI_ACPI_6_1_BYTE 1 +#define EFI_ACPI_6_1_WORD 2 +#define EFI_ACPI_6_1_DWORD 3 +#define EFI_ACPI_6_1_QWORD 4 + +// +// ACPI 6.1 table structures +// + +/// +/// Root System Description Pointer Structure +/// +typedef struct { + UINT64 Signature; + UINT8 Checksum; + UINT8 OemId[6]; + UINT8 Revision; + UINT32 RsdtAddress; + UINT32 Length; + UINT64 XsdtAddress; + UINT8 ExtendedChecksum; + UINT8 Reserved[3]; +} EFI_ACPI_6_1_ROOT_SYSTEM_DESCRIPTION_POINTER; + +/// +/// RSD_PTR Revision (as defined in ACPI 6.1 spec.) +/// +#define EFI_ACPI_6_1_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 6.1) says current value is 2 + +/// +/// Common table header, this prefaces all ACPI tables, including FACS, but +/// excluding the RSD PTR structure +/// +typedef struct { + UINT32 Signature; + UINT32 Length; +} EFI_ACPI_6_1_COMMON_HEADER; + +// +// Root System Description Table +// No definition needed as it is a common description table header, the same with +// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers. +// + +/// +/// RSDT Revision (as defined in ACPI 6.1 spec.) +/// +#define EFI_ACPI_6_1_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 + +// +// Extended System Description Table +// No definition needed as it is a common description table header, the same with +// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers. +// + +/// +/// XSDT Revision (as defined in ACPI 6.1 spec.) +/// +#define EFI_ACPI_6_1_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 + +/// +/// Fixed ACPI Description Table Structure (FADT) +/// +typedef struct { + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 FirmwareCtrl; + UINT32 Dsdt; + UINT8 Reserved0; + UINT8 PreferredPmProfile; + UINT16 SciInt; + UINT32 SmiCmd; + UINT8 AcpiEnable; + UINT8 AcpiDisable; + UINT8 S4BiosReq; + UINT8 PstateCnt; + UINT32 Pm1aEvtBlk; + UINT32 Pm1bEvtBlk; + UINT32 Pm1aCntBlk; + UINT32 Pm1bCntBlk; + UINT32
Re: [edk2] [PATCH 1/2] MdeModulePkg: Add BS+RT+AT variable attribute definition
Reviewed-by: Star Zeng-Original Message- From: Zhang, Chao B Sent: Friday, January 29, 2016 2:18 PM To: edk2-de...@ml01.01.org Cc: Zeng, Star; Fu, Siyuan; Zhang, Chao B Subject: [PATCH 1/2] MdeModulePkg: Add BS+RT+AT variable attribute definition Add BS+RT+AT variable attribute definition. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang --- MdeModulePkg/Include/Guid/VariableFormat.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Include/Guid/VariableFormat.h b/MdeModulePkg/Include/Guid/VariableFormat.h index 5fa75e6..ce71aab 100644 --- a/MdeModulePkg/Include/Guid/VariableFormat.h +++ b/MdeModulePkg/Include/Guid/VariableFormat.h @@ -2,7 +2,7 @@ The variable data structures are related to EDK II-specific implementation of UEFI variables. VariableFormat.h defines variable data headers and variable storage region headers. -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved. +Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at @@ -116,6 +116,7 @@ typedef struct { #define VARIABLE_ATTRIBUTE_NV_BS(EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS) #define VARIABLE_ATTRIBUTE_BS_RT(EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS) #define VARIABLE_ATTRIBUTE_AT_AW (EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS | EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS) +#define VARIABLE_ATTRIBUTE_BS_RT_AT (VARIABLE_ATTRIBUTE_BS_RT | EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) #define VARIABLE_ATTRIBUTE_NV_BS_RT (VARIABLE_ATTRIBUTE_BS_RT | EFI_VARIABLE_NON_VOLATILE) #define VARIABLE_ATTRIBUTE_NV_BS_RT_HR (VARIABLE_ATTRIBUTE_NV_BS_RT | EFI_VARIABLE_HARDWARE_ERROR_RECORD) #define VARIABLE_ATTRIBUTE_NV_BS_RT_AT (VARIABLE_ATTRIBUTE_NV_BS_RT | EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 2/2] SecurityPkg: AuthVariableLib: Add new cert database for volatile time based Auth variable
All right, the patch is good to me. Reviewed-by: Siyuan Fu-Original Message- From: Zhang, Chao B Sent: Friday, January 29, 2016 3:10 PM To: Fu, Siyuan ; edk2-de...@ml01.01.org Cc: Zeng, Star Subject: RE: [PATCH 2/2] SecurityPkg: AuthVariableLib: Add new cert database for volatile time based Auth variable Siyuan: You are correct. CleanCertsFromDb is dedicated for NV time based variable. The change is just to cooperate DeleteCertsFromDb interface change. Thanks & Best regards Chao Zhang -Original Message- From: Fu, Siyuan Sent: Friday, January 29, 2016 3:06 PM To: Zhang, Chao B; edk2-de...@ml01.01.org Cc: Zeng, Star Subject: RE: [PATCH 2/2] SecurityPkg: AuthVariableLib: Add new cert database for volatile time based Auth variable Hi, Chao The changes for CleanCertsFromDb() function seems unnecessary, Certdbv is a volatile variable so it doesn't need clean up logic on system crash. Other parts are good for me. Reviewed-by: Siyuan Fu -Original Message- From: Zhang, Chao B Sent: Friday, January 29, 2016 2:18 PM To: edk2-de...@ml01.01.org Cc: Zeng, Star ; Fu, Siyuan ; Zhang, Chao B Subject: [PATCH 2/2] SecurityPkg: AuthVariableLib: Add new cert database for volatile time based Auth variable Add a new cert data base "certdbv" to store signer certs for volatile time based Auth variable. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang --- SecurityPkg/Library/AuthVariableLib/AuthService.c | 144 ++--- .../Library/AuthVariableLib/AuthServiceInternal.h | 22 ++-- .../Library/AuthVariableLib/AuthVariableLib.c | 32 - .../Library/AuthVariableLib/AuthVariableLib.inf| 4 +- SecurityPkg/SecurityPkg.dec| 2 +- 5 files changed, 146 insertions(+), 58 deletions(-) diff --git a/SecurityPkg/Library/AuthVariableLib/AuthService.c b/SecurityPkg/Library/AuthVariableLib/AuthService.c index 1c5c2f3..f11b868 100644 --- a/SecurityPkg/Library/AuthVariableLib/AuthService.c +++ b/SecurityPkg/Library/AuthVariableLib/AuthService.c @@ -18,7 +18,7 @@ They will do basic validation for authentication data structure, then call crypto library to verify the signature. -Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved. +Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -2190,7 +2190,7 @@ ProcessVariable ( IN EFI_GUID *VendorGuid, IN VOID *Data, IN UINTN DataSize, - IN UINT32 Attributes OPTIONAL + IN UINT32 Attributes ) { EFI_STATUS Status; @@ -2231,7 +2231,7 @@ ProcessVariable ( 0 ); if (!EFI_ERROR (Status) && ((Attributes & EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) != 0)) { - Status = DeleteCertsFromDb (VariableName, VendorGuid); + Status = DeleteCertsFromDb (VariableName, VendorGuid, + Attributes); } return Status; @@ -2544,9 +2544,9 @@ AuthServiceInternalCompareTimeStamp ( /** Find matching signer's certificates for common authenticated variable - by corresponding VariableName and VendorGuid from "certdb". + by corresponding VariableName and VendorGuid from "certdb" or "certdbv". - The data format of "certdb": + The data format of "certdb" or "certdbv": // // UINT32 CertDbListSize; // /// AUTH_CERT_DB_DATA Certs1[]; @@ -2557,8 +2557,8 @@ AuthServiceInternalCompareTimeStamp ( @param[in] VariableName Name of authenticated Variable. @param[in] VendorGuid Vendor GUID of authenticated Variable. - @param[in] Data Pointer to variable "certdb". - @param[in] DataSize Size of variable "certdb". + @param[in] Data Pointer to variable "certdb" or "certdbv". + @param[in] DataSize Size of variable "certdb" or "certdbv". @param[out] CertOffset Offset of matching CertData, from starting of Data. @param[out] CertDataSize Length of CertData in bytes. @param[out] CertNodeOffset Offset of matching AUTH_CERT_DB_DATA , from @@ -2665,15 +2665,17 @@ FindCertsFromDb ( /** Retrieve signer's certificates for common authenticated variable - by corresponding VariableName and VendorGuid from "certdb". + by corresponding VariableName and VendorGuid from "certdb" + or "certdbv" according to authenticated variable attributes. @param[in] VariableName Name of authenticated Variable. @param[in] VendorGuid Vendor
[edk2] [PATCH 1/2] MdeModulePkg: Add BS+RT+AT variable attribute definition
Add BS+RT+AT variable attribute definition. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang--- MdeModulePkg/Include/Guid/VariableFormat.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Include/Guid/VariableFormat.h b/MdeModulePkg/Include/Guid/VariableFormat.h index 5fa75e6..ce71aab 100644 --- a/MdeModulePkg/Include/Guid/VariableFormat.h +++ b/MdeModulePkg/Include/Guid/VariableFormat.h @@ -2,7 +2,7 @@ The variable data structures are related to EDK II-specific implementation of UEFI variables. VariableFormat.h defines variable data headers and variable storage region headers. -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved. +Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at @@ -116,6 +116,7 @@ typedef struct { #define VARIABLE_ATTRIBUTE_NV_BS(EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS) #define VARIABLE_ATTRIBUTE_BS_RT(EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS) #define VARIABLE_ATTRIBUTE_AT_AW (EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS | EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS) +#define VARIABLE_ATTRIBUTE_BS_RT_AT (VARIABLE_ATTRIBUTE_BS_RT | EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) #define VARIABLE_ATTRIBUTE_NV_BS_RT (VARIABLE_ATTRIBUTE_BS_RT | EFI_VARIABLE_NON_VOLATILE) #define VARIABLE_ATTRIBUTE_NV_BS_RT_HR (VARIABLE_ATTRIBUTE_NV_BS_RT | EFI_VARIABLE_HARDWARE_ERROR_RECORD) #define VARIABLE_ATTRIBUTE_NV_BS_RT_AT (VARIABLE_ATTRIBUTE_NV_BS_RT | EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH 2/2] SecurityPkg: AuthVariableLib: Add new cert database for volatile time based Auth variable
Add a new cert data base "certdbv" to store signer certs for volatile time based Auth variable. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang--- SecurityPkg/Library/AuthVariableLib/AuthService.c | 144 ++--- .../Library/AuthVariableLib/AuthServiceInternal.h | 22 ++-- .../Library/AuthVariableLib/AuthVariableLib.c | 32 - .../Library/AuthVariableLib/AuthVariableLib.inf| 4 +- SecurityPkg/SecurityPkg.dec| 2 +- 5 files changed, 146 insertions(+), 58 deletions(-) diff --git a/SecurityPkg/Library/AuthVariableLib/AuthService.c b/SecurityPkg/Library/AuthVariableLib/AuthService.c index 1c5c2f3..f11b868 100644 --- a/SecurityPkg/Library/AuthVariableLib/AuthService.c +++ b/SecurityPkg/Library/AuthVariableLib/AuthService.c @@ -18,7 +18,7 @@ They will do basic validation for authentication data structure, then call crypto library to verify the signature. -Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved. +Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -2190,7 +2190,7 @@ ProcessVariable ( IN EFI_GUID *VendorGuid, IN VOID *Data, IN UINTN DataSize, - IN UINT32 Attributes OPTIONAL + IN UINT32 Attributes ) { EFI_STATUS Status; @@ -2231,7 +2231,7 @@ ProcessVariable ( 0 ); if (!EFI_ERROR (Status) && ((Attributes & EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) != 0)) { - Status = DeleteCertsFromDb (VariableName, VendorGuid); + Status = DeleteCertsFromDb (VariableName, VendorGuid, Attributes); } return Status; @@ -2544,9 +2544,9 @@ AuthServiceInternalCompareTimeStamp ( /** Find matching signer's certificates for common authenticated variable - by corresponding VariableName and VendorGuid from "certdb". + by corresponding VariableName and VendorGuid from "certdb" or "certdbv". - The data format of "certdb": + The data format of "certdb" or "certdbv": // // UINT32 CertDbListSize; // /// AUTH_CERT_DB_DATA Certs1[]; @@ -2557,8 +2557,8 @@ AuthServiceInternalCompareTimeStamp ( @param[in] VariableName Name of authenticated Variable. @param[in] VendorGuid Vendor GUID of authenticated Variable. - @param[in] Data Pointer to variable "certdb". - @param[in] DataSize Size of variable "certdb". + @param[in] Data Pointer to variable "certdb" or "certdbv". + @param[in] DataSize Size of variable "certdb" or "certdbv". @param[out] CertOffset Offset of matching CertData, from starting of Data. @param[out] CertDataSize Length of CertData in bytes. @param[out] CertNodeOffset Offset of matching AUTH_CERT_DB_DATA , from @@ -2665,15 +2665,17 @@ FindCertsFromDb ( /** Retrieve signer's certificates for common authenticated variable - by corresponding VariableName and VendorGuid from "certdb". + by corresponding VariableName and VendorGuid from "certdb" + or "certdbv" according to authenticated variable attributes. @param[in] VariableName Name of authenticated Variable. @param[in] VendorGuid Vendor GUID of authenticated Variable. + @param[in] AttributesAttributes of authenticated variable. @param[out] CertData Pointer to signer's certificates. @param[out] CertDataSize Length of CertData in bytes. @retval EFI_INVALID_PARAMETER Any input parameter is invalid. - @retval EFI_NOT_FOUND Fail to find "certdb" or matching certs. + @retval EFI_NOT_FOUND Fail to find "certdb"/"certdbv" or matching certs. @retval EFI_SUCCESS Get signer's certificates successfully. **/ @@ -2681,6 +2683,7 @@ EFI_STATUS GetCertsFromDb ( IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, + IN UINT32 Attributes, OUTUINT8**CertData, OUTUINT32 *CertDataSize ) @@ -2689,16 +2692,30 @@ GetCertsFromDb ( UINT8 *Data; UINTN DataSize; UINT32 CertOffset; + CHAR16 *DbName; if ((VariableName == NULL) || (VendorGuid == NULL) || (CertData == NULL) || (CertDataSize == NULL)) { return EFI_INVALID_PARAMETER; } + + if ((Attributes & EFI_VARIABLE_NON_VOLATILE) != 0) { +// +// Get variable "certdb". +// +DbName = EFI_CERT_DB_NAME; + } else { +// +// Get variable "certdbv". +// +DbName = EFI_CERT_DB_VOLATILE_NAME; + } + // - // Get variable "certdb". + //
[edk2] [PATCH 0/2] Add new cert database for volatile time based variable
Add a new cert database "certdbv" for signer certs of volatile time based variable Zhang, Chao B (2): MdeModulePkg: Add BS+RT+AT variable attribute definition SecurityPkg: AuthVariableLib: Add new cert database for volatile time based Auth variable MdeModulePkg/Include/Guid/VariableFormat.h | 3 +- SecurityPkg/Library/AuthVariableLib/AuthService.c | 144 ++--- .../Library/AuthVariableLib/AuthServiceInternal.h | 22 ++-- .../Library/AuthVariableLib/AuthVariableLib.c | 32 - .../Library/AuthVariableLib/AuthVariableLib.inf| 4 +- SecurityPkg/SecurityPkg.dec| 2 +- 6 files changed, 148 insertions(+), 59 deletions(-) -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] SCT compilation failed with UEFI spec 2.5
Hi, I am using latest code from "UEFI-SCT-sct-next" git. Compilation command I am using is: ./SctPkg/build.sh AARCH64 GCC48 DEBUG EDK2: Author: Ard BiesheuvelDate: Fri Sep 4 10:02:43 2015 + ArmPlatformPkg/HdLcd: add missing LcdIdentify() Commit r18308 ("ArmPlatformPkg/LcdGraphicsOutputDxe: check PrimeCell ID before initializing") introduced a LcdIdentify() function to the PL111 LCD driver that makes it fail gracefully when executed on hardware that does not have the IP. However, the LcdGraphicsOutputDxe driver is shared with the HdLcd driver, which now fails to build due to the fact that it has no LcdIdentity() function. So add a dummy implementation that always returns EFI_SUCCESS. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18395 6f19259b-4bc3-4df7-8a09-765794883524 My edk2 repository is updated till above patch by Ard, and on above of this I have my SoC specific patches. I will send this email to u...@uefi.org for further discussion. Thanks for reply. Thanks & Regards, Meenakshi -Original Message- From: Jin, Eric [mailto:eric@intel.com] Sent: Friday, January 29, 2016 7:30 AM To: Supreeth Venkatesh ; Meenakshi Aggarwal ; edk2-devel@lists.01.org Subject: RE: SCT compilation failed with UEFI spec 2.5 Meenakshi, Could you please the more information about the build step and the SCT/EDK2 version? BTW, since SCT is not the open source project, please send email to u...@uefi.org for discussion. Best Regards Eric -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Supreeth Venkatesh Sent: Thursday, January 28, 2016 6:01 PM To: Meenakshi Aggarwal; edk2-devel@lists.01.org Subject: Re: [edk2] SCT compilation failed with UEFI spec 2.5 What is the SCT version that is being used? Is the latest master from git clone https://github.com/UEFI/UEFI-SCT.git being used? Thanks, Supreeth -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Meenakshi Aggarwal Sent: Thursday, January 28, 2016 3:34 AM To: edk2-devel@lists.01.org Subject: [edk2] SCT compilation failed with UEFI spec 2.5 Hi, I am facing following error while compiling SCT package: n file included from /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/MdePkg/Include/Uefi.h:24:0, from /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/Build/UefiSct/DEBUG_GCC48/AARCH64/SctPkg/TestInfrastructure/SCT/Framework/Sct/DEBUG/AutoGen.h:17, from :0: /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/MdePkg/Include/Uefi/UefiSpec.h:1768:0: warning: "EFI_SPECIFICATION_VERSION" redefined [enabled by default] #define EFI_SPECIFICATION_VERSION EFI_SYSTEM_TABLE_REVISION ^ :0:0: note: this is the location of the previous definition /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/SctPkg/TestInfrastructure/SCT/Framework/Core/Sct.c:66:1: warning: missing braces around initializer [-Wmissing-braces] EFI_GUID gEfiSystemHangAssertionGuid = EFI_SYSTEM_HANG_ASSERTION_GUID; ^ /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/SctPkg/TestInfrastructure/SCT/Framework/Core/Sct.c:66:1: warning: (near initialization for 'gEfiSystemHangAssertionGuid.Data4') [-Wmissing-braces] /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/SctPkg/TestInfrastructure/SCT/Framework/Core/Sct.c: In function 'PrintUsage': /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/SctPkg/TestInfrastructure/SCT/Framework/Core/Sct.c:226:5: error: 'EFI_SCT_NAME' undeclared (first use in this function) EFI_SCT_NAME, ^ /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/SctPkg/TestInfrastructure/SCT/Framework/Core/Sct.c:226:5: note: each undeclared identifier is reported only once for each function it appears in make: *** [/proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/Build/UefiSct/DEBUG_GCC48/AARCH64/SctPkg/TestInfrastructure/SCT/Framework/Sct/OUTPUT/Core/Sct.obj] Error 1 Kindly help on what is the issue. Thanks & Regards, Meenakshi ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. ___ edk2-devel mailing list
[edk2] [Patch 1/2] BaseTools/GenFw: Exit with error when header lookup fails
This patch revises GetPhdrByIndex and GetShdrByIndex to cause GenFw to exit with an error message when a section header lookup fails. The current behavior of those functions in such circumstances is to return NULL, which can cause GenFw to subsequently fault when it attempts to dereference the null pointer. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael LeMayReviewed-by: Yonghong Zhu --- BaseTools/Source/C/GenFw/Elf32Convert.c | 10 +++--- BaseTools/Source/C/GenFw/Elf64Convert.c | 7 +-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c b/BaseTools/Source/C/GenFw/Elf32Convert.c index eede645..dfd8bec 100644 --- a/BaseTools/Source/C/GenFw/Elf32Convert.c +++ b/BaseTools/Source/C/GenFw/Elf32Convert.c @@ -189,23 +189,27 @@ STATIC Elf_Shdr* GetShdrByIndex ( UINT32 Num ) { - if (Num >= mEhdr->e_shnum) -return NULL; + if (Num >= mEhdr->e_shnum) { +Error (NULL, 0, 3000, "Invalid", "GetShdrByIndex: Index %u is too high.", Num); +exit(EXIT_FAILURE); + } + return (Elf_Shdr*)((UINT8*)mShdrBase + Num * mEhdr->e_shentsize); } STATIC Elf_Phdr* GetPhdrByIndex ( UINT32 num ) { if (num >= mEhdr->e_phnum) { -return NULL; +Error (NULL, 0, 3000, "Invalid", "GetPhdrByIndex: Index %u is too high.", num); +exit(EXIT_FAILURE); } return (Elf_Phdr *)((UINT8*)mPhdrBase + num * mEhdr->e_phentsize); } diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c b/BaseTools/Source/C/GenFw/Elf64Convert.c index 90d80a2..3b55afa 100644 --- a/BaseTools/Source/C/GenFw/Elf64Convert.c +++ b/BaseTools/Source/C/GenFw/Elf64Convert.c @@ -195,12 +195,15 @@ STATIC Elf_Shdr* GetShdrByIndex ( UINT32 Num ) { - if (Num >= mEhdr->e_shnum) -return NULL; + if (Num >= mEhdr->e_shnum) { +Error (NULL, 0, 3000, "Invalid", "GetShdrByIndex: Index %u is too high.", Num); +exit(EXIT_FAILURE); + } + return (Elf_Shdr*)((UINT8*)mShdrBase + Num * mEhdr->e_shentsize); } STATIC UINT32 -- 2.6.1.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 2/2] BaseTools/GenFw: Enhance error message for bad symbol definitions
This patch expands the error message that is output when GenFw encounters a bad symbol definition or an unsupported symbol type. It displays the symbol name, the symbol address, and a message that describes both possibilities (bad symbol definition or unsupported symbol type). It also provides two examples of unsupported symbol types. Furthermore, this patch revises the conditional for detecting bad symbol definitions to eliminate a redundant test (a Sym->st_shndx value of SHN_ABS should certainly be greater than mEhdr->e_shnum) and to change another test from 'Sym->st_shndx > mEhdr->e_shnum' to 'Sym->st_shndx >= mEhdr->e_shnum' for consistency with the test in GetShdrByIndex. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael LeMayReviewed-by: Yonghong Zhu --- BaseTools/Source/C/GenFw/Elf32Convert.c | 62 +++-- BaseTools/Source/C/GenFw/Elf64Convert.c | 62 +++-- BaseTools/Source/C/GenFw/ElfConvert.h | 1 + 3 files changed, 119 insertions(+), 6 deletions(-) diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c b/BaseTools/Source/C/GenFw/Elf32Convert.c index dfd8bec..a842ceb 100644 --- a/BaseTools/Source/C/GenFw/Elf32Convert.c +++ b/BaseTools/Source/C/GenFw/Elf32Convert.c @@ -264,10 +264,57 @@ IsDataShdr ( return FALSE; } return (BOOLEAN) (Shdr->sh_flags & (SHF_WRITE | SHF_ALLOC)) == (SHF_ALLOC | SHF_WRITE); } +STATIC +BOOLEAN +IsStrtabShdr ( + Elf_Shdr *Shdr + ) +{ + Elf_Shdr *Namedr = GetShdrByIndex(mEhdr->e_shstrndx); + + return (BOOLEAN) (strcmp((CHAR8*)mEhdr + Namedr->sh_offset + Shdr->sh_name, ELF_STRTAB_SECTION_NAME) == 0); +} + +STATIC +Elf_Shdr * +FindStrtabShdr ( + VOID + ) +{ + UINT32 i; + for (i = 0; i < mEhdr->e_shnum; i++) { +Elf_Shdr *shdr = GetShdrByIndex(i); +if (IsStrtabShdr(shdr)) { + return shdr; +} + } + return NULL; +} + +STATIC +const UINT8 * +GetSymName ( + Elf_Sym *Sym + ) +{ + if (Sym->st_name == 0) { +return NULL; + } + + Elf_Shdr *StrtabShdr = FindStrtabShdr(); + if (StrtabShdr == NULL) { +return NULL; + } + + assert(Sym->st_name < StrtabShdr->sh_size); + + return (UINT8*)mEhdr + StrtabShdr->sh_offset + Sym->st_name; +} + // // Elf functions interface implementation // STATIC @@ -669,13 +716,22 @@ WriteSections32 ( // // Check section header index found in symbol table and get the section // header location. // if (Sym->st_shndx == SHN_UNDEF -|| Sym->st_shndx == SHN_ABS -|| Sym->st_shndx > mEhdr->e_shnum) { - Error (NULL, 0, 3000, "Invalid", "%s bad symbol definition.", mInImageName); +|| Sym->st_shndx >= mEhdr->e_shnum) { + const UINT8 *SymName = GetSymName(Sym); + if (SymName == NULL) { +SymName = (const UINT8 *)""; + } + + Error (NULL, 0, 3000, "Invalid", + "%s: Bad definition for symbol '%s'@%p or unsupported symbol type. " + "For example, absolute and undefined symbols are not supported.", + mInImageName, SymName, Sym->st_value); + + exit(EXIT_FAILURE); } SymShdr = GetShdrByIndex(Sym->st_shndx); // // Convert the relocation data to a pointer into the coff file. diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c b/BaseTools/Source/C/GenFw/Elf64Convert.c index 3b55afa..fad270c 100644 --- a/BaseTools/Source/C/GenFw/Elf64Convert.c +++ b/BaseTools/Source/C/GenFw/Elf64Convert.c @@ -256,10 +256,57 @@ IsDataShdr ( return FALSE; } return (BOOLEAN) (Shdr->sh_flags & (SHF_WRITE | SHF_ALLOC)) == (SHF_ALLOC | SHF_WRITE); } +STATIC +BOOLEAN +IsStrtabShdr ( + Elf_Shdr *Shdr + ) +{ + Elf_Shdr *Namedr = GetShdrByIndex(mEhdr->e_shstrndx); + + return (BOOLEAN) (strcmp((CHAR8*)mEhdr + Namedr->sh_offset + Shdr->sh_name, ELF_STRTAB_SECTION_NAME) == 0); +} + +STATIC +Elf_Shdr * +FindStrtabShdr ( + VOID + ) +{ + UINT32 i; + for (i = 0; i < mEhdr->e_shnum; i++) { +Elf_Shdr *shdr = GetShdrByIndex(i); +if (IsStrtabShdr(shdr)) { + return shdr; +} + } + return NULL; +} + +STATIC +const UINT8 * +GetSymName ( + Elf_Sym *Sym + ) +{ + if (Sym->st_name == 0) { +return NULL; + } + + Elf_Shdr *StrtabShdr = FindStrtabShdr(); + if (StrtabShdr == NULL) { +return NULL; + } + + assert(Sym->st_name < StrtabShdr->sh_size); + + return (UINT8*)mEhdr + StrtabShdr->sh_offset + Sym->st_name; +} + // // Elf functions interface implementation // STATIC @@ -665,13 +712,22 @@ WriteSections64 ( // // Check section header index found in symbol table and get the section // header location. // if (Sym->st_shndx == SHN_UNDEF -|| Sym->st_shndx == SHN_ABS -|| Sym->st_shndx > mEhdr->e_shnum) { - Error (NULL, 0, 3000, "Invalid", "%s bad symbol
[edk2] [Patch 0/2] BaseTools/GenFw: improve error messages and fix some bugs
These patches improve GenFw's error messages and fix some bugs. Yonghong Zhu (2): BaseTools/GenFw: Exit with error when header lookup fails BaseTools/GenFw: Enhance error message for bad symbol definitions BaseTools/Source/C/GenFw/Elf32Convert.c | 72 ++--- BaseTools/Source/C/GenFw/Elf64Convert.c | 69 --- BaseTools/Source/C/GenFw/ElfConvert.h | 1 + 3 files changed, 131 insertions(+), 11 deletions(-) -- 2.6.1.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [patch] MdePkg: Update Acpi.h to include 6.1.
Reviewed-by: Liming Gao-Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of jiewen yao Sent: Friday, January 29, 2016 1:40 PM To: edk2-de...@ml01.01.org Cc: Yao, Jiewen; Gao, Liming Subject: [edk2] [patch] MdePkg: Update Acpi.h to include 6.1. Update Acpi.h to include latest Acpi6.1 header file. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" Cc: "Gao, Liming" --- MdePkg/Include/IndustryStandard/Acpi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdePkg/Include/IndustryStandard/Acpi.h b/MdePkg/Include/IndustryStandard/Acpi.h index be91b0f..ad8504a 100644 --- a/MdePkg/Include/IndustryStandard/Acpi.h +++ b/MdePkg/Include/IndustryStandard/Acpi.h @@ -2,7 +2,7 @@ This file contains the latest ACPI definitions that are consumed by drivers that do not care about ACPI versions. - Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved. + Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -16,6 +16,6 @@ #ifndef _ACPI_H_ #define _ACPI_H_ -#include +#include #endif -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 2/2] SecurityPkg: AuthVariableLib: Add new cert database for volatile time based Auth variable
Hi, Chao The changes for CleanCertsFromDb() function seems unnecessary, Certdbv is a volatile variable so it doesn't need clean up logic on system crash. Other parts are good for me. Reviewed-by: Siyuan Fu-Original Message- From: Zhang, Chao B Sent: Friday, January 29, 2016 2:18 PM To: edk2-de...@ml01.01.org Cc: Zeng, Star ; Fu, Siyuan ; Zhang, Chao B Subject: [PATCH 2/2] SecurityPkg: AuthVariableLib: Add new cert database for volatile time based Auth variable Add a new cert data base "certdbv" to store signer certs for volatile time based Auth variable. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang --- SecurityPkg/Library/AuthVariableLib/AuthService.c | 144 ++--- .../Library/AuthVariableLib/AuthServiceInternal.h | 22 ++-- .../Library/AuthVariableLib/AuthVariableLib.c | 32 - .../Library/AuthVariableLib/AuthVariableLib.inf| 4 +- SecurityPkg/SecurityPkg.dec| 2 +- 5 files changed, 146 insertions(+), 58 deletions(-) diff --git a/SecurityPkg/Library/AuthVariableLib/AuthService.c b/SecurityPkg/Library/AuthVariableLib/AuthService.c index 1c5c2f3..f11b868 100644 --- a/SecurityPkg/Library/AuthVariableLib/AuthService.c +++ b/SecurityPkg/Library/AuthVariableLib/AuthService.c @@ -18,7 +18,7 @@ They will do basic validation for authentication data structure, then call crypto library to verify the signature. -Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved. +Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -2190,7 +2190,7 @@ ProcessVariable ( IN EFI_GUID *VendorGuid, IN VOID *Data, IN UINTN DataSize, - IN UINT32 Attributes OPTIONAL + IN UINT32 Attributes ) { EFI_STATUS Status; @@ -2231,7 +2231,7 @@ ProcessVariable ( 0 ); if (!EFI_ERROR (Status) && ((Attributes & EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) != 0)) { - Status = DeleteCertsFromDb (VariableName, VendorGuid); + Status = DeleteCertsFromDb (VariableName, VendorGuid, + Attributes); } return Status; @@ -2544,9 +2544,9 @@ AuthServiceInternalCompareTimeStamp ( /** Find matching signer's certificates for common authenticated variable - by corresponding VariableName and VendorGuid from "certdb". + by corresponding VariableName and VendorGuid from "certdb" or "certdbv". - The data format of "certdb": + The data format of "certdb" or "certdbv": // // UINT32 CertDbListSize; // /// AUTH_CERT_DB_DATA Certs1[]; @@ -2557,8 +2557,8 @@ AuthServiceInternalCompareTimeStamp ( @param[in] VariableName Name of authenticated Variable. @param[in] VendorGuid Vendor GUID of authenticated Variable. - @param[in] Data Pointer to variable "certdb". - @param[in] DataSize Size of variable "certdb". + @param[in] Data Pointer to variable "certdb" or "certdbv". + @param[in] DataSize Size of variable "certdb" or "certdbv". @param[out] CertOffset Offset of matching CertData, from starting of Data. @param[out] CertDataSize Length of CertData in bytes. @param[out] CertNodeOffset Offset of matching AUTH_CERT_DB_DATA , from @@ -2665,15 +2665,17 @@ FindCertsFromDb ( /** Retrieve signer's certificates for common authenticated variable - by corresponding VariableName and VendorGuid from "certdb". + by corresponding VariableName and VendorGuid from "certdb" + or "certdbv" according to authenticated variable attributes. @param[in] VariableName Name of authenticated Variable. @param[in] VendorGuid Vendor GUID of authenticated Variable. + @param[in] AttributesAttributes of authenticated variable. @param[out] CertData Pointer to signer's certificates. @param[out] CertDataSize Length of CertData in bytes. @retval EFI_INVALID_PARAMETER Any input parameter is invalid. - @retval EFI_NOT_FOUND Fail to find "certdb" or matching certs. + @retval EFI_NOT_FOUND Fail to find "certdb"/"certdbv" or matching certs. @retval EFI_SUCCESS Get signer's certificates successfully. **/ @@ -2681,6 +2683,7 @@ EFI_STATUS GetCertsFromDb ( IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, + IN UINT32 Attributes, OUTUINT8**CertData, OUTUINT32 *CertDataSize ) @@ -2689,16 +2692,30 @@ GetCertsFromDb (
Re: [edk2] [patch 1/2] MdePkg:Add a new error status code EFI_HTTP_ERROR.
Reviewed-by: Ye Ting-Original Message- From: Zhang, Lubo Sent: Wednesday, January 27, 2016 3:26 PM To: edk2-devel@lists.01.org Cc: Ye, Ting; Fu, Siyuan; Gao, Liming Subject: [patch 1/2] MdePkg:Add a new error status code EFI_HTTP_ERROR. Add a new error status code EFI_HTTP_ERROR in corresponding with the UEFI 2.6 spec Cc: Ye Ting Cc: Fu Siyuan Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo --- MdePkg/Include/Base.h | 5 + MdePkg/Include/Uefi/UefiBaseType.h | 1 + 2 files changed, 6 insertions(+) diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index 85ed34f..174a32e 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include/Base.h @@ -939,10 +939,15 @@ typedef UINTN RETURN_STATUS; /// security status. /// #define RETURN_COMPROMISED_DATA ENCODE_ERROR (33) /// +/// A HTTP error occurred during the network operation. +/// +#define RETURN_HTTP_ERRORENCODE_ERROR (35) + +/// /// The string contained one or more characters that /// the device could not render and were skipped. /// #define RETURN_WARN_UNKNOWN_GLYPHENCODE_WARNING (1) diff --git a/MdePkg/Include/Uefi/UefiBaseType.h b/MdePkg/Include/Uefi/UefiBaseType.h index b505e7d..3c75764 100644 --- a/MdePkg/Include/Uefi/UefiBaseType.h +++ b/MdePkg/Include/Uefi/UefiBaseType.h @@ -149,10 +149,11 @@ typedef union { #define EFI_CRC_ERROR RETURN_CRC_ERROR #define EFI_END_OF_MEDIA RETURN_END_OF_MEDIA #define EFI_END_OF_FILE RETURN_END_OF_FILE #define EFI_INVALID_LANGUAGE RETURN_INVALID_LANGUAGE #define EFI_COMPROMISED_DATA RETURN_COMPROMISED_DATA +#define EFI_HTTP_ERRORRETURN_HTTP_ERROR #define EFI_WARN_UNKNOWN_GLYPHRETURN_WARN_UNKNOWN_GLYPH #define EFI_WARN_DELETE_FAILURE RETURN_WARN_DELETE_FAILURE #define EFI_WARN_WRITE_FAILURERETURN_WARN_WRITE_FAILURE #define EFI_WARN_BUFFER_TOO_SMALL RETURN_WARN_BUFFER_TOO_SMALL -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 2/2] SecurityPkg: AuthVariableLib: Add new cert database for volatile time based Auth variable
Siyuan: You are correct. CleanCertsFromDb is dedicated for NV time based variable. The change is just to cooperate DeleteCertsFromDb interface change. Thanks & Best regards Chao Zhang -Original Message- From: Fu, Siyuan Sent: Friday, January 29, 2016 3:06 PM To: Zhang, Chao B; edk2-de...@ml01.01.org Cc: Zeng, Star Subject: RE: [PATCH 2/2] SecurityPkg: AuthVariableLib: Add new cert database for volatile time based Auth variable Hi, Chao The changes for CleanCertsFromDb() function seems unnecessary, Certdbv is a volatile variable so it doesn't need clean up logic on system crash. Other parts are good for me. Reviewed-by: Siyuan Fu-Original Message- From: Zhang, Chao B Sent: Friday, January 29, 2016 2:18 PM To: edk2-de...@ml01.01.org Cc: Zeng, Star ; Fu, Siyuan ; Zhang, Chao B Subject: [PATCH 2/2] SecurityPkg: AuthVariableLib: Add new cert database for volatile time based Auth variable Add a new cert data base "certdbv" to store signer certs for volatile time based Auth variable. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang --- SecurityPkg/Library/AuthVariableLib/AuthService.c | 144 ++--- .../Library/AuthVariableLib/AuthServiceInternal.h | 22 ++-- .../Library/AuthVariableLib/AuthVariableLib.c | 32 - .../Library/AuthVariableLib/AuthVariableLib.inf| 4 +- SecurityPkg/SecurityPkg.dec| 2 +- 5 files changed, 146 insertions(+), 58 deletions(-) diff --git a/SecurityPkg/Library/AuthVariableLib/AuthService.c b/SecurityPkg/Library/AuthVariableLib/AuthService.c index 1c5c2f3..f11b868 100644 --- a/SecurityPkg/Library/AuthVariableLib/AuthService.c +++ b/SecurityPkg/Library/AuthVariableLib/AuthService.c @@ -18,7 +18,7 @@ They will do basic validation for authentication data structure, then call crypto library to verify the signature. -Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved. +Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -2190,7 +2190,7 @@ ProcessVariable ( IN EFI_GUID *VendorGuid, IN VOID *Data, IN UINTN DataSize, - IN UINT32 Attributes OPTIONAL + IN UINT32 Attributes ) { EFI_STATUS Status; @@ -2231,7 +2231,7 @@ ProcessVariable ( 0 ); if (!EFI_ERROR (Status) && ((Attributes & EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) != 0)) { - Status = DeleteCertsFromDb (VariableName, VendorGuid); + Status = DeleteCertsFromDb (VariableName, VendorGuid, + Attributes); } return Status; @@ -2544,9 +2544,9 @@ AuthServiceInternalCompareTimeStamp ( /** Find matching signer's certificates for common authenticated variable - by corresponding VariableName and VendorGuid from "certdb". + by corresponding VariableName and VendorGuid from "certdb" or "certdbv". - The data format of "certdb": + The data format of "certdb" or "certdbv": // // UINT32 CertDbListSize; // /// AUTH_CERT_DB_DATA Certs1[]; @@ -2557,8 +2557,8 @@ AuthServiceInternalCompareTimeStamp ( @param[in] VariableName Name of authenticated Variable. @param[in] VendorGuid Vendor GUID of authenticated Variable. - @param[in] Data Pointer to variable "certdb". - @param[in] DataSize Size of variable "certdb". + @param[in] Data Pointer to variable "certdb" or "certdbv". + @param[in] DataSize Size of variable "certdb" or "certdbv". @param[out] CertOffset Offset of matching CertData, from starting of Data. @param[out] CertDataSize Length of CertData in bytes. @param[out] CertNodeOffset Offset of matching AUTH_CERT_DB_DATA , from @@ -2665,15 +2665,17 @@ FindCertsFromDb ( /** Retrieve signer's certificates for common authenticated variable - by corresponding VariableName and VendorGuid from "certdb". + by corresponding VariableName and VendorGuid from "certdb" + or "certdbv" according to authenticated variable attributes. @param[in] VariableName Name of authenticated Variable. @param[in] VendorGuid Vendor GUID of authenticated Variable. + @param[in] AttributesAttributes of authenticated variable. @param[out] CertData Pointer to signer's certificates. @param[out] CertDataSize Length of CertData in bytes. @retval EFI_INVALID_PARAMETER Any input parameter is invalid. - @retval EFI_NOT_FOUND Fail to find "certdb" or matching certs. + @retval
Re: [edk2] [Patch 1/2] QuarkPlatformPkg/PlatformInit: Clear memory based on TCG MOR request
Reviewed by: Kelly Steele-Original Message- From: Kinney, Michael D Sent: January 28, 2016 15:34 To: edk2-devel@lists.01.org Cc: Steele, Kelly ; Yao, Jiewen Subject: [Patch 1/2] QuarkPlatformPkg/PlatformInit: Clear memory based on TCG MOR request If TCG Memory Overwrite Request is set, then clear all memory available for use by an OS. An OS may optionally use embedded SRAM in Quark SoC X1000, so the embedded SRAM should is cleared too. TCG MOR requests are communicated through a UEFI variable. This module reads UEFI variable to check state of MOR request. Cc: Kelly Steele Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney --- .../Platform/Pei/PlatformInit/MemoryCallback.c | 51 +- .../Platform/Pei/PlatformInit/MrcWrapper.c | 41 - 2 files changed, 90 insertions(+), 2 deletions(-) diff --git a/QuarkPlatformPkg/Platform/Pei/PlatformInit/MemoryCallback.c b/QuarkPlatformPkg/Platform/Pei/PlatformInit/MemoryCallback.c index 728e2b1..b140b0d 100644 --- a/QuarkPlatformPkg/Platform/Pei/PlatformInit/MemoryCallback.c +++ b/QuarkPlatformPkg/Platform/Pei/PlatformInit/MemoryCallback.c @@ -7,7 +7,7 @@ following action is performed in this file, 4. Set MTRR for PEI 5. Create FV HOB and Flash HOB -Copyright (c) 2013 Intel Corporation. +Copyright (c) 2013 - 2016, Intel Corporation. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -108,6 +108,9 @@ MemoryDiscoveredPpiNotifyCallback ( UINT8 CpuAddressWidth; UINT32RegEax; MTRR_SETTINGS MtrrSettings; + EFI_PEI_READ_ONLY_VARIABLE2_PPI *VariableServices; + UINT8 MorControl; + UINTN DataSize; DEBUG ((EFI_D_INFO, "Platform PEIM Memory Callback\n")); @@ -150,6 +153,52 @@ MemoryDiscoveredPpiNotifyCallback ( MtrrSetAllMtrrs (); PERF_END (NULL, "SetCache", NULL, 0); + + // + // Get necessary PPI + // + Status = PeiServicesLocatePpi ( + , // GUID + 0, // INSTANCE + NULL, // EFI_PEI_PPI_DESCRIPTOR + (VOID **) // PPI + ); + ASSERT_EFI_ERROR (Status); + + // + // Detect MOR request by the OS. + // + MorControl = 0; + DataSize = sizeof (MorControl); + Status = VariableServices->GetVariable ( + VariableServices, + MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, + , + NULL, + , + + ); + // + // If OS requested a memory overwrite perform it now for Embedded + SRAM // if (MOR_CLEAR_MEMORY_VALUE (MorControl)) { +DEBUG ((EFI_D_INFO, "Clear Embedded SRAM per MOR request.\n")); +if (PcdGet32 (PcdESramMemorySize) > 0) { + if (PcdGet32 (PcdEsramStage1Base) == 0) { +// +// ZeroMem() generates an ASSERT() if Buffer parameter is NULL. +// Clear byte at 0 and start clear operation at address 1. +// +*(UINT8 *)(0) = 0; +ZeroMem ((VOID *)1, (UINTN)PcdGet32 (PcdESramMemorySize) - 1); + } else { +ZeroMem ( + (VOID *)(UINTN)PcdGet32 (PcdEsramStage1Base), + (UINTN)PcdGet32 (PcdESramMemorySize) + ); + } +} + } // // Install PeiReset for PeiResetSystem service diff --git a/QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.c b/QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.c index eee696e..fec2398 100644 --- a/QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.c +++ b/QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.c @@ -1,7 +1,7 @@ /** @file Framework PEIM to initialize memory on a Quark Memory Controller. -Copyright (c) 2013 Intel Corporation. +Copyright (c) 2013 - 2016, Intel Corporation. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -563,6 +563,8 @@ InstallEfiMemory ( PEI_CAPSULE_PPI *Capsule; VOID *LargeMemRangeBuf; UINTN LargeMemRangeBufLen; + UINT8 MorControl; + UINTN DataSize; // // Test the memory from 1M->TOM @@ -617,6 +619,20 @@ InstallEfiMemory ( RequiredMemSize = 0; RetriveRequiredMemorySize (PeiServices, ); + // + // Detect MOR request by the OS. + // + MorControl = 0; +
Re: [edk2] [Patch 2/2] QuarkPlatformPkg: Add modules required for TCG MOR feature
Reviewed by: Kelly Steele-Original Message- From: Kinney, Michael D Sent: January 28, 2016 15:34 To: edk2-devel@lists.01.org Cc: Steele, Kelly ; Yao, Jiewen Subject: [Patch 2/2] QuarkPlatformPkg: Add modules required for TCG MOR feature Add the TcgSmm and TcgMor modules that are required to manage UEFI variable that conveys TCG MOR request to memory init module in PEI phase. Cc: Kelly Steele Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney --- QuarkPlatformPkg/Quark.dsc | 3 +++ QuarkPlatformPkg/Quark.fdf | 12 2 files changed, 15 insertions(+) diff --git a/QuarkPlatformPkg/Quark.dsc b/QuarkPlatformPkg/Quark.dsc index be6b83d..c87bb17 100644 --- a/QuarkPlatformPkg/Quark.dsc +++ b/QuarkPlatformPkg/Quark.dsc @@ -184,6 +184,7 @@ !if $(TPM_12_HARDWARE) == INFINEON_I2C Tpm12DeviceLib|QuarkPlatformPkg/Library/Tpm12DeviceLibInfineonI2c/Tpm12DeviceLibInfineonI2c.inf !endif + + TcgPpVendorLib|SecurityPkg/Library/TcgPpVendorLibNull/TcgPpVendorLibNu + ll.inf !else TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf !endif @@ -843,7 +844,9 @@ # Trusted Platform Module # !if $(MEASURED_BOOT_ENABLE) + SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf SecurityPkg/Tcg/TcgDxe/TcgDxe.inf + SecurityPkg/Tcg/TcgSmm/TcgSmm.inf !endif # diff --git a/QuarkPlatformPkg/Quark.fdf b/QuarkPlatformPkg/Quark.fdf index c196d21..9f51eb3 100644 --- a/QuarkPlatformPkg/Quark.fdf +++ b/QuarkPlatformPkg/Quark.fdf @@ -574,7 +574,9 @@ INF FatPkg/EnhancedFatDxe/Fat.inf # Trusted Platform Module # !if $(MEASURED_BOOT_ENABLE) +INF SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf INF SecurityPkg/Tcg/TcgDxe/TcgDxe.inf +INF RuleOverride = DRIVER_ACPITABLE SecurityPkg/Tcg/TcgSmm/TcgSmm.inf !endif @@ -724,6 +726,16 @@ INF RuleOverride = TIANOCOMPRESSED PerformancePkg/Dp_App/Dp.inf VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) } +[Rule.Common.DXE_SMM_DRIVER.DRIVER_ACPITABLE] + FILE SMM = $(NAMED_GUID) { +DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex +PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi +RAW ACPI Optional|.acpi +RAW ASL Optional|.aml +UISTRING="$(MODULE_NAME)" Optional +VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) + } + [Rule.Common.SMM_CORE] FILE SMM_CORE = $(NAMED_GUID) { PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 1/2] MdePkg: Correct inconsistent function descriptions in DNS
This patch is used to correct inconsistent function descriptions in Dns4.h and Dns6.h. Cc: Fu SiyuanCc: Ye Ting Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu --- MdePkg/Include/Protocol/Dns4.h | 5 ++--- MdePkg/Include/Protocol/Dns6.h | 8 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/MdePkg/Include/Protocol/Dns4.h b/MdePkg/Include/Protocol/Dns4.h index 3e7cdaa..2489268 100644 --- a/MdePkg/Include/Protocol/Dns4.h +++ b/MdePkg/Include/Protocol/Dns4.h @@ -2,11 +2,11 @@ This file defines the EFI Domain Name Service Binding Protocol interface. It is split into the following two main sections: DNSv4 Service Binding Protocol (DNSv4SB) DNSv4 Protocol (DNSv4) - Copyright (c) 2015, Intel Corporation. All rights reserved. + Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -337,11 +337,11 @@ EFI_STATUS The HostNameToIp () function is used to translate the host name to host IP address. A type A query is used to get the one or more IP addresses for this host. @param[in] ThisPointer to EFI_DNS4_PROTOCOL instance. - @param[in] HostnameHost name. + @param[in] HostNameHost name. @param[in] Token Point to the completion token to translate host name to host address. @retval EFI_SUCCESS The operation completed successfully. @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: @@ -378,11 +378,10 @@ EFI_STATUS Token is NULL. Token.Event is NULL. IpAddress is not valid IP address . @retval EFI_NO_MAPPING There's no source address is available for use. @retval EFI_ALREADY_STARTED This Token is being used in another DNS session. - @retval EFI_NOT_STARTED This instance has not been started. @retval EFI_OUT_OF_RESOURCESFailed to allocate needed resources. **/ typedef EFI_STATUS (EFIAPI *EFI_DNS4_IP_TO_HOST_NAME) ( diff --git a/MdePkg/Include/Protocol/Dns6.h b/MdePkg/Include/Protocol/Dns6.h index 03cdf6a..1ea85bc 100644 --- a/MdePkg/Include/Protocol/Dns6.h +++ b/MdePkg/Include/Protocol/Dns6.h @@ -2,11 +2,11 @@ This file defines the EFI DNSv6 (Domain Name Service version 6) Protocol. It is split into the following two main sections: DNSv6 Service Binding Protocol (DNSv6SB) DNSv6 Protocol (DNSv6) - Copyright (c) 2015, Intel Corporation. All rights reserved. + Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -299,11 +299,11 @@ EFI_STATUS @param[in] DnsConfigData Pointer to the configuration data structure. All associated storage to be allocated and released by caller. @retval EFI_SUCCESS The operation completed successfully. @retval EFI_INVALID_PARAMTERThis is NULL. - The StationIp address provided in DnsConfigData is not a valid unicast. + The StationIp address provided in DnsConfigData is not zero and not a valid unicast. DnsServerList is NULL while DnsServerList Count is not ZERO. DnsServerList Count is ZERO while DnsServerList is not NULL. @retval EFI_OUT_OF_RESOURCESThe DNS instance data or required space could not be allocated. @retval EFI_DEVICE_ERRORAn unexpected system or network error occurred. The EFI DNSv6 Protocol instance is not configured. @@ -321,14 +321,14 @@ EFI_STATUS /** Host name to host address translation. The HostNameToIp () function is used to translate the host name to host IP address. A - type A query is used to get the one or more IPv6 addresses for this host. + type query is used to get the one or more IPv6 addresses for this host. @param[in] ThisPointer to EFI_DNS6_PROTOCOL instance. - @param[in] HostnameHost name. + @param[in] HostNameHost name. @param[in] Token Point to the completion token to translate host name to host address. @retval EFI_SUCCESS The operation
[edk2] [Patch 2/2] NetworkPkg: Correct inconsistent function descriptions in DNS
This patch is used to correct inconsistent function descriptions in DnsDxe. Cc: Fu SiyuanCc: Ye Ting Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu --- NetworkPkg/DnsDxe/DnsImpl.h | 583 ++- NetworkPkg/DnsDxe/DnsProtocol.c | 585 +++- 2 files changed, 665 insertions(+), 503 deletions(-) diff --git a/NetworkPkg/DnsDxe/DnsImpl.h b/NetworkPkg/DnsDxe/DnsImpl.h index 72b85cb..8cd73e7 100644 --- a/NetworkPkg/DnsDxe/DnsImpl.h +++ b/NetworkPkg/DnsDxe/DnsImpl.h @@ -730,130 +730,147 @@ DnsOnTimerUpdate ( IN VOID *Context ); /** - This function is used to retrieve DNS mode data for this DNS instance. + Retrieve mode data of this DNS instance. - @param[in] This Pointer to EFI_DNS4_PROTOCOL instance. - @param[out] DnsModeDataPointer to the caller-allocated storage for the EFI_DNS4_MODE_DATA structure. + This function is used to retrieve DNS mode data for this DNS instance. - @retval EFI_SUCCESS The operation completed successfully. - @retval EFI_NOT_STARTED When DnsConfigData is queried, no configuration data is - available because this instance has not been configured. - @retval EFI_OUT_OF_RESOURCES Failed to allocate needed resources. - @retval EFI_INVALID_PARAMETER This is NULL or DnsModeData is NULL. + @param[in] This Pointer to EFI_DNS4_PROTOCOL instance. + @param[out] DnsModeDataPoint to the mode data. + @retval EFI_SUCCESS The operation completed successfully. + @retval EFI_NOT_STARTED When DnsConfigData is queried, no configuration data + is available because this instance has not been + configured. + @retval EFI_INVALID_PARAMETER This is NULL or DnsModeData is NULL. + @retval EFI_OUT_OF_RESOURCESFailed to allocate needed resources. **/ EFI_STATUS EFIAPI Dns4GetModeData ( IN EFI_DNS4_PROTOCOL *This, OUT EFI_DNS4_MODE_DATA *DnsModeData ); /** - This function is used to configure DNS configuration data for this DNS instance. - - @param[in] This Pointer to EFI_DNS4_PROTOCOL instance. - @param[in] DnsConfigData Pointer to caller-allocated buffer containing EFI_DNS4_CONFIG_DATA structure. - If NULL, the driver will reinitialize the protocol instance to the unconfigured state. - - @retval EFI_SUCCESS The operation completed successfully. - @retval EFI_UNSUPPORTED The designated protocol is not supported. - @retval EFI_OUT_OF_RESOURCES Failed to allocate needed resources. - @retval EFI_INVALID_PARAMETER This is NULL. - The StationIp address provided in DnsConfigData is not a valid unicast. - DnsServerList is NULL while DnsServerListCount is not equal to Zero. - DnsServerListCount is Zero while DnsServerListCount is not equal to NULL. - @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The EFI DNSv4 Protocol instance is not configured. - + Configure this DNS instance. + + This function is used to configure DNS mode data for this DNS instance. + + @param[in] ThisPointer to EFI_DNS4_PROTOCOL instance. + @param[in] DnsConfigData Point to the Configuration data. + + @retval EFI_SUCCESS The operation completed successfully. + @retval EFI_UNSUPPORTED The designated protocol is not supported. + @retval EFI_INVALID_PARAMTERThisis NULL. + The StationIp address provided in DnsConfigData is not a + valid unicast. + DnsServerList is NULL while DnsServerListCount + is not ZERO. + DnsServerListCount is ZERO while DnsServerList + is not NULL + @retval EFI_OUT_OF_RESOURCESThe DNS instance data or required space could not be + allocated. + @retval EFI_DEVICE_ERRORAn unexpected system or network error occurred. The + EFI DNSv4 Protocol instance is not configured. + @retval EFI_ALREADY_STARTED Second call to Configure() with DnsConfigData. To + reconfigure the instance the caller must call Configure() + with NULL first to return driver to unconfigured state. **/ EFI_STATUS EFIAPI Dns4Configure ( IN EFI_DNS4_PROTOCOL *This, IN EFI_DNS4_CONFIG_DATA*DnsConfigData ); /** - The function is used to translate the host name to host IP
[edk2] [Patch 0/2] Correct inconsistent function descriptions in DNS
This patch is used to correct inconsistent function descriptions in DNS. Cc: Fu SiyuanCc: Ye Ting Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu Jiaxin Wu (2): MdePkg: Correct inconsistent function descriptions in DNS NetworkPkg: Correct inconsistent function descriptions in DNS MdePkg/Include/Protocol/Dns4.h | 5 +- MdePkg/Include/Protocol/Dns6.h | 8 +- NetworkPkg/DnsDxe/DnsImpl.h | 583 ++- NetworkPkg/DnsDxe/DnsProtocol.c | 585 +++- 4 files changed, 671 insertions(+), 510 deletions(-) -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch 1/2] MdePkg: Correct inconsistent function descriptions in DNS
Reviewed-by: Siyuan Fu-Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Jiaxin Wu Sent: Friday, January 29, 2016 8:52 AM To: edk2-devel@lists.01.org Cc: Ye, Ting ; Fu, Siyuan Subject: [edk2] [Patch 1/2] MdePkg: Correct inconsistent function descriptions in DNS This patch is used to correct inconsistent function descriptions in Dns4.h and Dns6.h. Cc: Fu Siyuan Cc: Ye Ting Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu --- MdePkg/Include/Protocol/Dns4.h | 5 ++--- MdePkg/Include/Protocol/Dns6.h | 8 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/MdePkg/Include/Protocol/Dns4.h b/MdePkg/Include/Protocol/Dns4.h index 3e7cdaa..2489268 100644 --- a/MdePkg/Include/Protocol/Dns4.h +++ b/MdePkg/Include/Protocol/Dns4.h @@ -2,11 +2,11 @@ This file defines the EFI Domain Name Service Binding Protocol interface. It is split into the following two main sections: DNSv4 Service Binding Protocol (DNSv4SB) DNSv4 Protocol (DNSv4) - Copyright (c) 2015, Intel Corporation. All rights reserved. + Copyright (c) 2015 - 2016, Intel Corporation. All rights + reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -337,11 +337,11 @@ EFI_STATUS The HostNameToIp () function is used to translate the host name to host IP address. A type A query is used to get the one or more IP addresses for this host. @param[in] ThisPointer to EFI_DNS4_PROTOCOL instance. - @param[in] HostnameHost name. + @param[in] HostNameHost name. @param[in] Token Point to the completion token to translate host name to host address. @retval EFI_SUCCESS The operation completed successfully. @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: @@ -378,11 +378,10 @@ EFI_STATUS Token is NULL. Token.Event is NULL. IpAddress is not valid IP address . @retval EFI_NO_MAPPING There's no source address is available for use. @retval EFI_ALREADY_STARTED This Token is being used in another DNS session. - @retval EFI_NOT_STARTED This instance has not been started. @retval EFI_OUT_OF_RESOURCESFailed to allocate needed resources. **/ typedef EFI_STATUS (EFIAPI *EFI_DNS4_IP_TO_HOST_NAME) ( diff --git a/MdePkg/Include/Protocol/Dns6.h b/MdePkg/Include/Protocol/Dns6.h index 03cdf6a..1ea85bc 100644 --- a/MdePkg/Include/Protocol/Dns6.h +++ b/MdePkg/Include/Protocol/Dns6.h @@ -2,11 +2,11 @@ This file defines the EFI DNSv6 (Domain Name Service version 6) Protocol. It is split into the following two main sections: DNSv6 Service Binding Protocol (DNSv6SB) DNSv6 Protocol (DNSv6) - Copyright (c) 2015, Intel Corporation. All rights reserved. + Copyright (c) 2015 - 2016, Intel Corporation. All rights + reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -299,11 +299,11 @@ EFI_STATUS @param[in] DnsConfigData Pointer to the configuration data structure. All associated storage to be allocated and released by caller. @retval EFI_SUCCESS The operation completed successfully. @retval EFI_INVALID_PARAMTERThis is NULL. - The StationIp address provided in DnsConfigData is not a valid unicast. + The StationIp address provided in DnsConfigData is not zero and not a valid unicast. DnsServerList is NULL while DnsServerList Count is not ZERO. DnsServerList Count is ZERO while DnsServerList is not NULL. @retval EFI_OUT_OF_RESOURCESThe DNS instance data or required space could not be allocated. @retval EFI_DEVICE_ERRORAn unexpected system or network error occurred. The EFI DNSv6 Protocol instance is not configured. @@ -321,14 +321,14 @@ EFI_STATUS /** Host name to host address translation. The HostNameToIp () function is used to translate the host name to host IP address. A - type A query is used to get the one or more IPv6 addresses for this host. + type query is used to get the one or more IPv6
Re: [edk2] [Patch] Maintainers.txt: Update maintainers for NetworkPkg
Reviewed-by: Siyuan Fu-Original Message- From: Wu, Jiaxin Sent: Friday, January 29, 2016 9:13 AM To: edk2-devel@lists.01.org Cc: Fu, Siyuan ; Ye, Ting Subject: [Patch] Maintainers.txt: Update maintainers for NetworkPkg Cc: Fu Siyuan Cc: Ye Ting Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu --- Maintainers.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/Maintainers.txt b/Maintainers.txt index 0bd9c2f..9295532 100644 --- a/Maintainers.txt +++ b/Maintainers.txt @@ -146,12 +146,10 @@ M: Liming Gao NetworkPkg W: https://github.com/tianocore/tianocore.github.io/wiki/NetworkPkg M: Siyuan Fu M: Jiaxin Wu -M: Lubo Zhang -M: Fan Wang Nt32Pkg W: https://github.com/tianocore/tianocore.github.io/wiki/Nt32Pkg M: Ruiyu Ni -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 2/2] QuarkPlatformPkg: Add modules required for TCG MOR feature
Add the TcgSmm and TcgMor modules that are required to manage UEFI variable that conveys TCG MOR request to memory init module in PEI phase. Cc: Kelly SteeleCc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney --- QuarkPlatformPkg/Quark.dsc | 3 +++ QuarkPlatformPkg/Quark.fdf | 12 2 files changed, 15 insertions(+) diff --git a/QuarkPlatformPkg/Quark.dsc b/QuarkPlatformPkg/Quark.dsc index be6b83d..c87bb17 100644 --- a/QuarkPlatformPkg/Quark.dsc +++ b/QuarkPlatformPkg/Quark.dsc @@ -184,6 +184,7 @@ !if $(TPM_12_HARDWARE) == INFINEON_I2C Tpm12DeviceLib|QuarkPlatformPkg/Library/Tpm12DeviceLibInfineonI2c/Tpm12DeviceLibInfineonI2c.inf !endif + TcgPpVendorLib|SecurityPkg/Library/TcgPpVendorLibNull/TcgPpVendorLibNull.inf !else TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf !endif @@ -843,7 +844,9 @@ # Trusted Platform Module # !if $(MEASURED_BOOT_ENABLE) + SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf SecurityPkg/Tcg/TcgDxe/TcgDxe.inf + SecurityPkg/Tcg/TcgSmm/TcgSmm.inf !endif # diff --git a/QuarkPlatformPkg/Quark.fdf b/QuarkPlatformPkg/Quark.fdf index c196d21..9f51eb3 100644 --- a/QuarkPlatformPkg/Quark.fdf +++ b/QuarkPlatformPkg/Quark.fdf @@ -574,7 +574,9 @@ INF FatPkg/EnhancedFatDxe/Fat.inf # Trusted Platform Module # !if $(MEASURED_BOOT_ENABLE) +INF SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf INF SecurityPkg/Tcg/TcgDxe/TcgDxe.inf +INF RuleOverride = DRIVER_ACPITABLE SecurityPkg/Tcg/TcgSmm/TcgSmm.inf !endif @@ -724,6 +726,16 @@ INF RuleOverride = TIANOCOMPRESSED PerformancePkg/Dp_App/Dp.inf VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) } +[Rule.Common.DXE_SMM_DRIVER.DRIVER_ACPITABLE] + FILE SMM = $(NAMED_GUID) { +DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex +PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi +RAW ACPI Optional|.acpi +RAW ASL Optional|.aml +UISTRING="$(MODULE_NAME)" Optional +VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) + } + [Rule.Common.SMM_CORE] FILE SMM_CORE = $(NAMED_GUID) { PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch 0/2] Add TCG MOR feature to QuarkPlatformPkg
Reviewed-by: jiewen@intel.com -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Michael Kinney Sent: Friday, January 29, 2016 7:34 AM To: edk2-devel@lists.01.org Subject: [edk2] [Patch 0/2] Add TCG MOR feature to QuarkPlatformPkg Add support for TCG Memory Overwrite Request feature to QuarkPlatformPkg. Memory is cleared in PEI phase in memory init module if MOR request is set. TCG SMM modules are added that manage the UEFI variables associated with MOR requests. Michael Kinney (2): QuarkPlatformPkg/PlatformInit: Clear memory based on TCG MOR request QuarkPlatformPkg: Add modules required for TCG MOR feature .../Platform/Pei/PlatformInit/MemoryCallback.c | 51 +- .../Platform/Pei/PlatformInit/MrcWrapper.c | 41 - QuarkPlatformPkg/Quark.dsc | 3 ++ QuarkPlatformPkg/Quark.fdf | 12 + 4 files changed, 105 insertions(+), 2 deletions(-) -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] BaseTools: Fix the bug for VOID* Patchable PCD declaration in Library
Reviewed-by: Liming Gao-Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Yonghong Zhu Sent: Wednesday, January 27, 2016 5:19 PM To: edk2-devel@lists.01.org Subject: [edk2] [Patch] BaseTools: Fix the bug for VOID* Patchable PCD declaration in Library VOID* Patchable PCD in Library has the different declaration from the one in Driver, this issue that will cause GCC LTO build failure. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/GenC.py | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py index 93be718..3f0dfd9 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -1,9 +1,9 @@ ## @file # Routines for generating AutoGen.h and AutoGen.c # -# Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved. +# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved. # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php # @@ -1097,11 +1097,12 @@ def CreateLibraryPcdCode(Info, AutoGenC, AutoGenH, Pcd): GetModeSizeName = '_PCD_GET_MODE_SIZE' + '_' + Pcd.TokenCName Type = '' Array = '' if Pcd.DatumType == 'VOID*': -Type = '(VOID *)' +if Pcd.DefaultValue[0]== '{': +Type = '(VOID *)' Array = '[]' PcdItemType = Pcd.Type PcdExCNameList = [] if PcdItemType in gDynamicExPcd: PcdExTokenName = '_PCD_TOKEN_' + TokenSpaceGuidCName + '_' + Pcd.TokenCName @@ -1159,11 +1160,19 @@ def CreateLibraryPcdCode(Info, AutoGenC, AutoGenH, Pcd): else: AutoGenH.Append('#define %s(Value) LibPcdSet%s(%s, (Value))\n' % (SetModeName, DatumSizeLib, PcdTokenName)) AutoGenH.Append('#define %s(Value) LibPcdSet%sS(%s, (Value))\n' % (SetModeStatusName, DatumSizeLib, PcdTokenName)) if PcdItemType == TAB_PCDS_PATCHABLE_IN_MODULE: PcdVariableName = '_gPcd_' + gItemTypeStringDatabase[TAB_PCDS_PATCHABLE_IN_MODULE] + '_' + TokenCName -AutoGenH.Append('extern volatile %s _gPcd_BinaryPatch_%s%s;\n' %(DatumType, TokenCName, Array) ) +if DatumType == 'VOID*': +ArraySize = int(Pcd.MaxDatumSize, 0) +if Pcd.DefaultValue[0] == 'L': +ArraySize = ArraySize / 2 +Array = '[%d]' % ArraySize +DatumType = ['UINT8', 'UINT16'][Pcd.DefaultValue[0] == 'L'] +AutoGenH.Append('extern %s _gPcd_BinaryPatch_%s%s;\n' %(DatumType, TokenCName, Array)) +else: +AutoGenH.Append('extern volatile %s %s%s;\n' % (DatumType, PcdVariableName, Array)) AutoGenH.Append('#define %s %s_gPcd_BinaryPatch_%s\n' %(GetModeName, Type, TokenCName)) if Pcd.DatumType == 'VOID*': AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtrAndSize((VOID *)_gPcd_BinaryPatch_%s, &_gPcd_BinaryPatch_Size_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), (Buffer))\n' % (SetModeName, Pcd.TokenCName, Pcd.TokenCName, Pcd.TokenCName)) AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtrAndSizeS((VOID *)_gPcd_BinaryPatch_%s, &_gPcd_BinaryPatch_Size_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), (Buffer))\n' % (SetModeStatusName, Pcd.TokenCName, Pcd.TokenCName, Pcd.TokenCName)) else: -- 2.6.1.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] BaseTools:Incremental build not work if VPD values in DSC changed by -D
Reviewed-by: Liming Gao-Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Yonghong Zhu Sent: Wednesday, January 27, 2016 3:36 PM To: edk2-devel@lists.01.org Subject: [edk2] [Patch] BaseTools:Incremental build not work if VPD values in DSC changed by -D If a -D flag is passed into build that selects different lines in [PcdsDynamicExVpd], then build does not see any changes to the timestamp of the DSC file and the VPD tool is not used to regenerate the VPD region based in the statements that are active. so we changed the detect condition and use SaveFileOnChange function to generate VPD. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/AutoGen.py| 7 + BaseTools/Source/Python/Common/VpdInfoFile.py | 42 ++- 2 files changed, 16 insertions(+), 33 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index dfb5b72..d9d7271 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -1240,25 +1240,20 @@ class PlatformAutoGen(AutoGen): VpdFile.GetCount() != 0: EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE, "Fail to get FLASH_DEFINITION definition in DSC file %s which is required when DSC contains VPD PCD." % str(self.Platform.MetaFile)) if VpdFile.GetCount() != 0: -DscTimeStamp = self.Platform.MetaFile.TimeStamp FvPath = os.path.join(self.BuildDir, "FV") if not os.path.exists(FvPath): try: os.makedirs(FvPath) except: EdkLogger.error("build", FILE_WRITE_FAILURE, "Fail to create FV folder under %s" % self.BuildDir) - VpdFilePath = os.path.join(FvPath, "%s.txt" % self.Platform.VpdToolGuid) - -if not os.path.exists(VpdFilePath) or os.path.getmtime(VpdFilePath) < DscTimeStamp: -VpdFile.Write(VpdFilePath) - +if VpdFile.Write(VpdFilePath): # retrieve BPDG tool's path from tool_def.txt according to VPD_TOOL_GUID defined in DSC file. BPDGToolName = None for ToolDef in self.ToolDefinition.values(): if ToolDef.has_key("GUID") and ToolDef["GUID"] == self.Platform.VpdToolGuid: if not ToolDef.has_key("PATH"): diff --git a/BaseTools/Source/Python/Common/VpdInfoFile.py b/BaseTools/Source/Python/Common/VpdInfoFile.py index 1a68e9b..e303b4c 100644 --- a/BaseTools/Source/Python/Common/VpdInfoFile.py +++ b/BaseTools/Source/Python/Common/VpdInfoFile.py @@ -19,10 +19,11 @@ import Common.LongFilePathOs as os import re import Common.EdkLogger as EdkLogger import Common.BuildToolError as BuildToolError import subprocess from Common.LongFilePathSupport import OpenLongFilePath as open +from Common.Misc import SaveFileOnChange FILE_COMMENT_TEMPLATE = \ """ ## @file # @@ -122,38 +123,25 @@ class VpdInfoFile: # @param FilePathThe given file path which would hold VPD information def Write(self, FilePath): if not (FilePath != None or len(FilePath) != 0): EdkLogger.error("VpdInfoFile", BuildToolError.PARAMETER_INVALID, "Invalid parameter FilePath: %s." % FilePath) -try: -fd = open(FilePath, "w") -except: -EdkLogger.error("VpdInfoFile", -BuildToolError.FILE_OPEN_FAILURE, -"Fail to open file %s for written." % FilePath) - -try: -# write file header -fd.write(FILE_COMMENT_TEMPLATE) -# write each of PCD in VPD type -Pcds = self._VpdArray.keys() -Pcds.sort() -for Pcd in Pcds: -i = 0 -for Offset in self._VpdArray[Pcd]: -PcdValue = str(Pcd.SkuInfoList[Pcd.SkuInfoList.keys()[i]].DefaultValue).strip() -if PcdValue == "" : -PcdValue = Pcd.DefaultValue - -fd.write("%s.%s|%s|%s|%s|%s \n" % (Pcd.TokenSpaceGuidCName, Pcd.TokenCName, str(Pcd.SkuInfoList.keys()[i]),str(Offset).strip(), str(Pcd.MaxDatumSize).strip(),PcdValue)) -i += 1 -except: -EdkLogger.error("VpdInfoFile", -BuildToolError.FILE_WRITE_FAILURE, -"Fail to write file %s" % FilePath) -fd.close() +Content = FILE_COMMENT_TEMPLATE +Pcds = self._VpdArray.keys() +Pcds.sort() +for Pcd in Pcds: +i = 0 +
Re: [edk2] [Patch] BaseTools: Fix a bug for VpdOffset calculate
Reviewed-by: Liming Gao-Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Yonghong Zhu Sent: Wednesday, January 27, 2016 3:36 PM To: edk2-devel@lists.01.org Subject: [edk2] [Patch] BaseTools: Fix a bug for VpdOffset calculate The VpdOffset value in the DSC both support integer and Hex value, so we fix the bug to support both format. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/AutoGen.py | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index dfb5b72..55a59da 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -1152,11 +1152,18 @@ class PlatformAutoGen(AutoGen): Alignment = 8 elif PcdValue.startswith("L"): Alignment = 2 else: Alignment = 1 -if int(Sku.VpdOffset) % Alignment != 0: +try: +VpdOffset = int(Sku.VpdOffset) +except: +try: +VpdOffset = int(Sku.VpdOffset, 16) +except: +EdkLogger.error("build", FORMAT_INVALID, "Invalid offset value %s for PCD %s.%s." % (Sku.VpdOffset, Pcd.TokenSpaceGuidCName, Pcd.TokenCName)) +if VpdOffset % Alignment != 0: EdkLogger.error("build", FORMAT_INVALID, 'The offset value of PCD %s.%s should be %s-byte aligned.' % (Pcd.TokenSpaceGuidCName, Pcd.TokenCName, Alignment)) VpdFile.Add(Pcd, Sku.VpdOffset) # if the offset of a VPD is *, then it need to be fixed up by third party tool. if not NeedProcessVpdMapFile and Sku.VpdOffset == "*": NeedProcessVpdMapFile = True @@ -1218,11 +1225,18 @@ class PlatformAutoGen(AutoGen): Alignment = 8 elif PcdValue.startswith("L"): Alignment = 2 else: Alignment = 1 -if int(Sku.VpdOffset) % Alignment != 0: +try: +VpdOffset = int(Sku.VpdOffset) +except: +try: +VpdOffset = int(Sku.VpdOffset, 16) +except: +EdkLogger.error("build", FORMAT_INVALID, "Invalid offset value %s for PCD %s.%s." % (Sku.VpdOffset, DscPcdEntry.TokenSpaceGuidCName, DscPcdEntry.TokenCName)) +if VpdOffset % Alignment != 0: EdkLogger.error("build", FORMAT_INVALID, 'The offset value of PCD %s.%s should be %s-byte aligned.' % (DscPcdEntry.TokenSpaceGuidCName, DscPcdEntry.TokenCName, Alignment)) VpdFile.Add(DscPcdEntry, Sku.VpdOffset) if not NeedProcessVpdMapFile and Sku.VpdOffset == "*": NeedProcessVpdMapFile = True if DscPcdEntry.DatumType == 'VOID*' and PcdValue.startswith("L"): -- 2.6.1.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 1/2] QuarkPlatformPkg/PlatformInit: Clear memory based on TCG MOR request
If TCG Memory Overwrite Request is set, then clear all memory available for use by an OS. An OS may optionally use embedded SRAM in Quark SoC X1000, so the embedded SRAM should is cleared too. TCG MOR requests are communicated through a UEFI variable. This module reads UEFI variable to check state of MOR request. Cc: Kelly SteeleCc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney --- .../Platform/Pei/PlatformInit/MemoryCallback.c | 51 +- .../Platform/Pei/PlatformInit/MrcWrapper.c | 41 - 2 files changed, 90 insertions(+), 2 deletions(-) diff --git a/QuarkPlatformPkg/Platform/Pei/PlatformInit/MemoryCallback.c b/QuarkPlatformPkg/Platform/Pei/PlatformInit/MemoryCallback.c index 728e2b1..b140b0d 100644 --- a/QuarkPlatformPkg/Platform/Pei/PlatformInit/MemoryCallback.c +++ b/QuarkPlatformPkg/Platform/Pei/PlatformInit/MemoryCallback.c @@ -7,7 +7,7 @@ following action is performed in this file, 4. Set MTRR for PEI 5. Create FV HOB and Flash HOB -Copyright (c) 2013 Intel Corporation. +Copyright (c) 2013 - 2016, Intel Corporation. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -108,6 +108,9 @@ MemoryDiscoveredPpiNotifyCallback ( UINT8 CpuAddressWidth; UINT32RegEax; MTRR_SETTINGS MtrrSettings; + EFI_PEI_READ_ONLY_VARIABLE2_PPI *VariableServices; + UINT8 MorControl; + UINTN DataSize; DEBUG ((EFI_D_INFO, "Platform PEIM Memory Callback\n")); @@ -150,6 +153,52 @@ MemoryDiscoveredPpiNotifyCallback ( MtrrSetAllMtrrs (); PERF_END (NULL, "SetCache", NULL, 0); + + // + // Get necessary PPI + // + Status = PeiServicesLocatePpi ( + , // GUID + 0, // INSTANCE + NULL, // EFI_PEI_PPI_DESCRIPTOR + (VOID **) // PPI + ); + ASSERT_EFI_ERROR (Status); + + // + // Detect MOR request by the OS. + // + MorControl = 0; + DataSize = sizeof (MorControl); + Status = VariableServices->GetVariable ( + VariableServices, + MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, + , + NULL, + , + + ); + // + // If OS requested a memory overwrite perform it now for Embedded SRAM + // + if (MOR_CLEAR_MEMORY_VALUE (MorControl)) { +DEBUG ((EFI_D_INFO, "Clear Embedded SRAM per MOR request.\n")); +if (PcdGet32 (PcdESramMemorySize) > 0) { + if (PcdGet32 (PcdEsramStage1Base) == 0) { +// +// ZeroMem() generates an ASSERT() if Buffer parameter is NULL. +// Clear byte at 0 and start clear operation at address 1. +// +*(UINT8 *)(0) = 0; +ZeroMem ((VOID *)1, (UINTN)PcdGet32 (PcdESramMemorySize) - 1); + } else { +ZeroMem ( + (VOID *)(UINTN)PcdGet32 (PcdEsramStage1Base), + (UINTN)PcdGet32 (PcdESramMemorySize) + ); + } +} + } // // Install PeiReset for PeiResetSystem service diff --git a/QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.c b/QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.c index eee696e..fec2398 100644 --- a/QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.c +++ b/QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.c @@ -1,7 +1,7 @@ /** @file Framework PEIM to initialize memory on a Quark Memory Controller. -Copyright (c) 2013 Intel Corporation. +Copyright (c) 2013 - 2016, Intel Corporation. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -563,6 +563,8 @@ InstallEfiMemory ( PEI_CAPSULE_PPI *Capsule; VOID *LargeMemRangeBuf; UINTN LargeMemRangeBufLen; + UINT8 MorControl; + UINTN DataSize; // // Test the memory from 1M->TOM @@ -617,6 +619,20 @@ InstallEfiMemory ( RequiredMemSize = 0; RetriveRequiredMemorySize (PeiServices, ); + // + // Detect MOR request by the OS. + // + MorControl = 0; + DataSize = sizeof (MorControl); + Status = VariableServices->GetVariable ( + VariableServices, + MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, + , + NULL, + , +
[edk2] [Patch 0/2] Add TCG MOR feature to QuarkPlatformPkg
Add support for TCG Memory Overwrite Request feature to QuarkPlatformPkg. Memory is cleared in PEI phase in memory init module if MOR request is set. TCG SMM modules are added that manage the UEFI variables associated with MOR requests. Michael Kinney (2): QuarkPlatformPkg/PlatformInit: Clear memory based on TCG MOR request QuarkPlatformPkg: Add modules required for TCG MOR feature .../Platform/Pei/PlatformInit/MemoryCallback.c | 51 +- .../Platform/Pei/PlatformInit/MrcWrapper.c | 41 - QuarkPlatformPkg/Quark.dsc | 3 ++ QuarkPlatformPkg/Quark.fdf | 12 + 4 files changed, 105 insertions(+), 2 deletions(-) -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch 2/2] NetworkPkg: Correct inconsistent function descriptions in DNS
Reviewed-by: Siyuan Fu-Original Message- From: Wu, Jiaxin Sent: Friday, January 29, 2016 8:52 AM To: edk2-devel@lists.01.org Cc: Fu, Siyuan ; Ye, Ting Subject: [Patch 2/2] NetworkPkg: Correct inconsistent function descriptions in DNS This patch is used to correct inconsistent function descriptions in DnsDxe. Cc: Fu Siyuan Cc: Ye Ting Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu --- NetworkPkg/DnsDxe/DnsImpl.h | 583 ++- NetworkPkg/DnsDxe/DnsProtocol.c | 585 +++- 2 files changed, 665 insertions(+), 503 deletions(-) diff --git a/NetworkPkg/DnsDxe/DnsImpl.h b/NetworkPkg/DnsDxe/DnsImpl.h index 72b85cb..8cd73e7 100644 --- a/NetworkPkg/DnsDxe/DnsImpl.h +++ b/NetworkPkg/DnsDxe/DnsImpl.h @@ -730,130 +730,147 @@ DnsOnTimerUpdate ( IN VOID *Context ); /** - This function is used to retrieve DNS mode data for this DNS instance. + Retrieve mode data of this DNS instance. - @param[in] This Pointer to EFI_DNS4_PROTOCOL instance. - @param[out] DnsModeDataPointer to the caller-allocated storage for the EFI_DNS4_MODE_DATA structure. + This function is used to retrieve DNS mode data for this DNS instance. - @retval EFI_SUCCESS The operation completed successfully. - @retval EFI_NOT_STARTED When DnsConfigData is queried, no configuration data is - available because this instance has not been configured. - @retval EFI_OUT_OF_RESOURCES Failed to allocate needed resources. - @retval EFI_INVALID_PARAMETER This is NULL or DnsModeData is NULL. + @param[in] This Pointer to EFI_DNS4_PROTOCOL instance. + @param[out] DnsModeDataPoint to the mode data. + @retval EFI_SUCCESS The operation completed successfully. + @retval EFI_NOT_STARTED When DnsConfigData is queried, no configuration data + is available because this instance has not been + configured. + @retval EFI_INVALID_PARAMETER This is NULL or DnsModeData is NULL. + @retval EFI_OUT_OF_RESOURCESFailed to allocate needed resources. **/ EFI_STATUS EFIAPI Dns4GetModeData ( IN EFI_DNS4_PROTOCOL *This, OUT EFI_DNS4_MODE_DATA *DnsModeData ); /** - This function is used to configure DNS configuration data for this DNS instance. - - @param[in] This Pointer to EFI_DNS4_PROTOCOL instance. - @param[in] DnsConfigData Pointer to caller-allocated buffer containing EFI_DNS4_CONFIG_DATA structure. - If NULL, the driver will reinitialize the protocol instance to the unconfigured state. - - @retval EFI_SUCCESS The operation completed successfully. - @retval EFI_UNSUPPORTED The designated protocol is not supported. - @retval EFI_OUT_OF_RESOURCES Failed to allocate needed resources. - @retval EFI_INVALID_PARAMETER This is NULL. - The StationIp address provided in DnsConfigData is not a valid unicast. - DnsServerList is NULL while DnsServerListCount is not equal to Zero. - DnsServerListCount is Zero while DnsServerListCount is not equal to NULL. - @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The EFI DNSv4 Protocol instance is not configured. - + Configure this DNS instance. + + This function is used to configure DNS mode data for this DNS instance. + + @param[in] ThisPointer to EFI_DNS4_PROTOCOL instance. + @param[in] DnsConfigData Point to the Configuration data. + + @retval EFI_SUCCESS The operation completed successfully. + @retval EFI_UNSUPPORTED The designated protocol is not supported. + @retval EFI_INVALID_PARAMTERThisis NULL. + The StationIp address provided in DnsConfigData is not a + valid unicast. + DnsServerList is NULL while DnsServerListCount + is not ZERO. + DnsServerListCount is ZERO while DnsServerList + is not NULL + @retval EFI_OUT_OF_RESOURCESThe DNS instance data or required space could not be + allocated. + @retval EFI_DEVICE_ERRORAn unexpected system or network error occurred. The + EFI DNSv4 Protocol instance is not configured. + @retval EFI_ALREADY_STARTED Second call to Configure() with DnsConfigData. To + reconfigure the instance the caller must call
[edk2] [Patch] Maintainers.txt: Update maintainers for NetworkPkg
Cc: Fu SiyuanCc: Ye Ting Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu --- Maintainers.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/Maintainers.txt b/Maintainers.txt index 0bd9c2f..9295532 100644 --- a/Maintainers.txt +++ b/Maintainers.txt @@ -146,12 +146,10 @@ M: Liming Gao NetworkPkg W: https://github.com/tianocore/tianocore.github.io/wiki/NetworkPkg M: Siyuan Fu M: Jiaxin Wu -M: Lubo Zhang -M: Fan Wang Nt32Pkg W: https://github.com/tianocore/tianocore.github.io/wiki/Nt32Pkg M: Ruiyu Ni -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] MdePkg: Remove magic number
Reviewed-by: Ye Ting-Original Message- From: Wu, Jiaxin Sent: Thursday, January 28, 2016 3:47 PM To: edk2-devel@lists.01.org Cc: Fu, Siyuan; Ye, Ting Subject: [Patch] MdePkg: Remove magic number This patch is used to update structure of EFI_IP4_CONFIG2_INTERFACE_INFO to remove magic number. Cc: Fu Siyuan Cc: Ye Ting Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu --- MdePkg/Include/Protocol/Ip4Config2.h | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/MdePkg/Include/Protocol/Ip4Config2.h b/MdePkg/Include/Protocol/Ip4Config2.h index 383da8a..fca2bb5 100644 --- a/MdePkg/Include/Protocol/Ip4Config2.h +++ b/MdePkg/Include/Protocol/Ip4Config2.h @@ -1,10 +1,10 @@ /** @file This file provides a definition of the EFI IPv4 Configuration II Protocol. -Copyright (c) 2015, Intel Corporation. All rights reserved. +Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -74,17 +74,22 @@ typedef enum { Ip4Config2DataTypeDnsServer, Ip4Config2DataTypeMaximum } EFI_IP4_CONFIG2_DATA_TYPE; /// +/// EFI_IP4_CONFIG2_INTERFACE_INFO related definitions /// #define +EFI_IP4_CONFIG2_INTERFACE_INFO_NAME_SIZE 32 + +/// /// EFI_IP4_CONFIG2_INTERFACE_INFO /// typedef struct { /// /// The name of the interface. It is a NULL-terminated Unicode string. /// - CHAR16Name[32]; + CHAR16Name[EFI_IP4_CONFIG2_INTERFACE_INFO_NAME_SIZE]; /// /// The interface type of the network interface. See RFC 1700, /// section "Number Hardware Type". /// UINT8 IfType; -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] MdePkg: Remove magic number
Reviewed-by: Siyuan Fu-Original Message- From: Wu, Jiaxin Sent: Thursday, January 28, 2016 3:47 PM To: edk2-devel@lists.01.org Cc: Fu, Siyuan ; Ye, Ting Subject: [Patch] MdePkg: Remove magic number This patch is used to update structure of EFI_IP4_CONFIG2_INTERFACE_INFO to remove magic number. Cc: Fu Siyuan Cc: Ye Ting Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu --- MdePkg/Include/Protocol/Ip4Config2.h | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/MdePkg/Include/Protocol/Ip4Config2.h b/MdePkg/Include/Protocol/Ip4Config2.h index 383da8a..fca2bb5 100644 --- a/MdePkg/Include/Protocol/Ip4Config2.h +++ b/MdePkg/Include/Protocol/Ip4Config2.h @@ -1,10 +1,10 @@ /** @file This file provides a definition of the EFI IPv4 Configuration II Protocol. -Copyright (c) 2015, Intel Corporation. All rights reserved. +Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -74,17 +74,22 @@ typedef enum { Ip4Config2DataTypeDnsServer, Ip4Config2DataTypeMaximum } EFI_IP4_CONFIG2_DATA_TYPE; /// +/// EFI_IP4_CONFIG2_INTERFACE_INFO related definitions /// #define +EFI_IP4_CONFIG2_INTERFACE_INFO_NAME_SIZE 32 + +/// /// EFI_IP4_CONFIG2_INTERFACE_INFO /// typedef struct { /// /// The name of the interface. It is a NULL-terminated Unicode string. /// - CHAR16Name[32]; + CHAR16Name[EFI_IP4_CONFIG2_INTERFACE_INFO_NAME_SIZE]; /// /// The interface type of the network interface. See RFC 1700, /// section "Number Hardware Type". /// UINT8 IfType; -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] SCT compilation failed with UEFI spec 2.5
Hi, I am facing following error while compiling SCT package: n file included from /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/MdePkg/Include/Uefi.h:24:0, from /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/Build/UefiSct/DEBUG_GCC48/AARCH64/SctPkg/TestInfrastructure/SCT/Framework/Sct/DEBUG/AutoGen.h:17, from :0: /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/MdePkg/Include/Uefi/UefiSpec.h:1768:0: warning: "EFI_SPECIFICATION_VERSION" redefined [enabled by default] #define EFI_SPECIFICATION_VERSION EFI_SYSTEM_TABLE_REVISION ^ :0:0: note: this is the location of the previous definition /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/SctPkg/TestInfrastructure/SCT/Framework/Core/Sct.c:66:1: warning: missing braces around initializer [-Wmissing-braces] EFI_GUID gEfiSystemHangAssertionGuid = EFI_SYSTEM_HANG_ASSERTION_GUID; ^ /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/SctPkg/TestInfrastructure/SCT/Framework/Core/Sct.c:66:1: warning: (near initialization for 'gEfiSystemHangAssertionGuid.Data4') [-Wmissing-braces] /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/SctPkg/TestInfrastructure/SCT/Framework/Core/Sct.c: In function 'PrintUsage': /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/SctPkg/TestInfrastructure/SCT/Framework/Core/Sct.c:226:5: error: 'EFI_SCT_NAME' undeclared (first use in this function) EFI_SCT_NAME, ^ /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/SctPkg/TestInfrastructure/SCT/Framework/Core/Sct.c:226:5: note: each undeclared identifier is reported only once for each function it appears in make: *** [/proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/Build/UefiSct/DEBUG_GCC48/AARCH64/SctPkg/TestInfrastructure/SCT/Framework/Sct/OUTPUT/Core/Sct.obj] Error 1 Kindly help on what is the issue. Thanks & Regards, Meenakshi ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] MdeModulePkg/PeiCore: Fix the debug info of PEI temp heap length
On 2016/1/27 16:02, Zeng, Star wrote: On 2016/1/27 15:45, Cinnamon Shia wrote: (HandoffInformationTable->EfiFreeMemoryBottom - Private->HobList.Raw) is the PEI temp heap used instead of the length of PEI temp heap. The length of PEI temp heap should be: (HandoffInformationTable->EfiFreeMemoryTop - Private->HobList.Raw) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Cinnamon Shia--- MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Star Zeng Patch committed at R19762. Thanks, Star diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c index 2251b9b..715e9d2 100644 --- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c @@ -2,6 +2,7 @@ EFI PEI Core dispatch services Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved. +(C) Copyright 2016 Hewlett Packard Enterprise Development LP This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -682,7 +683,7 @@ PeiCheckAndSwitchStack ( StackPointer ++); DEBUG ((EFI_D_INFO, "Temp Stack : BaseAddress=0x%p Length=0x%X\n", SecCoreData->StackBase, (UINT32)SecCoreData->StackSize)); - DEBUG ((EFI_D_INFO, "Temp Heap : BaseAddress=0x%p Length=0x%X\n", Private->HobList.Raw, (UINT32)((UINTN) Private->HobList.HandoffInformationTable->EfiFreeMemoryBottom - (UINTN) Private->HobList.Raw))); + DEBUG ((EFI_D_INFO, "Temp Heap : BaseAddress=0x%p Length=0x%X\n", Private->HobList.Raw, (UINT32)((UINTN) Private->HobList.HandoffInformationTable->EfiFreeMemoryTop - (UINTN) Private->HobList.Raw))); DEBUG ((EFI_D_INFO, "Total temporary memory:%d bytes.\n", (UINT32)SecCoreData->TemporaryRamSize)); DEBUG ((EFI_D_INFO, " temporary memory stack ever used: %d bytes.\n", (UINT32)(SecCoreData->StackSize - ((UINTN) StackPointer - (UINTN)SecCoreData->StackBase)) ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] Maintainers.txt: Update maintainers for MdeModulePkg
Cc: Feng TianCc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng --- Maintainers.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Maintainers.txt b/Maintainers.txt index 0bd9c2f..86afbfb 100644 --- a/Maintainers.txt +++ b/Maintainers.txt @@ -138,6 +138,7 @@ M: Jiewen Yao MdeModulePkg W: https://github.com/tianocore/tianocore.github.io/wiki/MdeModulePkg M: Feng Tian +M: Star Zeng MdePkg W: https://github.com/tianocore/tianocore.github.io/wiki/MdePkg -- 2.7.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] Maintainers.txt: Update maintainers for MdeModulePkg
Reviewed-by: Liming Gao-Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Star Zeng Sent: Thursday, January 28, 2016 4:23 PM To: edk2-devel@lists.01.org Cc: Tian, Feng; Gao, Liming Subject: [edk2] [PATCH] Maintainers.txt: Update maintainers for MdeModulePkg Cc: Feng Tian Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng --- Maintainers.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Maintainers.txt b/Maintainers.txt index 0bd9c2f..86afbfb 100644 --- a/Maintainers.txt +++ b/Maintainers.txt @@ -138,6 +138,7 @@ M: Jiewen Yao MdeModulePkg W: https://github.com/tianocore/tianocore.github.io/wiki/MdeModulePkg M: Feng Tian +M: Star Zeng MdePkg W: https://github.com/tianocore/tianocore.github.io/wiki/MdePkg -- 2.7.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] OvmfPkg: Increase default RELEASE build image size to 2MB
Looks good; two nits: On 01/28/16 02:15, Jordan Justen wrote: > Fixes: https://github.com/tianocore/edk2/issues/47 > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Jordan Justen> Cc: Bruce Cran > Cc: Laszlo Ersek > --- > OvmfPkg/OvmfPkg.fdf.inc| 6 ++ > OvmfPkg/OvmfPkgIa32.fdf| 12 > OvmfPkg/OvmfPkgIa32X64.fdf | 12 > OvmfPkg/OvmfPkgX64.fdf | 12 > 4 files changed, 6 insertions(+), 36 deletions(-) > > diff --git a/OvmfPkg/OvmfPkg.fdf.inc b/OvmfPkg/OvmfPkg.fdf.inc > index 441c35a..fd57904 100644 > --- a/OvmfPkg/OvmfPkg.fdf.inc > +++ b/OvmfPkg/OvmfPkg.fdf.inc > @@ -15,6 +15,12 @@ > # > ## > > +# > +# Default flash size for is 2MB. (a) The word "for" is not needed. (b) I think the two occurrences of -D E1000_ENABLE -D FD_SIZE_2MB should be replaced with -D E1000_ENABLE in the README file. (I also looked at the "OVMF Flash Layout" section in the README; it remains current & valid after this change, so it's fine.) Thank you! Laszlo > +# > +# Defining FD_SIZE_1MB on the build command line can override this. > +# > + > DEFINE BLOCK_SIZE= 0x1000 > DEFINE VARS_SIZE = 0x2 > DEFINE VARS_BLOCKS = 0x20 > diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf > index 1c1936c..e3cbf74 100644 > --- a/OvmfPkg/OvmfPkgIa32.fdf > +++ b/OvmfPkg/OvmfPkgIa32.fdf > @@ -15,19 +15,7 @@ > > > > > -# > -# Default flash size for DEBUG build is 2MB. For RELEASE it is 1MB. > -# > -# Defining FD_SIZE_1MB or FD_SIZE_2MB on the build command line can > -# override this. > -# > [Defines] > -!if $(TARGET) == RELEASE > -!ifndef $(FD_SIZE_2MB) > -DEFINE FD_SIZE_1MB= > -!endif > -!endif > - > !include OvmfPkg.fdf.inc > > # > diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf > index ffed58a..b60d93b 100644 > --- a/OvmfPkg/OvmfPkgIa32X64.fdf > +++ b/OvmfPkg/OvmfPkgIa32X64.fdf > @@ -15,19 +15,7 @@ > > > > > -# > -# Default flash size for DEBUG build is 2MB. For RELEASE it is 1MB. > -# > -# Defining FD_SIZE_1MB or FD_SIZE_2MB on the build command line can > -# override this. > -# > [Defines] > -!if $(TARGET) == RELEASE > -!ifndef $(FD_SIZE_2MB) > -DEFINE FD_SIZE_1MB= > -!endif > -!endif > - > !include OvmfPkg.fdf.inc > > # > diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf > index ae9f348..d8b119a 100644 > --- a/OvmfPkg/OvmfPkgX64.fdf > +++ b/OvmfPkg/OvmfPkgX64.fdf > @@ -15,19 +15,7 @@ > > > > > -# > -# Default flash size for DEBUG build is 2MB. For RELEASE it is 1MB. > -# > -# Defining FD_SIZE_1MB or FD_SIZE_2MB on the build command line can > -# override this. > -# > [Defines] > -!if $(TARGET) == RELEASE > -!ifndef $(FD_SIZE_2MB) > -DEFINE FD_SIZE_1MB= > -!endif > -!endif > - > !include OvmfPkg.fdf.inc > > # > ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] BaseTools: Fix the bug for VOID* Patchable PCD declaration in Library
On 01/28/16 03:38, Gao, Liming wrote: > Laszlo: > Someone evaluates GCC LTO feature and detects this issue. Now, we have no > clear plan to add LTO support. Thanks Scott for the great summary, and Liming for the info. Laszlo > > Thanks > Liming > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Laszlo > Ersek > Sent: Thursday, January 28, 2016 1:34 AM > To: Zhu, Yonghong > Cc: edk2-de...@ml01.01.org; Scott Duplichan > Subject: Re: [edk2] [Patch] BaseTools: Fix the bug for VOID* Patchable PCD > declaration in Library > > On 01/27/16 10:18, Yonghong Zhu wrote: >> VOID* Patchable PCD in Library has the different declaration from the >> one in Driver, this issue that will cause GCC LTO build failure. > > Wow, you managed to build edk2 modules with -flto? How? Is that going to be > added to BaseTools? > > Thanks! > Laszlo > >> >> Contributed-under: TianoCore Contribution Agreement 1.0 >> Signed-off-by: Yonghong Zhu>> --- >> BaseTools/Source/Python/AutoGen/GenC.py | 15 --- >> 1 file changed, 12 insertions(+), 3 deletions(-) >> >> diff --git a/BaseTools/Source/Python/AutoGen/GenC.py >> b/BaseTools/Source/Python/AutoGen/GenC.py >> index 93be718..3f0dfd9 100644 >> --- a/BaseTools/Source/Python/AutoGen/GenC.py >> +++ b/BaseTools/Source/Python/AutoGen/GenC.py >> @@ -1,9 +1,9 @@ >> ## @file >> # Routines for generating AutoGen.h and AutoGen.c # -# Copyright (c) >> 2007 - 2015, Intel Corporation. All rights reserved. >> +# Copyright (c) 2007 - 2016, Intel Corporation. All rights >> +reserved. >> # This program and the accompanying materials # are licensed and >> made available under the terms and conditions of the BSD License # >> which accompanies this distribution. The full text of the license may >> be found at # http://opensource.org/licenses/bsd-license.php >> # >> @@ -1097,11 +1097,12 @@ def CreateLibraryPcdCode(Info, AutoGenC, AutoGenH, >> Pcd): >> GetModeSizeName = '_PCD_GET_MODE_SIZE' + '_' + Pcd.TokenCName >> >> Type = '' >> Array = '' >> if Pcd.DatumType == 'VOID*': >> -Type = '(VOID *)' >> +if Pcd.DefaultValue[0]== '{': >> +Type = '(VOID *)' >> Array = '[]' >> PcdItemType = Pcd.Type >> PcdExCNameList = [] >> if PcdItemType in gDynamicExPcd: >> PcdExTokenName = '_PCD_TOKEN_' + TokenSpaceGuidCName + '_' + >> Pcd.TokenCName @@ -1159,11 +1160,19 @@ def CreateLibraryPcdCode(Info, >> AutoGenC, AutoGenH, Pcd): >> else: >> AutoGenH.Append('#define %s(Value) LibPcdSet%s(%s, >> (Value))\n' % (SetModeName, DatumSizeLib, PcdTokenName)) >> AutoGenH.Append('#define %s(Value) LibPcdSet%sS(%s, >> (Value))\n' % (SetModeStatusName, DatumSizeLib, PcdTokenName)) >> if PcdItemType == TAB_PCDS_PATCHABLE_IN_MODULE: >> PcdVariableName = '_gPcd_' + >> gItemTypeStringDatabase[TAB_PCDS_PATCHABLE_IN_MODULE] + '_' + TokenCName >> -AutoGenH.Append('extern volatile %s _gPcd_BinaryPatch_%s%s;\n' >> %(DatumType, TokenCName, Array) ) >> +if DatumType == 'VOID*': >> +ArraySize = int(Pcd.MaxDatumSize, 0) >> +if Pcd.DefaultValue[0] == 'L': >> +ArraySize = ArraySize / 2 >> +Array = '[%d]' % ArraySize >> +DatumType = ['UINT8', 'UINT16'][Pcd.DefaultValue[0] == 'L'] >> +AutoGenH.Append('extern %s _gPcd_BinaryPatch_%s%s;\n' >> %(DatumType, TokenCName, Array)) >> +else: >> +AutoGenH.Append('extern volatile %s %s%s;\n' % >> + (DatumType, PcdVariableName, Array)) >> AutoGenH.Append('#define %s %s_gPcd_BinaryPatch_%s\n' >> %(GetModeName, Type, TokenCName)) >> if Pcd.DatumType == 'VOID*': >> AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) >> LibPatchPcdSetPtrAndSize((VOID *)_gPcd_BinaryPatch_%s, >> &_gPcd_BinaryPatch_Size_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), >> (Buffer))\n' % (SetModeName, Pcd.TokenCName, Pcd.TokenCName, Pcd.TokenCName)) >> AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) >> LibPatchPcdSetPtrAndSizeS((VOID *)_gPcd_BinaryPatch_%s, >> &_gPcd_BinaryPatch_Size_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), >> (Buffer))\n' % (SetModeStatusName, Pcd.TokenCName, Pcd.TokenCName, >> Pcd.TokenCName)) >> else: >> > > ___ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel > ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] SCT compilation failed with UEFI spec 2.5
What is the SCT version that is being used? Is the latest master from git clone https://github.com/UEFI/UEFI-SCT.git being used? Thanks, Supreeth -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Meenakshi Aggarwal Sent: Thursday, January 28, 2016 3:34 AM To: edk2-devel@lists.01.org Subject: [edk2] SCT compilation failed with UEFI spec 2.5 Hi, I am facing following error while compiling SCT package: n file included from /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/MdePkg/Include/Uefi.h:24:0, from /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/Build/UefiSct/DEBUG_GCC48/AARCH64/SctPkg/TestInfrastructure/SCT/Framework/Sct/DEBUG/AutoGen.h:17, from :0: /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/MdePkg/Include/Uefi/UefiSpec.h:1768:0: warning: "EFI_SPECIFICATION_VERSION" redefined [enabled by default] #define EFI_SPECIFICATION_VERSION EFI_SYSTEM_TABLE_REVISION ^ :0:0: note: this is the location of the previous definition /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/SctPkg/TestInfrastructure/SCT/Framework/Core/Sct.c:66:1: warning: missing braces around initializer [-Wmissing-braces] EFI_GUID gEfiSystemHangAssertionGuid = EFI_SYSTEM_HANG_ASSERTION_GUID; ^ /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/SctPkg/TestInfrastructure/SCT/Framework/Core/Sct.c:66:1: warning: (near initialization for 'gEfiSystemHangAssertionGuid.Data4') [-Wmissing-braces] /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/SctPkg/TestInfrastructure/SCT/Framework/Core/Sct.c: In function 'PrintUsage': /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/SctPkg/TestInfrastructure/SCT/Framework/Core/Sct.c:226:5: error: 'EFI_SCT_NAME' undeclared (first use in this function) EFI_SCT_NAME, ^ /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/SctPkg/TestInfrastructure/SCT/Framework/Core/Sct.c:226:5: note: each undeclared identifier is reported only once for each function it appears in make: *** [/proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/Build/UefiSct/DEBUG_GCC48/AARCH64/SctPkg/TestInfrastructure/SCT/Framework/Sct/OUTPUT/Core/Sct.obj] Error 1 Kindly help on what is the issue. Thanks & Regards, Meenakshi ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 1/3] MdeModulePkg: NvmExpressDxe: clean up NvmeRead() / NvmeWrite() debug msgs
On 01/28/16 02:32, Tian, Feng wrote: > Laszlo, > > Thanks for your particular elaborations on this issue. I am ok with your > change. > > Reviewed-by: Feng Tian> > Feng Thank you very much! Since this change seems to be justified in general, independently of the OVMF feature I'm aiming at in this small series, I'll go ahead and commit this one patch at once. ... SVN r19763. Thank you! Laszlo > > -Original Message- > From: Laszlo Ersek [mailto:ler...@redhat.com] > Sent: Wednesday, January 27, 2016 21:40 > To: Tian, Feng > Cc: edk2-de...@ml01.01.org > Subject: Re: [PATCH 1/3] MdeModulePkg: NvmExpressDxe: clean up NvmeRead() / > NvmeWrite() debug msgs > > Hi Feng, > > On 01/27/16 05:24, Tian, Feng wrote: >> Hi, Laszlo >> >> I am ok with the format string change. >> >> I just have a concern about the DEBUG level change. According to >> comments, if debug msg impacts boot performance, we should use >> DEBUG_VERBOSE. Does it impact OVMF boot performance significantly? If >> yes, I agree to change it to VERBOSE. Otherwise, I would suggest to >> keep INFO level. >> >> Others look good to me, Reviewed-by: Feng Tian >> >> #define DEBUG_INFO 0x0040 // Informational debug messages >> #define DEBUG_VERBOSE 0x0040 // Detailed debug messages that may >> significantly impact boot performance > > The main problem with these debug messages is that their amount scales > proportionally with the amount of data the system transfers from or to all > NVMe devices together, before ExitBootServices(). Dependent on what the user > does in the UEFI shell, or how much data a boot loader application loads from > an NVMe device (kernel, initial ram disk etc), or how much data a SysPrep > application massages, these log messages can "squash" everything else in the > full boot log. > > In turn, if logging is expensive (which is platform dependent), then the time > spent on logging these messages can impact boot performance noticeably. With > OVMF (x86), logging to the QEMU debug ioport is not extremely expensive (at > least we never felt motivated to measure it :)), but with ArmVirtPkg (logging > to the emulated serial port, running on > Aarch64 KVM), we did measure high costs in general. > > I've now looked up some numbers from last September. In those tests, the > ArmVirtQemu build would take about 6.1 seconds in total, from the start of > the virtual machine to reaching the guest OS kernel. This was with a debug > mask of 0x8040004F (DEBUG_ERROR | DEBUG_VERBOSE | DEBUG_INFO | DEBUG_FS | > DEBUG_LOAD | DEBUG_WARN | DEBUG_INIT). Changing the debug mask to just > DEBUG_ERROR, the time spent in ArmVirtQemu fell back to 3 seconds, > eliminating about half of the previous runtime. > > So, with ArmVirtPkg at least, any significant increase in the amount of debug > messages impacts boot performance quite visibly. The default debug mask is > 0x804F (== the first mask above, minus DEBUG_VERBOSE). The time of such a > boot should be somewhere between the above extremes -- it is tolerable, while > enabling the reader to have a good grasp on the boot process. But, if such a > log gets spammed with NVMe read/write messages, that will have a high impact. > > (Note, I'm not including NvmExpressDxe in ArmVirtQemu.dsc just yet, but the > aarch64 system target of QEMU, "qemu-system-aarch64 -M virt", *does* include > NVMe emulation; so this is not a purely theoretical discussion.) > > In short, the log messages in question can take a significant portion of an > "INFO level" log emitted for the entire boot, and on some platforms that will > have a high impact. > > Just to give you ad-hoc line counts with OVMF: using the default log mask > (0x804F), booting an installed Fedora 22 Workstation guest from an NVMe > device, the OVMF log consists of 2332 lines. Of those, 887 are "NvmeRead()" > messages. Hence the non-NvmeRead() messages take 1445 lines. > > Which means, relative to the non-NvmeRead() portion of the log (which is all > you would have if you booted off another device), the NvmeRead() messages add > 887/1445 ~= 61%. > > I think the other INFO messages logged by NvmExpressDxe are both helpful and > non-intrusive, but these two are intrusive. > > Thanks! > Laszlo > >> >> Thanks >> Feng >> >> -Original Message- >> From: Laszlo Ersek [mailto:ler...@redhat.com] >> Sent: Wednesday, January 27, 2016 10:36 >> To: edk2-de...@ml01.01.org >> Cc: Tian, Feng >> Subject: [PATCH 1/3] MdeModulePkg: NvmExpressDxe: clean up NvmeRead() >> / NvmeWrite() debug msgs >> >> These workhorse functions are part of the BlockIo protocol that >> NvmExpressDxe produces. For bulk data access, they are called very >> frequently. Their debug messages should be therefore downgraded to >> EFI_D_VERBOSE. >> >> In addition, the following DEBUG() warts are cleaned up: >> >> - The function name should be printed with %a /
Re: [edk2] [Patch] QuarkPlatformPkg: Add Readme.md for QuarkPlatformPkg
Reviewed by: Kelly Steele-Original Message- From: Kinney, Michael D Sent: January 27, 2016 22:58 To: edk2-devel@lists.01.org Cc: Steele, Kelly ; Yao, Jiewen Subject: [Patch] QuarkPlatformPkg: Add Readme.md for QuarkPlatformPkg Add a Readme.md for the QuarkPlatformPkg that describes how to build, boot, debug, and enable/disable features for the Intel(R) Galileo Development Board and the Intel(R) Galileo Gen 2 Development Board. Cc: Kelly Steele Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney --- QuarkPlatformPkg/Readme.md | 666 + 1 file changed, 666 insertions(+) create mode 100644 QuarkPlatformPkg/Readme.md diff --git a/QuarkPlatformPkg/Readme.md b/QuarkPlatformPkg/Readme.md new file mode 100644 index 000..04582cd --- /dev/null +++ b/QuarkPlatformPkg/Readme.md @@ -0,0 +1,666 @@ +# **EDK II firmware for Intel(R) Quark SoC X1000 based platforms** + +## **Features** +* UEFI firmware image with ability to enable/disable major features such as +- Logging +- Source level debug using [Intel(R) UEFI Development Kit Debugger Tool]( + https://firmware.intel.com/develop/intel-uefi-tools-and-utilities/intel-uefi-development-kit-debugger-tool) +- Boot Performance Measurements +- UEFI Secure Boot with Physical Presence +- TCG Measured Boot using TPM 1.2 hardware devices on I2C bus +* Minimal firmware image for initial power-on and debug +* UEFI Shell built into FLASH image +* UEFI Linux operating system boot support from Micro SD FLASH +* Hardware Support +- [Intel(R) Quark SoC X1000 CPU]( + http://www.intel.com/content/www/us/en/embedded/products/quark/quark-x1000-datasheet.html) +- [Intel(R) Galileo Development Board]( + http://www.intel.com/content/www/us/en/embedded/products/galileo/galileo-g1-datasheet.html) +- [Intel(R) Galileo Gen 2 Development Board]( + http://www.intel.com/content/www/us/en/embedded/products/galileo/galileo-overview.html) +- HPET Timer +- Real Time Clock +* Major I/O Subsystems +- PCI including support for Mini PCI Express Cards +- USB using EHCI and OHCI host controllers +- Micro SD FLASH with FAT file system support +- Serial UART up to 921600 baud for console, logging, and debug +* ACPI Tables with ACPI S3 sleep state support +* SMBIOS Tables + +## **Windows Build Instructions** + +### Pre-requisites + +* GIT client: Available from https://git-scm.com/downloads +* Microsoft Visual Studio. + - Visual Studio 2015 recommended and is used in the examples below. +* Microsoft Windows Driver Development Kit 3790.1830 + - +http://download.microsoft.com/download/9/0/f/90f019ac-8243-48d3-91cf-81 +fc4093ecfd/1830_usa_ddk.iso + - Mount ISO image + - Right click on ```x86\kitsetup.exe``` & choose **Run as +administrator** + - Install to C:\WINDDK\3790.1830 + - Uncheck all Component Groups + - Expand Build Environment Component + - Check Windows Driver Development Kit 16-bit Additional Build Tools + - Install +* ASL compiler: Available from http://www.acpica.org + - Install into ```C:\ASL``` to match default tools_def.txt configuration. + +Create a new directory for an EDK II WORKSPACE. + +The code block below shows the GIT clone operations required to pull +the EDK II source tree, the FatPkg sources, the pre-built versions of +BaseTools as WIN32 binaries, and the edk2-non-osi repository that +provides a binary file for the Quark Remote Management Unit (RMU). + +Next it sets environment variables that must be set before running +```edksetup.bat```. Since content is being pulled from multiple +repositories, the EDK II [Multiple Workspace]( +https://github.com/tianocore/tianocore.github.io/wiki/Multiple_Workspac +e) +feature is used. + +Next, the ```edksetup.bat``` file is run to complete the initialization +of an EDK II build environment. Two example build commands are shown. +The first one in ```QuarkPlatformPlg/Quark.dsc``` builds a full UEFI +firmware image that is able to boot the built-in UEFI Shell and Linux +from a micro SD FLASH card. The second one in +```QuarkPlatformPkg/QuarkMin.dsc``` builds a minimal firmware image that is useful for initial power-on and debug of new features. + +```cmd +git clone https://github.com/tianocore/edk2.git +git clone https://github.com/tianocore/edk2-FatPkg.git FatPkg git clone +https://github.com/tianocore/edk2-BaseTools-win32.git +git clone https://github.com/tianocore/edk2-non-osi.git + +set WORKSPACE=%CD% +set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\edk2-non-osi +set EDK_TOOLS_BIN=%WORKSPACE%\edk2-BaseTools-win32 + +cd edk2 +edksetup.bat + +build -a IA32 -t VS2015x86 -p QuarkPlatformPkg/Quark.dsc build -a IA32 +-t VS2015x86 -p QuarkPlatformPkg/QuarkMin.dsc ``` + +## **Linux
[edk2] [patch] MdePkg: Add missing definition for ACPI6.0.
Add missing definition in ACPI6.0 specification. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen"Cc: "Gao, Liming" --- MdePkg/Include/IndustryStandard/Acpi60.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/IndustryStandard/Acpi60.h b/MdePkg/Include/IndustryStandard/Acpi60.h index f0e4151..d736979 100644 --- a/MdePkg/Include/IndustryStandard/Acpi60.h +++ b/MdePkg/Include/IndustryStandard/Acpi60.h @@ -1,7 +1,7 @@ /** @file ACPI 6.0 definitions from the ACPI Specification Revision 6.0 April, 2015. - Copyright (c) 2015, Intel Corporation. All rights reserved. + Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved. (C) Copyright 2015 Hewlett Packard Enterprise Development LP This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -1666,6 +1666,9 @@ typedef struct { #define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02 #define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_SCI 0x03 #define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_NMI 0x04 +#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_CMCI 0x05 +#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_MCE 0x06 +#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_GPIO_SIGNAL 0x07 /// /// Hardware Error Notification Configuration Write Enable Structure Definition -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch 1/2] MdePkg: Correct inconsistent function descriptions in DNS
Reviewed-by: Liming Gao-Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Jiaxin Wu Sent: Friday, January 29, 2016 8:52 AM To: edk2-devel@lists.01.org Cc: Ye, Ting; Fu, Siyuan Subject: [edk2] [Patch 1/2] MdePkg: Correct inconsistent function descriptions in DNS This patch is used to correct inconsistent function descriptions in Dns4.h and Dns6.h. Cc: Fu Siyuan Cc: Ye Ting Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu --- MdePkg/Include/Protocol/Dns4.h | 5 ++--- MdePkg/Include/Protocol/Dns6.h | 8 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/MdePkg/Include/Protocol/Dns4.h b/MdePkg/Include/Protocol/Dns4.h index 3e7cdaa..2489268 100644 --- a/MdePkg/Include/Protocol/Dns4.h +++ b/MdePkg/Include/Protocol/Dns4.h @@ -2,11 +2,11 @@ This file defines the EFI Domain Name Service Binding Protocol interface. It is split into the following two main sections: DNSv4 Service Binding Protocol (DNSv4SB) DNSv4 Protocol (DNSv4) - Copyright (c) 2015, Intel Corporation. All rights reserved. + Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -337,11 +337,11 @@ EFI_STATUS The HostNameToIp () function is used to translate the host name to host IP address. A type A query is used to get the one or more IP addresses for this host. @param[in] ThisPointer to EFI_DNS4_PROTOCOL instance. - @param[in] HostnameHost name. + @param[in] HostNameHost name. @param[in] Token Point to the completion token to translate host name to host address. @retval EFI_SUCCESS The operation completed successfully. @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: @@ -378,11 +378,10 @@ EFI_STATUS Token is NULL. Token.Event is NULL. IpAddress is not valid IP address . @retval EFI_NO_MAPPING There's no source address is available for use. @retval EFI_ALREADY_STARTED This Token is being used in another DNS session. - @retval EFI_NOT_STARTED This instance has not been started. @retval EFI_OUT_OF_RESOURCESFailed to allocate needed resources. **/ typedef EFI_STATUS (EFIAPI *EFI_DNS4_IP_TO_HOST_NAME) ( diff --git a/MdePkg/Include/Protocol/Dns6.h b/MdePkg/Include/Protocol/Dns6.h index 03cdf6a..1ea85bc 100644 --- a/MdePkg/Include/Protocol/Dns6.h +++ b/MdePkg/Include/Protocol/Dns6.h @@ -2,11 +2,11 @@ This file defines the EFI DNSv6 (Domain Name Service version 6) Protocol. It is split into the following two main sections: DNSv6 Service Binding Protocol (DNSv6SB) DNSv6 Protocol (DNSv6) - Copyright (c) 2015, Intel Corporation. All rights reserved. + Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -299,11 +299,11 @@ EFI_STATUS @param[in] DnsConfigData Pointer to the configuration data structure. All associated storage to be allocated and released by caller. @retval EFI_SUCCESS The operation completed successfully. @retval EFI_INVALID_PARAMTERThis is NULL. - The StationIp address provided in DnsConfigData is not a valid unicast. + The StationIp address provided in DnsConfigData is not zero and not a valid unicast. DnsServerList is NULL while DnsServerList Count is not ZERO. DnsServerList Count is ZERO while DnsServerList is not NULL. @retval EFI_OUT_OF_RESOURCESThe DNS instance data or required space could not be allocated. @retval EFI_DEVICE_ERRORAn unexpected system or network error occurred. The EFI DNSv6 Protocol instance is not configured. @@ -321,14 +321,14 @@ EFI_STATUS /** Host name to host address translation. The HostNameToIp () function is used to translate the host name to host IP address. A - type A query is used to get the one or more IPv6 addresses for this host. + type query is used to get the one or more IPv6 addresses for this host. @param[in] This
Re: [edk2] [PATCH] Maintainers.txt: Update maintainers for MdeModulePkg
Reviewed-by: Feng Tian-Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Star Zeng Sent: Thursday, January 28, 2016 4:23 PM To: edk2-devel@lists.01.org Cc: Tian, Feng; Gao, Liming Subject: [edk2] [PATCH] Maintainers.txt: Update maintainers for MdeModulePkg Cc: Feng Tian Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng --- Maintainers.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Maintainers.txt b/Maintainers.txt index 0bd9c2f..86afbfb 100644 --- a/Maintainers.txt +++ b/Maintainers.txt @@ -138,6 +138,7 @@ M: Jiewen Yao MdeModulePkg W: https://github.com/tianocore/tianocore.github.io/wiki/MdeModulePkg M: Feng Tian +M: Star Zeng MdePkg W: https://github.com/tianocore/tianocore.github.io/wiki/MdePkg -- 2.7.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] BaseTools: Update BaseTools to pass VS2015 compiler
Reviewed-by: Liming Gao-Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Yonghong Zhu Sent: Friday, January 29, 2016 10:26 AM To: edk2-devel@lists.01.org Subject: [edk2] [Patch] BaseTools: Update BaseTools to pass VS2015 compiler Fix some errors to pass VS2015 compiler. 1. warning C4456: declaration of xxx hides previous local declaration 2. warning C4005: 'UINT8_MAX': macro redefinition Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/C/GenFw/Elf32Convert.c | 4 +-- BaseTools/Source/C/GenVtf/GenVtf.c | 16 ++-- BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaDec.c | 2 +- BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c | 33 +++-- BaseTools/Source/C/VfrCompile/VfrSyntax.g | 5 +++- 5 files changed, 29 insertions(+), 31 deletions(-) diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c b/BaseTools/Source/C/GenFw/Elf32Convert.c index eede645..9bf5855 100644 --- a/BaseTools/Source/C/GenFw/Elf32Convert.c +++ b/BaseTools/Source/C/GenFw/Elf32Convert.c @@ -1,9 +1,9 @@ /** @file Elf32 Convert solution -Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved. +Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved. Portions copyright (c) 2013, ARM Ltd. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -813,11 +813,11 @@ WriteRelocations32 ( if (IsTextShdr(SecShdr) || IsDataShdr(SecShdr)) { UINT32 RelIdx; FoundRelocations = TRUE; for (RelIdx = 0; RelIdx < RelShdr->sh_size; RelIdx += RelShdr->sh_entsize) { - Elf_Rel *Rel = (Elf_Rel *)((UINT8*)mEhdr + RelShdr->sh_offset + RelIdx); + Rel = (Elf_Rel *)((UINT8*)mEhdr + RelShdr->sh_offset + RelIdx); if (mEhdr->e_machine == EM_386) { switch (ELF_R_TYPE(Rel->r_info)) { case R_386_NONE: case R_386_PC32: diff --git a/BaseTools/Source/C/GenVtf/GenVtf.c b/BaseTools/Source/C/GenVtf/GenVtf.c index 6f66ddc..9a3f508 100644 --- a/BaseTools/Source/C/GenVtf/GenVtf.c +++ b/BaseTools/Source/C/GenVtf/GenVtf.c @@ -1,10 +1,10 @@ /** @file This file contains functions required to generate a boot strap file (BSF) also known as the Volume Top File (VTF) -Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved. +Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -2650,24 +2650,24 @@ Returns: OutFileName1 = VTF_OUTPUT_FILE1; } SymFileName = VTF_SYM_FILE; } else { INTN OutFileNameLen = strlen(OutFileName1); -INTN Index; +INTN NewIndex; -for (Index = OutFileNameLen; Index > 0; --Index) { - if (OutFileName1[Index] == '/' || OutFileName1[Index] == '\\') { +for (NewIndex = OutFileNameLen; NewIndex > 0; --NewIndex) { + if (OutFileName1[NewIndex] == '/' || OutFileName1[NewIndex] == '\\') { break; } } -if (Index == 0) { +if (NewIndex == 0) { SymFileName = VTF_SYM_FILE; } else { - INTN SymFileNameLen = Index + 1 + strlen(VTF_SYM_FILE); + INTN SymFileNameLen = NewIndex + 1 + strlen(VTF_SYM_FILE); SymFileName = malloc(SymFileNameLen + 1); - memcpy(SymFileName, OutFileName1, Index + 1); - memcpy(SymFileName + Index + 1, VTF_SYM_FILE, strlen(VTF_SYM_FILE)); + memcpy(SymFileName, OutFileName1, NewIndex + 1); + memcpy(SymFileName + NewIndex + 1, VTF_SYM_FILE, strlen(VTF_SYM_FILE)); SymFileName[SymFileNameLen] = '\0'; } if (DebugMode) { DebugMsg(UTILITY_NAME, 0, DebugLevel, SymFileName, NULL); } diff --git a/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaDec.c b/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaDec.c index eb52501..87bea86 100644 --- a/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaDec.c +++ b/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaDec.c @@ -264,11 +264,11 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte } state = state < kNumLitStates ? 8 : 11; prob = probs + RepLenCoder; } { -unsigned limit, offset; +unsigned offset; CLzmaProb *probLen = prob + LenChoice; IF_BIT_0(probLen) { UPDATE_0(probLen); probLen = prob + LenLow + (posState << kLenNumLowBits); diff --git a/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c b/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c index 95c3c9f..9b2dd16 100644
[edk2] [PATCH v2] NetworkPkg:Add a new error status code EFI_HTTP_ERROR
v2: * *Return the EFI_HTTP_ERROR in the “Status” field in token, instead of in the status codes returned table of EFI_HTTP_PROTOCOL.Response() interface. Cc: Fu SiyuanCc: Ye Ting Cc: Wu Jiaxin Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo --- NetworkPkg/HttpBootDxe/HttpBootSupport.c | 13 +++-- NetworkPkg/HttpDxe/HttpImpl.c| 17 ++--- NetworkPkg/HttpDxe/HttpImpl.h| 1 + NetworkPkg/HttpDxe/HttpProto.h | 2 ++ 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/NetworkPkg/HttpBootDxe/HttpBootSupport.c b/NetworkPkg/HttpBootDxe/HttpBootSupport.c index f9bbe4b..5572cb4 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootSupport.c +++ b/NetworkPkg/HttpBootDxe/HttpBootSupport.c @@ -969,19 +969,20 @@ HttpIoRecvResponse ( } // // Store the received data into the wrapper. // - Status = HttpIo->RspToken.Status; + if (HttpIo->RspToken.Status != EFI_HTTP_ERROR) { +Status = HttpIo->RspToken.Status; + } else if (RecvMsgHeader){ +StatusCode = HttpIo->RspToken.Message->Data.Response->StatusCode; +HttpBootPrintErrorMessage (StatusCode); + } + if (!EFI_ERROR (Status)) { ResponseData->HeaderCount = HttpIo->RspToken.Message->HeaderCount; ResponseData->Headers = HttpIo->RspToken.Message->Headers; ResponseData->BodyLength = HttpIo->RspToken.Message->BodyLength; } - - if (RecvMsgHeader) { -StatusCode = HttpIo->RspToken.Message->Data.Response->StatusCode; -HttpBootPrintErrorMessage (StatusCode); - } return Status; } diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c index b46f0ae..d1e3dd1 100644 --- a/NetworkPkg/HttpDxe/HttpImpl.c +++ b/NetworkPkg/HttpDxe/HttpImpl.c @@ -974,11 +974,11 @@ HttpResponseWorker ( FreePool (HttpHeaders); HttpHeaders = NULL; HttpMsg->Data.Response->StatusCode = HttpMappingToStatusCode (StatusCode); - +HttpInstance->StatusCode = StatusCode; // // Init message-body parser by header information. // Status = EFI_NOT_READY; ValueInItem = NULL; @@ -1109,11 +1109,17 @@ HttpResponseWorker ( Exit: Item = NetMapFindKey (>HttpInstance->RxTokens, Wrap->HttpToken); if (Item != NULL) { NetMapRemoveItem (>HttpInstance->RxTokens, Item, NULL); } - Token->Status = Status; + + if (HttpInstance->StatusCode >= HTTP_ERROR_STATUS) { +Token->Status = EFI_HTTP_ERROR; + } else { +Token->Status = Status; + } + gBS->SignalEvent (Token->Event); HttpCloseTcpRxEvent (Wrap); FreePool (Wrap); return Status; @@ -1134,11 +1140,16 @@ Error: if (HttpInstance->CacheBody != NULL) { FreePool (HttpInstance->CacheBody); HttpInstance->CacheBody = NULL; } - Token->Status = Status; + if (HttpInstance->StatusCode >= HTTP_ERROR_STATUS) { +Token->Status = EFI_HTTP_ERROR; + } else { +Token->Status = Status; + } + gBS->SignalEvent (Token->Event); return Status; } diff --git a/NetworkPkg/HttpDxe/HttpImpl.h b/NetworkPkg/HttpDxe/HttpImpl.h index bfbaecc..4f9068a 100644 --- a/NetworkPkg/HttpDxe/HttpImpl.h +++ b/NetworkPkg/HttpDxe/HttpImpl.h @@ -14,10 +14,11 @@ **/ #ifndef __EFI_HTTP_IMPL_H__ #define __EFI_HTTP_IMPL_H__ +#define HTTP_ERROR_STATUS300 #define HTTP_DEFAULT_PORT80 #define HTTP_END_OF_HDR_STR "\r\n\r\n" #define HTTP_CRLF_STR"\r\n" #define HTTP_VERSION_STR "HTTP/1.1" #define HTTP_VERSION_CRLF_STR" HTTP/1.1\r\n" diff --git a/NetworkPkg/HttpDxe/HttpProto.h b/NetworkPkg/HttpDxe/HttpProto.h index e43a2dc..0f2bf53 100644 --- a/NetworkPkg/HttpDxe/HttpProto.h +++ b/NetworkPkg/HttpDxe/HttpProto.h @@ -88,10 +88,12 @@ typedef struct _HTTP_PROTOCOL { HTTP_SERVICE *Service; LIST_ENTRYLink; // Link to all HTTP instance from the service. BOOLEAN InDestroy; INTN State; + UINTN StatusCode; + EFI_HANDLETcp4ChildHandle; EFI_TCP4_PROTOCOL *Tcp4; EFI_TCP4_CONFIG_DATA Tcp4CfgData; EFI_TCP4_OPTION Tcp4Option; -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2] MdePkg:Add a new error status code EFI_HTTP_ERROR.
v2: *Return the EFI_HTTP_ERROR in the “Status” field in token, instead of in the status codes returned table of EFI_HTTP_PROTOCOL.Response() interface. Cc: Ye TingCc: Fu Siyuan Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo --- MdePkg/Include/Base.h | 7 ++- MdePkg/Include/Protocol/Http.h | 2 ++ MdePkg/Include/Uefi/UefiBaseType.h | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index 85ed34f..882b5a6 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include/Base.h @@ -4,11 +4,11 @@ This is the include file for any module of type base. Base modules only use types defined via this include file and can be ported easily to any environment. There are a set of base libraries in the Mde Package that can be used to implement base modules. -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved. +Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved. Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php. @@ -939,10 +939,15 @@ typedef UINTN RETURN_STATUS; /// security status. /// #define RETURN_COMPROMISED_DATA ENCODE_ERROR (33) /// +/// A HTTP error occurred during the network operation. +/// +#define RETURN_HTTP_ERRORENCODE_ERROR (35) + +/// /// The string contained one or more characters that /// the device could not render and were skipped. /// #define RETURN_WARN_UNKNOWN_GLYPHENCODE_WARNING (1) diff --git a/MdePkg/Include/Protocol/Http.h b/MdePkg/Include/Protocol/Http.h index ad6c76a..22201b4 100644 --- a/MdePkg/Include/Protocol/Http.h +++ b/MdePkg/Include/Protocol/Http.h @@ -280,10 +280,12 @@ typedef struct { EFI_EVENT Event; /// /// Status will be set to one of the following value if the HTTP request is /// successfully sent or if an unexpected error occurs: /// EFI_SUCCESS: The HTTP request was successfully sent to the remote host. + /// EFI_HTTP_ERROR: The response message was successfully received but contains a + /// HTTP error. The response status code is returned in token. /// EFI_ABORTED: The HTTP request was cancelled by the caller and removed from /// the transmit queue. /// EFI_TIMEOUT: The HTTP request timed out before reaching the remote host. /// EFI_DEVICE_ERROR: An unexpected system or network error occurred. /// diff --git a/MdePkg/Include/Uefi/UefiBaseType.h b/MdePkg/Include/Uefi/UefiBaseType.h index b505e7d..90a93db 100644 --- a/MdePkg/Include/Uefi/UefiBaseType.h +++ b/MdePkg/Include/Uefi/UefiBaseType.h @@ -1,10 +1,10 @@ /** @file Defines data types and constants introduced in UEFI. Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved. -Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved. +Portions copyright (c) 2011 - 2016, ARM Ltd. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php. @@ -149,10 +149,11 @@ typedef union { #define EFI_CRC_ERROR RETURN_CRC_ERROR #define EFI_END_OF_MEDIA RETURN_END_OF_MEDIA #define EFI_END_OF_FILE RETURN_END_OF_FILE #define EFI_INVALID_LANGUAGE RETURN_INVALID_LANGUAGE #define EFI_COMPROMISED_DATA RETURN_COMPROMISED_DATA +#define EFI_HTTP_ERRORRETURN_HTTP_ERROR #define EFI_WARN_UNKNOWN_GLYPHRETURN_WARN_UNKNOWN_GLYPH #define EFI_WARN_DELETE_FAILURE RETURN_WARN_DELETE_FAILURE #define EFI_WARN_WRITE_FAILURERETURN_WARN_WRITE_FAILURE #define EFI_WARN_BUFFER_TOO_SMALL RETURN_WARN_BUFFER_TOO_SMALL -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] SCT compilation failed with UEFI spec 2.5
Meenakshi, Could you please the more information about the build step and the SCT/EDK2 version? BTW, since SCT is not the open source project, please send email to u...@uefi.org for discussion. Best Regards Eric -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Supreeth Venkatesh Sent: Thursday, January 28, 2016 6:01 PM To: Meenakshi Aggarwal; edk2-devel@lists.01.org Subject: Re: [edk2] SCT compilation failed with UEFI spec 2.5 What is the SCT version that is being used? Is the latest master from git clone https://github.com/UEFI/UEFI-SCT.git being used? Thanks, Supreeth -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Meenakshi Aggarwal Sent: Thursday, January 28, 2016 3:34 AM To: edk2-devel@lists.01.org Subject: [edk2] SCT compilation failed with UEFI spec 2.5 Hi, I am facing following error while compiling SCT package: n file included from /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/MdePkg/Include/Uefi.h:24:0, from /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/Build/UefiSct/DEBUG_GCC48/AARCH64/SctPkg/TestInfrastructure/SCT/Framework/Sct/DEBUG/AutoGen.h:17, from :0: /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/MdePkg/Include/Uefi/UefiSpec.h:1768:0: warning: "EFI_SPECIFICATION_VERSION" redefined [enabled by default] #define EFI_SPECIFICATION_VERSION EFI_SYSTEM_TABLE_REVISION ^ :0:0: note: this is the location of the previous definition /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/SctPkg/TestInfrastructure/SCT/Framework/Core/Sct.c:66:1: warning: missing braces around initializer [-Wmissing-braces] EFI_GUID gEfiSystemHangAssertionGuid = EFI_SYSTEM_HANG_ASSERTION_GUID; ^ /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/SctPkg/TestInfrastructure/SCT/Framework/Core/Sct.c:66:1: warning: (near initialization for 'gEfiSystemHangAssertionGuid.Data4') [-Wmissing-braces] /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/SctPkg/TestInfrastructure/SCT/Framework/Core/Sct.c: In function 'PrintUsage': /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/SctPkg/TestInfrastructure/SCT/Framework/Core/Sct.c:226:5: error: 'EFI_SCT_NAME' undeclared (first use in this function) EFI_SCT_NAME, ^ /proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/SctPkg/TestInfrastructure/SCT/Framework/Core/Sct.c:226:5: note: each undeclared identifier is reported only once for each function it appears in make: *** [/proj/nmgsw_be/users/b46476/code/UEFI/stash/new/ls2080a-uefi-new/Build/UefiSct/DEBUG_GCC48/AARCH64/SctPkg/TestInfrastructure/SCT/Framework/Sct/OUTPUT/Core/Sct.obj] Error 1 Kindly help on what is the issue. Thanks & Regards, Meenakshi ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [patch] MdePkg: Add missing definition for ACPI6.0.
Reviewed-by: Liming Gao-Original Message- From: Yao, Jiewen Sent: Friday, January 29, 2016 12:41 PM To: edk2-de...@ml01.01.org Cc: Yao, Jiewen; Gao, Liming Subject: [patch] MdePkg: Add missing definition for ACPI6.0. Add missing definition in ACPI6.0 specification. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" Cc: "Gao, Liming" --- MdePkg/Include/IndustryStandard/Acpi60.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/IndustryStandard/Acpi60.h b/MdePkg/Include/IndustryStandard/Acpi60.h index f0e4151..d736979 100644 --- a/MdePkg/Include/IndustryStandard/Acpi60.h +++ b/MdePkg/Include/IndustryStandard/Acpi60.h @@ -1,7 +1,7 @@ /** @file ACPI 6.0 definitions from the ACPI Specification Revision 6.0 April, 2015. - Copyright (c) 2015, Intel Corporation. All rights reserved. + Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved. (C) Copyright 2015 Hewlett Packard Enterprise Development LP This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -1666,6 +1666,9 @@ typedef struct { #define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02 #define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_SCI 0x03 #define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_NMI 0x04 +#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_CMCI 0x05 +#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_MCE 0x06 +#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_GPIO_SIGNAL 0x07 /// /// Hardware Error Notification Configuration Write Enable Structure Definition -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [patch] MdePkg: Add ACPI6.1 definition.
Jiewen: Will you update MdePkg\Include\IndustryStandard\Acpi.h to include new Acpi61.h? Thanks Liming -Original Message- From: Yao, Jiewen Sent: Friday, January 29, 2016 12:44 PM To: edk2-de...@ml01.01.org Cc: Yao, Jiewen; Gao, Liming Subject: [patch] MdePkg: Add ACPI6.1 definition. Add ACPI 6.1 definitions from the ACPI Specification Revision 6.1 January, 2016. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen"Cc: "Gao, Liming" --- MdePkg/Include/IndustryStandard/Acpi61.h | 2375 ++ 1 file changed, 2375 insertions(+) create mode 100644 MdePkg/Include/IndustryStandard/Acpi61.h diff --git a/MdePkg/Include/IndustryStandard/Acpi61.h b/MdePkg/Include/IndustryStandard/Acpi61.h new file mode 100644 index 000..c68f140 --- /dev/null +++ b/MdePkg/Include/IndustryStandard/Acpi61.h @@ -0,0 +1,2375 @@ +/** @file + ACPI 6.1 definitions from the ACPI Specification Revision 6.1 January, 2016. + + Copyright (c) 2016, Intel Corporation. All rights reserved. + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +**/ + +#ifndef _ACPI_6_1_H_ +#define _ACPI_6_1_H_ + +#include + +// +// Ensure proper structure formats +// +#pragma pack(1) + +/// +/// ACPI 6.1 Generic Address Space definition +/// +typedef struct { + UINT8 AddressSpaceId; + UINT8 RegisterBitWidth; + UINT8 RegisterBitOffset; + UINT8 AccessSize; + UINT64 Address; +} EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE; + +// +// Generic Address Space Address IDs +// +#define EFI_ACPI_6_1_SYSTEM_MEMORY 0 +#define EFI_ACPI_6_1_SYSTEM_IO 1 +#define EFI_ACPI_6_1_PCI_CONFIGURATION_SPACE2 +#define EFI_ACPI_6_1_EMBEDDED_CONTROLLER3 +#define EFI_ACPI_6_1_SMBUS 4 +#define EFI_ACPI_6_1_PLATFORM_COMMUNICATION_CHANNEL 0x0A +#define EFI_ACPI_6_1_FUNCTIONAL_FIXED_HARDWARE 0x7F + +// +// Generic Address Space Access Sizes +// +#define EFI_ACPI_6_1_UNDEFINED 0 +#define EFI_ACPI_6_1_BYTE 1 +#define EFI_ACPI_6_1_WORD 2 +#define EFI_ACPI_6_1_DWORD 3 +#define EFI_ACPI_6_1_QWORD 4 + +// +// ACPI 6.1 table structures +// + +/// +/// Root System Description Pointer Structure +/// +typedef struct { + UINT64 Signature; + UINT8 Checksum; + UINT8 OemId[6]; + UINT8 Revision; + UINT32 RsdtAddress; + UINT32 Length; + UINT64 XsdtAddress; + UINT8 ExtendedChecksum; + UINT8 Reserved[3]; +} EFI_ACPI_6_1_ROOT_SYSTEM_DESCRIPTION_POINTER; + +/// +/// RSD_PTR Revision (as defined in ACPI 6.1 spec.) +/// +#define EFI_ACPI_6_1_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 6.1) says current value is 2 + +/// +/// Common table header, this prefaces all ACPI tables, including FACS, but +/// excluding the RSD PTR structure +/// +typedef struct { + UINT32 Signature; + UINT32 Length; +} EFI_ACPI_6_1_COMMON_HEADER; + +// +// Root System Description Table +// No definition needed as it is a common description table header, the same with +// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers. +// + +/// +/// RSDT Revision (as defined in ACPI 6.1 spec.) +/// +#define EFI_ACPI_6_1_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 + +// +// Extended System Description Table +// No definition needed as it is a common description table header, the same with +// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers. +// + +/// +/// XSDT Revision (as defined in ACPI 6.1 spec.) +/// +#define EFI_ACPI_6_1_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 + +/// +/// Fixed ACPI Description Table Structure (FADT) +/// +typedef struct { + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 FirmwareCtrl; + UINT32 Dsdt; + UINT8 Reserved0; + UINT8 PreferredPmProfile; + UINT16 SciInt; + UINT32 SmiCmd; + UINT8 AcpiEnable; + UINT8 AcpiDisable; + UINT8 S4BiosReq; + UINT8 PstateCnt; + UINT32 Pm1aEvtBlk; + UINT32 Pm1bEvtBlk; + UINT32 Pm1aCntBlk; + UINT32
Re: [edk2] [PATCH v2] MdePkg:Add a new error status code EFI_HTTP_ERROR.
Reviewed-by: Siyuan Fu-Original Message- From: Zhang, Lubo Sent: Friday, January 29, 2016 11:45 AM To: edk2-devel@lists.01.org Cc: Ye, Ting ; Fu, Siyuan ; Gao, Liming Subject: [PATCH v2] MdePkg:Add a new error status code EFI_HTTP_ERROR. v2: *Return the EFI_HTTP_ERROR in the “Status” field in token, instead of in the status codes returned table of EFI_HTTP_PROTOCOL.Response() interface. Cc: Ye Ting Cc: Fu Siyuan Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo --- MdePkg/Include/Base.h | 7 ++- MdePkg/Include/Protocol/Http.h | 2 ++ MdePkg/Include/Uefi/UefiBaseType.h | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index 85ed34f..882b5a6 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include/Base.h @@ -4,11 +4,11 @@ This is the include file for any module of type base. Base modules only use types defined via this include file and can be ported easily to any environment. There are a set of base libraries in the Mde Package that can be used to implement base modules. -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved. +Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved. Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php. @@ -939,10 +939,15 @@ typedef UINTN RETURN_STATUS; /// security status. /// #define RETURN_COMPROMISED_DATA ENCODE_ERROR (33) /// +/// A HTTP error occurred during the network operation. +/// +#define RETURN_HTTP_ERRORENCODE_ERROR (35) + +/// /// The string contained one or more characters that /// the device could not render and were skipped. /// #define RETURN_WARN_UNKNOWN_GLYPHENCODE_WARNING (1) diff --git a/MdePkg/Include/Protocol/Http.h b/MdePkg/Include/Protocol/Http.h index ad6c76a..22201b4 100644 --- a/MdePkg/Include/Protocol/Http.h +++ b/MdePkg/Include/Protocol/Http.h @@ -280,10 +280,12 @@ typedef struct { EFI_EVENT Event; /// /// Status will be set to one of the following value if the HTTP request is /// successfully sent or if an unexpected error occurs: /// EFI_SUCCESS: The HTTP request was successfully sent to the remote host. + /// EFI_HTTP_ERROR: The response message was successfully received but contains a + /// HTTP error. The response status code is returned in token. /// EFI_ABORTED: The HTTP request was cancelled by the caller and removed from /// the transmit queue. /// EFI_TIMEOUT: The HTTP request timed out before reaching the remote host. /// EFI_DEVICE_ERROR: An unexpected system or network error occurred. /// diff --git a/MdePkg/Include/Uefi/UefiBaseType.h b/MdePkg/Include/Uefi/UefiBaseType.h index b505e7d..90a93db 100644 --- a/MdePkg/Include/Uefi/UefiBaseType.h +++ b/MdePkg/Include/Uefi/UefiBaseType.h @@ -1,10 +1,10 @@ /** @file Defines data types and constants introduced in UEFI. Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved. -Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved. +Portions copyright (c) 2011 - 2016, ARM Ltd. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php. @@ -149,10 +149,11 @@ typedef union { #define EFI_CRC_ERROR RETURN_CRC_ERROR #define EFI_END_OF_MEDIA RETURN_END_OF_MEDIA #define EFI_END_OF_FILE RETURN_END_OF_FILE #define EFI_INVALID_LANGUAGE RETURN_INVALID_LANGUAGE #define EFI_COMPROMISED_DATA RETURN_COMPROMISED_DATA +#define EFI_HTTP_ERRORRETURN_HTTP_ERROR #define EFI_WARN_UNKNOWN_GLYPHRETURN_WARN_UNKNOWN_GLYPH #define EFI_WARN_DELETE_FAILURE RETURN_WARN_DELETE_FAILURE #define EFI_WARN_WRITE_FAILURERETURN_WARN_WRITE_FAILURE #define EFI_WARN_BUFFER_TOO_SMALL RETURN_WARN_BUFFER_TOO_SMALL -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [patch] MdePkg: Add ACPI6.1 definition.
Yes, thanks to remind me. Patch will be sent. -Original Message- From: Gao, Liming Sent: Friday, January 29, 2016 1:17 PM To: Yao, Jiewen; edk2-de...@ml01.01.org Subject: RE: [patch] MdePkg: Add ACPI6.1 definition. Jiewen: Will you update MdePkg\Include\IndustryStandard\Acpi.h to include new Acpi61.h? Thanks Liming -Original Message- From: Yao, Jiewen Sent: Friday, January 29, 2016 12:44 PM To: edk2-de...@ml01.01.org Cc: Yao, Jiewen; Gao, Liming Subject: [patch] MdePkg: Add ACPI6.1 definition. Add ACPI 6.1 definitions from the ACPI Specification Revision 6.1 January, 2016. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen"Cc: "Gao, Liming" --- MdePkg/Include/IndustryStandard/Acpi61.h | 2375 ++ 1 file changed, 2375 insertions(+) create mode 100644 MdePkg/Include/IndustryStandard/Acpi61.h diff --git a/MdePkg/Include/IndustryStandard/Acpi61.h b/MdePkg/Include/IndustryStandard/Acpi61.h new file mode 100644 index 000..c68f140 --- /dev/null +++ b/MdePkg/Include/IndustryStandard/Acpi61.h @@ -0,0 +1,2375 @@ +/** @file + ACPI 6.1 definitions from the ACPI Specification Revision 6.1 January, 2016. + + Copyright (c) 2016, Intel Corporation. All rights reserved. + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +**/ + +#ifndef _ACPI_6_1_H_ +#define _ACPI_6_1_H_ + +#include + +// +// Ensure proper structure formats +// +#pragma pack(1) + +/// +/// ACPI 6.1 Generic Address Space definition +/// +typedef struct { + UINT8 AddressSpaceId; + UINT8 RegisterBitWidth; + UINT8 RegisterBitOffset; + UINT8 AccessSize; + UINT64 Address; +} EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE; + +// +// Generic Address Space Address IDs +// +#define EFI_ACPI_6_1_SYSTEM_MEMORY 0 +#define EFI_ACPI_6_1_SYSTEM_IO 1 +#define EFI_ACPI_6_1_PCI_CONFIGURATION_SPACE2 +#define EFI_ACPI_6_1_EMBEDDED_CONTROLLER3 +#define EFI_ACPI_6_1_SMBUS 4 +#define EFI_ACPI_6_1_PLATFORM_COMMUNICATION_CHANNEL 0x0A +#define EFI_ACPI_6_1_FUNCTIONAL_FIXED_HARDWARE 0x7F + +// +// Generic Address Space Access Sizes +// +#define EFI_ACPI_6_1_UNDEFINED 0 +#define EFI_ACPI_6_1_BYTE 1 +#define EFI_ACPI_6_1_WORD 2 +#define EFI_ACPI_6_1_DWORD 3 +#define EFI_ACPI_6_1_QWORD 4 + +// +// ACPI 6.1 table structures +// + +/// +/// Root System Description Pointer Structure +/// +typedef struct { + UINT64 Signature; + UINT8 Checksum; + UINT8 OemId[6]; + UINT8 Revision; + UINT32 RsdtAddress; + UINT32 Length; + UINT64 XsdtAddress; + UINT8 ExtendedChecksum; + UINT8 Reserved[3]; +} EFI_ACPI_6_1_ROOT_SYSTEM_DESCRIPTION_POINTER; + +/// +/// RSD_PTR Revision (as defined in ACPI 6.1 spec.) +/// +#define EFI_ACPI_6_1_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 6.1) says current value is 2 + +/// +/// Common table header, this prefaces all ACPI tables, including FACS, but +/// excluding the RSD PTR structure +/// +typedef struct { + UINT32 Signature; + UINT32 Length; +} EFI_ACPI_6_1_COMMON_HEADER; + +// +// Root System Description Table +// No definition needed as it is a common description table header, the same with +// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers. +// + +/// +/// RSDT Revision (as defined in ACPI 6.1 spec.) +/// +#define EFI_ACPI_6_1_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 + +// +// Extended System Description Table +// No definition needed as it is a common description table header, the same with +// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers. +// + +/// +/// XSDT Revision (as defined in ACPI 6.1 spec.) +/// +#define EFI_ACPI_6_1_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 + +/// +/// Fixed ACPI Description Table Structure (FADT) +/// +typedef struct { + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 FirmwareCtrl; + UINT32 Dsdt; + UINT8 Reserved0; + UINT8 PreferredPmProfile; + UINT16 SciInt; + UINT32 SmiCmd; + UINT8 AcpiEnable; + UINT8 AcpiDisable; + UINT8 S4BiosReq; + UINT8
[edk2] [patch] MdePkg: Update Acpi.h to include 6.1.
Update Acpi.h to include latest Acpi6.1 header file. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen"Cc: "Gao, Liming" --- MdePkg/Include/IndustryStandard/Acpi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdePkg/Include/IndustryStandard/Acpi.h b/MdePkg/Include/IndustryStandard/Acpi.h index be91b0f..ad8504a 100644 --- a/MdePkg/Include/IndustryStandard/Acpi.h +++ b/MdePkg/Include/IndustryStandard/Acpi.h @@ -2,7 +2,7 @@ This file contains the latest ACPI definitions that are consumed by drivers that do not care about ACPI versions. - Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved. + Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -16,6 +16,6 @@ #ifndef _ACPI_H_ #define _ACPI_H_ -#include +#include #endif -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel