[edk2] [PATCH v2] BaseTools: Add error condition for the path in PACKAGES_PATH env
From: "Zhu, Yonghong" <yonghong@intel.com> This patch adds two error conditions: 1) if one path in PACKAGES_PATH doesn't exist. 2) if the space exists in the PACKAGES_PATH. In V2, highlight one path in PACKAGES_PATH env doesn't exist. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong@intel.com> Reviewed-by: Liming Gao <liming@intel.com> Reviewed by: Andrew Fish <af...@apple.com> --- BaseTools/Source/Python/build/build.py | 6 ++ 1 file changed, 6 insertions(+) diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index 07891da..4f859bf 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -110,6 +110,12 @@ def CheckEnvVariable(): # set multiple workspace PackagesPath = os.getenv("PACKAGES_PATH") mws.setWs(WorkspaceDir, PackagesPath) +if mws.PACKAGES_PATH: +for Path in mws.PACKAGES_PATH: +if not os.path.exists(Path): +EdkLogger.error("build", FILE_NOT_FOUND, "One Path in PACKAGES_PATH doesn't exist", ExtraData="%s" % Path) +elif ' ' in Path: +EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "No space is allowed in PACKAGES_PATH", ExtraData=Path) # # Check EFI_SOURCE (Edk build convention). EDK_SOURCE will always point to ECP -- 2.8.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch] MdePkg: Update StatusCode Runtime Protocol comments to follow PI spec.
Cc: Star Zeng <star.z...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- MdePkg/Include/Protocol/StatusCode.h | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/MdePkg/Include/Protocol/StatusCode.h b/MdePkg/Include/Protocol/StatusCode.h index 281e0ce..2a19f3a 100644 --- a/MdePkg/Include/Protocol/StatusCode.h +++ b/MdePkg/Include/Protocol/StatusCode.h @@ -1,15 +1,7 @@ /** @file Status code Runtime Protocol as defined in PI Specification VOLUME 2 DXE - The StatusCode () service is added to the EFI system table and the - EFI_STATUS_CODE_ARCH_PROTOCOL_GUID protocol is registered with a NULL - pointer. - - No CRC of the EFI system table is required, since that is done in the DXE core. - - This code abstracts Status Code reporting. - - Copyright (c) 2006 - 2009, 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 @@ -56,8 +48,7 @@ EFI_STATUS /// /// Provides the service required to report a status code to the platform firmware. -/// This protocol must be produced by a runtime DXE driver and may be consumed -/// only by the DXE Foundation. +/// This protocol must be produced by a runtime DXE driver. /// typedef struct _EFI_STATUS_CODE_PROTOCOL { EFI_REPORT_STATUS_CODE ReportStatusCode; -- 2.8.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch] SecurityPkg: Use PcdGet32() to access PcdPeiCoreMaxFvSupported
FixedPcdGet32() limits PcdPeiCoreMaxFvSupported type as FixedAtBuild. PcdGet32() allows PCD be configured as FixedAtBuild or PatchableInModule. Cc: Chao Zhang <chao.b.zh...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 10 +- SecurityPkg/Tcg/TrEEPei/TrEEPei.c | 10 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c index 3b4b5fe..a830ba8 100644 --- a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c +++ b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c @@ -1,7 +1,7 @@ /** @file Initialize TPM2 device and measure FVs before handing off control to DXE. -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 @@ -649,8 +649,8 @@ MeasureFvImage ( // // Add new FV into the measured FV list. // - ASSERT (mMeasuredBaseFvIndex < FixedPcdGet32 (PcdPeiCoreMaxFvSupported)); - if (mMeasuredBaseFvIndex < FixedPcdGet32 (PcdPeiCoreMaxFvSupported)) { + ASSERT (mMeasuredBaseFvIndex < PcdGet32 (PcdPeiCoreMaxFvSupported)); + if (mMeasuredBaseFvIndex < PcdGet32 (PcdPeiCoreMaxFvSupported)) { mMeasuredBaseFvInfo[mMeasuredBaseFvIndex].BlobBase = FvBase; mMeasuredBaseFvInfo[mMeasuredBaseFvIndex].BlobLength = FvLength; mMeasuredBaseFvIndex++; @@ -761,8 +761,8 @@ FirmwareVolmeInfoPpiNotifyCallback ( // if (Fv->ParentFvName != NULL || Fv->ParentFileName != NULL ) { -ASSERT (mMeasuredChildFvIndex < FixedPcdGet32 (PcdPeiCoreMaxFvSupported)); -if (mMeasuredChildFvIndex < FixedPcdGet32 (PcdPeiCoreMaxFvSupported)) { +ASSERT (mMeasuredChildFvIndex < PcdGet32 (PcdPeiCoreMaxFvSupported)); +if (mMeasuredChildFvIndex < PcdGet32 (PcdPeiCoreMaxFvSupported)) { // // Check whether FV is in the measured child FV list. // diff --git a/SecurityPkg/Tcg/TrEEPei/TrEEPei.c b/SecurityPkg/Tcg/TrEEPei/TrEEPei.c index 7a17b0a..41edfdd 100644 --- a/SecurityPkg/Tcg/TrEEPei/TrEEPei.c +++ b/SecurityPkg/Tcg/TrEEPei/TrEEPei.c @@ -1,7 +1,7 @@ /** @file Initialize TPM2 device and measure FVs before handing off control to DXE. -Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved. +Copyright (c) 2013 - 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 @@ -431,8 +431,8 @@ MeasureFvImage ( // // Add new FV into the measured FV list. // - ASSERT (mMeasuredBaseFvIndex < FixedPcdGet32 (PcdPeiCoreMaxFvSupported)); - if (mMeasuredBaseFvIndex < FixedPcdGet32 (PcdPeiCoreMaxFvSupported)) { + ASSERT (mMeasuredBaseFvIndex < PcdGet32 (PcdPeiCoreMaxFvSupported)); + if (mMeasuredBaseFvIndex < PcdGet32 (PcdPeiCoreMaxFvSupported)) { mMeasuredBaseFvInfo[mMeasuredBaseFvIndex].BlobBase = FvBase; mMeasuredBaseFvInfo[mMeasuredBaseFvIndex].BlobLength = FvLength; mMeasuredBaseFvIndex++; @@ -543,8 +543,8 @@ FirmwareVolmeInfoPpiNotifyCallback ( // if (Fv->ParentFvName != NULL || Fv->ParentFileName != NULL ) { -ASSERT (mMeasuredChildFvIndex < FixedPcdGet32 (PcdPeiCoreMaxFvSupported)); -if (mMeasuredChildFvIndex < FixedPcdGet32 (PcdPeiCoreMaxFvSupported)) { +ASSERT (mMeasuredChildFvIndex < PcdGet32 (PcdPeiCoreMaxFvSupported)); +if (mMeasuredChildFvIndex < PcdGet32 (PcdPeiCoreMaxFvSupported)) { // // Check whether FV is in the measured child FV list. // -- 2.8.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch] MdeModulePkg: DxeCore MemoryPool Algorithm Update
Use 128 bytes as the start size region to be same to previous one. 64 bytes is small as the first range. On X64 arch, POOL_OVERHEAD takes 40 bytes, the pool data less than 24 bytes can be fit into it. But, the real allocation is few that can't reduce its free pool link list. And, the second range (64~128) has more allocation that also increases the free pool link list of the first range. Then, the link list will become longer and longer. When LinkList check enable in DEBUG tip, the long link list will bring the additional overhead and bad performance. Here is the performance data collected in our X64 platform with DEBUG enable. 64 byte: 22 seconds in BDS phase 128 byte: 19.6 seconds in BDS phase Cc: Michael Kinney <michael.d.kin...@intel.com> Cc: Ard Biesheuvel <ard.biesheu...@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- MdeModulePkg/Core/Dxe/Mem/Pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Core/Dxe/Mem/Pool.c b/MdeModulePkg/Core/Dxe/Mem/Pool.c index 5eced88..934b4ca 100644 --- a/MdeModulePkg/Core/Dxe/Mem/Pool.c +++ b/MdeModulePkg/Core/Dxe/Mem/Pool.c @@ -52,7 +52,7 @@ typedef struct { // as we would in a strict power-of-2 sequence // STATIC CONST UINT16 mPoolSizeTable[] = { - 64, 128, 192, 320, 512, 832, 1344, 2176, 3520, 5696, 9216, 14912, 24128 + 128, 256, 384, 640, 1024, 1664, 2688, 5352, 7040, 11392, 18432, 29824 }; #define SIZE_TO_LIST(a) (GetPoolIndexFromSize (a)) -- 2.8.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch] MdeModulePkg: Add description to MdeModulePkg AcpiTable driver.
Cc: Star Zeng <star.z...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf | 3 +++ MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.uni | 8 +++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf index 3ec39c0..ffb8d08 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf @@ -1,6 +1,9 @@ ## @file # ACPI Table Protocol Driver # +# This driver initializes ACPI tables (Rsdp, Rsdt and Xsdt) and produces UEFI/PI +# services to install/uninstall/manage ACPI tables. +# # Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved. # Copyright (c) 2016, Linaro Ltd. All rights reserved. # This program and the accompanying materials are diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.uni b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.uni index fa34ba6..b8d82f3 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.uni +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.uni @@ -1,9 +1,7 @@ // /** @file -// ACPI Table Protocol Driver +// AcpiTableDxe Module Localized Abstract and Description Content // -// ACPI Table Protocol Driver -// -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved. +// Copyright (c) 2012 - 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 @@ -18,5 +16,5 @@ #string STR_MODULE_ABSTRACT #language en-US "ACPI Table Protocol Driver" -#string STR_MODULE_DESCRIPTION #language en-US "ACPI Table Protocol Driver" +#string STR_MODULE_DESCRIPTION #language en-US "This driver initializes ACPI tables (Rsdp, Rsdt and Xsdt) and produces UEFI/PI services to install/uninstall/manage ACPI tables." -- 2.8.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch] MdeModulePkg: Correct PlatformHookLibSerialPortPpi module type.
This library instance is PEIM type, not BASE type. It has the PPI dependency for PEIM. Cc: Feng Tian <feng.t...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- .../PlatformHookLibSerialPortPpi/PlatformHookLibSerialPortPpi.inf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Library/PlatformHookLibSerialPortPpi/PlatformHookLibSerialPortPpi.inf b/MdeModulePkg/Library/PlatformHookLibSerialPortPpi/PlatformHookLibSerialPortPpi.inf index 09074a8..d577506 100644 --- a/MdeModulePkg/Library/PlatformHookLibSerialPortPpi/PlatformHookLibSerialPortPpi.inf +++ b/MdeModulePkg/Library/PlatformHookLibSerialPortPpi/PlatformHookLibSerialPortPpi.inf @@ -16,9 +16,9 @@ INF_VERSION= 0x00010005 BASE_NAME = PlatformHookLibSerialPortPpi FILE_GUID = 621734D8-8B5E-4c01-B330-9F89A1081710 - MODULE_TYPE= BASE + MODULE_TYPE= PEIM VERSION_STRING = 1.0 - LIBRARY_CLASS = PlatformHookLib + LIBRARY_CLASS = PlatformHookLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER SMM_CORE PEIM SEC PEI_CORE UEFI_APPLICATION UEFI_DRIVER MODULE_UNI_FILE= PlatformHookLibSerialPortPpi.uni # -- 2.8.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2 3/3] MdeModulePkg: Update Guid/Protocol usages in INF files.
V2: Update VariableSmm inf to align the change in VariableRuntimeDxe.inf. Cc: Star Zeng <star.z...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- .../Library/VarCheckUefiLib/VarCheckUefiLib.inf| 78 +++--- .../Variable/RuntimeDxe/VariableRuntimeDxe.inf | 17 +++-- .../Universal/Variable/RuntimeDxe/VariableSmm.inf | 17 +++-- 3 files changed, 59 insertions(+), 53 deletions(-) diff --git a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf index 77ef210..128c44d 100644 --- a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf +++ b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf @@ -45,44 +45,44 @@ VarCheckLib [Guids] - ## CONSUMES ## Variable:L"LangCodes" - ## CONSUMES ## Variable:L"Lang" - ## CONSUMES ## Variable:L"Timeout" - ## CONSUMES ## Variable:L"PlatformLangCodes" - ## CONSUMES ## Variable:L"PlatformLang" - ## CONSUMES ## Variable:L"ConIn" - ## CONSUMES ## Variable:L"ConOut" - ## CONSUMES ## Variable:L"ErrOut" - ## CONSUMES ## Variable:L"ConInDev" - ## CONSUMES ## Variable:L"ConOutDev" - ## CONSUMES ## Variable:L"ErrOutDev" - ## CONSUMES ## Variable:L"BootOrder" - ## CONSUMES ## Variable:L"BootNext" - ## CONSUMES ## Variable:L"BootCurrent" - ## CONSUMES ## Variable:L"BootOptionSupport" - ## CONSUMES ## Variable:L"DriverOrder" - ## CONSUMES ## Variable:L"SysPrepOrder" - ## CONSUMES ## Variable:L"HwErrRecSupport" - ## CONSUMES ## Variable:L"SetupMode" - ## CONSUMES ## Variable:L"PK" - ## CONSUMES ## Variable:L"KEK" - ## CONSUMES ## Variable:L"SignatureSupport" - ## CONSUMES ## Variable:L"SecureBoot" - ## CONSUMES ## Variable:L"KEKDefault" - ## CONSUMES ## Variable:L"PKDefault" - ## CONSUMES ## Variable:L"dbDefault" - ## CONSUMES ## Variable:L"dbxDefault" - ## CONSUMES ## Variable:L"dbtDefault" - ## CONSUMES ## Variable:L"OsIndicationsSupported" - ## CONSUMES ## Variable:L"OsIndications" - ## CONSUMES ## Variable:L"VendorKeys" - ## CONSUMES ## Variable:L"Boot" - ## CONSUMES ## Variable:L"Driver" - ## CONSUMES ## Variable:L"SysPrep" - ## CONSUMES ## Variable:L"Key" + ## SOMETIMES_CONSUMES ## Variable:L"LangCodes" + ## SOMETIMES_CONSUMES ## Variable:L"Lang" + ## SOMETIMES_CONSUMES ## Variable:L"Timeout" + ## SOMETIMES_CONSUMES ## Variable:L"PlatformLangCodes" + ## SOMETIMES_CONSUMES ## Variable:L"PlatformLang" + ## SOMETIMES_CONSUMES ## Variable:L"ConIn" + ## SOMETIMES_CONSUMES ## Variable:L"ConOut" + ## SOMETIMES_CONSUMES ## Variable:L"ErrOut" + ## SOMETIMES_CONSUMES ## Variable:L"ConInDev" + ## SOMETIMES_CONSUMES ## Variable:L"ConOutDev" + ## SOMETIMES_CONSUMES ## Variable:L"ErrOutDev" + ## SOMETIMES_CONSUMES ## Variable:L"BootOrder" + ## SOMETIMES_CONSUMES ## Variable:L"BootNext" + ## SOMETIMES_CONSUMES ## Variable:L"BootCurrent" + ## SOMETIMES_CONSUMES ## Variable:L"BootOptionSupport" + ## SOMETIMES_CONSUMES ## Variable:L"DriverOrder" + ## SOMETIMES_CONSUMES ## Variable:L"SysPrepOrder" + ## SOMETIMES_CONSUMES ## Variable:L"HwErrRecSupport" + ## SOMETIMES_CONSUMES ## Variable:L"SetupMode" + ## SOMETIMES_CONSUMES ## Variable:L"PK" + ## SOMETIMES_CONSUMES ## Variable:L"KEK" + ## SOMETIMES_CONSUMES ## Variable:L"SignatureSupport" + ## SOMETIMES_CONSUMES ## Variable:L"SecureBoot" + ## SOMETIMES_CONSUMES ## Variable:L"KEKDefault" + ## SOMETIMES_CONSUMES ## Variable:L"PKDefault" + ## SOMETIMES_CONSUMES ## Variable:L"dbDefault" + ## SOMETIMES_CONSUMES ## Variable:L"dbxDefault" + ## SOMETIMES_CONSUMES ## Variable:L"dbtDefault" + ## SOMETIMES_CONSUMES ## Variable:L"OsIndicationsSupported" + ## SOMETIMES_CONSUMES ## Variable:L"OsIndications" + ## SOMETIMES_CONSUMES ## Variable:L"VendorKeys" + ## SOMETIMES_CONSUMES ## Variable:L"Boot" + ## SOMETIMES_CONSUMES ## Variable:L"Driver" + ## SOMETIMES_CONSUMES ## Variable:L"SysPrep" + ## SOMETIMES_CONSUMES ## Variable:L"Key" gEfiGlobalVariableGuid - ## CONSUMES ## Variable:L"DB" - ## CONSUMES ## Variable:L"DBX" - ## CONS
[edk2] [Patch] QuarkSocPkg: Add /Oi option to let MemoryInit pass build.
MemoryInit uses the intrinsic memset function. To keep it pass build in VS tool chain without source code change, /Oi option will be added. Cc: Michael Kinney <michael.d.kin...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/MemoryInitPei.inf | 4 1 file changed, 4 insertions(+) diff --git a/QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/MemoryInitPei.inf b/QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/MemoryInitPei.inf index e327684..78821f5 100644 --- a/QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/MemoryInitPei.inf +++ b/QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/MemoryInitPei.inf @@ -74,3 +74,7 @@ [Depex] TRUE + +[BuildOptions] + # /Oi option to use the intrinsic memset function in source code. + MSFT:*_*_*_CC_FLAGS = /Oi -- 2.8.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch] QuarkSocPkg: Remove intrinsic memset function usages in MemoryInit
Use BaseMemoryLib ZeroMem replace memset function. Cc: Michael Kinney <michael.d.kin...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/meminit.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/meminit.c b/QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/meminit.c index 50692fe..321163a 100644 --- a/QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/meminit.c +++ b/QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/meminit.c @@ -1,6 +1,6 @@ / * - * Copyright (c) 2013-2015 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 @@ -40,6 +40,7 @@ #include "meminit_utils.h" #include "hte.h" #include "io.h" +#include "MemoryInit.h" // Override ODT to off state if requested #define DRMC_DEFAULT(mrc_params->rd_odt_value==0?BIT12:0) @@ -1108,7 +1109,7 @@ static void rcvn_cal( #ifdef R2R_SHARING // need to set "final_delay[][]" elements to "0" - memset((void *) (final_delay), 0x00, (size_t) sizeof(final_delay)); + ZeroMem((void *) (final_delay), (size_t) sizeof(final_delay)); #endif // R2R_SHARING // loop through each enabled channel @@ -1393,7 +1394,7 @@ static void wr_level( #ifdef R2R_SHARING // need to set "final_delay[][]" elements to "0" - memset((void *) (final_delay), 0x00, (size_t) sizeof(final_delay)); + ZeroMem((void *) (final_delay), (size_t) sizeof(final_delay)); #endif // R2R_SHARING // loop through each enabled channel for (channel_i = 0; channel_i < NUM_CHANNELS; channel_i++) @@ -1647,7 +1648,7 @@ static void rd_train( #ifdef R2R_SHARING // need to set "final_delay[][]" elements to "0" - memset((void *) (final_delay), 0x00, (size_t) sizeof(final_delay)); + ZeroMem((void *) (final_delay), (size_t) sizeof(final_delay)); #endif // R2R_SHARING // look for passing coordinates @@ -1969,7 +1970,7 @@ static void wr_train( #ifdef R2R_SHARING // need to set "final_delay[][]" elements to "0" - memset((void *) (final_delay), 0x00, (size_t) sizeof(final_delay)); + ZeroMem((void *) (final_delay), (size_t) sizeof(final_delay)); #endif // R2R_SHARING // start algorithm on the LEFT side and train each channel/bl until no failures are observed, then repeat for the RIGHT side. -- 2.8.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2 2/2] MdeModulePkg: Update PerformanceLib instances not to check Identifier.
In PerformanceLib, Identifier is for single PERF, not the pair of PERF. When find the matched START and END pair, the identifier will not be checked. Cc: Star Zeng <star.z...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- .../Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c| 9 - MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.c | 4 ++-- MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.c | 4 ++-- MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c | 7 +++ .../Library/SmmCorePerformanceLib/SmmCorePerformanceLib.c| 9 - MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.c | 4 ++-- 6 files changed, 17 insertions(+), 20 deletions(-) diff --git a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c index c3a6d70..4739bb8 100644 --- a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c +++ b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c @@ -10,7 +10,7 @@ This library is mainly used by DxeCore to start performance logging to ensure that Performance Protocol is installed at the very beginning of DXE phase. -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved. +Copyright (c) 2006 - 2016, 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 @@ -110,8 +110,7 @@ InternalSearchForGaugeEntry ( if (GaugeEntryExArray[Index2].EndTimeStamp == 0 && (GaugeEntryExArray[Index2].Handle == (EFI_PHYSICAL_ADDRESS) (UINTN) Handle) && AsciiStrnCmp (GaugeEntryExArray[Index2].Token, Token, DXE_PERFORMANCE_STRING_LENGTH) == 0 && -AsciiStrnCmp (GaugeEntryExArray[Index2].Module, Module, DXE_PERFORMANCE_STRING_LENGTH) == 0 && -(GaugeEntryExArray[Index2].Identifier == Identifier)) { +AsciiStrnCmp (GaugeEntryExArray[Index2].Module, Module, DXE_PERFORMANCE_STRING_LENGTH) == 0) { Index = Index2; break; } @@ -216,7 +215,7 @@ StartGaugeEx ( for the first matching record that contains a zero end time and fills in a valid end time. Searches the performance measurement log from the beginning of the log - for the first record that matches Handle, Token, Module and Identifier and has an end time value of zero. + for the first record that matches Handle, Token and Module and has an end time value of zero. If the record can not be found then return EFI_NOT_FOUND. If the record is found and TimeStamp is not zero, then the end time in the record is filled in with the value specified by TimeStamp. @@ -578,7 +577,7 @@ StartPerformanceMeasurementEx ( for the first matching record that contains a zero end time and fills in a valid end time. Searches the performance measurement log from the beginning of the log - for the first record that matches Handle, Token, Module and Identifier and has an end time value of zero. + for the first record that matches Handle, Token and Module and has an end time value of zero. If the record can not be found then return RETURN_NOT_FOUND. If the record is found and TimeStamp is not zero, then the end time in the record is filled in with the value specified by TimeStamp. diff --git a/MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.c b/MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.c index 2ddd983..cb62d52 100644 --- a/MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.c +++ b/MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.c @@ -6,7 +6,7 @@ to log performance data. If both PerformanceEx and Performance Protocol is not available, it does not log any performance information. - Copyright (c) 2006 - 2012, 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 @@ -131,7 +131,7 @@ StartPerformanceMeasurementEx ( /** Fills in the end time of a performance measurement. - Looks up the record that matches Handle, Token, Module and Identifier. + Looks up the record that matches Handle, Token and Module. If the record can not be found then return RETURN_NOT_FOUND. If the record is found and TimeStamp is not zero, then TimeStamp is added to the record as the end time. diff --git a/MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.c b/MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.c index 3c7cfc1..218cf8b 100644 --- a/MdeModulePkg/Library
[edk2] [PATCH v2 0/2] Update PerformanceLib not to check Identifier.
In V2, update function header comments not to check Identifier. In V1, update PerformanceLib instance not to check Identifier. Liming Gao (2): MdePkg: Update PerformanceLib comments not to check Identifier. MdeModulePkg: Update PerformanceLib instances not to check Identifier. .../Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c| 9 - MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.c | 4 ++-- MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.c | 4 ++-- MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c | 7 +++ .../Library/SmmCorePerformanceLib/SmmCorePerformanceLib.c| 9 - MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.c | 4 ++-- MdePkg/Include/Library/PerformanceLib.h | 4 ++-- 7 files changed, 19 insertions(+), 22 deletions(-) -- 2.8.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2 1/2] MdePkg: Update PerformanceLib comments not to check Identifier.
In PerformanceLib, Identifier is for single PERF, not the pair of PERF. When find the matched START and END pair, the identifier will not be checked. Cc: Star Zeng <star.z...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- MdePkg/Include/Library/PerformanceLib.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdePkg/Include/Library/PerformanceLib.h b/MdePkg/Include/Library/PerformanceLib.h index cf85163..3ecd62b 100644 --- a/MdePkg/Include/Library/PerformanceLib.h +++ b/MdePkg/Include/Library/PerformanceLib.h @@ -1,7 +1,7 @@ /** @file Provides services to log the execution times and retrieve them later. -Copyright (c) 2006 - 2012, 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 @@ -168,7 +168,7 @@ StartPerformanceMeasurementEx ( /** Fills in the end time of a performance measurement. - Looks up the record that matches Handle, Token, Module and Identifier. + Looks up the record that matches Handle, Token and Module. If the record can not be found then return RETURN_NOT_FOUND. If the record is found and TimeStamp is not zero, then TimeStamp is added to the record as the end time. -- 2.8.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch] MdeModulePkg: Update PerformanceLib instances not to check Identifier.
In PerformanceLib, Identifier is for single PERF, not the pair of PERF. EDKII performance library implementation dumps the duration between the matched START and END pair. When find the matched START and END pair, the identifier will not be checked. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c | 5 ++--- MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c | 5 ++--- MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.c | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c index c3a6d70..8563564 100644 --- a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c +++ b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c @@ -10,7 +10,7 @@ This library is mainly used by DxeCore to start performance logging to ensure that Performance Protocol is installed at the very beginning of DXE phase. -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved. +Copyright (c) 2006 - 2016, 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 @@ -110,8 +110,7 @@ InternalSearchForGaugeEntry ( if (GaugeEntryExArray[Index2].EndTimeStamp == 0 && (GaugeEntryExArray[Index2].Handle == (EFI_PHYSICAL_ADDRESS) (UINTN) Handle) && AsciiStrnCmp (GaugeEntryExArray[Index2].Token, Token, DXE_PERFORMANCE_STRING_LENGTH) == 0 && -AsciiStrnCmp (GaugeEntryExArray[Index2].Module, Module, DXE_PERFORMANCE_STRING_LENGTH) == 0 && -(GaugeEntryExArray[Index2].Identifier == Identifier)) { +AsciiStrnCmp (GaugeEntryExArray[Index2].Module, Module, DXE_PERFORMANCE_STRING_LENGTH) == 0) { Index = Index2; break; } diff --git a/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c b/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c index b3b11b9..2db0808 100644 --- a/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c +++ b/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c @@ -7,7 +7,7 @@ number of performance logging entry is specified by PcdMaxPeiPerformanceLogEntries or PcdMaxPeiPerformanceLogEntries16. -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved. +Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved. (C) Copyright 2015-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 @@ -140,8 +140,7 @@ InternalSearchForLogEntry ( if (LogEntryArray[Index2].EndTimeStamp == 0 && (LogEntryArray[Index2].Handle == (EFI_PHYSICAL_ADDRESS) (UINTN) Handle) && AsciiStrnCmp (LogEntryArray[Index2].Token, Token, PEI_PERFORMANCE_STRING_LENGTH) == 0 && -AsciiStrnCmp (LogEntryArray[Index2].Module, Module, PEI_PERFORMANCE_STRING_LENGTH) == 0 && -(PeiPerformanceIdArray[Index2] == Identifier)) { +AsciiStrnCmp (LogEntryArray[Index2].Module, Module, PEI_PERFORMANCE_STRING_LENGTH) == 0) { Index = Index2; break; } diff --git a/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.c b/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.c index e59cc28..2f1e67d 100644 --- a/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.c +++ b/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.c @@ -16,7 +16,7 @@ SmmPerformanceHandlerEx(), SmmPerformanceHandler() will receive untrusted input and do basic validation. -Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved. +Copyright (c) 2011 - 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 @@ -118,8 +118,7 @@ SmmSearchForGaugeEntry ( if (GaugeEntryExArray[Index2].EndTimeStamp == 0 && (GaugeEntryExArray[Index2].Handle == (EFI_PHYSICAL_ADDRESS) (UINTN) Handle) && AsciiStrnCmp (GaugeEntryExArray[Index2].Token, Token, SMM_PERFORMANCE_STRING_LENGTH) == 0 && -AsciiStrnCmp (GaugeEntryExArray[Index2].Module, Module, SMM_PERFORMANCE_STRING_LENGTH) == 0 && -(GaugeEntryExArray[Index2].Identifier == Identifier)) { +AsciiStrnCmp (GaugeEntryExArray[Index2].Module, Module, SMM_PERFORMANCE_STRING_LENGTH) == 0) { Index = Index2; break; } -- 2.8.0.windows.1
[edk2] [Patch] Update edksetup.bat to check EDK_TOOLS_PATH before set it.
If EDK_TOOLS_PATH is set, then not set it again. If EDK_TOOLS_PATH is not set, then set it. Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- edksetup.bat | 30 -- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/edksetup.bat b/edksetup.bat index b69bd26..e065b64 100755 --- a/edksetup.bat +++ b/edksetup.bat @@ -1,7 +1,7 @@ @REM @file @REM Windows batch file to setup a WORKSPACE environment @REM -@REM Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved. +@REM Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved. @REM This program and the accompanying materials @REM are licensed and made available under the terms and conditions of the BSD License @REM which accompanies this distribution. The full text of the license may be found at @@ -100,21 +100,23 @@ shift :no_nt32 if /I "%1"=="NewBuild" shift -if exist %WORKSPACE%\BaseTools ( - set EDK_TOOLS_PATH=%WORKSPACE%\BaseTools -) else ( - if defined PACKAGES_PATH ( -for %%i IN (%PACKAGES_PATH%) DO ( - if exist %%~fi\BaseTools ( -set EDK_TOOLS_PATH=%%~fi\BaseTools -goto checkBaseTools +if not defined EDK_TOOLS_PATH ( + if exist %WORKSPACE%\BaseTools ( +set EDK_TOOLS_PATH=%WORKSPACE%\BaseTools + ) else ( +if defined PACKAGES_PATH ( + for %%i IN (%PACKAGES_PATH%) DO ( +if exist %%~fi\BaseTools ( + set EDK_TOOLS_PATH=%%~fi\BaseTools + goto checkBaseTools +) ) +) else ( + echo. + echo !!! ERROR !!! Cannot find BaseTools !!! + echo. + goto BadBaseTools ) - ) else ( -echo. -echo !!! ERROR !!! Cannot find BaseTools !!! -echo. -goto BadBaseTools ) ) if exist %EDK_TOOLS_PATH%\Source set BASE_TOOLS_PATH=%EDK_TOOLS_PATH% -- 2.8.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 3/3] MdeModulePkg: Update Guid/Protocol usages in INF files.
Cc: Star Zeng <star.z...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- .../Library/VarCheckUefiLib/VarCheckUefiLib.inf| 78 +++--- .../Variable/RuntimeDxe/VariableRuntimeDxe.inf | 10 +-- 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf index 77ef210..128c44d 100644 --- a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf +++ b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf @@ -45,44 +45,44 @@ VarCheckLib [Guids] - ## CONSUMES ## Variable:L"LangCodes" - ## CONSUMES ## Variable:L"Lang" - ## CONSUMES ## Variable:L"Timeout" - ## CONSUMES ## Variable:L"PlatformLangCodes" - ## CONSUMES ## Variable:L"PlatformLang" - ## CONSUMES ## Variable:L"ConIn" - ## CONSUMES ## Variable:L"ConOut" - ## CONSUMES ## Variable:L"ErrOut" - ## CONSUMES ## Variable:L"ConInDev" - ## CONSUMES ## Variable:L"ConOutDev" - ## CONSUMES ## Variable:L"ErrOutDev" - ## CONSUMES ## Variable:L"BootOrder" - ## CONSUMES ## Variable:L"BootNext" - ## CONSUMES ## Variable:L"BootCurrent" - ## CONSUMES ## Variable:L"BootOptionSupport" - ## CONSUMES ## Variable:L"DriverOrder" - ## CONSUMES ## Variable:L"SysPrepOrder" - ## CONSUMES ## Variable:L"HwErrRecSupport" - ## CONSUMES ## Variable:L"SetupMode" - ## CONSUMES ## Variable:L"PK" - ## CONSUMES ## Variable:L"KEK" - ## CONSUMES ## Variable:L"SignatureSupport" - ## CONSUMES ## Variable:L"SecureBoot" - ## CONSUMES ## Variable:L"KEKDefault" - ## CONSUMES ## Variable:L"PKDefault" - ## CONSUMES ## Variable:L"dbDefault" - ## CONSUMES ## Variable:L"dbxDefault" - ## CONSUMES ## Variable:L"dbtDefault" - ## CONSUMES ## Variable:L"OsIndicationsSupported" - ## CONSUMES ## Variable:L"OsIndications" - ## CONSUMES ## Variable:L"VendorKeys" - ## CONSUMES ## Variable:L"Boot" - ## CONSUMES ## Variable:L"Driver" - ## CONSUMES ## Variable:L"SysPrep" - ## CONSUMES ## Variable:L"Key" + ## SOMETIMES_CONSUMES ## Variable:L"LangCodes" + ## SOMETIMES_CONSUMES ## Variable:L"Lang" + ## SOMETIMES_CONSUMES ## Variable:L"Timeout" + ## SOMETIMES_CONSUMES ## Variable:L"PlatformLangCodes" + ## SOMETIMES_CONSUMES ## Variable:L"PlatformLang" + ## SOMETIMES_CONSUMES ## Variable:L"ConIn" + ## SOMETIMES_CONSUMES ## Variable:L"ConOut" + ## SOMETIMES_CONSUMES ## Variable:L"ErrOut" + ## SOMETIMES_CONSUMES ## Variable:L"ConInDev" + ## SOMETIMES_CONSUMES ## Variable:L"ConOutDev" + ## SOMETIMES_CONSUMES ## Variable:L"ErrOutDev" + ## SOMETIMES_CONSUMES ## Variable:L"BootOrder" + ## SOMETIMES_CONSUMES ## Variable:L"BootNext" + ## SOMETIMES_CONSUMES ## Variable:L"BootCurrent" + ## SOMETIMES_CONSUMES ## Variable:L"BootOptionSupport" + ## SOMETIMES_CONSUMES ## Variable:L"DriverOrder" + ## SOMETIMES_CONSUMES ## Variable:L"SysPrepOrder" + ## SOMETIMES_CONSUMES ## Variable:L"HwErrRecSupport" + ## SOMETIMES_CONSUMES ## Variable:L"SetupMode" + ## SOMETIMES_CONSUMES ## Variable:L"PK" + ## SOMETIMES_CONSUMES ## Variable:L"KEK" + ## SOMETIMES_CONSUMES ## Variable:L"SignatureSupport" + ## SOMETIMES_CONSUMES ## Variable:L"SecureBoot" + ## SOMETIMES_CONSUMES ## Variable:L"KEKDefault" + ## SOMETIMES_CONSUMES ## Variable:L"PKDefault" + ## SOMETIMES_CONSUMES ## Variable:L"dbDefault" + ## SOMETIMES_CONSUMES ## Variable:L"dbxDefault" + ## SOMETIMES_CONSUMES ## Variable:L"dbtDefault" + ## SOMETIMES_CONSUMES ## Variable:L"OsIndicationsSupported" + ## SOMETIMES_CONSUMES ## Variable:L"OsIndications" + ## SOMETIMES_CONSUMES ## Variable:L"VendorKeys" + ## SOMETIMES_CONSUMES ## Variable:L"Boot" + ## SOMETIMES_CONSUMES ## Variable:L"Driver" + ## SOMETIMES_CONSUMES ## Variable:L"SysPrep" + ## SOMETIMES_CONSUMES ## Variable:L"Key" gEfiGlobalVariableGuid - ## CONSUMES ## Variable:L"DB" - ## CONSUMES ## Variable:L"DBX" - ## CONSUMES ## Variable:L"DBT" + ## SOMETIMES_CONSUMES ## Variable:L"DB" + ## SOMETIMES_CONSUMES ## Variab
[edk2] [Patch 1/3] SecurityPkg: Update protocol usage in module INF files.
Update TCG and Library module uses gEdkiiVariableLockProtocolGuid as SOMETIMES_CONSUMES instead of CONSUMES to follow the code logic. Cc: Chao Zhang <chao.b.zh...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- .../DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf | 6 +++--- .../Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.inf | 6 +++--- .../DxeTrEEPhysicalPresenceLib/DxeTrEEPhysicalPresenceLib.inf | 6 +++--- SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf| 2 +- SecurityPkg/Tcg/TrEEConfig/TrEEConfigDxe.inf| 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf b/SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf index bad4fe4..f4aa0da 100644 --- a/SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf +++ b/SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf @@ -57,11 +57,11 @@ Tcg2PpVendorLib [Protocols] - gEfiTcg2ProtocolGuid ## CONSUMES - gEdkiiVariableLockProtocolGuid ## CONSUMES + gEfiTcg2ProtocolGuid ## SOMETIMES_CONSUMES + gEdkiiVariableLockProtocolGuid ## SOMETIMES_CONSUMES [Guids] - ## CONSUMES ## HII + ## SOMETIMES_CONSUMES ## HII ## SOMETIMES_PRODUCES ## Variable:L"Tcg2PhysicalPresence" ## SOMETIMES_CONSUMES ## Variable:L"Tcg2PhysicalPresence" ## SOMETIMES_PRODUCES ## Variable:L"Tcg2PhysicalPresenceFlags" diff --git a/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.inf b/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.inf index b48b887..3aacba5 100644 --- a/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.inf +++ b/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.inf @@ -57,11 +57,11 @@ TcgPpVendorLib [Protocols] - gEfiTcgProtocolGuid ## CONSUMES - gEdkiiVariableLockProtocolGuid## CONSUMES + gEfiTcgProtocolGuid ## SOMETIMES_CONSUMES + gEdkiiVariableLockProtocolGuid## SOMETIMES_CONSUMES [Guids] - ## CONSUMES ## HII + ## SOMETIMES_CONSUMES ## HII ## SOMETIMES_PRODUCES ## Variable:L"PhysicalPresence" ## SOMETIMES_CONSUMES ## Variable:L"PhysicalPresence" ## SOMETIMES_PRODUCES ## Variable:L"PhysicalPresenceFlags" diff --git a/SecurityPkg/Library/DxeTrEEPhysicalPresenceLib/DxeTrEEPhysicalPresenceLib.inf b/SecurityPkg/Library/DxeTrEEPhysicalPresenceLib/DxeTrEEPhysicalPresenceLib.inf index 0612226..1c123ef 100644 --- a/SecurityPkg/Library/DxeTrEEPhysicalPresenceLib/DxeTrEEPhysicalPresenceLib.inf +++ b/SecurityPkg/Library/DxeTrEEPhysicalPresenceLib/DxeTrEEPhysicalPresenceLib.inf @@ -57,11 +57,11 @@ TrEEPpVendorLib [Protocols] - gEfiTrEEProtocolGuid ## CONSUMES - gEdkiiVariableLockProtocolGuid ## CONSUMES + gEfiTrEEProtocolGuid ## SOMETIMES_CONSUMES + gEdkiiVariableLockProtocolGuid ## SOMETIMES_CONSUMES [Guids] - ## CONSUMES ## HII + ## SOMETIMES_CONSUMES ## HII ## SOMETIMES_PRODUCES ## Variable:L"PhysicalPresence" ## SOMETIMES_CONSUMES ## Variable:L"PhysicalPresence" ## SOMETIMES_PRODUCES ## Variable:L"PhysicalPresenceFlags" diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf index dd2247b..d9340d6 100644 --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf @@ -70,7 +70,7 @@ [Protocols] gEfiHiiConfigAccessProtocolGuid ## PRODUCES gEfiDevicePathProtocolGuid## PRODUCES - gEdkiiVariableLockProtocolGuid## CONSUMES + gEdkiiVariableLockProtocolGuid## SOMETIMES_CONSUMES gEfiTcg2ProtocolGuid ## CONSUMES [Pcd] diff --git a/SecurityPkg/Tcg/TrEEConfig/TrEEConfigDxe.inf b/SecurityPkg/Tcg/TrEEConfig/TrEEConfigDxe.inf index 9935e40..368570a 100644 --- a/SecurityPkg/Tcg/TrEEConfig/TrEEConfigDxe.inf +++ b/SecurityPkg/Tcg/TrEEConfig/TrEEConfigDxe.inf @@ -72,7 +72,7 @@ [Protocols] gEfiHiiConfigAccessProtocolGuid ## PRODUCES gEfiDevicePathProtocolGuid## PRODUCES - gEdkiiVariableLockProtocolGuid## CONSUMES + gEdkiiVariableLockProtocolGuid## SOMETIMES_CONSUMES [Pcd] gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid## CONSUMES -- 2.8.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 2/3] ShellPkg: Update Guid/Protocol usages in INF files.
Cc: Jaben Carsey <jaben.car...@intel.com> Cc: Shumin Qiu <shumin@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- ShellPkg/Application/Shell/Shell.inf | 10 - .../UefiHandleParsingLib/UefiHandleParsingLib.inf | 24 +++--- .../UefiShellCommandLib/UefiShellCommandLib.inf| 2 +- .../UefiShellDebug1CommandsLib.inf | 8 .../UefiShellDriver1CommandsLib.inf| 8 .../UefiShellLevel2CommandsLib.inf | 4 ++-- ShellPkg/Library/UefiShellLib/UefiShellLib.inf | 6 +++--- 7 files changed, 31 insertions(+), 31 deletions(-) diff --git a/ShellPkg/Application/Shell/Shell.inf b/ShellPkg/Application/Shell/Shell.inf index 9e14485..a1b6a24 100644 --- a/ShellPkg/Application/Shell/Shell.inf +++ b/ShellPkg/Application/Shell/Shell.inf @@ -73,9 +73,9 @@ UefiHiiServicesLib [Guids] - gShellVariableGuid ## CONSUMES ## GUID - gShellMapGuid ## CONSUMES ## GUID - gShellAliasGuid ## CONSUMES ## GUID + gShellVariableGuid ## SOMETIMES_CONSUMES ## GUID + gShellAliasGuid ## SOMETIMES_CONSUMES ## GUID + gShellAliasGuid ## SOMETIMES_PRODUCES ## GUID [Protocols] gEfiShellProtocolGuid ## PRODUCES @@ -89,9 +89,9 @@ gEfiSimpleTextInputExProtocolGuid ## CONSUMES gEfiSimpleTextInProtocolGuid## CONSUMES gEfiSimpleTextOutProtocolGuid ## CONSUMES - gEfiSimpleFileSystemProtocolGuid## CONSUMES + gEfiSimpleFileSystemProtocolGuid## SOMETIMES_CONSUMES gEfiLoadedImageProtocolGuid ## CONSUMES - gEfiComponentName2ProtocolGuid ## CONSUMES + gEfiComponentName2ProtocolGuid ## SOMETIMES_CONSUMES gEfiUnicodeCollation2ProtocolGuid ## CONSUMES gEfiDevicePathProtocolGuid ## CONSUMES gEfiHiiPackageListProtocolGuid ## SOMETIMES_PRODUCES diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf index 52eed86..3bd4dbe 100644 --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf +++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf @@ -52,7 +52,7 @@ SortLib [Protocols] - gEfiSimpleFileSystemProtocolGuid## CONSUMES + gEfiSimpleFileSystemProtocolGuid## SOMETIMES_CONSUMES # shell 2.0 gEfiShellProtocolGuid ## SOMETIMES_CONSUMES @@ -62,18 +62,18 @@ gEfiShellEnvironment2Guid ## SOMETIMES_CONSUMES gEfiShellInterfaceGuid ## SOMETIMES_CONSUMES - gEfiUnicodeCollation2ProtocolGuid ## CONSUMES - gEfiDevicePathToTextProtocolGuid## CONSUMES - gEfiBusSpecificDriverOverrideProtocolGuid ## CONSUMES - gEfiDevicePathUtilitiesProtocolGuid ## CONSUMES - gEfiDevicePathFromTextProtocolGuid ## CONSUMES - gEfiPlatformDriverOverrideProtocolGuid ## CONSUMES - gEfiSimpleTextInProtocolGuid## CONSUMES - gEfiPlatformToDriverConfigurationProtocolGuid ## CONSUMES - gEfiDriverSupportedEfiVersionProtocolGuid ## CONSUMES + gEfiUnicodeCollation2ProtocolGuid ## UNDEFINED + gEfiDevicePathToTextProtocolGuid## UNDEFINED + gEfiBusSpecificDriverOverrideProtocolGuid ## UNDEFINED + gEfiDevicePathUtilitiesProtocolGuid ## UNDEFINED + gEfiDevicePathFromTextProtocolGuid ## UNDEFINED + gEfiPlatformDriverOverrideProtocolGuid ## UNDEFINED + gEfiSimpleTextInProtocolGuid## UNDEFINED + gEfiPlatformToDriverConfigurationProtocolGuid ## UNDEFINED + gEfiDriverSupportedEfiVersionProtocolGuid ## UNDEFINED gEfiLoadedImageProtocolGuid ## CONSUMES gEfiDevicePathProtocolGuid ## CONSUMES - gEfiLoadedImageDevicePathProtocolGuid ## CONSUMES + gEfiLoadedImageDevicePathProtocolGuid ## UNDEFINED gEfiSimpleTextOutProtocolGuid ## UNDEFINED gEfiSimplePointerProtocolGuid ## UNDEFINED gEfiAbsolutePointerProtocolGuid ## UNDEFINE
[edk2] [Patch] MdeModulePkg: Update PeiCore dispatcher to handle PEIM and PEI_CORE only
When PcdShadowPeimOnBoot is FALSE, they are not copied to memory and execute from their original locations. Here, this policy should only apply for PEIM and PEI_CORE, not for other file type, such as DXE_CORE. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- MdeModulePkg/Core/Pei/Image/Image.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/MdeModulePkg/Core/Pei/Image/Image.c b/MdeModulePkg/Core/Pei/Image/Image.c index 9c54192..cc84ac5 100644 --- a/MdeModulePkg/Core/Pei/Image/Image.c +++ b/MdeModulePkg/Core/Pei/Image/Image.c @@ -1,7 +1,7 @@ /** @file Pei Core Load Image Support -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 @@ -359,6 +359,7 @@ LoadAndRelocatePeCoffImage ( EFI_STATUSReturnStatus; BOOLEAN IsS3Boot; BOOLEAN IsRegisterForShadow; + EFI_FV_FILE_INFO FileInfo; Private = PEI_CORE_INSTANCE_FROM_PS_THIS (GetPeiServicesTablePointer ()); @@ -396,9 +397,15 @@ LoadAndRelocatePeCoffImage ( } // + // Get file type first + // + Status = PeiServicesFfsGetFileInfo (FileHandle, ); + ASSERT_EFI_ERROR (Status); + + // // When Image has no reloc section, it can't be relocated into memory. // - if (ImageContext.RelocationsStripped && (Private->PeiMemoryInstalled) && ( + if (ImageContext.RelocationsStripped && (Private->PeiMemoryInstalled) && ((FileInfo.FileType != EFI_FV_FILETYPE_PEIM && FileInfo.FileType != EFI_FV_FILETYPE_PEI_CORE) || (!IsS3Boot && (PcdGetBool (PcdShadowPeimOnBoot) || IsRegisterForShadow)) || (IsS3Boot && PcdGetBool (PcdShadowPeimOnS3Boot { DEBUG ((EFI_D_INFO|EFI_D_LOAD, "The image at 0x%08x without reloc section can't be loaded into memory\n", (UINTN) Pe32Data)); } @@ -413,7 +420,7 @@ LoadAndRelocatePeCoffImage ( // On normal boot, PcdShadowPeimOnBoot decides whether load PEIM or PeiCore into memory. // On S3 boot, PcdShadowPeimOnS3Boot decides whether load PEIM or PeiCore into memory. // - if ((!ImageContext.RelocationsStripped) && (Private->PeiMemoryInstalled) && ( + if ((!ImageContext.RelocationsStripped) && (Private->PeiMemoryInstalled) && ((FileInfo.FileType != EFI_FV_FILETYPE_PEIM && FileInfo.FileType != EFI_FV_FILETYPE_PEI_CORE) || (!IsS3Boot && (PcdGetBool (PcdShadowPeimOnBoot) || IsRegisterForShadow)) || (IsS3Boot && PcdGetBool (PcdShadowPeimOnS3Boot { // // Allocate more buffer to avoid buffer overflow. -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch] MdeModulePkg: Update DxeCore dispatcher to ignore PEI and SMM depex for FV.
If FV image without DXE depex, it will be dispatched by DxeCore. If FV image with SMM depex, it is the invalid image. ASSERT will be trig. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c | 31 --- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c index 0776cd6..69c3b11 100644 --- a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c @@ -26,7 +26,7 @@ Depex - Dependency Expresion. SOR - Schedule On Request - Don't schedule if this bit is set. -Copyright (c) 2006 - 2014, 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 @@ -1249,29 +1249,6 @@ CoreFwVolEventProtocolNotify ( } // -// Check if this EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE file has PEI depex section. -// -DepexBuffer = NULL; -SizeOfBuffer = 0; -Status = Fv->ReadSection ( - Fv, - , - EFI_SECTION_PEI_DEPEX, - 0, - , - , - - ); -if (!EFI_ERROR (Status)) { - // - // If PEI depex section is found, this FV image will be ignored in DXE phase. - // Now, DxeCore doesn't support FV image with more one type DEPEX section. - // - FreePool (DepexBuffer); - continue; -} - -// // Check if this EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE file has SMM depex section. // DepexBuffer = NULL; @@ -1287,11 +1264,11 @@ CoreFwVolEventProtocolNotify ( ); if (!EFI_ERROR (Status)) { // - // If SMM depex section is found, this FV image will be ignored in DXE phase. - // Now, DxeCore doesn't support FV image with more one type DEPEX section. + // If SMM depex section is found, this FV image is invalid to be supported. + // ASSERT FALSE to report this FV image. // FreePool (DepexBuffer); - continue; + ASSERT (FALSE); } // -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 3/3] BaseTools/GenFw: Correct datatypes in diagnostic messages and check for string termination
From: Michael LeMayThis patch revises multiple diagnostic messages to use correct datatypes. It also checks that a symbol name that is about to be used in a diagnostic message is terminated by a null character within the contents of the string table section so that the print routine does not read past the end of the string table section contents when reading the symbol name. Signed-off-by: Michael LeMay --- BaseTools/Source/C/GenFw/Elf32Convert.c | 15 --- BaseTools/Source/C/GenFw/Elf64Convert.c | 15 --- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c b/BaseTools/Source/C/GenFw/Elf32Convert.c index a842ceb..d4258e5 100644 --- a/BaseTools/Source/C/GenFw/Elf32Convert.c +++ b/BaseTools/Source/C/GenFw/Elf32Convert.c @@ -21,6 +21,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #endif #include +#include #include #include #include @@ -310,7 +311,15 @@ GetSymName ( assert(Sym->st_name < StrtabShdr->sh_size); - return (UINT8*)mEhdr + StrtabShdr->sh_offset + Sym->st_name; + UINT8* StrtabContents = (UINT8*)mEhdr + StrtabShdr->sh_offset; + + bool foundEnd = false; + for (UINT32 i = Sym->st_name; (i < StrtabShdr->sh_size) && !foundEnd; i++) { +foundEnd = StrtabContents[i] == 0; + } + assert(foundEnd); + + return StrtabContents + Sym->st_name; } // @@ -539,7 +548,7 @@ ScanSections32 ( NtHdr->Pe32.OptionalHeader.Magic = EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC; break; default: -VerboseMsg ("%s unknown e_machine type. Assume IA-32", (UINTN)mEhdr->e_machine); +VerboseMsg ("%s unknown e_machine type %hu. Assume IA-32", mInImageName, mEhdr->e_machine); NtHdr->Pe32.FileHeader.Machine = EFI_IMAGE_MACHINE_IA32; NtHdr->Pe32.OptionalHeader.Magic = EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC; } @@ -725,7 +734,7 @@ WriteSections32 ( } Error (NULL, 0, 3000, "Invalid", - "%s: Bad definition for symbol '%s'@%p or unsupported symbol type. " + "%s: Bad definition for symbol '%s'@%#x or unsupported symbol type. " "For example, absolute and undefined symbols are not supported.", mInImageName, SymName, Sym->st_value); diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c b/BaseTools/Source/C/GenFw/Elf64Convert.c index fad270c..7b7282b 100644 --- a/BaseTools/Source/C/GenFw/Elf64Convert.c +++ b/BaseTools/Source/C/GenFw/Elf64Convert.c @@ -21,6 +21,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #endif #include +#include #include #include #include @@ -302,7 +303,15 @@ GetSymName ( assert(Sym->st_name < StrtabShdr->sh_size); - return (UINT8*)mEhdr + StrtabShdr->sh_offset + Sym->st_name; + UINT8* StrtabContents = (UINT8*)mEhdr + StrtabShdr->sh_offset; + + bool foundEnd = false; + for (UINT32 i = Sym->st_name; (i < StrtabShdr->sh_size) && !foundEnd; i++) { +foundEnd = StrtabContents[i] == 0; + } + assert(foundEnd); + + return StrtabContents + Sym->st_name; } // @@ -337,7 +346,7 @@ ScanSections64 ( mCoffOffset += sizeof (EFI_IMAGE_NT_HEADERS64); break; default: -VerboseMsg ("%s unknown e_machine type. Assume X64", (UINTN)mEhdr->e_machine); +VerboseMsg ("%s unknown e_machine type %hu. Assume X64", mInImageName, mEhdr->e_machine); mCoffOffset += sizeof (EFI_IMAGE_NT_HEADERS64); break; } @@ -721,7 +730,7 @@ WriteSections64 ( } Error (NULL, 0, 3000, "Invalid", - "%s: Bad definition for symbol '%s'@%p or unsupported symbol type. " + "%s: Bad definition for symbol '%s'@%#llx or unsupported symbol type. " "For example, absolute and undefined symbols are not supported.", mInImageName, SymName, Sym->st_value); -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 5/8] MdeModulePkg: Update SerialDxe inf to include the module uni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- MdeModulePkg/Universal/SerialDxe/SerialDxe.inf | 4 1 file changed, 4 insertions(+) diff --git a/MdeModulePkg/Universal/SerialDxe/SerialDxe.inf b/MdeModulePkg/Universal/SerialDxe/SerialDxe.inf index 145101b..164060b 100644 --- a/MdeModulePkg/Universal/SerialDxe/SerialDxe.inf +++ b/MdeModulePkg/Universal/SerialDxe/SerialDxe.inf @@ -16,6 +16,7 @@ [Defines] INF_VERSION= 0x00010005 BASE_NAME = SerialDxe + MODULE_UNI_FILE= SerialDxe.uni FILE_GUID = D3987D4B-971A-435F-8CAF-4967EB627241 MODULE_TYPE= DXE_DRIVER VERSION_STRING = 1.0 @@ -47,3 +48,6 @@ [Depex] TRUE + +[UserExtensions.TianoCore."ExtraFiles"] + SerialDxeExtra.uni -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 7/8] NetworkPkg: Update module inf to include the missing uni file
Update DnsDxe and HttpUtilitiesDxe inf files. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- NetworkPkg/DnsDxe/DnsDxe.inf | 5 +++-- NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/NetworkPkg/DnsDxe/DnsDxe.inf b/NetworkPkg/DnsDxe/DnsDxe.inf index 0d1efd8..bf9dc3d 100644 --- a/NetworkPkg/DnsDxe/DnsDxe.inf +++ b/NetworkPkg/DnsDxe/DnsDxe.inf @@ -22,6 +22,7 @@ VERSION_STRING= 1.0 ENTRY_POINT = DnsDriverEntryPoint UNLOAD_IMAGE = DnsUnload + MODULE_UNI_FILE = DnsDxe.uni [Packages] MdePkg/MdePkg.dec @@ -73,6 +74,6 @@ gEfiDhcp6ServiceBindingProtocolGuid ## SOMETIMES_CONSUMES gEfiDhcp6ProtocolGuid ## SOMETIMES_CONSUMES - -[Guids] +[UserExtensions.TianoCore."ExtraFiles"] + DnsDxeExtra.uni diff --git a/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf b/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf index c101e6f..ffdbcd5 100644 --- a/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf +++ b/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf @@ -21,6 +21,7 @@ VERSION_STRING= 1.0 ENTRY_POINT = HttpUtilitiesDxeDriverEntryPoint UNLOAD_IMAGE = HttpUtilitiesDxeUnload + MODULE_UNI_FILE = HttpUtilitiesDxe.uni [Packages] MdePkg/MdePkg.dec @@ -47,5 +48,5 @@ [Depex] TRUE -[Guids] - +[UserExtensions.TianoCore."ExtraFiles"] + HttpUtilitiesDxeExtra.uni -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 2/8] MdeModulePkg: Add the missing Library uni files of ImageDecode instances
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- .../BmpImageDecoderLib/BmpImageDecoderLib.inf | 1 + .../BmpImageDecoderLib/BmpImageDecoderLib.uni | 26 ++ MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf | 1 + MdeModulePkg/Library/BootLogoLib/BootLogoLib.uni | 26 ++ .../Library/ImageDecoderLib/ImageDecoderLib.inf| 9 .../Library/ImageDecoderLib/ImageDecoderLib.uni| 26 ++ 6 files changed, 85 insertions(+), 4 deletions(-) create mode 100644 MdeModulePkg/Library/BmpImageDecoderLib/BmpImageDecoderLib.uni create mode 100644 MdeModulePkg/Library/BootLogoLib/BootLogoLib.uni create mode 100644 MdeModulePkg/Library/ImageDecoderLib/ImageDecoderLib.uni diff --git a/MdeModulePkg/Library/BmpImageDecoderLib/BmpImageDecoderLib.inf b/MdeModulePkg/Library/BmpImageDecoderLib/BmpImageDecoderLib.inf index 2d1c160..0bde46c 100644 --- a/MdeModulePkg/Library/BmpImageDecoderLib/BmpImageDecoderLib.inf +++ b/MdeModulePkg/Library/BmpImageDecoderLib/BmpImageDecoderLib.inf @@ -15,6 +15,7 @@ [Defines] INF_VERSION= 0x00010005 BASE_NAME = BmpImageDecoderLib + MODULE_UNI_FILE= BmpImageDecoderLib.uni FILE_GUID = DF414223-F17C-4022-A1F4-4062612AB00D MODULE_TYPE= DXE_DRIVER VERSION_STRING = 1.0 diff --git a/MdeModulePkg/Library/BmpImageDecoderLib/BmpImageDecoderLib.uni b/MdeModulePkg/Library/BmpImageDecoderLib/BmpImageDecoderLib.uni new file mode 100644 index 000..334144b --- /dev/null +++ b/MdeModulePkg/Library/BmpImageDecoderLib/BmpImageDecoderLib.uni @@ -0,0 +1,26 @@ +// /** @file +// This library provides BMP image decoding capability. +// +// This library provides BMP image decoding capability. +// +// Copyright (c) 2015, 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 +// 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. +// +// **/ + +#string STR_MODULE_ABSTRACT +#language en-US +"This library provides BMP image decoding capability." + +#string STR_MODULE_DESCRIPTION +#language en-US +"This library provides BMP image decoding capability." + + diff --git a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf index 673a4ce..8698f26 100644 --- a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf +++ b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf @@ -16,6 +16,7 @@ [Defines] INF_VERSION= 0x00010005 BASE_NAME = BootLogoLib + MODULE_UNI_FILE= BootLogoLib.uni FILE_GUID = F5AE5B5C-42E8-4A9B-829D-5B631CD5367A MODULE_TYPE= DXE_DRIVER VERSION_STRING = 1.0 diff --git a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.uni b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.uni new file mode 100644 index 000..fae0335 --- /dev/null +++ b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.uni @@ -0,0 +1,26 @@ +// /** @file +// This library is only intended to be used by PlatformBootManagerLib +// +// to show progress bar and logo. +// +// Copyright (c) 2015, 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 +// 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. +// +// **/ + +#string STR_MODULE_ABSTRACT +#language en-US +"This library is only intended to be used by PlatformBootManagerLib" + +#string STR_MODULE_DESCRIPTION +#language en-US +"to show progress bar and logo." + + diff --git a/MdeModulePkg/Library/ImageDecoderLib/ImageDecoderLib.inf b/MdeModulePkg/Library/ImageDecoderLib/ImageDecoderLib.inf index 5d2ee7b..7ebeec6 100644 --- a/MdeModulePkg/Library/ImageDecoderLib/ImageDecoderLib.inf +++ b/MdeModulePkg/Library/ImageDecoderLib/ImageDecoderLib.inf @@ -1,21 +1,22 @@ ## @file # This library provides image decoding service by managing the different # image decoding libraries. -# +# # Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved. # This program and the accompanying materials are licensed and made available under # the terms and conditions of the
[edk2] [Patch 1/8] MdeModulePkg: Add the missing Library uni files of Ipmi instances
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- .../Library/BaseIpmiLibNull/BaseIpmiLibNull.inf| 1 + .../Library/BaseIpmiLibNull/BaseIpmiLibNull.uni| 25 ++ .../DxeIpmiLibIpmiProtocol.inf | 1 + .../DxeIpmiLibIpmiProtocol.uni | 25 ++ .../PeiIpmiLibIpmiPpi/PeiIpmiLibIpmiPpi.inf| 1 + .../PeiIpmiLibIpmiPpi/PeiIpmiLibIpmiPpi.uni| 25 ++ .../SmmIpmiLibSmmIpmiProtocol.inf | 1 + .../SmmIpmiLibSmmIpmiProtocol.uni | 25 ++ 8 files changed, 104 insertions(+) create mode 100644 MdeModulePkg/Library/BaseIpmiLibNull/BaseIpmiLibNull.uni create mode 100644 MdeModulePkg/Library/DxeIpmiLibIpmiProtocol/DxeIpmiLibIpmiProtocol.uni create mode 100644 MdeModulePkg/Library/PeiIpmiLibIpmiPpi/PeiIpmiLibIpmiPpi.uni create mode 100644 MdeModulePkg/Library/SmmIpmiLibSmmIpmiProtocol/SmmIpmiLibSmmIpmiProtocol.uni diff --git a/MdeModulePkg/Library/BaseIpmiLibNull/BaseIpmiLibNull.inf b/MdeModulePkg/Library/BaseIpmiLibNull/BaseIpmiLibNull.inf index fc9d06d..efd8c0a 100644 --- a/MdeModulePkg/Library/BaseIpmiLibNull/BaseIpmiLibNull.inf +++ b/MdeModulePkg/Library/BaseIpmiLibNull/BaseIpmiLibNull.inf @@ -16,6 +16,7 @@ [Defines] INF_VERSION = 0x00010005 BASE_NAME = BaseIpmiLibNull + MODULE_UNI_FILE = BaseIpmiLibNull.uni FILE_GUID = 46805D61-0BB8-4680-A9BE-C96C751AB5A4 MODULE_TYPE = BASE VERSION_STRING= 1.0 diff --git a/MdeModulePkg/Library/BaseIpmiLibNull/BaseIpmiLibNull.uni b/MdeModulePkg/Library/BaseIpmiLibNull/BaseIpmiLibNull.uni new file mode 100644 index 000..0e8fd69 --- /dev/null +++ b/MdeModulePkg/Library/BaseIpmiLibNull/BaseIpmiLibNull.uni @@ -0,0 +1,25 @@ +// /** @file +// Null Instance of IPMI Library. +// +// Null Instance of IPMI Library. +// +// Copyright (c) 2015, 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. +// +// **/ + +#string STR_MODULE_ABSTRACT +#language en-US +"Null Instance of IPMI Library." + +#string STR_MODULE_DESCRIPTION +#language en-US +"Null Instance of IPMI Library." + + diff --git a/MdeModulePkg/Library/DxeIpmiLibIpmiProtocol/DxeIpmiLibIpmiProtocol.inf b/MdeModulePkg/Library/DxeIpmiLibIpmiProtocol/DxeIpmiLibIpmiProtocol.inf index 5b56b39..d756431 100644 --- a/MdeModulePkg/Library/DxeIpmiLibIpmiProtocol/DxeIpmiLibIpmiProtocol.inf +++ b/MdeModulePkg/Library/DxeIpmiLibIpmiProtocol/DxeIpmiLibIpmiProtocol.inf @@ -16,6 +16,7 @@ [Defines] INF_VERSION= 0x00010005 BASE_NAME = DxeIpmiLibIpmiProtocol + MODULE_UNI_FILE= DxeIpmiLibIpmiProtocol.uni FILE_GUID = 62408AD5-4EAC-432B-AB9B-C4B85BFAED02 MODULE_TYPE= DXE_DRIVER VERSION_STRING = 1.0 diff --git a/MdeModulePkg/Library/DxeIpmiLibIpmiProtocol/DxeIpmiLibIpmiProtocol.uni b/MdeModulePkg/Library/DxeIpmiLibIpmiProtocol/DxeIpmiLibIpmiProtocol.uni new file mode 100644 index 000..5b7814b --- /dev/null +++ b/MdeModulePkg/Library/DxeIpmiLibIpmiProtocol/DxeIpmiLibIpmiProtocol.uni @@ -0,0 +1,25 @@ +// /** @file +// Instance of IPMI Library in DXE phase for SMS. +// +// Instance of IPMI Library in DXE phase for SMS. +// +// Copyright (c) 2015, 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. +// +// **/ + +#string STR_MODULE_ABSTRACT +#language en-US +"Instance of IPMI Library in DXE phase for SMS." + +#string STR_MODULE_DESCRIPTION +#language en-US +"Instance of IPMI Library in DXE phase for SMS." + + diff --git a/MdeModulePkg/Library/PeiIpmiLibIpmiPpi/PeiIpmiLibIpmiPpi.inf b/MdeModulePkg/Library/PeiIpmiLibIpmiPpi/PeiIpmiLibIpmiPpi.inf index e2e2646..4a3cc6c 100644 --- a/MdeModulePkg/Library/PeiIpmiLibIpmiPpi/PeiIpmiLibIpmiPpi.inf +++ b/MdeModulePkg/Library/PeiIpmiLibIpmiPpi/PeiIpmiLibIpmiPpi.inf @@ -16,6 +16,7 @@ [Defines] INF_VERSION
[edk2] [Patch 4/8] MdeModulePkg: Add the missing module uni in RegularExpressionDxe
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- .../RegularExpressionDxe/RegularExpressionDxe.inf | 3 +++ .../RegularExpressionDxe/RegularExpressionDxe.uni | 26 ++ .../RegularExpressionDxeExtra.uni | 18 +++ 3 files changed, 47 insertions(+) create mode 100644 MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.uni create mode 100644 MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxeExtra.uni diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.inf b/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.inf index cfe42a6..26b88e4 100644 --- a/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.inf +++ b/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.inf @@ -15,6 +15,7 @@ [Defines] INF_VERSION = 0x00010018 BASE_NAME = RegularExpressionDxe + MODULE_UNI_FILE = RegularExpressionDxe.uni FILE_GUID = 3E197E9C-D8DC-42D3-89CE-B04FA9833756 MODULE_TYPE = UEFI_DRIVER VERSION_STRING = 1.0 @@ -95,3 +96,5 @@ # Oniguruma: 'type cast' : truncation from 'OnigUChar *' to 'unsigned int' MSFT:*_*_*_CC_FLAGS = /wd4305 /wd4306 +[UserExtensions.TianoCore."ExtraFiles"] + RegularExpressionDxeExtra.uni diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.uni b/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.uni new file mode 100644 index 000..45a2ccf --- /dev/null +++ b/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.uni @@ -0,0 +1,26 @@ +// /** @file +// EFI_REGULAR_EXPRESSION_PROTOCOL Implementation +// +// EFI_REGULAR_EXPRESSION_PROTOCOL Implementation +// +// Copyright (c) 2015, 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 +// 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. +// +// **/ + +#string STR_MODULE_ABSTRACT +#language en-US +"EFI_REGULAR_EXPRESSION_PROTOCOL Implementation" + +#string STR_MODULE_DESCRIPTION +#language en-US +"EFI_REGULAR_EXPRESSION_PROTOCOL Implementation" + + diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxeExtra.uni b/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxeExtra.uni new file mode 100644 index 000..f83cd3a --- /dev/null +++ b/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxeExtra.uni @@ -0,0 +1,18 @@ +// /** @file +// RegularExpressionDxe Localized Strings and Content +// +// Copyright (c) 2015, 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 +// 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. +// +// **/ + +#string STR_PROPERTIES_MODULE_NAME #language en-US "RegularExpressionDxe module" + + -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 0/8] Add the missing module uni and extra uni files
Liming Gao (8): MdeModulePkg: Add the missing Library uni files of Ipmi instances MdeModulePkg: Add the missing Library uni files of ImageDecode instances MdeModulePkg: Add the missing library uni files of UI instances MdeModulePkg: Add the missing module uni in RegularExpressionDxe MdeModulePkg: Update SerialDxe inf to include the module uni UefiCpuPkg: Add the missing module uni for CpuS3DataDxe NetworkPkg: Update module inf to include the missing uni file IntelFrameworkModulePkg: Remove the undefined PCD help and prompt strings .../IntelFrameworkModulePkg.uni| 26 +- .../Library/BaseIpmiLibNull/BaseIpmiLibNull.inf| 1 + .../Library/BaseIpmiLibNull/BaseIpmiLibNull.uni| 25 ++ .../BmpImageDecoderLib/BmpImageDecoderLib.inf | 1 + .../BmpImageDecoderLib/BmpImageDecoderLib.uni | 26 ++ MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf | 1 + MdeModulePkg/Library/BootLogoLib/BootLogoLib.uni | 26 ++ .../BootMaintenanceManagerLib.inf | 1 + .../BootMaintenanceManagerLib.uni | 26 ++ .../Library/BootManagerLib/BootManagerLib.inf | 1 + .../Library/BootManagerLib/BootManagerLib.uni | 26 ++ .../Library/DeviceManagerLib/DeviceManagerLib.inf | 1 + .../Library/DeviceManagerLib/DeviceManagerLib.uni | 26 ++ .../DxeIpmiLibIpmiProtocol.inf | 1 + .../DxeIpmiLibIpmiProtocol.uni | 25 ++ .../Library/FileExplorerLib/FileExplorerLib.inf| 1 + .../Library/FileExplorerLib/FileExplorerLib.uni| 26 ++ .../Library/ImageDecoderLib/ImageDecoderLib.inf| 9 ++--- .../Library/ImageDecoderLib/ImageDecoderLib.uni| 26 ++ .../PeiIpmiLibIpmiPpi/PeiIpmiLibIpmiPpi.inf| 1 + .../PeiIpmiLibIpmiPpi/PeiIpmiLibIpmiPpi.uni| 25 ++ .../SmmIpmiLibSmmIpmiProtocol.inf | 1 + .../SmmIpmiLibSmmIpmiProtocol.uni | 25 ++ .../RegularExpressionDxe/RegularExpressionDxe.inf | 3 ++ .../RegularExpressionDxe/RegularExpressionDxe.uni | 26 ++ .../RegularExpressionDxeExtra.uni | 18 ++ MdeModulePkg/Universal/SerialDxe/SerialDxe.inf | 4 +++ NetworkPkg/DnsDxe/DnsDxe.inf | 5 +-- NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf | 5 +-- UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf | 4 +++ UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.uni | 40 ++ UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxeExtra.uni | 20 +++ 32 files changed, 419 insertions(+), 33 deletions(-) create mode 100644 MdeModulePkg/Library/BaseIpmiLibNull/BaseIpmiLibNull.uni create mode 100644 MdeModulePkg/Library/BmpImageDecoderLib/BmpImageDecoderLib.uni create mode 100644 MdeModulePkg/Library/BootLogoLib/BootLogoLib.uni create mode 100644 MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenanceManagerLib.uni create mode 100644 MdeModulePkg/Library/BootManagerLib/BootManagerLib.uni create mode 100644 MdeModulePkg/Library/DeviceManagerLib/DeviceManagerLib.uni create mode 100644 MdeModulePkg/Library/DxeIpmiLibIpmiProtocol/DxeIpmiLibIpmiProtocol.uni create mode 100644 MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.uni create mode 100644 MdeModulePkg/Library/ImageDecoderLib/ImageDecoderLib.uni create mode 100644 MdeModulePkg/Library/PeiIpmiLibIpmiPpi/PeiIpmiLibIpmiPpi.uni create mode 100644 MdeModulePkg/Library/SmmIpmiLibSmmIpmiProtocol/SmmIpmiLibSmmIpmiProtocol.uni create mode 100644 MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.uni create mode 100644 MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxeExtra.uni create mode 100644 UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.uni create mode 100644 UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxeExtra.uni -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 6/8] UefiCpuPkg: Add the missing module uni for CpuS3DataDxe
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf | 4 +++ UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.uni | 40 +++ UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxeExtra.uni | 20 ++ 3 files changed, 64 insertions(+) create mode 100644 UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.uni create mode 100644 UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxeExtra.uni diff --git a/UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf b/UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf index 9143b87..857e12b 100644 --- a/UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf +++ b/UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf @@ -25,6 +25,7 @@ [Defines] INF_VERSION= 0x00010005 BASE_NAME = CpuS3DataDxe + MODULE_UNI_FILE= CpuS3DataDxe.uni FILE_GUID = 4D2E57EE-0E3F-44DD-93C4-D3B57E96945D MODULE_TYPE= DXE_DRIVER VERSION_STRING = 1.0 @@ -62,3 +63,6 @@ [Depex] gEfiMpServiceProtocolGuid + +[UserExtensions.TianoCore."ExtraFiles"] + CpuS3DataDxeExtra.uni diff --git a/UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.uni b/UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.uni new file mode 100644 index 000..4a0218f --- /dev/null +++ b/UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.uni @@ -0,0 +1,40 @@ +// /** @file +// ACPI CPU Data initialization module +// +// This module initializes the ACPI_CPU_DATA structure and registers the address +// of this structure in the PcdCpuS3DataAddress PCD. This is a generic/simple +// version of this module. It does not provide a machine check handler or CPU +// register initialization tables for ACPI S3 resume. It also only supports the +// number of CPUs reported by the MP Services Protocol, so this module does not +// support hot plug CPUs. This module can be copied into a CPU specific package +// and customized if these additional features are required. +// +// Copyright (c) 2015, Intel Corporation. All rights reserved. +// +// Copyright (c) 2015, Red Hat, Inc. +// +// 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. +// +// **/ + +#string STR_MODULE_ABSTRACT +#language en-US +"ACPI CPU Data initialization module" + +#string STR_MODULE_DESCRIPTION +#language en-US +"This module initializes the ACPI_CPU_DATA structure and registers the address " +"of this structure in the PcdCpuS3DataAddress PCD. This is a generic/simple " +"version of this module. It does not provide a machine check handler or CPU " +"register initialization tables for ACPI S3 resume. It also only supports the " +"number of CPUs reported by the MP Services Protocol, so this module does not " +"support hot plug CPUs. This module can be copied into a CPU specific package " +"and customized if these additional features are required." + + diff --git a/UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxeExtra.uni b/UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxeExtra.uni new file mode 100644 index 000..050f25f --- /dev/null +++ b/UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxeExtra.uni @@ -0,0 +1,20 @@ +// /** @file +// CpuS3DataDxe Localized Strings and Content +// +// Copyright (c) 2015, Intel Corporation. All rights reserved. +// +// Copyright (c) 2015, Red Hat, Inc. +// +// 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. +// +// **/ + +#string STR_PROPERTIES_MODULE_NAME #language en-US "CpuS3DataDxe module" + + -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 8/8] IntelFrameworkModulePkg: Remove the undefined PCD help and prompt strings
IntelFrameworkModulePkg.uni includes some undefined PCD help and prompt strings, which will be removed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- .../IntelFrameworkModulePkg.uni| 26 +- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/IntelFrameworkModulePkg/IntelFrameworkModulePkg.uni b/IntelFrameworkModulePkg/IntelFrameworkModulePkg.uni index 019edf7..8528f5d 100644 --- a/IntelFrameworkModulePkg/IntelFrameworkModulePkg.uni +++ b/IntelFrameworkModulePkg/IntelFrameworkModulePkg.uni @@ -10,7 +10,7 @@ // 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. // @@ -102,22 +102,6 @@ "TRUE - Use the optimized timing for best PS2 detection performance.\n" "FALSE - Use the normal timing to detect PS2." -#string STR_gEfiIntelFrameworkModulePkgTokenSpaceGuid_PcdSetupVideoHorizontalResolution_PROMPT #language en-US "Video Horizontal Resolution of Text Setup" - -#string STR_gEfiIntelFrameworkModulePkgTokenSpaceGuid_PcdSetupVideoHorizontalResolution_HELP #language en-US "Specify the video horizontal resolution of text setup." - -#string STR_gEfiIntelFrameworkModulePkgTokenSpaceGuid_PcdSetupVideoVerticalResolution_PROMPT #language en-US "Video Vertical Resolution of Text Setup" - -#string STR_gEfiIntelFrameworkModulePkgTokenSpaceGuid_PcdSetupVideoVerticalResolution_HELP #language en-US "Specify the video vertical resolution of text setup." - -#string STR_gEfiIntelFrameworkModulePkgTokenSpaceGuid_PcdSetupConOutColumn_PROMPT #language en-US "Console Output Column of Text Setup" - -#string STR_gEfiIntelFrameworkModulePkgTokenSpaceGuid_PcdSetupConOutColumn_HELP #language en-US "Specify the console output column of text setup." - -#string STR_gEfiIntelFrameworkModulePkgTokenSpaceGuid_PcdSetupConOutRow_PROMPT #language en-US "Console Output Row of Text Setup" - -#string STR_gEfiIntelFrameworkModulePkgTokenSpaceGuid_PcdSetupConOutRow_HELP #language en-US "Specify the console output row of text setup." - #string STR_gEfiIntelFrameworkModulePkgTokenSpaceGuid_PcdStatusCodeUseOEM_PROMPT #language en-US "Report StatusCode via OEM Device" #string STR_gEfiIntelFrameworkModulePkgTokenSpaceGuid_PcdStatusCodeUseOEM_HELP #language en-US "Indicates if OEM device is enabled as StatusCode report device. It is only used in Framework StatusCode implementation. \n" @@ -172,14 +156,6 @@ "TRUE - The complete boot cycle has not happened before.\n" "FALSE - The complete boot cycle has happened before." -#string STR_gEfiIntelFrameworkModulePkgTokenSpaceGuid_PcdPlatformBootTimeOut_PROMPT #language en-US "Boot Timeout (s)" - -#string STR_gEfiIntelFrameworkModulePkgTokenSpaceGuid_PcdPlatformBootTimeOut_HELP #language en-US "The number of seconds that the firmware will wait before initiating the original default boot selection. A value of 0 indicates that the default boot selection is to be initiated immediately on boot. The value of 0x then firmware will wait for user input before booting." - -#string STR_gEfiIntelFrameworkModulePkgTokenSpaceGuid_PcdHardwareErrorRecordLevel_PROMPT #language en-US "Error Level For Hardware Recorder" - -#string STR_gEfiIntelFrameworkModulePkgTokenSpaceGuid_PcdHardwareErrorRecordLevel_HELP #language en-US "Error level for hardware recorder. If value 0, platform does not support feature of hardware error record." - #string STR_gEfiIntelFrameworkModulePkgTokenSpaceGuid_PcdOpromReservedMemoryBase_PROMPT #language en-US "Reserved Memory Base Address for OPROM" #string STR_gEfiIntelFrameworkModulePkgTokenSpaceGuid_PcdOpromReservedMemoryBase_HELP #language en-US "Specify memory base address for OPROM to find free memory.\n" -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 3/8] MdeModulePkg: Add the missing library uni files of UI instances
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- .../BootMaintenanceManagerLib.inf | 1 + .../BootMaintenanceManagerLib.uni | 26 ++ .../Library/BootManagerLib/BootManagerLib.inf | 1 + .../Library/BootManagerLib/BootManagerLib.uni | 26 ++ .../Library/DeviceManagerLib/DeviceManagerLib.inf | 1 + .../Library/DeviceManagerLib/DeviceManagerLib.uni | 26 ++ .../Library/FileExplorerLib/FileExplorerLib.inf| 1 + .../Library/FileExplorerLib/FileExplorerLib.uni| 26 ++ 8 files changed, 108 insertions(+) create mode 100644 MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenanceManagerLib.uni create mode 100644 MdeModulePkg/Library/BootManagerLib/BootManagerLib.uni create mode 100644 MdeModulePkg/Library/DeviceManagerLib/DeviceManagerLib.uni create mode 100644 MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.uni diff --git a/MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenanceManagerLib.inf b/MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenanceManagerLib.inf index 7db201d..302cb90 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenanceManagerLib.inf +++ b/MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenanceManagerLib.inf @@ -14,6 +14,7 @@ [Defines] INF_VERSION= 0x00010005 BASE_NAME = BootMaintenanceManagerLib + MODULE_UNI_FILE= BootMaintenanceManagerLib.uni FILE_GUID = CA9E4824-4198-4715-AA22-E2935E703A07 MODULE_TYPE= DXE_DRIVER VERSION_STRING = 1.0 diff --git a/MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenanceManagerLib.uni b/MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenanceManagerLib.uni new file mode 100644 index 000..44411c8 --- /dev/null +++ b/MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenanceManagerLib.uni @@ -0,0 +1,26 @@ +// /** @file +// Boot Maintenance Manager Library used by UiApp. +// +// Boot Maintenance Manager Library used by UiApp. +// +// Copyright (c) 2015, 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 +// 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. +// +// **/ + +#string STR_MODULE_ABSTRACT +#language en-US +"Boot Maintenance Manager Library used by UiApp." + +#string STR_MODULE_DESCRIPTION +#language en-US +"Boot Maintenance Manager Library used by UiApp." + + diff --git a/MdeModulePkg/Library/BootManagerLib/BootManagerLib.inf b/MdeModulePkg/Library/BootManagerLib/BootManagerLib.inf index ff19516..8930414 100644 --- a/MdeModulePkg/Library/BootManagerLib/BootManagerLib.inf +++ b/MdeModulePkg/Library/BootManagerLib/BootManagerLib.inf @@ -14,6 +14,7 @@ [Defines] INF_VERSION= 0x00010005 BASE_NAME = BootManagerLib + MODULE_UNI_FILE= BootManagerLib.uni FILE_GUID = CCB2DCE1-4FC8-41CB-88C5-D349E134C9FC MODULE_TYPE= DXE_DRIVER VERSION_STRING = 1.0 diff --git a/MdeModulePkg/Library/BootManagerLib/BootManagerLib.uni b/MdeModulePkg/Library/BootManagerLib/BootManagerLib.uni new file mode 100644 index 000..5ffa9de --- /dev/null +++ b/MdeModulePkg/Library/BootManagerLib/BootManagerLib.uni @@ -0,0 +1,26 @@ +// /** @file +// Boot Manager Library used by UiApp. +// +// Boot Manager Library used by UiApp. +// +// Copyright (c) 2015, 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 +// 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. +// +// **/ + +#string STR_MODULE_ABSTRACT +#language en-US +"Boot Manager Library used by UiApp." + +#string STR_MODULE_DESCRIPTION +#language en-US +"Boot Manager Library used by UiApp." + + diff --git a/MdeModulePkg/Library/DeviceManagerLib/DeviceManagerLib.inf b/MdeModulePkg/Library/DeviceManagerLib/DeviceManagerLib.inf index e6f703a..7baf566 100644 --- a/MdeModulePkg/Library/DeviceManagerLib/DeviceManagerLib.inf +++ b/MdeModulePkg/Library/DeviceManagerLib/DeviceManagerLib.inf @@ -14,6
[edk2] [PATCH v2] Nt32Pkg: Fix VS2015 Build Failure
VS2015 separates vcruntime.lib and ucrt.lib from msvcrt.lib. Per MSDN notes, If you link with the /nodefaultlib option, you will need to link several extra libraries when you link. For example, whereas you previously might have just linked msvcrt.lib in order to use the CRT DLL, you will now also need to link vcruntime.lib and ucrt.lib. More detail is in http://blogs.msdn.com/b/vcblog/archive/2015/03/03/introducing-the-universal-crt.aspx Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- Nt32Pkg/Sec/SecMain.inf | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Nt32Pkg/Sec/SecMain.inf b/Nt32Pkg/Sec/SecMain.inf index fee68e0..01bde2e 100644 --- a/Nt32Pkg/Sec/SecMain.inf +++ b/Nt32Pkg/Sec/SecMain.inf @@ -65,15 +65,19 @@ gEfiNt32PkgTokenSpaceGuid.PcdWinNtFirmwareFdSize gEfiNt32PkgTokenSpaceGuid.PcdWinNtMemorySizeForSecMain gEfiNt32PkgTokenSpaceGuid.PcdWinNtFirmwareVolume - + [BuildOptions] MSFT:*_*_IA32_DLINK_FLAGS == /out:"$(BIN_DIR)\SecMain.exe" /base:0x1000 /pdb:"$(BIN_DIR)\SecMain.pdb" /LIBPATH:"$(VCINSTALLDIR)\Lib" /LIBPATH:"$(VCINSTALLDIR)\PlatformSdk\Lib" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:I386 /LTCG Kernel32.lib MSVCRTD.lib Gdi32.lib User32.lib Winmm.lib Advapi32.lib + MSFT:*_VS2015_IA32_DLINK_FLAGS == /out:"$(BIN_DIR)\SecMain.exe" /base:0x1000 /pdb:"$(BIN_DIR)\SecMain.pdb" /LIBPATH:"$(VCINSTALLDIR)\Lib" /LIBPATH:"$(VCINSTALLDIR)\PlatformSdk\Lib" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:I386 /LTCG Kernel32.lib MSVCRTD.lib vcruntimed.lib ucrtd.lib Gdi32.lib User32.lib Winmm.lib Advapi32.lib + MSFT:*_VS2015x86_IA32_DLINK_FLAGS == /out:"$(BIN_DIR)\SecMain.exe" /base:0x1000 /pdb:"$(BIN_DIR)\SecMain.pdb" /LIBPATH:"$(VCINSTALLDIR)\Lib" /LIBPATH:"$(VCINSTALLDIR)\PlatformSdk\Lib" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:I386 /LTCG Kernel32.lib MSVCRTD.lib vcruntimed.lib ucrtd.lib Gdi32.lib User32.lib Winmm.lib Advapi32.lib MSFT:*_*_IA32_CC_FLAGS == /nologo /W4 /WX /Gy /c /D UNICODE /Od /FIAutoGen.h /EHs-c- /GF /Gs8192 /Zi /Gm /D _CRT_SECURE_NO_WARNINGS /D _CRT_SECURE_NO_DEPRECATE MSFT:*_*_IA32_PP_FLAGS == /nologo /E /TC /FIAutoGen.h MSFT:*_*_IA32_ASM_FLAGS == /nologo /W3 /WX /c /coff /Cx /Zd /W0 /Zi MSFT:*_*_IA32_ASMLINK_FLAGS == /link /nologo /tiny MSFT:*_*_X64_DLINK_FLAGS == /out:"$(BIN_DIR)\SecMain.exe" /base:0x1000 /pdb:"$(BIN_DIR)\SecMain.pdb" /LIBPATH:"$(VCINSTALLDIR)\Lib\AMD64" /LIBPATH:"$(VCINSTALLDIR)\PlatformSdk\Lib\AMD64" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:AMD64 /LTCG Kernel32.lib MSVCRTD.lib Gdi32.lib User32.lib Winmm.lib Advapi32.lib + MSFT:*_VS2015_X64_DLINK_FLAGS == /out:"$(BIN_DIR)\SecMain.exe" /base:0x1000 /pdb:"$(BIN_DIR)\SecMain.pdb" /LIBPATH:"$(VCINSTALLDIR)\Lib\AMD64" /LIBPATH:"$(VCINSTALLDIR)\PlatformSdk\Lib\AMD64" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:AMD64 /LTCG Kernel32.lib MSVCRTD.lib vcruntimed.lib ucrtd.lib Gdi32.lib User32.lib Winmm.lib Advapi32.lib + MSFT:*_VS2015x86_X64_DLINK_FLAGS == /out:"$(BIN_DIR)\SecMain.exe" /base:0x1000 /pdb:"$(BIN_DIR)\SecMain.pdb" /LIBPATH:"$(VCINSTALLDIR)\Lib\AMD64" /LIBPATH:"$(VCINSTALLDIR)\PlatformSdk\Lib\AMD64" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:AMD64 /LTCG Kernel32.lib MSVCRTD.lib vcruntimed.lib ucrtd.lib Gdi32.lib User32.lib Winmm.lib Advapi32.lib MSFT:*_*_X64_CC_FLAGS == /nologo /W4 /WX /Gy /c /D UNICODE /Od /FIAutoGen.h /EHs-c- /GF /Gs8192 /Zi /Gm /D _CRT_SECURE_NO_WARNINGS /D _CRT_SECURE_NO_DEPRECATE MSFT:*_*_X64_PP_FLAGS == /nologo /E /TC /FIAutoGen.h MSFT:*_*_X64_ASM_FLAGS == /nologo /W3 /WX /c /Cx /Zd /W0 /Zi -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch] BaseTools: Update Scripts to support VS2015 env
edk2 Edk2Setup.bat depends on those scripts to configure VS env. Update them to support VS2015. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- BaseTools/Scripts/SetVisualStudio.bat | 5 + BaseTools/Scripts/ShowEnvironment.bat | 19 +++ BaseTools/get_vsvars.bat | 1 - 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/BaseTools/Scripts/SetVisualStudio.bat b/BaseTools/Scripts/SetVisualStudio.bat index d379cd7..de2f912 100755 --- a/BaseTools/Scripts/SetVisualStudio.bat +++ b/BaseTools/Scripts/SetVisualStudio.bat @@ -25,6 +25,11 @@ :CheckLatest echo. +@if defined VS140COMNTOOLS ( + @set "COMMONTOOLSx64=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64" + @goto SetVs +) + @if defined VS120COMNTOOLS ( @set "COMMONTOOLSx64=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64" @goto SetVs diff --git a/BaseTools/Scripts/ShowEnvironment.bat b/BaseTools/Scripts/ShowEnvironment.bat index 2b320fb..5dd30b4 100755 --- a/BaseTools/Scripts/ShowEnvironment.bat +++ b/BaseTools/Scripts/ShowEnvironment.bat @@ -55,7 +55,7 @@ if defined SRC_CONF @goto SetEnv @if defined PYTHON_FREEZER_PATH @echo PYTHON_FREEZER_PATH = %PYTHON_FREEZER_PATH% @if "%NT32PKG%"=="TRUE" ( @echo. -@echo NOTE: Please configure your build to use the following TOOL_CHAIN_TAG +@echo NOTE: Please configure your build to use the following TOOL_CHAIN_TAG @echo when building NT32Pkg/Nt32Pkg.dsc @if defined VCINSTALLDIR @call :CheckVsVer @set TEST_VS= @@ -130,6 +130,17 @@ if defined SRC_CONF @goto SetEnv @echo TOOL_CHAIN_TAG = VS2013 @goto :EOF ) + +@set "TEST_VS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\" +@if "%VSINSTALLDIR%"=="%TEST_VS%" ( +@echo TOOL_CHAIN_TAG = VS2015x86 +@goto :EOF +) +@set "TEST_VS=C:\Program Files\Microsoft Visual Studio 14.0\" +@if "%VSINSTALLDIR%"=="%TEST_VS%" ( +@echo TOOL_CHAIN_TAG = VS2015 +@goto :EOF +) @goto :EOF :SetEnv @@ -153,7 +164,7 @@ if defined SRC_CONF @goto SetEnv @copy /Y "%SRC_CONF%\tools_def.template" "%WORKSPACE%\Conf\tools_def.txt" > nul @set FIRST_COPY=TRUE ) -@if not exist "%WORKSPACE%\Conf\build_rule.txt" ( +@if not exist "%WORKSPACE%\Conf\build_rule.txt" ( @if "%MISSING_BUILD_RULE_TEMPLATE%"=="TRUE" @goto MissingTemplates @echo copying ... build_rule.template to %WORKSPACE%\Conf\build_rule.txt @copy /Y "%SRC_CONF%\build_rule.template" "%WORKSPACE%\Conf\build_rule.txt" > nul @@ -171,11 +182,11 @@ if defined SRC_CONF @goto SetEnv @if "%MISSING_TARGET_TEMPLATE%"=="TRUE" @goto MissingTemplates @echo over-write ... target.template to %WORKSPACE%\Conf\target.txt @copy /Y "%SRC_CONF%\target.template" "%WORKSPACE%\Conf\target.txt" > nul - + @if "%MISSING_TOOLS_DEF_TEMPLATE%"=="TRUE" @goto MissingTemplates @echo over-write ... tools_def.template to %WORKSPACE%\Conf\tools_def.txt @copy /Y "%SRC_CONF%\tools_def.template" "%WORKSPACE%\Conf\tools_def.txt" > nul - + @if "%MISSING_BUILD_RULE_TEMPLATE%"=="TRUE" @goto MissingTemplates @echo over-write ... build_rule.template to %WORKSPACE%\Conf\build_rule.txt @copy /Y "%SRC_CONF%\build_rule.template" "%WORKSPACE%\Conf\build_rule.txt" > nul diff --git a/BaseTools/get_vsvars.bat b/BaseTools/get_vsvars.bat index b67a81d..7649e1d 100644 --- a/BaseTools/get_vsvars.bat +++ b/BaseTools/get_vsvars.bat @@ -34,7 +34,6 @@ REM (Or invoke the relevant vsvars32 file beforehand). :main if defined VCINSTALLDIR goto :done if defined VS140COMNTOOLS call :read_vsvars "%VS140COMNTOOLS%" - if defined VS130COMNTOOLS call :read_vsvars "%VS130COMNTOOLS%" if defined VS120COMNTOOLS call :read_vsvars "%VS120COMNTOOLS%" if defined VS110COMNTOOLS call :read_vsvars "%VS110COMNTOOLS%" if defined VS100COMNTOOLS call :read_vsvars "%VS100COMNTOOLS%" -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch] Nt32Pkg: Fix VS2015 Build Failure
VS2015 separates vcruntime.lib and ucrt.lib from msvcrt.lib. Per MSDN notes, If you link with the /nodefaultlib option, you will need to link several extra libraries when you link. For example, whereas you previously might have just linked msvcrt.lib in order to use the CRT DLL, you will now also need to link vcruntime.lib and ucrt.lib. More detail is in http://blogs.msdn.com/b/vcblog/archive/2015/03/03/introducing-the-universal-crt.aspx Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- Nt32Pkg/Sec/SecMain.inf | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Nt32Pkg/Sec/SecMain.inf b/Nt32Pkg/Sec/SecMain.inf index fee68e0..dbb2e9a 100644 --- a/Nt32Pkg/Sec/SecMain.inf +++ b/Nt32Pkg/Sec/SecMain.inf @@ -65,15 +65,19 @@ gEfiNt32PkgTokenSpaceGuid.PcdWinNtFirmwareFdSize gEfiNt32PkgTokenSpaceGuid.PcdWinNtMemorySizeForSecMain gEfiNt32PkgTokenSpaceGuid.PcdWinNtFirmwareVolume - + [BuildOptions] MSFT:*_*_IA32_DLINK_FLAGS == /out:"$(BIN_DIR)\SecMain.exe" /base:0x1000 /pdb:"$(BIN_DIR)\SecMain.pdb" /LIBPATH:"$(VCINSTALLDIR)\Lib" /LIBPATH:"$(VCINSTALLDIR)\PlatformSdk\Lib" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:I386 /LTCG Kernel32.lib MSVCRTD.lib Gdi32.lib User32.lib Winmm.lib Advapi32.lib + MSFT:*_VS2015_IA32_DLINK_FLAGS == /out:"$(BIN_DIR)\SecMain.exe" /base:0x1000 /pdb:"$(BIN_DIR)\SecMain.pdb" /LIBPATH:"$(VCINSTALLDIR)\Lib" /LIBPATH:"$(VCINSTALLDIR)\PlatformSdk\Lib" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:I386 /LTCG Kernel32.lib MSVCRTD.lib vcruntimed.lib ucrtd.lib Gdi32.lib User32.lib Winmm.lib Advapi32.lib + MSFT:*_VS2015x86_IA32_DLINK_FLAGS == /out:"$(BIN_DIR)\SecMain.exe" /base:0x1000 /pdb:"$(BIN_DIR)\SecMain.pdb" /LIBPATH:"$(VCINSTALLDIR)\Lib" /LIBPATH:"$(VCINSTALLDIR)\PlatformSdk\Lib" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:I386 /LTCG Kernel32.lib MSVCRTD.lib vcruntimed.lib ucrtd.lib Gdi32.lib User32.lib Winmm.lib Advapi32.lib MSFT:*_*_IA32_CC_FLAGS == /nologo /W4 /WX /Gy /c /D UNICODE /Od /FIAutoGen.h /EHs-c- /GF /Gs8192 /Zi /Gm /D _CRT_SECURE_NO_WARNINGS /D _CRT_SECURE_NO_DEPRECATE MSFT:*_*_IA32_PP_FLAGS == /nologo /E /TC /FIAutoGen.h MSFT:*_*_IA32_ASM_FLAGS == /nologo /W3 /WX /c /coff /Cx /Zd /W0 /Zi MSFT:*_*_IA32_ASMLINK_FLAGS == /link /nologo /tiny MSFT:*_*_X64_DLINK_FLAGS == /out:"$(BIN_DIR)\SecMain.exe" /base:0x1000 /pdb:"$(BIN_DIR)\SecMain.pdb" /LIBPATH:"$(VCINSTALLDIR)\Lib\AMD64" /LIBPATH:"$(VCINSTALLDIR)\PlatformSdk\Lib\AMD64" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:AMD64 /LTCG Kernel32.lib MSVCRTD.lib Gdi32.lib User32.lib Winmm.lib Advapi32.lib + MSFT:*_*_VS2015_DLINK_FLAGS == /out:"$(BIN_DIR)\SecMain.exe" /base:0x1000 /pdb:"$(BIN_DIR)\SecMain.pdb" /LIBPATH:"$(VCINSTALLDIR)\Lib\AMD64" /LIBPATH:"$(VCINSTALLDIR)\PlatformSdk\Lib\AMD64" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:AMD64 /LTCG Kernel32.lib MSVCRTD.lib vcruntimed.lib ucrtd.lib Gdi32.lib User32.lib Winmm.lib Advapi32.lib + MSFT:*_*_VS2015x86_DLINK_FLAGS == /out:"$(BIN_DIR)\SecMain.exe" /base:0x1000 /pdb:"$(BIN_DIR)\SecMain.pdb" /LIBPATH:"$(VCINSTALLDIR)\Lib\AMD64" /LIBPATH:"$(VCINSTALLDIR)\PlatformSdk\Lib\AMD64" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:AMD64 /LTCG Kernel32.lib MSVCRTD.lib vcruntimed.lib ucrtd.lib Gdi32.lib User32.lib Winmm.lib Advapi32.lib MSFT:*_*_X64_CC_FLAGS == /nologo /W4 /WX /Gy /c /D UNICODE /Od /FIAutoGen.h /EHs-c- /GF /Gs8192 /Zi /Gm /D _CRT_SECURE_NO_WARNINGS /D _CRT_SECURE_NO_DEPRECATE MSFT:*_*_X64_PP_FLAGS == /nologo /E /TC /FIAutoGen.h MSFT:*_*_X64_ASM_FLAGS == /nologo /W3 /WX /c /Cx /Zd /W0 /Zi -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch] MdePkg: Convert IoLibEbc.c source file to DOS format
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- MdePkg/Library/BaseIoLibIntrinsic/IoLibEbc.c | 342 +-- 1 file changed, 171 insertions(+), 171 deletions(-) diff --git a/MdePkg/Library/BaseIoLibIntrinsic/IoLibEbc.c b/MdePkg/Library/BaseIoLibIntrinsic/IoLibEbc.c index 991c1e0..e12a5ae 100644 --- a/MdePkg/Library/BaseIoLibIntrinsic/IoLibEbc.c +++ b/MdePkg/Library/BaseIoLibIntrinsic/IoLibEbc.c @@ -1,171 +1,171 @@ -/** @file - I/O Library for EBC. - - EBC does not support port I/O. All APIs in this file ASSERT(). - - Copyright (c) 2015, 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. - -**/ - -#include "BaseIoLibIntrinsicInternal.h" - -/** - Reads an 8-bit I/O port. - - Reads the 8-bit I/O port specified by Port. The 8-bit read value is returned. - This function must guarantee that all I/O read and write operations are - serialized. - - If 8-bit I/O port operations are not supported, then ASSERT(). - - @param Port The I/O port to read. - - @return The value read. - -**/ -UINT8 -EFIAPI -IoRead8 ( - IN UINTN Port - ) -{ - ASSERT (FALSE); - return 0; -} - -/** - Writes an 8-bit I/O port. - - Writes the 8-bit I/O port specified by Port with the value specified by Value - and returns Value. This function must guarantee that all I/O read and write - operations are serialized. - - If 8-bit I/O port operations are not supported, then ASSERT(). - - @param Port The I/O port to write. - @param Value The value to write to the I/O port. - - @return The value written to the I/O port. - -**/ -UINT8 -EFIAPI -IoWrite8 ( - IN UINTN Port, - IN UINT8 Value - ) -{ - ASSERT (FALSE); - return 0; -} - -/** - Reads a 16-bit I/O port. - - Reads the 16-bit I/O port specified by Port. The 16-bit read value is returned. - This function must guarantee that all I/O read and write operations are - serialized. - - If 16-bit I/O port operations are not supported, then ASSERT(). - If Port is not aligned on a 16-bit boundary, then ASSERT(). - - @param Port The I/O port to read. - - @return The value read. - -**/ -UINT16 -EFIAPI -IoRead16 ( - IN UINTN Port - ) -{ - ASSERT (FALSE); - return 0; -} - -/** - Writes a 16-bit I/O port. - - Writes the 16-bit I/O port specified by Port with the value specified by Value - and returns Value. This function must guarantee that all I/O read and write - operations are serialized. - - If 16-bit I/O port operations are not supported, then ASSERT(). - If Port is not aligned on a 16-bit boundary, then ASSERT(). - - @param Port The I/O port to write. - @param Value The value to write to the I/O port. - - @return The value written to the I/O port. - -**/ -UINT16 -EFIAPI -IoWrite16 ( - IN UINTN Port, - IN UINT16Value - ) -{ - ASSERT (FALSE); - return 0; -} - -/** - Reads a 32-bit I/O port. - - Reads the 32-bit I/O port specified by Port. The 32-bit read value is returned. - This function must guarantee that all I/O read and write operations are - serialized. - - If 32-bit I/O port operations are not supported, then ASSERT(). - If Port is not aligned on a 32-bit boundary, then ASSERT(). - - @param Port The I/O port to read. - - @return The value read. - -**/ -UINT32 -EFIAPI -IoRead32 ( - IN UINTN Port - ) -{ - ASSERT (FALSE); - return 0; -} - -/** - Writes a 32-bit I/O port. - - Writes the 32-bit I/O port specified by Port with the value specified by Value - and returns Value. This function must guarantee that all I/O read and write - operations are serialized. - - If 32-bit I/O port operations are not supported, then ASSERT(). - If Port is not aligned on a 32-bit boundary, then ASSERT(). - - @param Port The I/O port to write. - @param Value The value to write to the I/O port. - - @return The value written to the I/O port. - -**/ -UINT32 -EFIAPI -IoWrite32 ( - IN UINTN Port, - IN UINT32Value - ) -{ - ASSERT (FALSE); - return 0; -} +/** @file + I/O Library for EBC. + + EBC does not support port I/O. All APIs in this file ASSERT(). + + Copyright (c) 2015, 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 di
[edk2] [PATCH v2 3/3] EdkCompatibilityPkg: Fix GCC error to avoid the duplicated global variables
SmmBaseHelper uses the same name global variables to the one in SmmMemoryAllocateLib. Update SmmBaseHelper to use SmmMemLib SmmIsBufferOutsideSmmValid(). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- .../Compatibility/SmmBaseHelper/SmmBaseHelper.c| 84 +- .../Compatibility/SmmBaseHelper/SmmBaseHelper.inf | 2 +- EdkCompatibilityPkg/EdkCompatibilityPkg.dsc| 2 + 3 files changed, 5 insertions(+), 83 deletions(-) diff --git a/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/SmmBaseHelper.c b/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/SmmBaseHelper.c index 1d16449..16566d2 100644 --- a/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/SmmBaseHelper.c +++ b/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/SmmBaseHelper.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -42,7 +43,6 @@ #include #include #include -#include /** Register SMM image to SMRAM profile. @@ -122,8 +122,6 @@ SPIN_LOCK mPFLock; UINT64 mPhyMask; VOID *mOriginalHandler; EFI_SMM_CPU_SAVE_STATE *mShadowSaveState; -EFI_SMRAM_DESCRIPTOR *mSmramRanges; -UINTN mSmramRangeCount; LIST_ENTRY mCallbackInfoListHead = INITIALIZE_LIST_HEAD_VARIABLE (mCallbackInfoListHead); @@ -743,60 +741,6 @@ LoadImage ( return Status; } -/** - This function check if the address is in SMRAM. - - @param Buffer the buffer address to be checked. - @param Length the buffer length to be checked. - - @retval TRUE this address is in SMRAM. - @retval FALSE this address is NOT in SMRAM. -**/ -BOOLEAN -IsAddressInSmram ( - IN EFI_PHYSICAL_ADDRESS Buffer, - IN UINT64Length - ) -{ - UINTN Index; - - for (Index = 0; Index < mSmramRangeCount; Index ++) { -if (((Buffer >= mSmramRanges[Index].CpuStart) && (Buffer < mSmramRanges[Index].CpuStart + mSmramRanges[Index].PhysicalSize)) || -((mSmramRanges[Index].CpuStart >= Buffer) && (mSmramRanges[Index].CpuStart < Buffer + Length))) { - return TRUE; -} - } - - return FALSE; -} - -/** - This function check if the address refered by Buffer and Length is valid. - - @param Buffer the buffer address to be checked. - @param Length the buffer length to be checked. - - @retval TRUE this address is valid. - @retval FALSE this address is NOT valid. -**/ -BOOLEAN -IsAddressValid ( - IN UINTN Buffer, - IN UINTN Length - ) -{ - if (Buffer > (MAX_ADDRESS - Length)) { -// -// Overflow happen -// -return FALSE; - } - if (IsAddressInSmram ((EFI_PHYSICAL_ADDRESS)Buffer, (UINT64)Length)) { -return FALSE; - } - return TRUE; -} - /** Thunk service of EFI_SMM_BASE_PROTOCOL.Register(). @@ -1133,7 +1077,7 @@ SmmHandlerEntry ( ASSERT (CommBufferSize != NULL); if (*CommBufferSize == sizeof (SMMBASE_FUNCTION_DATA) && - IsAddressValid ((UINTN)CommBuffer, *CommBufferSize)) { + SmmIsBufferOutsideSmmValid ((EFI_PHYSICAL_ADDRESS)(UINTN)CommBuffer, (UINT64)*CommBufferSize)) { FunctionData = (SMMBASE_FUNCTION_DATA *)CommBuffer; switch (FunctionData->Function) { @@ -1207,8 +1151,6 @@ SmmBaseHelperMain ( EFI_HANDLE Handle; UINTN NumberOfEnabledProcessors; VOID *Registration; - EFI_SMM_ACCESS2_PROTOCOL *SmmAccess; - UINTN Size; Handle = NULL; /// @@ -1254,28 +1196,6 @@ SmmBaseHelperMain ( mSmmBaseHelperReady->ServiceEntry = SmmHandlerEntry; // - // Get SMRAM information - // - Status = gBS->LocateProtocol (, NULL, (VOID **)); - ASSERT_EFI_ERROR (Status); - - Size = 0; - Status = SmmAccess->GetCapabilities (SmmAccess, , NULL); - ASSERT (Status == EFI_BUFFER_TOO_SMALL); - - Status = gSmst->SmmAllocatePool ( -EfiRuntimeServicesData, -Size, -(VOID **) -); - ASSERT_EFI_ERROR (Status); - - Status = SmmAccess->GetCapabilities (SmmAccess, , mSmramRanges); - ASSERT_EFI_ERROR (Status); - - mSmramRangeCount = Size / sizeof (EFI_SMRAM_DESCRIPTOR); - - // // Register SMM Ready To Lock Protocol notification // Status = gSmst->SmmRegisterProtocolNotify ( diff --git a/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/SmmBaseHelper.inf b/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/SmmBaseHelper.inf index 8e967dc..118640b 100644 --- a/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/SmmBaseHelper.inf +++ b/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/SmmBaseHelper.inf @@ -60,6 +60,7 @@ SynchronizationLib CpuLib PcdLib + SmmMemLib [Guids] gEfiSmmBaseThunkCommunicationGuid @@ -75,7 +76,6 @@ gEfiSmmCpuIo2ProtocolGuid
[edk2] [Patch] NetworkPkg: Correct gEfiUdp4ProtocolGuid usage in DnsDxe
DnsDxe driver locates gEfiUdp4ProtocolGuid. Its usage should be TO_START. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- NetworkPkg/DnsDxe/DnsDxe.inf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NetworkPkg/DnsDxe/DnsDxe.inf b/NetworkPkg/DnsDxe/DnsDxe.inf index d63bbbe..0d1efd8 100644 --- a/NetworkPkg/DnsDxe/DnsDxe.inf +++ b/NetworkPkg/DnsDxe/DnsDxe.inf @@ -57,7 +57,7 @@ gEfiDns4ServiceBindingProtocolGuid ## BY_START gEfiDns4ProtocolGuid## BY_START gEfiUdp4ServiceBindingProtocolGuid ## TO_START - gEfiUdp4ProtocolGuid## BY_START + gEfiUdp4ProtocolGuid## TO_START gEfiDhcp4ServiceBindingProtocolGuid ## SOMETIMES_CONSUMES gEfiDhcp4ProtocolGuid ## SOMETIMES_CONSUMES gEfiIp4Config2ProtocolGuid ## SOMETIMES_CONSUMES -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch] EdkCompatibilityPkg: Fix wrong guid value of gEfiManagedNetworkProtocolGuid
UEFI2.1B corrects the guid value of gEfiManagedNetworkProtocolGuid. ECP package updates its value in ManagedNetwork.h, but miss the one in EdkIIGlueLib. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- .../Library/EdkIIGlueLib/EntryPoints/EdkIIGlueDxeDriverEntryPoint.c | 2 +- .../Library/EdkIIGlueLib/EntryPoints/EdkIIGluePeimEntryPoint.c | 2 +- .../Library/EdkIIGlueLib/EntryPoints/EdkIIGlueSmmDriverEntryPoint.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/EntryPoints/EdkIIGlueDxeDriverEntryPoint.c b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/EntryPoints/EdkIIGlueDxeDriverEntryPoint.c index 58ee6e0..2b71b1a 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/EntryPoints/EdkIIGlueDxeDriverEntryPoint.c +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/EntryPoints/EdkIIGlueDxeDriverEntryPoint.c @@ -706,7 +706,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiDhcp4ServiceBindingProtocolGuid GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiIp4ProtocolGuid = { 0x41d94cd2, 0x35b6, 0x455a, { 0x82, 0x58, 0xd4, 0xe5, 0x13, 0x34, 0xaa, 0xdd } }; GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiIp4ServiceBindingProtocolGuid = { 0xc51711e7, 0xb4bf, 0x404a, { 0xbf, 0xb8, 0x0a, 0x04, 0x8e, 0xf1, 0xff, 0xe4 } }; GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiIp4ConfigProtocolGuid = { 0x3b95aa31, 0x3793, 0x434b, { 0x86, 0x67, 0xc8, 0x07, 0x08, 0x92, 0xe0, 0x5e } }; -GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiManagedNetworkProtocolGuid = { 0x3b95aa31, 0x3793, 0x434b, { 0x86, 0x67, 0xc8, 0x07, 0x08, 0x92, 0xe0, 0x5e } }; +GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiManagedNetworkProtocolGuid = { 0x7ab33a91, 0xace5, 0x4326, { 0xb5, 0x72, 0xe7, 0xee, 0x33, 0xd3, 0x9f, 0x16 } }; GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiManagedNetworkServiceBindingProtocolGuid = { 0xf36ff770, 0xa7e1, 0x42cf, { 0x9e, 0xd2, 0x56, 0xf0, 0xf2, 0x71, 0xf4, 0x4c } }; GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiMtftp4ProtocolGuid = { 0x3ad9df29, 0x4501, 0x478d, { 0xb1, 0xf8, 0x7f, 0x7f, 0xe7, 0x0e, 0x50, 0xf3 } }; GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiMtftp4ServiceBindingProtocolGuid = { 0x2FE800BE, 0x8F01, 0x4aa6, { 0x94, 0x6B, 0xD7, 0x13, 0x88, 0xE1, 0x83, 0x3F } }; diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/EntryPoints/EdkIIGluePeimEntryPoint.c b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/EntryPoints/EdkIIGluePeimEntryPoint.c index 1144cc0..3a9ed9b 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/EntryPoints/EdkIIGluePeimEntryPoint.c +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/EntryPoints/EdkIIGluePeimEntryPoint.c @@ -134,7 +134,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiDhcp4ServiceBindingProtocolGuid GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiIp4ProtocolGuid = { 0x41d94cd2, 0x35b6, 0x455a, { 0x82, 0x58, 0xd4, 0xe5, 0x13, 0x34, 0xaa, 0xdd } }; GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiIp4ServiceBindingProtocolGuid = { 0xc51711e7, 0xb4bf, 0x404a, { 0xbf, 0xb8, 0x0a, 0x04, 0x8e, 0xf1, 0xff, 0xe4 } }; GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiIp4ConfigProtocolGuid = { 0x3b95aa31, 0x3793, 0x434b, { 0x86, 0x67, 0xc8, 0x07, 0x08, 0x92, 0xe0, 0x5e } }; -GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiManagedNetworkProtocolGuid = { 0x3b95aa31, 0x3793, 0x434b, { 0x86, 0x67, 0xc8, 0x07, 0x08, 0x92, 0xe0, 0x5e } }; +GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiManagedNetworkProtocolGuid = { 0x7ab33a91, 0xace5, 0x4326, { 0xb5, 0x72, 0xe7, 0xee, 0x33, 0xd3, 0x9f, 0x16 } }; GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiManagedNetworkServiceBindingProtocolGuid = { 0xf36ff770, 0xa7e1, 0x42cf, { 0x9e, 0xd2, 0x56, 0xf0, 0xf2, 0x71, 0xf4, 0x4c } }; GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiMtftp4ProtocolGuid = { 0x3ad9df29, 0x4501, 0x478d, { 0xb1, 0xf8, 0x7f, 0x7f, 0xe7, 0x0e, 0x50, 0xf3 } }; GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiMtftp4ServiceBindingProtocolGuid = { 0x2FE800BE, 0x8F01, 0x4aa6, { 0x94, 0x6B, 0xD7, 0x13, 0x88, 0xE1, 0x83, 0x3F } }; diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/EntryPoints/EdkIIGlueSmmDriverEntryPoint.c b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/EntryPoints/EdkIIGlueSmmDriverEntryPoint.c index 781eb86..954f7e9 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/EntryPoints/EdkIIGlueSmmDriverEntryPoint.c +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/EntryPoints/EdkIIGlueSmmDriverEntryPoint.c @@ -453,7 +453,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiDhcp4ServiceBindingProtoc
[edk2] [Patch 2/3] DuetPkg: Fix GCC error to avoid the duplicated global variable in SmbiosGenDxe
Update SmbiosGenDxe to use UefiHiiServicesLib. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- DuetPkg/SmbiosGenDxe/SmbiosGen.c | 11 --- DuetPkg/SmbiosGenDxe/SmbiosGen.h | 1 + DuetPkg/SmbiosGenDxe/SmbiosGen.inf | 1 + 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/DuetPkg/SmbiosGenDxe/SmbiosGen.c b/DuetPkg/SmbiosGenDxe/SmbiosGen.c index 03e0936..393bb4d 100644 --- a/DuetPkg/SmbiosGenDxe/SmbiosGen.c +++ b/DuetPkg/SmbiosGenDxe/SmbiosGen.c @@ -18,7 +18,6 @@ Abstract: **/ #include "SmbiosGen.h" -EFI_HII_DATABASE_PROTOCOL *gHiiDatabase; extern UINT8SmbiosGenDxeStrings[]; EFI_SMBIOS_PROTOCOL *gSmbios; EFI_HII_HANDLE gStringHandle; @@ -211,16 +210,6 @@ SmbiosGenEntrypoint ( if (EFI_ERROR (Status)) { return Status; } - - Status = gBS->LocateProtocol ( - , - NULL, - (VOID**) - ); - - if (EFI_ERROR (Status)) { -return Status; - } gStringHandle = HiiAddPackages ( , diff --git a/DuetPkg/SmbiosGenDxe/SmbiosGen.h b/DuetPkg/SmbiosGenDxe/SmbiosGen.h index 0474366..3a42e22 100644 --- a/DuetPkg/SmbiosGenDxe/SmbiosGen.h +++ b/DuetPkg/SmbiosGenDxe/SmbiosGen.h @@ -39,6 +39,7 @@ Abstract: #include #include #include +#include #define PRODUCT_NAME L"DUET" #define PRODUCT_VERSION L"Beta" diff --git a/DuetPkg/SmbiosGenDxe/SmbiosGen.inf b/DuetPkg/SmbiosGenDxe/SmbiosGen.inf index e413beb..c8568da 100644 --- a/DuetPkg/SmbiosGenDxe/SmbiosGen.inf +++ b/DuetPkg/SmbiosGenDxe/SmbiosGen.inf @@ -41,6 +41,7 @@ UefiDriverEntryPoint BaseLib HiiLib + UefiHiiServicesLib [Sources] SmbiosGen.c -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 1/3] DuetPkg: Fix GCC error to avoid the duplicated global variables in EfiLdr
Move the global variable definitions into source code instead of head filer. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- DuetPkg/EfiLdr/EfiLdr.h| 3 --- DuetPkg/EfiLdr/EfiLoader.c | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DuetPkg/EfiLdr/EfiLdr.h b/DuetPkg/EfiLdr/EfiLdr.h index 665f405..4f21cf3 100644 --- a/DuetPkg/EfiLdr/EfiLdr.h +++ b/DuetPkg/EfiLdr/EfiLdr.h @@ -80,9 +80,6 @@ typedef struct { BIOS_MEMORY_MAP_ENTRY MemoryMapEntry[1]; } BIOS_MEMORY_MAP; -EFILDR_LOADED_IMAGEDxeCoreImage; -EFILDR_LOADED_IMAGEDxeIplImage; - typedef VOID (EFIAPI * EFI_MAIN_ENTRYPOINT) ( diff --git a/DuetPkg/EfiLdr/EfiLoader.c b/DuetPkg/EfiLdr/EfiLoader.c index 6913027..b23966e 100644 --- a/DuetPkg/EfiLdr/EfiLoader.c +++ b/DuetPkg/EfiLdr/EfiLoader.c @@ -24,6 +24,9 @@ Revision History: #include "PeLoader.h" #include "LzmaDecompress.h" +EFILDR_LOADED_IMAGEDxeCoreImage; +EFILDR_LOADED_IMAGEDxeIplImage; + VOID SystemHang ( CHAR8*Message -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 0/3] Fix GCC error to avoid the duplicated global variables
GCC adds the compiler options to detect the duplicated global variables. Update the below modules to avoid it and pass GCC build. Liming Gao (3): DuetPkg: Fix GCC error to avoid the duplicated global variables in EfiLdr DuetPkg: Fix GCC error to avoid the duplicated global variable in SmbiosGenDxe EdkCompatibilityPkg: Fix GCC error to avoid the duplicated global variables DuetPkg/EfiLdr/EfiLdr.h | 3 --- DuetPkg/EfiLdr/EfiLoader.c | 3 +++ DuetPkg/SmbiosGenDxe/SmbiosGen.c | 11 --- DuetPkg/SmbiosGenDxe/SmbiosGen.h | 1 + DuetPkg/SmbiosGenDxe/SmbiosGen.inf | 1 + .../Compatibility/SmmBaseHelper/SmmBaseHelper.c | 16 6 files changed, 13 insertions(+), 22 deletions(-) -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch] MdeModulePkg: Update print error level for RuntimeDriver alignment check
In DxeCore, use warning message for Runtime driver that doesn't satisfy section alignment requirement. This check is required when PropertiesTable is installed. So, add error message if PropertiesTable can't be installed successfully. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c b/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c index 3486737..adfc91c 100644 --- a/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c +++ b/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c @@ -1120,11 +1120,11 @@ InsertImageRecord ( SetPropertiesTableSectionAlignment (SectionAlignment); if ((SectionAlignment & (EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT - 1)) != 0) { -DEBUG ((EFI_D_ERROR, " InsertImageRecord - Section Alignment(0x%x) is not %dK \n", +DEBUG ((EFI_D_WARN, " InsertImageRecord - Section Alignment(0x%x) is not %dK \n", SectionAlignment, EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT >> 10)); PdbPointer = PeCoffLoaderGetPdbPointer ((VOID*) (UINTN) ImageAddress); if (PdbPointer != NULL) { - DEBUG ((EFI_D_ERROR, " Image - %a \n", PdbPointer)); + DEBUG ((EFI_D_WARN, " Image - %a \n", PdbPointer)); } goto Finish; } @@ -1320,6 +1320,8 @@ InstallPropertiesTable ( DEBUG ((EFI_D_INFO, "MemoryProtectionAttribute - 0x%016lx\n", mPropertiesTable.MemoryProtectionAttribute)); if ((mPropertiesTable.MemoryProtectionAttribute & EFI_PROPERTIES_RUNTIME_MEMORY_PROTECTION_NON_EXECUTABLE_PE_DATA) == 0) { + DEBUG ((EFI_D_ERROR, "MemoryProtectionAttribute NON_EXECUTABLE_PE_DATA is not set, ")); + DEBUG ((EFI_D_ERROR, "because Runtime Driver Section Alignment is not %dK.\n", EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT >> 10)); return ; } -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 4/4] SourceLevelDebugPkg: Correct gEfiDebugAgentGuid usage in DxeDebugAgentLib
DxeDebugAgentLib instance produces gEfiDebugAgentGuid system table. Its usage should be PRODUCES instead of SOMETIMES_PRODUCES. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf b/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf index 7ed5f55..8894a04 100644 --- a/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf +++ b/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf @@ -81,7 +81,7 @@ MemoryAllocationLib [Guids] - ## SOMETIMES_PRODUCES ## SystemTable + ## PRODUCES ## SystemTable ## CONSUMES ## HOB gEfiDebugAgentGuid ## SOMETIMES_CONSUMES ## SystemTable -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 1/4] SecurityPkg: Correct Pcd Usage PcdTcg2HashAlgorithmBitmap
HashLibBaseCryptoRouter sets PcdTcg2HashAlgorithmBitmap. Its usage should be both SOMETIMES_CONSUMES and SOMETIMES_PRODUCES. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- .../Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf| 4 +++- .../Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.inf| 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf b/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf index 7c38ea6..6050059 100644 --- a/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf +++ b/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf @@ -49,5 +49,7 @@ [Pcd] gEfiSecurityPkgTokenSpaceGuid.PcdTpm2HashMask ## CONSUMES - gEfiSecurityPkgTokenSpaceGuid.PcdTcg2HashAlgorithmBitmap ## CONSUMES + ## SOMETIMES_CONSUMES + ## SOMETIMES_PRODUCES + gEfiSecurityPkgTokenSpaceGuid.PcdTcg2HashAlgorithmBitmap diff --git a/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.inf b/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.inf index c1a699f..1a3cd6a 100644 --- a/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.inf +++ b/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.inf @@ -50,5 +50,7 @@ [Pcd] gEfiSecurityPkgTokenSpaceGuid.PcdTpm2HashMask ## CONSUMES - gEfiSecurityPkgTokenSpaceGuid.PcdTcg2HashAlgorithmBitmap ## CONSUMES + ## SOMETIMES_CONSUMES + ## SOMETIMES_PRODUCES + gEfiSecurityPkgTokenSpaceGuid.PcdTcg2HashAlgorithmBitmap -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 0/4] Correct Pcd/Guid/Protocol Usage in module INF
Liming Gao (4): SecurityPkg: Correct Pcd Usage PcdTcg2HashAlgorithmBitmap SecurityPkg: Correct Pcd Usage PcdTpm2HashMask in Tcg2Pei MdeModulePkg: Correct usage gEfiIp4Config2ProtocolGuid in Ip4Dxe SourceLevelDebugPkg: Correct gEfiDebugAgentGuid usage in DxeDebugAgentLib MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf | 2 +- .../Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf| 4 +++- .../Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.inf| 4 +++- SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf | 4 +++- SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf | 2 +- 5 files changed, 11 insertions(+), 5 deletions(-) -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 0/6] Fix VS2015 warnings in EDKII packages.
VS2015 reports the following warnings in EDKII codes. 1) warning C4701: potentially uninitialized local variable used. 2) warning C4703: potentially uninitialized local pointer variable used. 3) warning C4459: declaration of 'PrivateData' hides global declaration. 4) warning C4456: declaration of 'q' hides previous local declaration. 5) warning C4312: conversion from 'unsigned long' to 'void *' of greater size. 6) warning C4311: pointer truncation from 'void *' to 'unsigned long'. For warning C4701 & C4703, disable them in MdePkg because of the false report. For warning C4459 & C4456, update MdeModulePkg and OvmfPkg to fix them. For warning C4312 & C4311, update MdeModulePkg to fix them, and update CryptoPkg OpensslLib to disable them. After apply those changes, MdePkg, MdeModulePkg, UefiCpuPkg, NetworkPkg, SecurityPkg, ShellPkg, SourceLevelDebugPkg, PcAtChipsetPkg, PerformancePkg, IntelFrameworkModulePkg, IntelFrameworkPkg, CryptoPkg, IntelFspPkg, IntelFspWrapperPkg and FatPkg can pass VS2015. Ovmf can pass VS2015. Nt32 is failure in VS2015, still under investigation. Other package owners can choose to fix or disable them in your own packages. Liming Gao (6): MdePkg: Disable VS2015 warning C4701 & C4703 MdeModulePkg: Fix VS2015 warning C4459 in DriverSampleDxe MdeModulePkg: Fix VS2015 warning C4456 in RegularExpressionDxe MdeModulePkg: Fix VS2015 warning C4311 & C4312 in RegularExpressionDxe CryptoPkg: Disable VS2015 warning C4311 in OpensslLib OvmfPkg: Fix VS2015 warning C4459 in XenBusDxe CryptoPkg/Library/OpensslLib/OpensslLib.inf| 3 +- .../Universal/DriverSampleDxe/DriverSample.c | 72 +++--- .../RegularExpressionDxe/Oniguruma/enc/unicode.c | 22 +++ .../RegularExpressionDxe/Oniguruma/regexec.c | 52 .../RegularExpressionDxe/Oniguruma/regint.h| 8 +-- .../RegularExpressionDxe/Oniguruma/regparse.c | 16 ++--- MdePkg/Include/Ia32/ProcessorBind.h| 6 +- MdePkg/Include/X64/ProcessorBind.h | 6 +- OvmfPkg/XenBusDxe/XenStore.c | 14 ++--- 9 files changed, 100 insertions(+), 99 deletions(-) -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 1/6] MdePkg: Disable VS2015 warning C4701 & C4703
C4701 & C4703 may cause false positive issues. They have been disabled in VS2013. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- MdePkg/Include/Ia32/ProcessorBind.h | 6 +++--- MdePkg/Include/X64/ProcessorBind.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/MdePkg/Include/Ia32/ProcessorBind.h b/MdePkg/Include/Ia32/ProcessorBind.h index 22f07ca..458f7dd 100644 --- a/MdePkg/Include/Ia32/ProcessorBind.h +++ b/MdePkg/Include/Ia32/ProcessorBind.h @@ -93,7 +93,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // #pragma warning ( disable : 4206 ) -#if _MSC_VER == 1800 +#if _MSC_VER == 1800 || _MSC_VER == 1900 // // Disable these warnings for VS2013. @@ -101,13 +101,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // // This warning is for potentially uninitialized local variable, and it may cause false -// positive issues in VS2013 build +// positive issues in VS2013 and VS2015 build // #pragma warning ( disable : 4701 ) // // This warning is for potentially uninitialized local pointer variable, and it may cause -// false positive issues in VS2013 build +// false positive issues in VS2013 and VS2015 build // #pragma warning ( disable : 4703 ) diff --git a/MdePkg/Include/X64/ProcessorBind.h b/MdePkg/Include/X64/ProcessorBind.h index 81dbe18..705104a 100644 --- a/MdePkg/Include/X64/ProcessorBind.h +++ b/MdePkg/Include/X64/ProcessorBind.h @@ -94,7 +94,7 @@ // #pragma warning ( disable : 4206 ) -#if _MSC_VER == 1800 +#if _MSC_VER == 1800 || _MSC_VER == 1900 // // Disable these warnings for VS2013. @@ -102,13 +102,13 @@ // // This warning is for potentially uninitialized local variable, and it may cause false -// positive issues in VS2013 build +// positive issues in VS2013 and VS2015 build // #pragma warning ( disable : 4701 ) // // This warning is for potentially uninitialized local pointer variable, and it may cause -// false positive issues in VS2013 build +// false positive issues in VS2013 and VS2015 build // #pragma warning ( disable : 4703 ) -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 3/6] MdeModulePkg: Fix VS2015 warning C4456 in RegularExpressionDxe
warning C4456: declaration of 'q' hides previous local declaration. Update code to use the different local variable name. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> Cc: El-Haj-Mahmoud Samer <samer.el-haj-mahm...@hpe.com> --- .../Universal/RegularExpressionDxe/Oniguruma/regexec.c | 16 .../Universal/RegularExpressionDxe/Oniguruma/regint.h| 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regexec.c b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regexec.c index de5839a..5e3ffa1 100644 --- a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regexec.c +++ b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regexec.c @@ -1442,7 +1442,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, case OP_EXACT1_IC: MOP_IN(OP_EXACT1_IC); { int len; - UChar *q, lowbuf[ONIGENC_MBC_CASE_FOLD_MAXLEN]; + UChar *q1, lowbuf[ONIGENC_MBC_CASE_FOLD_MAXLEN]; DATA_ENSURE(1); len = ONIGENC_MBC_CASE_FOLD(encode, @@ -1450,12 +1450,12 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, case_fold_flag, , end, lowbuf); DATA_ENSURE(0); - q = lowbuf; + q1 = lowbuf; while (len-- > 0) { - if (*p != *q) { + if (*p != *q1) { goto fail; } - p++; q++; + p++; q1++; } } MOP_OUT; @@ -1531,7 +1531,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, case OP_EXACTN_IC: MOP_IN(OP_EXACTN_IC); { int len; - UChar *q, *endp, lowbuf[ONIGENC_MBC_CASE_FOLD_MAXLEN]; + UChar *qn, *endp, lowbuf[ONIGENC_MBC_CASE_FOLD_MAXLEN]; GET_LENGTH_INC(tlen, p); endp = p + tlen; @@ -1544,10 +1544,10 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, case_fold_flag, , end, lowbuf); DATA_ENSURE(0); - q = lowbuf; + qn = lowbuf; while (len-- > 0) { - if (*p != *q) goto fail; - p++; q++; + if (*p != *qn) goto fail; + p++; qn++; } } } diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regint.h b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regint.h index 2db3b70..44589bf 100644 --- a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regint.h +++ b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regint.h @@ -329,8 +329,8 @@ typedef Bits* BitSetRef; #define SIZE_BITSETsizeof(BitSet) #define BITSET_CLEAR(bs) do {\ - int i;\ - for (i = 0; i < (int )BITSET_SIZE; i++) { (bs)[i] = 0; } \ + int id;\ + for (id = 0; id < (int )BITSET_SIZE; id++) { (bs)[id] = 0; } \ } while (0) #define BS_ROOM(bs,pos)(bs)[pos / BITS_IN_ROOM] -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 2/6] MdeModulePkg: Fix VS2015 warning C4459 in DriverSampleDxe
warning C4459: declaration of 'PrivateData' hides global declaration. Update DriverSampleDxe to rename global variable name to be different. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- .../Universal/DriverSampleDxe/DriverSample.c | 72 +++--- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c index 2f77d39..8ec1d4e 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c +++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c @@ -21,7 +21,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. CHAR16 VariableName[] = L"MyIfrNVData"; CHAR16 MyEfiVar[] = L"MyEfiVar"; EFI_HANDLE DriverHandle[2] = {NULL, NULL}; -DRIVER_SAMPLE_PRIVATE_DATA *PrivateData = NULL; +DRIVER_SAMPLE_PRIVATE_DATA *mPrivateData = NULL; EFI_EVENT mEvent; HII_VENDOR_DEVICE_PATH mHiiVendorDevicePath0 = { @@ -1895,17 +1895,17 @@ DriverSampleInit ( // // Initialize driver private data // - PrivateData = AllocateZeroPool (sizeof (DRIVER_SAMPLE_PRIVATE_DATA)); - if (PrivateData == NULL) { + mPrivateData = AllocateZeroPool (sizeof (DRIVER_SAMPLE_PRIVATE_DATA)); + if (mPrivateData == NULL) { return EFI_OUT_OF_RESOURCES; } - PrivateData->Signature = DRIVER_SAMPLE_PRIVATE_SIGNATURE; + mPrivateData->Signature = DRIVER_SAMPLE_PRIVATE_SIGNATURE; - PrivateData->ConfigAccess.ExtractConfig = ExtractConfig; - PrivateData->ConfigAccess.RouteConfig = RouteConfig; - PrivateData->ConfigAccess.Callback = DriverCallback; - PrivateData->PasswordState = BROWSER_STATE_VALIDATE_PASSWORD; + mPrivateData->ConfigAccess.ExtractConfig = ExtractConfig; + mPrivateData->ConfigAccess.RouteConfig = RouteConfig; + mPrivateData->ConfigAccess.Callback = DriverCallback; + mPrivateData->PasswordState = BROWSER_STATE_VALIDATE_PASSWORD; // // Locate Hii Database protocol @@ -1914,7 +1914,7 @@ DriverSampleInit ( if (EFI_ERROR (Status)) { return Status; } - PrivateData->HiiDatabase = HiiDatabase; + mPrivateData->HiiDatabase = HiiDatabase; // // Locate HiiString protocol @@ -1923,7 +1923,7 @@ DriverSampleInit ( if (EFI_ERROR (Status)) { return Status; } - PrivateData->HiiString = HiiString; + mPrivateData->HiiString = HiiString; // // Locate Formbrowser2 protocol @@ -1932,7 +1932,7 @@ DriverSampleInit ( if (EFI_ERROR (Status)) { return Status; } - PrivateData->FormBrowser2 = FormBrowser2; + mPrivateData->FormBrowser2 = FormBrowser2; // // Locate ConfigRouting protocol @@ -1941,7 +1941,7 @@ DriverSampleInit ( if (EFI_ERROR (Status)) { return Status; } - PrivateData->HiiConfigRouting = HiiConfigRouting; + mPrivateData->HiiConfigRouting = HiiConfigRouting; // // Locate keyword handler protocol @@ -1950,19 +1950,19 @@ DriverSampleInit ( if (EFI_ERROR (Status)) { return Status; } - PrivateData->HiiKeywordHandler = HiiKeywordHandler; + mPrivateData->HiiKeywordHandler = HiiKeywordHandler; Status = gBS->InstallMultipleProtocolInterfaces ( [0], , , , - >ConfigAccess, + >ConfigAccess, NULL ); ASSERT_EFI_ERROR (Status); - PrivateData->DriverHandle[0] = DriverHandle[0]; + mPrivateData->DriverHandle[0] = DriverHandle[0]; // // Publish our HII data @@ -1978,7 +1978,7 @@ DriverSampleInit ( return EFI_OUT_OF_RESOURCES; } - PrivateData->HiiHandle[0] = HiiHandle[0]; + mPrivateData->HiiHandle[0] = HiiHandle[0]; // // Publish another Fromset @@ -1988,12 +1988,12 @@ DriverSampleInit ( , , , - >ConfigAccess, + >ConfigAccess, NULL ); ASSERT_EFI_ERROR (Status); - PrivateData->DriverHandle[1] = DriverHandle[1]; + mPrivateData->DriverHandle[1] = DriverHandle[1]; HiiHandle[1] = HiiAddPackages ( , @@ -2007,7 +2007,7 @@ DriverSampleInit ( return EFI_OUT_OF_RESOURCES; } - PrivateData->HiiHandle[1] = HiiHandle[1]; + mPrivateData->HiiHandle[1] = HiiHandle[1]; // // Update the device path string. @@ -2037,14 +2037,14 @@ DriverSampleInit ( // // Initialize Name/Value name String ID // - PrivateData->NameStringId[0] = STR_NAME_VALUE_VAR_NAME0; - PrivateData->NameStringId[1] = STR_NAME_VALUE_VAR_NAME1; - PrivateData->NameStringId[2] = STR_NAME_VALUE_VAR_NAME2; + mPrivateData->NameStringId[0] = STR_NAME_VALUE_VAR_NAME0; + mPrivateData->NameStri
[edk2] [Patch 4/6] MdeModulePkg: Fix VS2015 warning C4311 & C4312 in RegularExpressionDxe
warning C4311: pointer truncation from 'void *' to 'unsigned long' warning C4312: conversion from 'unsigned long' to 'void *' of greater size Update code to convert type to UINTN first, then convert it to other type. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> Cc: El-Haj-Mahmoud Samer <samer.el-haj-mahm...@hpe.com> --- .../RegularExpressionDxe/Oniguruma/enc/unicode.c | 22 ++--- .../RegularExpressionDxe/Oniguruma/regexec.c | 36 +++--- .../RegularExpressionDxe/Oniguruma/regint.h| 4 +-- .../RegularExpressionDxe/Oniguruma/regparse.c | 16 +- 4 files changed, 39 insertions(+), 39 deletions(-) diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/enc/unicode.c b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/enc/unicode.c index 70a1a52..a906670 100644 --- a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/enc/unicode.c +++ b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/enc/unicode.c @@ -10920,12 +10920,12 @@ static int init_case_fold_table(void) if (ONIG_IS_NULL(FoldTable)) return ONIGERR_MEMORY; for (i = 0; i < (int )(sizeof(CaseFold)/sizeof(CaseFold_11_Type)); i++) { p = [i]; -st_add_direct(FoldTable, (st_data_t )p->from, (st_data_t )&(p->to)); +st_add_direct(FoldTable, (st_data_t )p->from, (st_data_t )(UINTN)&(p->to)); } for (i = 0; i < (int )(sizeof(CaseFold_Locale)/sizeof(CaseFold_11_Type)); i++) { p = _Locale[i]; -st_add_direct(FoldTable, (st_data_t )p->from, (st_data_t )&(p->to)); +st_add_direct(FoldTable, (st_data_t )p->from, (st_data_t )(UINTN)&(p->to)); } Unfold1Table = st_init_numtable_with_size(1000); @@ -10934,13 +10934,13 @@ static int init_case_fold_table(void) for (i = 0; i < (int )(sizeof(CaseUnfold_11)/sizeof(CaseUnfold_11_Type)); i++) { p1 = _11[i]; -st_add_direct(Unfold1Table, (st_data_t )p1->from, (st_data_t )&(p1->to)); +st_add_direct(Unfold1Table, (st_data_t )p1->from, (st_data_t )(UINTN)&(p1->to)); } for (i = 0; i < (int )(sizeof(CaseUnfold_11_Locale)/sizeof(CaseUnfold_11_Type)); i++) { p1 = _11_Locale[i]; -st_add_direct(Unfold1Table, (st_data_t )p1->from, (st_data_t )&(p1->to)); +st_add_direct(Unfold1Table, (st_data_t )p1->from, (st_data_t )(UINTN)&(p1->to)); } Unfold2Table = st_init_table_with_size(_code2_hash, 200); @@ -10949,13 +10949,13 @@ static int init_case_fold_table(void) for (i = 0; i < (int )(sizeof(CaseUnfold_12)/sizeof(CaseUnfold_12_Type)); i++) { p2 = _12[i]; -st_add_direct(Unfold2Table, (st_data_t )p2->from, (st_data_t )(>to)); +st_add_direct(Unfold2Table, (st_data_t )(UINTN)p2->from, (st_data_t )(UINTN)(>to)); } for (i = 0; i < (int )(sizeof(CaseUnfold_12_Locale)/sizeof(CaseUnfold_12_Type)); i++) { p2 = _12_Locale[i]; -st_add_direct(Unfold2Table, (st_data_t )p2->from, (st_data_t )(>to)); +st_add_direct(Unfold2Table, (st_data_t )(UINTN)p2->from, (st_data_t )(UINTN)(>to)); } Unfold3Table = st_init_table_with_size(_code3_hash, 30); @@ -10964,7 +10964,7 @@ static int init_case_fold_table(void) for (i = 0; i < (int )(sizeof(CaseUnfold_13)/sizeof(CaseUnfold_13_Type)); i++) { p3 = _13[i]; -st_add_direct(Unfold3Table, (st_data_t )p3->from, (st_data_t )(>to)); +st_add_direct(Unfold3Table, (st_data_t )(UINTN)p3->from, (st_data_t )(UINTN)(>to)); } @@ -11265,7 +11265,7 @@ onigenc_unicode_get_case_fold_codes_by_str(OnigEncoding enc, } } - if (onig_st_lookup(Unfold2Table, (st_data_t )to->code, + if (onig_st_lookup(Unfold2Table, (st_data_t )(UINTN)to->code, (void* )) != 0) { for (i = 0; i < z2->n; i++) { if (z2->code[i] == code) continue; @@ -11291,7 +11291,7 @@ onigenc_unicode_get_case_fold_codes_by_str(OnigEncoding enc, } } - if (onig_st_lookup(Unfold3Table, (st_data_t )to->code, + if (onig_st_lookup(Unfold3Table, (st_data_t )(UINTN)to->code, (void* )) != 0) { for (i = 0; i < z2->n; i++) { if (z2->code[i] == code) continue; @@ -11336,7 +11336,7 @@ onigenc_unicode_get_case_fold_codes_by_str(OnigEncoding enc, clen = enclen(enc, p); len += clen; - if (onig_st_lookup(Unfold2Table, (st_data_t )codes, (void* )) != 0) { + if (onig_st_lookup(Unfold2Table, (st_data_t )(UINTN)codes, (void* )) != 0) { for (i = 0; i < z2->n; i++) { items[n].byte_len = len; items[n].code_len = 1; @@ -11357,7 +11357,7 @@ onigenc_unicode_get_case_fold_codes_by_str(OnigEncoding enc, clen = enclen(enc, p); len += clen; -
[edk2] [Patch 6/6] OvmfPkg: Fix VS2015 warning C4459 in XenBusDxe
warning C4459: declaration of 'xs' hides global declaration. Update code to rename local variable xs to xsp to be different. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> Cc: Justen Jordan <jordan.l.jus...@intel.com> --- OvmfPkg/XenBusDxe/XenStore.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/OvmfPkg/XenBusDxe/XenStore.c b/OvmfPkg/XenBusDxe/XenStore.c index 9850f1e..61976f9 100644 --- a/OvmfPkg/XenBusDxe/XenStore.c +++ b/OvmfPkg/XenBusDxe/XenStore.c @@ -992,9 +992,9 @@ NotifyEventChannelCheckForEvent ( IN VOID *Context ) { - XENSTORE_PRIVATE *xs; - xs = (XENSTORE_PRIVATE *)Context; - if (TestAndClearBit (xs->EventChannel, xs->Dev->SharedInfo->evtchn_pending)) { + XENSTORE_PRIVATE *xsp; + xsp = (XENSTORE_PRIVATE *)Context; + if (TestAndClearBit (xsp->EventChannel, xsp->Dev->SharedInfo->evtchn_pending)) { gBS->SignalEvent (Event); } } @@ -1007,12 +1007,12 @@ NotifyEventChannelCheckForEvent ( STATIC EFI_STATUS XenStoreInitComms ( - XENSTORE_PRIVATE *xs + XENSTORE_PRIVATE *xsp ) { EFI_STATUS Status; EFI_EVENT TimerEvent; - struct xenstore_domain_interface *XenStore = xs->XenStore; + struct xenstore_domain_interface *XenStore = xsp->XenStore; Status = gBS->CreateEvent (EVT_TIMER, 0, NULL, NULL, ); Status = gBS->SetTimer (TimerEvent, TimerRelative, @@ -1029,8 +1029,8 @@ XenStoreInitComms ( gBS->CloseEvent (TimerEvent); Status = gBS->CreateEvent (EVT_NOTIFY_WAIT, TPL_NOTIFY, - NotifyEventChannelCheckForEvent, xs, - >EventChannelEvent); + NotifyEventChannelCheckForEvent, xsp, + >EventChannelEvent); ASSERT_EFI_ERROR (Status); return Status; -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2] MdePkg: Add more DataBits support to Port80 output
The BasePostCodeLibPort80 instance just prints UINT8 to IoPort 80. Some boards may support 16bit or 32bit. To support them, new PCD PcdPort80DataWidth is introduced to specify the width of data bits to Port80. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> Reviewed-by: Star Zeng <star.z...@intel.com> Reviewed-by: Jiewen Yao <jiewen@intel.com> --- .../BasePostCodeLibPort80.inf | 5 +++-- MdePkg/Library/BasePostCodeLibPort80/PostCode.c| 24 ++--- MdePkg/MdePkg.dec | 5 + MdePkg/MdePkg.uni | Bin 69604 -> 70116 bytes 4 files changed, 29 insertions(+), 5 deletions(-) diff --git a/MdePkg/Library/BasePostCodeLibPort80/BasePostCodeLibPort80.inf b/MdePkg/Library/BasePostCodeLibPort80/BasePostCodeLibPort80.inf index e2f0be5..ebe1158 100644 --- a/MdePkg/Library/BasePostCodeLibPort80/BasePostCodeLibPort80.inf +++ b/MdePkg/Library/BasePostCodeLibPort80/BasePostCodeLibPort80.inf @@ -3,7 +3,7 @@ # # Post Code Library that writes post code values to I/O port 0x80. # -# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved. +# Copyright (c) 2007 - 2015, 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 @@ -40,8 +40,9 @@ [LibraryClasses] IoLib PcdLib + DebugLib [Pcd] gEfiMdePkgTokenSpaceGuid.PcdPostCodePropertyMask ## CONSUMES - + gEfiMdePkgTokenSpaceGuid.PcdPort80DataWidth ## CONSUMES diff --git a/MdePkg/Library/BasePostCodeLibPort80/PostCode.c b/MdePkg/Library/BasePostCodeLibPort80/PostCode.c index 925c740..f1fdbab 100644 --- a/MdePkg/Library/BasePostCodeLibPort80/PostCode.c +++ b/MdePkg/Library/BasePostCodeLibPort80/PostCode.c @@ -1,7 +1,7 @@ /** @file Post Code Library instance that writes post code values to I/O port 0x80. - Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved. + Copyright (c) 2006 - 2015, 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 @@ -17,6 +17,7 @@ #include #include #include +#include /** Sends an 32-bit value to a POST card. @@ -42,7 +43,24 @@ PostCode ( IN UINT32 Value ) { - IoWrite8 (0x80, (UINT8)(Value)); + switch (PcdGet8 (PcdPort80DataWidth)) { + case 8: +IoWrite8 (0x80, (UINT8)(Value)); +break; + case 16: +IoWrite16 (0x80, (UINT16)(Value)); +break; + case 32: +IoWrite32 (0x80, Value); +break; + default: +// +// Assert on the invalid data width +// +ASSERT (FALSE); +break; + } + return Value; } @@ -78,7 +96,7 @@ PostCodeWithDescription ( IN CONST CHAR8 *Description OPTIONAL ) { - IoWrite8 (0x80, (UINT8)(Value)); + PostCode (Value); return Value; } diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 337059a..7ab0cbb 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -1938,6 +1938,11 @@ # @Expression 0x8002 | (gEfiMdePkgTokenSpaceGuid.PcdPostCodePropertyMask & 0xFC) == 0 gEfiMdePkgTokenSpaceGuid.PcdPostCodePropertyMask|0|UINT8|0x000b + ## The bit width of data to be written to Port80. The default value is 8. + # @Prompt Port80 Data Width + # @ValidList 0x8001 | 8, 16, 32 + gEfiMdePkgTokenSpaceGuid.PcdPort80DataWidth|8|UINT8|0x002d + ## This value is used to configure X86 Processor FSB clock. # @Prompt FSB Clock. gEfiMdePkgTokenSpaceGuid.PcdFSBClock|2|UINT32|0x000c diff --git a/MdePkg/MdePkg.uni b/MdePkg/MdePkg.uni index 38211344e0ae01e984d5d9b916e42f4f8b4c1c66..5a5126213e4f72ea8c47772aebf5e31e007bbc46 100644 GIT binary patch delta 257 zcmaDdpXJG7mWC~iPxvRx?GKO*V8~}EVklv-U@%~CVMqkB5*fl7G8s~Utc=NqV&?J) zc?Gx%1tc|(*nlSl%is|GHt2pYDfaaAjC@_@6%muRZ8Pb4c3e-jgpnN`%pTv*~ zR#ybpQ3B-U0r?O)WS8mzMMD@ez^YS#WE#+%QidF`EoDG<4v+^jDU+d?L4g
[edk2] [Patch] BaseTools: Print PACKAGES_PATH build environment if it is set.
Print the optional build environment PACKAGES_PATH and EDK_TOOLS_BIN. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- BaseTools/Source/Python/build/build.py | 4 1 file changed, 4 insertions(+) diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index 30ff5bb..67bd3b3 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -780,10 +780,14 @@ class Build(): # print current build environment and configuration EdkLogger.quiet("%-16s = %s" % ("WORKSPACE", os.environ["WORKSPACE"])) +if "PACKAGES_PATH" in os.environ: +EdkLogger.quiet("%-16s = %s" % ("PACKAGES_PATH", os.path.normcase(os.path.normpath(os.environ["PACKAGES_PATH"] EdkLogger.quiet("%-16s = %s" % ("ECP_SOURCE", os.environ["ECP_SOURCE"])) EdkLogger.quiet("%-16s = %s" % ("EDK_SOURCE", os.environ["EDK_SOURCE"])) EdkLogger.quiet("%-16s = %s" % ("EFI_SOURCE", os.environ["EFI_SOURCE"])) EdkLogger.quiet("%-16s = %s" % ("EDK_TOOLS_PATH", os.environ["EDK_TOOLS_PATH"])) +if "EDK_TOOLS_BIN" in os.environ: +EdkLogger.quiet("%-16s = %s" % ("EDK_TOOLS_BIN", os.path.normcase(os.path.normpath(os.environ["EDK_TOOLS_BIN"] EdkLogger.info("") -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch] BaseTools: Don't require ECP pkg in WORKSPACE when PACKAGES_PATH is set
When PACKAGES_PATH is set, ECP pkg may be in another directory, not exist in WORKSPACE. So, keep this check in single WORKSPACE. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- BaseTools/Source/Python/build/build.py | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index b5df773..30ff5bb 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -156,16 +156,18 @@ def CheckEnvVariable(): EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "No space is allowed in EFI_SOURCE path", ExtraData=EfiSourceDir) -# change absolute path to relative path to WORKSPACE -if EfiSourceDir.upper().find(WorkspaceDir.upper()) != 0: -EdkLogger.error("build", PARAMETER_INVALID, "EFI_SOURCE is not under WORKSPACE", -ExtraData="WORKSPACE = %s\nEFI_SOURCE = %s" % (WorkspaceDir, EfiSourceDir)) -if EdkSourceDir.upper().find(WorkspaceDir.upper()) != 0: -EdkLogger.error("build", PARAMETER_INVALID, "EDK_SOURCE is not under WORKSPACE", -ExtraData="WORKSPACE = %s\nEDK_SOURCE = %s" % (WorkspaceDir, EdkSourceDir)) -if EcpSourceDir.upper().find(WorkspaceDir.upper()) != 0: -EdkLogger.error("build", PARAMETER_INVALID, "ECP_SOURCE is not under WORKSPACE", -ExtraData="WORKSPACE = %s\nECP_SOURCE = %s" % (WorkspaceDir, EcpSourceDir)) +# check those variables on single workspace case +if not PackagesPath: +# change absolute path to relative path to WORKSPACE +if EfiSourceDir.upper().find(WorkspaceDir.upper()) != 0: +EdkLogger.error("build", PARAMETER_INVALID, "EFI_SOURCE is not under WORKSPACE", +ExtraData="WORKSPACE = %s\nEFI_SOURCE = %s" % (WorkspaceDir, EfiSourceDir)) +if EdkSourceDir.upper().find(WorkspaceDir.upper()) != 0: +EdkLogger.error("build", PARAMETER_INVALID, "EDK_SOURCE is not under WORKSPACE", +ExtraData="WORKSPACE = %s\nEDK_SOURCE = %s" % (WorkspaceDir, EdkSourceDir)) +if EcpSourceDir.upper().find(WorkspaceDir.upper()) != 0: +EdkLogger.error("build", PARAMETER_INVALID, "ECP_SOURCE is not under WORKSPACE", +ExtraData="WORKSPACE = %s\nECP_SOURCE = %s" % (WorkspaceDir, EcpSourceDir)) # check EDK_TOOLS_PATH if "EDK_TOOLS_PATH" not in os.environ: -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch] MdePkg: Add more DataBits support to Port80 output
The BasePostCodeLibPort80 instance just prints UINT8 to IoPort 80. Some boards may support 16bit or 32bit. To support them, new PCD PcdPort80DataWidth is introduced to specify the width of data bits to Port80. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- .../BasePostCodeLibPort80/BasePostCodeLibPort80.inf | 4 ++-- MdePkg/Library/BasePostCodeLibPort80/PostCode.c | 19 --- MdePkg/MdePkg.dec | 5 + MdePkg/MdePkg.uni | Bin 69604 -> 70116 bytes 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/MdePkg/Library/BasePostCodeLibPort80/BasePostCodeLibPort80.inf b/MdePkg/Library/BasePostCodeLibPort80/BasePostCodeLibPort80.inf index e2f0be5..441c4c5 100644 --- a/MdePkg/Library/BasePostCodeLibPort80/BasePostCodeLibPort80.inf +++ b/MdePkg/Library/BasePostCodeLibPort80/BasePostCodeLibPort80.inf @@ -3,7 +3,7 @@ # # Post Code Library that writes post code values to I/O port 0x80. # -# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved. +# Copyright (c) 2007 - 2015, 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 @@ -44,4 +44,4 @@ [Pcd] gEfiMdePkgTokenSpaceGuid.PcdPostCodePropertyMask ## CONSUMES - + gEfiMdePkgTokenSpaceGuid.PcdPort80DataWidth ## CONSUMES diff --git a/MdePkg/Library/BasePostCodeLibPort80/PostCode.c b/MdePkg/Library/BasePostCodeLibPort80/PostCode.c index 925c740..4d572db 100644 --- a/MdePkg/Library/BasePostCodeLibPort80/PostCode.c +++ b/MdePkg/Library/BasePostCodeLibPort80/PostCode.c @@ -1,7 +1,7 @@ /** @file Post Code Library instance that writes post code values to I/O port 0x80. - Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved. + Copyright (c) 2006 - 2015, 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 @@ -42,7 +42,20 @@ PostCode ( IN UINT32 Value ) { - IoWrite8 (0x80, (UINT8)(Value)); + switch (PcdGet8 (PcdPort80DataWidth)) { + case 8: +IoWrite8 (0x80, (UINT8)(Value)); +break; + case 16: +IoWrite16 (0x80, (UINT16)(Value)); +break; + case 32: +IoWrite32 (0x80, Value); +break; + default: +break; + } + return Value; } @@ -78,7 +91,7 @@ PostCodeWithDescription ( IN CONST CHAR8 *Description OPTIONAL ) { - IoWrite8 (0x80, (UINT8)(Value)); + PostCode (Value); return Value; } diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 337059a..30f29d3 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -1965,6 +1965,11 @@ # @Prompt Memory Address of GuidedExtractHandler Table. gEfiMdePkgTokenSpaceGuid.PcdGuidedExtractHandlerTableAddress|0x100|UINT64|0x30001015 + ## The bit width of data to be written to Port80. The default value is 8. + # @Prompt Port80 Data Width + # @ValidList 0x8001 | 8, 16, 32 + gEfiMdePkgTokenSpaceGuid.PcdPort80DataWidth|8|UINT8|0x30001017 + [PcdsFixedAtBuild.IPF, PcdsPatchableInModule.IPF] ## The base address of IO port space for IA64 arch. # @Prompt IA64 IO Port Space Base Address. diff --git a/MdePkg/MdePkg.uni b/MdePkg/MdePkg.uni index 38211344e0ae01e984d5d9b916e42f4f8b4c1c66..5a5126213e4f72ea8c47772aebf5e31e007bbc46 100644 GIT binary patch delta 257 zcmaDdpXJG7mWC~iPxvRx?GKO*V8~}EVklv-U@%~CVMqkB5*fl7G8s~Utc=NqV&?J) zc?Gx%1tc|(*nlSl%is|GHt2pYDfaaAjC@_@6%muRZ8Pb4c3e-jgpnN`%pTv*~ zR#ybpQ3B-U0r?O)WS8mzMMD@ez^YS#WE#+%QidF`EoDG<4v+^jDU+d?L4g
[edk2] [Patch] BaseTools: Fix the issue to support windows root directory
Use os.path.relpath to get the relative directory instead of directly trim it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- BaseTools/Source/Python/Common/MultipleWorkspace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/Common/MultipleWorkspace.py b/BaseTools/Source/Python/Common/MultipleWorkspace.py index 8088404..feb1f8d 100644 --- a/BaseTools/Source/Python/Common/MultipleWorkspace.py +++ b/BaseTools/Source/Python/Common/MultipleWorkspace.py @@ -41,7 +41,7 @@ class MultipleWorkspace(object): @classmethod def convertPackagePath(cls, Ws, Path): if str(os.path.normcase (Path)).startswith(Ws): -return os.path.join(Ws, Path[len(Ws) + 1:]) +return os.path.join(Ws, os.path.relpath(Path, Ws)) return Path ## setWs() -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch] BaseTools: Add MultipleWorkspace.py in the common dependency.
Add new added MultipleWorkspace.py in the common dependency to freeze python tools for Windows. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- BaseTools/Source/Python/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/BaseTools/Source/Python/Makefile b/BaseTools/Source/Python/Makefile index 4044fce..d3f1baa 100644 --- a/BaseTools/Source/Python/Makefile +++ b/BaseTools/Source/Python/Makefile @@ -59,6 +59,7 @@ COMMON_PYTHON=$(BASE_TOOLS_PATH)\Source\Python\Common\BuildToolError.py \ $(BASE_TOOLS_PATH)\Source\Python\Common\ToolDefClassObject.py \ $(BASE_TOOLS_PATH)\Source\Python\Common\VpdInfoFile.py \ $(BASE_TOOLS_PATH)\Source\Python\Common\BuildVersion.py \ + $(BASE_TOOLS_PATH)\Source\Python\Common\MultipleWorkspace.py \ $(BASE_TOOLS_PATH)\Source\Python\CommonDataClass\CommonClass.py \ $(BASE_TOOLS_PATH)\Source\Python\CommonDataClass\DataClass.py \ $(BASE_TOOLS_PATH)\Source\Python\CommonDataClass\Exceptions.py \ -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch] edk2: Change BaseTools owner in Maintainers.txt
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- Maintainers.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Maintainers.txt b/Maintainers.txt index 1a07314..acb717e 100644 --- a/Maintainers.txt +++ b/Maintainers.txt @@ -68,7 +68,8 @@ M: Ard Biesheuvel <ard.biesheu...@linaro.org> BaseTools W: https://github.com/tianocore/tianocore.github.io/wiki/BaseTools -M: Yingke D Liu <yingke.d@intel.com> +M: Yonghong Zhu <yonghong@intel.com> +M: Liming Gao <liming@intel.com> BeagleBoardPkg W: https://github.com/tianocore/tianocore.github.io/wiki/BeagleBoardPkg -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 2/6] BaseTools: Update UPT tool to support multiple workspaces
Update UPT to refer MultipleWorkspace class to convert the file path from WORKSPACE and PACKAGES_PATH. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hesheng Chen <hesheng.c...@intel.com> Reviewed-by: Liming Gao <liming@intel.com> --- .../Python/UPT/Core/DistributionPackageClass.py| 26 +++--- BaseTools/Source/Python/UPT/Core/PackageFile.py| 8 -- BaseTools/Source/Python/UPT/Library/GlobalData.py | 3 +- BaseTools/Source/Python/UPT/Library/Misc.py| 7 - .../Source/Python/UPT/Library/ParserValidate.py| 3 +- BaseTools/Source/Python/UPT/Library/Parsing.py | 32 -- BaseTools/Source/Python/UPT/MkPkg.py | 7 +++-- .../Python/UPT/PomAdapter/InfPomAlignment.py | 5 ++-- BaseTools/Source/Python/UPT/UPT.py | 3 +- 9 files changed, 57 insertions(+), 37 deletions(-) diff --git a/BaseTools/Source/Python/UPT/Core/DistributionPackageClass.py b/BaseTools/Source/Python/UPT/Core/DistributionPackageClass.py index bfe6dcc..9c55e0e 100644 --- a/BaseTools/Source/Python/UPT/Core/DistributionPackageClass.py +++ b/BaseTools/Source/Python/UPT/Core/DistributionPackageClass.py @@ -32,6 +32,7 @@ from Logger.ToolError import EDK1_INF_ERROR from Object.POM.CommonObject import IdentificationObject from Object.POM.CommonObject import CommonHeaderObject from Object.POM.CommonObject import MiscFileObject +from Common.MultipleWorkspace import MultipleWorkspace as mws ## DistributionPackageHeaderClass # @@ -110,14 +111,17 @@ class DistributionPackageClass(object): # @param ModuleList:A list of all modules # def GetDistributionPackage(self, WorkspaceDir, PackageList, ModuleList): +# Backup WorkspaceDir +Root = WorkspaceDir + # # Get Packages # if PackageList: for PackageFile in PackageList: -PackageFileFullPath = \ -os.path.normpath(os.path.join(WorkspaceDir, PackageFile)) -DecObj = DecPomAlignment(PackageFileFullPath, WorkspaceDir, CheckMulDec = True) +PackageFileFullPath = mws.join(Root, PackageFile) +WorkspaceDir = mws.getWs(Root, PackageFile) +DecObj = DecPomAlignment(PackageFileFullPath, WorkspaceDir, CheckMulDec=True) PackageObj = DecObj # # Parser inf file one bye one @@ -140,8 +144,7 @@ class DistributionPackageClass(object): # Inf class in InfPomAlignment. # try: -ModuleObj = InfPomAlignment(Filename, WorkspaceDir, \ -PackageObj.GetPackagePath()) +ModuleObj = InfPomAlignment(Filename, WorkspaceDir, PackageObj.GetPackagePath()) # # Add module to package @@ -168,11 +171,11 @@ class DistributionPackageClass(object): # if ModuleList: for ModuleFile in ModuleList: -ModuleFileFullPath = \ -os.path.normpath(os.path.join(WorkspaceDir, ModuleFile)) +ModuleFileFullPath = mws.join(Root, ModuleFile) +WorkspaceDir = mws.getWs(Root, ModuleFile) + try: -ModuleObj = InfPomAlignment(ModuleFileFullPath, -WorkspaceDir) +ModuleObj = InfPomAlignment(ModuleFileFullPath, WorkspaceDir) ModuleKey = (ModuleObj.GetGuid(), ModuleObj.GetVersion(), ModuleObj.GetName(), @@ -185,7 +188,10 @@ class DistributionPackageClass(object): ST.WRN_EDK1_INF_FOUND%ModuleFileFullPath, ExtraData=ST.ERR_NOT_SUPPORTED_SA_MODULE) else: -raise +raise + +# Recover WorkspaceDir +WorkspaceDir = Root ## Get all files included for a distribution package, except tool/misc of # distribution level diff --git a/BaseTools/Source/Python/UPT/Core/PackageFile.py b/BaseTools/Source/Python/UPT/Core/PackageFile.py index 47ea0bc..5fafd85 100644 --- a/BaseTools/Source/Python/UPT/Core/PackageFile.py +++ b/BaseTools/Source/Python/UPT/Core/PackageFile.py @@ -37,6 +37,7 @@ from Logger import StringTable as ST from Library.Misc import CreateDirectory from Library.Misc import RemoveDirectory from Core.FileHook import __FileHookOpen__ +from Common.MultipleWorkspace import MultipleWorkspace as mws class PackageFile: @@ -203,8 +204,11 @@ class PackageFile: # @param Files: the files to pack # def PackFiles(self, Files): -for File1 in Files: -self.PackFile(File1) +for F
[edk2] [Patch 5/6] BaseTools: Update Edk2Setup.bat to support multiple workspaces
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> Reviewed-by: Wu Hao A <hao.a...@intel.com> --- BaseTools/Scripts/SetVisualStudio.bat | 2 +- BaseTools/Scripts/ShowEnvironment.bat | 2 ++ Edk2Setup.bat | 64 +-- 3 files changed, 50 insertions(+), 18 deletions(-) diff --git a/BaseTools/Scripts/SetVisualStudio.bat b/BaseTools/Scripts/SetVisualStudio.bat index a302a83..d379cd7 100755 --- a/BaseTools/Scripts/SetVisualStudio.bat +++ b/BaseTools/Scripts/SetVisualStudio.bat @@ -68,7 +68,7 @@ if not exist "%COMMONTOOLSx64%\vcvarsx86_amd64.bat" ( @goto End :RebuildTools -@call python "%WORKSPACE%\BaseTools\Scripts\UpdateBuildVersions.py" +@call python "%BASE_TOOLS_PATH%\Scripts\UpdateBuildVersions.py" @set "BIN_DIR=%EDK_TOOLS_PATH%\Bin\Win32" if not exist "%BIN_DIR%" @mkdir "%BIN_DIR%" @echo Removing temporary and binary files diff --git a/BaseTools/Scripts/ShowEnvironment.bat b/BaseTools/Scripts/ShowEnvironment.bat index c4613e1..2b320fb 100755 --- a/BaseTools/Scripts/ShowEnvironment.bat +++ b/BaseTools/Scripts/ShowEnvironment.bat @@ -47,9 +47,11 @@ if defined SRC_CONF @goto SetEnv @echo # @if defined WORKSPACE @echo WORKSPACE= %WORKSPACE% @if not defined WORKSPACE @echo WORKSPACE= Not Set +@if defined PACKAGES_PATH @echo PACKAGES_PATH= %PACKAGES_PATH% @if defined EDK_TOOLS_PATH @echo EDK_TOOLS_PATH = %EDK_TOOLS_PATH% @if not defined EDK_TOOLS_PATH @echo EDK_TOOLS_PATH = Not Set @if defined BASE_TOOLS_PATH @echo BASE_TOOLS_PATH = %BASE_TOOLS_PATH% +@if defined EDK_TOOLS_BIN @echo EDK_TOOLS_BIN= %EDK_TOOLS_BIN% @if defined PYTHON_FREEZER_PATH @echo PYTHON_FREEZER_PATH = %PYTHON_FREEZER_PATH% @if "%NT32PKG%"=="TRUE" ( @echo. diff --git a/Edk2Setup.bat b/Edk2Setup.bat index 0aa786d..2d13234 100755 --- a/Edk2Setup.bat +++ b/Edk2Setup.bat @@ -62,14 +62,33 @@ @if not defined ORIGINAL_PATH set "ORIGINAL_PATH=%PATH%" @REM Always set the WORKSPACE environment variable to the current directory -@set "WORKSPACE=%CD%" -@if exist "%WORKSPACE%\BaseTools" @set "BASE_TOOLS_PATH=%WORKSPACE%\BaseTools" +@if not defined WORKSPACE ( + @set "WORKSPACE=%CD%" +) +@if not exist "%BASE_TOOLS_PATH%" ( + @if exist "%WORKSPACE%\BaseTools" ( +set "BASE_TOOLS_PATH=%WORKSPACE%\BaseTools" + ) else ( +@if defined PACKAGES_PATH ( + @for %%i IN (%PACKAGES_PATH%) DO ( +@if exist %%~fi\BaseTools ( + @set BASE_TOOLS_PATH=%%~fi\BaseTools + @goto checkBaseTools +) + ) +) + ) +) +:checkBaseTools +@if not defined BASE_TOOLS_PATH ( + @echo. + @echo !!! ERROR !!! The BaseTools Package was not found !!! + @echo. + @goto ExitFailure +) @if not exist "%WORKSPACE%\Conf" @mkdir "%WORKSPACE%\Conf" -@@if not defined EDK_TOOLS_PATH @set "EDK_TOOLS_PATH=%WORKSPACE%\BaseTools" -@rem @set "PATH=%WORKSPACE%\BaseTools\Bin\Win32;%PATH%" -@rem @set WORKSPACE_TOOLS_PATH=%WORKSPACE%\BaseTools -@rem ) +@@if not defined EDK_TOOLS_PATH @set "EDK_TOOLS_PATH=%BASE_TOOLS_PATH%" @REM Keep the existing EDK_TOOLS_PATH value, the --reset flag will set it @REM back to WORKSPACE\BaseTools while the --location DIRECTORY flag will @@ -259,7 +278,7 @@ @echo %SCRIPT_NAME% Version: %SCRIPT_VERSION%%SVN_REVISION:~11,-1% @echo Copyright(c) 2014, Intel Corporation. All rights reserved. @set HIDE_PATH=TRUE -@call "%WORKSPACE%\BaseTools\Scripts\ShowEnvironment.bat" +@call "%BASE_TOOLS_PATH%\Scripts\ShowEnvironment.bat" @set HIDE_PATH= @goto ExitSuccess @@ -352,8 +371,8 @@ @REM copied or replaced from the WORKSPACE\BaseTools\Conf directories' template files. :SetConf @if not exist "%EDK_TOOLS_PATH%\Conf" ( -@if exist "%WORKSPACE%\BaseTools\Conf" ( -@set "SRC_CONF=%WORKSPACE%\BaseTools\Conf" +@if exist "%BASE_TOOLS_PATH%\Conf" ( +@set "SRC_CONF=%BASE_TOOLS_PATH%\Conf" ) ) else ( @set "SRC_CONF=%EDK_TOOLS_PATH%\Conf" @@ -365,7 +384,7 @@ @REM The script will test to see if the files exist, and also use the RESET_ENVIRONMENT flag @REM to overwrite the WORKSPACE\Conf *.txt files. -@call "%WORKSPACE%\BaseTools\Scripts\ShowEnvironment.bat" +@call "%BASE_TOOLS_PATH%\Scripts\ShowEnvironment.bat" @if errorlevel 1 ( @echo Unable to copy the template files from "%SRC_CONF%" to "%WORKSPACE%\Conf" @goto ExitFailure @@ -375,22 +394,34 @@ @REM Set up Visual Studio if required to build the Nt32Pkg/Nt32Pkg.dsc emulator @if &q
[edk2] [Patch 0/6] Add multiple workspaces feature
WORKSPACE is still kept. New optional PACKAGES_PATH is introduced to specify the additional WORKSPACEs. In PACKAGES_PATH, ';' is separator in Windows, ':' is separator in Linux. Build directory is in WORKSPACE. Package, BaseTools and Conf directory will be found from WORKSPACE and PACKAGES_PATH. This feature still supports current working models. If you have the different tree layout, you can configure PACKAGES_PATH to enable this feature. Liming Gao (6): BaseTools: Update Build tool to support multiple workspaces BaseTools: Update UPT tool to support multiple workspaces BaseTools: Update ECC tool to support multiple workspaces BaseTools: Update edksetup.bat to support multiple workspaces BaseTools: Update Edk2Setup.bat to support multiple workspaces BaseTools: Update edksetup.sh to support multiple workspaces BaseTools/BuildEnv | 66 ++--- BaseTools/Scripts/SetVisualStudio.bat | 2 +- BaseTools/Scripts/ShowEnvironment.bat | 2 + BaseTools/Source/Python/AutoGen/AutoGen.py | 16 ++- BaseTools/Source/Python/AutoGen/GenMake.py | 4 +- BaseTools/Source/Python/Common/EdkIIWorkspace.py | 3 +- BaseTools/Source/Python/Common/FdfParserLite.py| 6 +- .../Source/Python/Common/LongFilePathOsPath.py | 2 + BaseTools/Source/Python/Common/Misc.py | 2 + .../Source/Python/Common/MultipleWorkspace.py | 137 +++ BaseTools/Source/Python/Common/String.py | 8 +- BaseTools/Source/Python/Ecc/Check.py | 13 +- BaseTools/Source/Python/Ecc/Ecc.py | 8 +- BaseTools/Source/Python/Ecc/MetaDataParser.py | 5 +- BaseTools/Source/Python/GenFds/FfsInfStatement.py | 7 +- BaseTools/Source/Python/GenFds/GenFds.py | 13 +- .../Source/Python/GenFds/GenFdsGlobalVariable.py | 4 +- BaseTools/Source/Python/GenFds/Region.py | 3 +- .../Python/UPT/Core/DistributionPackageClass.py| 26 ++-- BaseTools/Source/Python/UPT/Core/PackageFile.py| 8 +- BaseTools/Source/Python/UPT/Library/GlobalData.py | 3 +- BaseTools/Source/Python/UPT/Library/Misc.py| 7 +- .../Source/Python/UPT/Library/ParserValidate.py| 3 +- BaseTools/Source/Python/UPT/Library/Parsing.py | 32 ++--- BaseTools/Source/Python/UPT/MkPkg.py | 7 +- .../Python/UPT/PomAdapter/InfPomAlignment.py | 5 +- BaseTools/Source/Python/UPT/UPT.py | 3 +- .../Source/Python/Workspace/WorkspaceDatabase.py | 23 +++- BaseTools/Source/Python/build/BuildReport.py | 5 +- BaseTools/Source/Python/build/build.py | 18 ++- BaseTools/toolsetup.bat| 150 + Edk2Setup.bat | 64 ++--- edksetup.bat | 30 - edksetup.sh| 19 ++- 34 files changed, 526 insertions(+), 178 deletions(-) create mode 100644 BaseTools/Source/Python/Common/MultipleWorkspace.py -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 4/6] BaseTools: Update edksetup.bat to support multiple workspaces
1. Update edksetup.bat and toolsetup.bat to handle PACKAGES_PATH. BaseTools directory may be in PACKAGES_PATH instead of WORKSAPCE. 2. Introduce EDK_TOOLS_BIN env points to the windows binary tools dir. Windows BaseTools Win32 may be a separate directory. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> Reviewed-by: Wu Hao A <hao.a...@intel.com> --- BaseTools/toolsetup.bat | 150 +++- edksetup.bat| 30 -- 2 files changed, 122 insertions(+), 58 deletions(-) diff --git a/BaseTools/toolsetup.bat b/BaseTools/toolsetup.bat index 2afa810..59874c5 100755 --- a/BaseTools/toolsetup.bat +++ b/BaseTools/toolsetup.bat @@ -113,30 +113,43 @@ if /I "%1"=="/?" goto Usage :set_PATH if defined WORKSPACE_TOOLS_PATH goto check_PATH - set PATH=%EDK_TOOLS_PATH%\Bin;%EDK_TOOLS_PATH%\Bin\Win32;%PATH% + if not defined EDK_TOOLS_BIN ( +if exist %EDK_TOOLS_PATH%\Bin\Win32 ( + set EDK_TOOLS_BIN=%EDK_TOOLS_PATH%\Bin\Win32 +) else ( + echo. + echo !!! ERROR !!! Cannot find BaseTools Bin Win32!!! + echo Please check the directory %EDK_TOOLS_PATH%\Bin\Win32 + echo Or configure EDK_TOOLS_BIN env to point Win32 directory. + echo. + goto end +) + ) + set PATH=%EDK_TOOLS_BIN%;%PATH% set WORKSPACE_TOOLS_PATH=%EDK_TOOLS_PATH% goto PATH_ok :check_PATH if "%EDK_TOOLS_PATH%"=="%WORKSPACE_TOOLS_PATH%" goto PATH_ok - set PATH=%EDK_TOOLS_PATH%\Bin;%EDK_TOOLS_PATH%\Bin\Win32;%PATH% + if not defined EDK_TOOLS_BIN ( +if exist %EDK_TOOLS_PATH%\Bin\Win32 ( + set EDK_TOOLS_BIN=%EDK_TOOLS_PATH%\Bin\Win32 +) else ( + echo. + echo !!! ERROR !!! Cannot find BaseTools Bin Win32!!! + echo Please check the directory %EDK_TOOLS_PATH%\Bin\Win32 + echo Or configure EDK_TOOLS_BIN env to point Win32 directory. + echo. + goto end +) + ) + set PATH=%EDK_TOOLS_BIN%;%PATH% set WORKSPACE_TOOLS_PATH=%EDK_TOOLS_PATH% echo Resetting the PATH variable to include the EDK_TOOLS_PATH for this session. :PATH_ok - echo PATH = %PATH% - echo. - if defined WORKSPACE ( -echo WORKSPACE = %WORKSPACE% - ) - echo EDK_TOOLS_PATH = %EDK_TOOLS_PATH% - if defined BASE_TOOLS_PATH ( -echo BASE_TOOLS_PATH = %BASE_TOOLS_PATH% - ) - echo. - REM -REM copy *.template to %WORKSPACE%\Conf +REM copy *.template to %CONF_PATH% REM if not defined WORKSPACE ( if defined RECONFIG ( @@ -147,49 +160,80 @@ if not defined WORKSPACE ( goto skip_reconfig ) -if NOT exist %WORKSPACE%\Conf ( - mkdir %WORKSPACE%\Conf +set CONF_PATH=%WORKSPACE%\Conf +if NOT exist %CONF_PATH% ( + if defined PACKAGES_PATH ( +for %%i IN (%PACKAGES_PATH%) DO ( + if exist %%~fi\Conf ( +set CONF_PATH=%%i\Conf +goto CopyConf + ) +) + ) +) + +:CopyConf +if NOT exist %CONF_PATH% ( + mkdir %CONF_PATH% ) else ( if defined RECONFIG ( echo. -echo Over-writing the files in the WORKSPACE\Conf directory +echo Over-writing the files in the CONF_PATH directory echo using the default template files echo. ) ) -if NOT exist %WORKSPACE%\Conf\target.txt ( - echo copying ... target.template to %WORKSPACE%\Conf\target.txt +if NOT exist %CONF_PATH%\target.txt ( + echo copying ... target.template to %CONF_PATH%\target.txt if NOT exist %EDK_TOOLS_PATH%\Conf\target.template ( echo Error: target.template is missing at folder %EDK_TOOLS_PATH%\Conf\ ) - copy %EDK_TOOLS_PATH%\Conf\target.template %WORKSPACE%\Conf\target.txt > nul + copy %EDK_TOOLS_PATH%\Conf\target.template %CONF_PATH%\target.txt > nul ) else ( - if defined RECONFIG echo over-write ... target.template to %WORKSPACE%\Conf\target.txt - if defined RECONFIG copy /Y %EDK_TOOLS_PATH%\Conf\target.template %WORKSPACE%\Conf\target.txt > nul + if defined RECONFIG echo over-write ... target.template to %CONF_PATH%\target.txt + if defined RECONFIG copy /Y %EDK_TOOLS_PATH%\Conf\target.template %CONF_PATH%\target.txt > nul ) -if NOT exist %WORKSPACE%\Conf\tools_def.txt ( - echo copying ... tools_def.template to %WORKSPACE%\Conf\tools_def.txt +if NOT exist %CONF_PATH%\tools_def.txt ( + echo copying ... tools_def.template to %CONF_PATH%\tools_def.txt if NOT exist %EDK_TOOLS_PATH%\Conf\tools_def.template ( echo Error: tools_def.template is missing at folder %EDK_TOOLS_PATH%\Conf\ ) - copy %EDK_TOOLS_PATH%\Conf\tools_def.template %WORKSPACE%\Conf\tools_def.txt > nul + copy %EDK_TOOLS_PATH%\Conf\tools_def.template %CONF_PATH%\tools_def.txt > nul ) else ( - if defined RECONFIG echo over-write ... tools_def.template to %WORKSPACE%\Conf\tools_def.txt - if defined RECONFIG copy /Y %EDK_TOOLS_PATH%\Conf\tools_def.template %WORKSPACE%\Conf\tools_def.txt > nul + if defined RECONFIG echo over-write ... tools_
[edk2] [Patch] CryptoPkg: Fix one wrong parameter for weak key checking
Fix one wrong offset which is passed into DES weak key checking in TdesInit(). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qin LongCC: Jiaxin Wu --- CryptoPkg/Library/BaseCryptLib/Cipher/CryptTdes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CryptoPkg/Library/BaseCryptLib/Cipher/CryptTdes.c b/CryptoPkg/Library/BaseCryptLib/Cipher/CryptTdes.c index f89094a..8025a49 100644 --- a/CryptoPkg/Library/BaseCryptLib/Cipher/CryptTdes.c +++ b/CryptoPkg/Library/BaseCryptLib/Cipher/CryptTdes.c @@ -1,9 +1,9 @@ /** @file TDES Wrapper Implementation over OpenSSL. -Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved. +Copyright (c) 2010 - 2015, 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 @@ -88,22 +88,22 @@ TdesInit ( CopyMem (KeySchedule + 1, KeySchedule, sizeof (DES_key_schedule)); CopyMem (KeySchedule + 2, KeySchedule, sizeof (DES_key_schedule)); return TRUE; } - if (DES_is_weak_key ((const_DES_cblock *) Key + 8) == 1) { + if (DES_is_weak_key ((const_DES_cblock *) (Key + 8)) == 1) { return FALSE; } DES_set_key_unchecked ((const_DES_cblock *) (Key + 8), KeySchedule + 1); if (KeyLength == 128) { CopyMem (KeySchedule + 2, KeySchedule, sizeof (DES_key_schedule)); return TRUE; } - if (DES_is_weak_key ((const_DES_cblock *) Key + 16) == 1) { + if (DES_is_weak_key ((const_DES_cblock *) (Key + 16)) == 1) { return FALSE; } DES_set_key_unchecked ((const_DES_cblock *) (Key + 16), KeySchedule + 2); -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2] MdeModulePkg: Fix the issue in DxeCore CoreInitializeMemoryServices()
CoreInitializeMemoryServices() will essentially pickup a piece of memory out of *any* memory descriptor HOB completely ignoring the memory allocation HOBs. This change considers memory allocation hobs in this API. v2 adds check the memory range in the resource HOB that includes PHIT range to make sure the free memory range not include the memory allocation hob. CC: Benjamin Herrenschmidt <b...@kernel.crashing.org> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming@intel.com> --- MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 47 - 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c index a50fda2..9d7c2df 100644 --- a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c +++ b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c @@ -2001,10 +2001,41 @@ CoreConvertResourceDescriptorHobAttributesToCapabilities ( } return Capabilities; } +/** + Check whether the memory allocation hob is in the specified memory range. + + @param HobStart The start address of the HOB. + @param MemoryBaseAddress Start address of the memory region. + @param MemoryLength Length of the memory region. + + @retval TRUE Memory allocation hob is in the specified memory range. + @retval FALSENo memory allocation hob is in the specified memory range. + +**/ +BOOLEAN +OverlapWithMemoryAllocationHob ( + IN VOID**HobStart, + IN EFI_PHYSICAL_ADDRESSMemoryAddress, + IN UINT64 MemoryLength + ) +{ + EFI_PEI_HOB_POINTERS Hob; + + for (Hob.Raw = *HobStart; !END_OF_HOB_LIST(Hob); Hob.Raw = GET_NEXT_HOB(Hob)) { +if (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_MEMORY_ALLOCATION) { + if (Hob.MemoryAllocation->AllocDescriptor.MemoryBaseAddress >= MemoryAddress && + Hob.MemoryAllocation->AllocDescriptor.MemoryBaseAddress < MemoryAddress + MemoryLength) { +return TRUE; + } +} + } + + return FALSE; +} /** External function. Initializes memory services based on the memory descriptor HOBs. This function is responsible for priming the memory map, so memory allocations and resource allocations can be made. @@ -2141,11 +2172,11 @@ CoreInitializeMemoryServices ( // Compute range between PHIT EfiFreeMemoryTop and the end of the Resource Descriptor HOB // Attributes = PhitResourceHob->ResourceAttribute; BaseAddress = PageAlignAddress (PhitHob->EfiMemoryTop); Length = PageAlignLength (ResourceHob->PhysicalStart + ResourceHob->ResourceLength - BaseAddress); -if (Length < MINIMUM_INITIAL_MEMORY_SIZE) { +if (Length < MINIMUM_INITIAL_MEMORY_SIZE || OverlapWithMemoryAllocationHob (HobStart, BaseAddress, Length)) { // // If that range is not large enough to intialize the DXE Core, then // Compute range between PHIT EfiFreeMemoryBottom and PHIT EfiFreeMemoryTop // BaseAddress = PageAlignAddress (PhitHob->EfiFreeMemoryBottom); @@ -2155,10 +2186,17 @@ CoreInitializeMemoryServices ( // If that range is not large enough to intialize the DXE Core, then // Compute range between the start of the Resource Descriptor HOB and the start of the HOB List // BaseAddress = PageAlignAddress (ResourceHob->PhysicalStart); Length = PageAlignLength ((UINT64)((UINTN)*HobStart - BaseAddress)); +if (OverlapWithMemoryAllocationHob (HobStart, BaseAddress, Length)) { + // + // Use free range between PHIT EfiFreeMemoryBottom and PHIT EfiFreeMemoryTop. + // + BaseAddress = PageAlignAddress (PhitHob->EfiFreeMemoryBottom); + Length = PageAlignLength (PhitHob->EfiFreeMemoryTop - BaseAddress); +} } } break; } @@ -2216,10 +2254,17 @@ CoreInitializeMemoryServices ( if (TestedMemoryLength < MINIMUM_INITIAL_MEMORY_SIZE) { continue; } // +// Skip Resource Descriptor HOBs that some of resource have been allocated in PEI. +// +if (OverlapWithMemoryAllocationHob (HobStart, TestedMemoryBaseAddress, TestedMemoryLength)) { + continue; +} + +// // Save the Resource Descriptor HOB context that is large enough to initilize the DXE Core // MaxMemoryBaseAddress = TestedMemoryBaseAddress; MaxMemoryLength = TestedMemoryLength; MaxMemoryAttributes = ResourceHob->ResourceAttribute; -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 0/3] Add the missing module UNI files
Liming Gao (3): MdePkg: Add the missing module UNI files MdeModulePkg: Add the missing module UNI files. IntelFrameworkModulePkg: Ad the missing module UNI files. .../LegacyBootMaintUiLib/LegacyBootMaintUiLib.inf| 1 + .../LegacyBootMaintUiLib/LegacyBootMaintUiLib.uni| Bin 0 - 1800 bytes .../LegacyBootManagerLib/LegacyBootManagerLib.inf| 5 ++--- .../LegacyBootManagerLib/LegacyBootManagerLib.uni| Bin 0 - 1736 bytes MdeModulePkg/Application/UiApp/UiApp.inf | 6 +- MdeModulePkg/Application/UiApp/UiApp.uni | Bin 0 - 1616 bytes MdeModulePkg/Application/UiApp/UiAppExtra.uni| Bin 0 - 1296 bytes MdeModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf | 4 MdeModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.uni | Bin 0 - 2742 bytes MdeModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxeExtra.uni| Bin 0 - 1302 bytes MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf | 1 + MdeModulePkg/Library/BaseSortLib/BaseSortLib.uni | Bin 0 - 1582 bytes MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf | 1 + MdeModulePkg/Library/UefiSortLib/UefiSortLib.uni | Bin 0 - 1582 bytes MdeModulePkg/Universal/EsrtDxe/EsrtDxe.inf | 1 + MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf | 1 + MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.uni | Bin 0 - 1942 bytes 17 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 IntelFrameworkModulePkg/Library/LegacyBootMaintUiLib/LegacyBootMaintUiLib.uni create mode 100644 IntelFrameworkModulePkg/Library/LegacyBootManagerLib/LegacyBootManagerLib.uni create mode 100644 MdeModulePkg/Application/UiApp/UiApp.uni create mode 100644 MdeModulePkg/Application/UiApp/UiAppExtra.uni create mode 100644 MdeModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.uni create mode 100644 MdeModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxeExtra.uni create mode 100644 MdeModulePkg/Library/BaseSortLib/BaseSortLib.uni create mode 100644 MdeModulePkg/Library/UefiSortLib/UefiSortLib.uni create mode 100644 MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.uni -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 3/3] IntelFrameworkModulePkg: Ad the missing module UNI files.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao liming@intel.com --- .../LegacyBootMaintUiLib/LegacyBootMaintUiLib.inf| 1 + .../LegacyBootMaintUiLib/LegacyBootMaintUiLib.uni| Bin 0 - 1800 bytes .../LegacyBootManagerLib/LegacyBootManagerLib.inf| 5 ++--- .../LegacyBootManagerLib/LegacyBootManagerLib.uni| Bin 0 - 1736 bytes 4 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 IntelFrameworkModulePkg/Library/LegacyBootMaintUiLib/LegacyBootMaintUiLib.uni create mode 100644 IntelFrameworkModulePkg/Library/LegacyBootManagerLib/LegacyBootManagerLib.uni diff --git a/IntelFrameworkModulePkg/Library/LegacyBootMaintUiLib/LegacyBootMaintUiLib.inf b/IntelFrameworkModulePkg/Library/LegacyBootMaintUiLib/LegacyBootMaintUiLib.inf index 9582da5..17c9cac 100644 --- a/IntelFrameworkModulePkg/Library/LegacyBootMaintUiLib/LegacyBootMaintUiLib.inf +++ b/IntelFrameworkModulePkg/Library/LegacyBootMaintUiLib/LegacyBootMaintUiLib.inf @@ -13,10 +13,11 @@ ## [Defines] INF_VERSION= 0x00010005 BASE_NAME = LegacyBootMaintUiLib + MODULE_UNI_FILE= LegacyBootMaintUiLib.uni FILE_GUID = e6f7f038-3ed9-401a-af1f-5ea7bf644d34 MODULE_TYPE= DXE_DRIVER VERSION_STRING = 1.0 LIBRARY_CLASS = NULL|DXE_DRIVER UEFI_APPLICATION CONSTRUCTOR= LegacyBootMaintUiLibConstructor diff --git a/IntelFrameworkModulePkg/Library/LegacyBootMaintUiLib/LegacyBootMaintUiLib.uni b/IntelFrameworkModulePkg/Library/LegacyBootMaintUiLib/LegacyBootMaintUiLib.uni new file mode 100644 index ..892d6e218e2565041ca6f3c0bce2638b0ecdaf31 GIT binary patch literal 1800 zcmd6n-ER_65XI-#Q$MKU(~dqCcYSBTx8XawM$rt`ec9wx(Q#o(ANI*w!dP?6%k! zpKJ*CbLPyMGjsRmPs^s@qfWDvJW=3(jd?r}l(X-JPV+0e#z8}@Lep^=GI4f* zI?NN+V{9WESjxD-uCNP_7GbJY|cC~hllfMQ*0dPZR=RhytZ@hHlQs29J@+M|iKv zz`keG!**|A~Z7=PWy|H7~sn=h-jT`2;iYkiN6BhQo{`1e%c4e;Rt^=UgtJS= z0?T*k)U)wDAR{SPV~~3Qmf#0A)ywf_aODYNI-iu~@)Fch~qWu~)ssO7Tiob7I%Z zt6uU}{Z!+nXC~Y|zPyWFgiF@yq9L_bFGX~LSO~jj5@Ibts!_yDmSv@nZdY_=?boJL zI_yvHajCgpc`e3_e`j05L5NZ#=%rX2_R4w$%1SrOuCBy)c3J!B-Xzf4_Vz;Ca9_R zGTQmCb{dG_KvdZoh`L^tCC?DyS=a=e2HzoSB}1NAqYjNo3_$-zw%lym-jP4=_$ z`CvIy7WIpBZD`vHCP;?D)CQX-cOJuuiv13P0*IIj`vDx`FFf^9;Ggj(ojSXhu z3cbPH_IvG)D{hf}=U%)rA5r_5NMd%zc?zm9G9SIiPTX~-n05dqo~2^6SngF$^4ZY zG1p5c2PnWiT$WYV;Hy7ZM|b{_l!=_}dt+@MJ)j8n#6fQFHkc42OuTvV)70* zF-rBl_mO`c^17fOX1+M_Y=HwZ_)T~-`PP=BLic$xL0-t*R09(Kq0+XDOz)#K0N0 literal 0 HcmV?d1 diff --git a/IntelFrameworkModulePkg/Library/LegacyBootManagerLib/LegacyBootManagerLib.inf b/IntelFrameworkModulePkg/Library/LegacyBootManagerLib/LegacyBootManagerLib.inf index 2dc03a8..4025c82 100644 --- a/IntelFrameworkModulePkg/Library/LegacyBootManagerLib/LegacyBootManagerLib.inf +++ b/IntelFrameworkModulePkg/Library/LegacyBootManagerLib/LegacyBootManagerLib.inf @@ -1,9 +1,7 @@ ## @file -# This function deal with the legacy boot option, it create, delete -# and manage the legacy boot option, all legacy boot option is getting from -# the legacy BBS table. +# Legacy Boot Manager module is library for BDS phase. # # Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.BR # 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 @@ -15,10 +13,11 @@ ## [Defines] INF_VERSION= 0x00010005 BASE_NAME = LegacyBootManagerLib + MODULE_UNI_FILE= LegacyBootManagerLib.uni FILE_GUID = F1B87BE4-0ACC-409A-A52B-7BFFABCC96A0 MODULE_TYPE= DXE_DRIVER VERSION_STRING = 1.0 LIBRARY_CLASS = NULL|DXE_DRIVER UEFI_APPLICATION CONSTRUCTOR= LegacyBootManagerLibConstructor diff --git a/IntelFrameworkModulePkg/Library/LegacyBootManagerLib/LegacyBootManagerLib.uni b/IntelFrameworkModulePkg/Library/LegacyBootManagerLib/LegacyBootManagerLib.uni new file mode 100644 index ..2585c93496ea8e6e063d687b7993f2862cc55299 GIT binary patch literal 1736 zcmd6nPjAye5XI+=#CNdL3q@@LNL(s}aEJkmP)Bhh;DnO6Ni8LDhX@?dEobU6T69e z;esm5yE{Ao-n$6+m?PEZ}|46WBYOTW(9cvZwZhTj}~p3!B)??vT1x@Kl_aJS}N zpf8bE+-G*yaS?axmVN(N1{fJ;z42UF%uOzOid`TOzdUjE^DndvI*T!McAM%DWa z22R;u*$aDVukDO;3DMDmz?EO;-z)MZO;;U4ez@Wzj?vHzj_mytG@^49hq0GPJi3 zFfjsyXLNo0Vd^G5k)=7*efiqoIC?(fo|h;clfQbSAT``EpK6ayLw?Kk`;W}Maz znd0u_%RAd;xaF)Vnb2F!Ni0z!q34TiO;nnQWHhUWSQ6eNLw%$O$A*hqler-z|vs- zA0AD(+#mIT#dC7(8FfwMACdQ*hqzOJL$v_~kJ)gz()#d?hDkQvXWCVIN_FLoRV zQ+1D7%}zxxF5K6osq*Z~zI0r-slTK{og?Q+)Tlq+4+CO_XciJtzBJ^?b4jR0HNH zv5%}F-K#_W$n3r#BI!^jj@g#(__12kGO9lG+l_9Ek0MNT+rqP4cz65()|G~I zI;*h-_7%NwB`%}nkW4~$$$d;z#YkNCA(F7`PB}+d
[edk2] [Patch 2/3] MdeModulePkg: Add the missing module UNI files.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao liming@intel.com --- MdeModulePkg/Application/UiApp/UiApp.inf | 6 +- MdeModulePkg/Application/UiApp/UiApp.uni | Bin 0 - 1616 bytes MdeModulePkg/Application/UiApp/UiAppExtra.uni | Bin 0 - 1296 bytes MdeModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf | 4 MdeModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.uni | Bin 0 - 2742 bytes MdeModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxeExtra.uni | Bin 0 - 1302 bytes MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf | 1 + MdeModulePkg/Library/BaseSortLib/BaseSortLib.uni | Bin 0 - 1582 bytes MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf | 1 + MdeModulePkg/Library/UefiSortLib/UefiSortLib.uni | Bin 0 - 1582 bytes MdeModulePkg/Universal/EsrtDxe/EsrtDxe.inf| 1 + 11 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 MdeModulePkg/Application/UiApp/UiApp.uni create mode 100644 MdeModulePkg/Application/UiApp/UiAppExtra.uni create mode 100644 MdeModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.uni create mode 100644 MdeModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxeExtra.uni create mode 100644 MdeModulePkg/Library/BaseSortLib/BaseSortLib.uni create mode 100644 MdeModulePkg/Library/UefiSortLib/UefiSortLib.uni diff --git a/MdeModulePkg/Application/UiApp/UiApp.inf b/MdeModulePkg/Application/UiApp/UiApp.inf index 25d0605..36d292e 100644 --- a/MdeModulePkg/Application/UiApp/UiApp.inf +++ b/MdeModulePkg/Application/UiApp/UiApp.inf @@ -13,10 +13,11 @@ ## [Defines] INF_VERSION= 0x00010005 BASE_NAME = UiApp + MODULE_UNI_FILE= UiApp.uni FILE_GUID = 462CAA21-7614-4503-836E-8AB6F4662331 MODULE_TYPE= UEFI_APPLICATION VERSION_STRING = 1.0 ENTRY_POINT= InitializeUserInterface @@ -141,6 +142,9 @@ ## CONSUMES ## SOMETIMES_PRODUCES gEfiMdeModulePkgTokenSpaceGuid.PcdSetupConOutRow gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution ## CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution## CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString ## CONSUMES \ No newline at end of file + gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString ## CONSUMES + +[UserExtensions.TianoCore.ExtraFiles] + UiAppExtra.uni diff --git a/MdeModulePkg/Application/UiApp/UiApp.uni b/MdeModulePkg/Application/UiApp/UiApp.uni new file mode 100644 index ..020fb2d9e43e1d0d5709af93126484a51fb9e11d GIT binary patch literal 1616 zcmchXU2hUm5QgX4#Q(6NH)kYCf*oh1X*X7Q#Z*D+4UFBz$bP(8`~;KJOgZEu=Rl zrXid;XU@z!?|huS`_r(7Mf_jzi|oBkZDwu*i(CgR(At5P0RU3wy3DwsDIH{WZGG z3U)X66r845NVcqPDKfV!8)7%HdWrcs*dJh$+t%4#!eR}ZXEwIy$a8yXuk5v*vQKQu z-GrPXlTU${)*;#%yCuvcDlm5orhGdx4*FD?I-U%eQ3Svv{V+J{4^SdRS)6vbG8 zG9*TZTw^iu^BA5h?sC7|;vJ^%pC}o3Wb{yQ|7t-R;ljoB@onQ-^`^3HYZrH2S zLmRQmZ{sXN7xzp;tOZCFikOM-tgMf2S9HG0phfT7oWCA$skq*HEyk?EJN6n8zG9r ze!?Wzp7jWx_xlo=MH(IpG$R7tbel}vpTFysOA={(awLhtARMJ?^RZ_v!)ks{6%Q0 zLUmdc+Q?U(lh(QT4CUjNqQx+0jiMlq%Gn(U?W`D`()y3A3KCw3K8|TE|Q`==9 zZNj7tu#Uab1G_-R=qrS(3kj1QW05*?hn*%`YYmz1}+z+pB3x0QCa?qKQ|BkJ5F zl9*kfPe2t$$D{W+iMw=)*~dyYiW;mwVk^|$ST8xn5$tixRSk?MI1Ip(oU$%UmgD z`@wIDzGMyOu9}{dlM`N03YVV!0;Plh0Hl~xlf1)ClS=j7`@~;|yf)0krO$}^euh`- f7BzPN)TlSN5-P3RlfRx2$i-Sg-o=c`No`X$JVS literal 0 HcmV?d1 diff --git a/MdeModulePkg/Application/UiApp/UiAppExtra.uni b/MdeModulePkg/Application/UiApp/UiAppExtra.uni new file mode 100644 index ..f2337ecbc53ba15f8b8ac3cc3e5605b91c31a9a8 GIT binary patch literal 1296 zcmZ9MTW`}q5QXO%iT_}Q7eK88NW36~NTmeHjdInz*FU1np#TY$Vm~#{=IP-rts zhE_YnX_ld{`a?QT?=?$@xwLZY{HwE$pd1!KH=PtUeIfn8c|GfTH?LUeAl+O zg7wChwqu#lm8RB8)6F|YrNW)@vR+v@6ztb4D31RFR*XymA$sNcEueP*xRY0h63v zDLXQ+5fbUaNf}~NqKQjE^M|v56(8U_tv+OeQ3_t@)^S+^Al{zp}a*H7NCo_GB!4 zJ%eXXZ0oT@b@~90SgBsdYz112pW@YSX*XlGab{Ag#@Ft7RpEiTZXfQqxRjiL(zhH z7`cgcGfkDm?-B^pO%dH{0(b88o@FORsiTz|P1Ge)sHK5YgEANt(mul@;(ot zKE9X0q^tPf5-IOUtbdbr%Ia8|Qq2Qd(`tWSX_GfN6M;q_T0rg@7SDKsjl)1*E;0 z1vlC~QGbVL3ir94pF~1X?s#iWYOC{nwFp*2`Y5q4j6J(z9iwT0sLCeF`YJH7P-B z8(^+Ekb(F(nW#e3S%+%2uJ6PcgwS(ZTC1~$TVUUbix?mweC?#%m(;lP=%3r z^${y^mrpgvWGP2g%dF4jYUfYvHzH!LFEOgBl6U7M}yO%$7nI6uT=BG!iHn3pZ+vm z_sjRJ=^Xt(^f!@qHh|WP)5xOZop1Joq!*aGl1n4vj7x*DMGl%F1=sW1Lx$5TL;_z Q#nyDg+`DlL@es}Ki90tO#lD@ literal 0 HcmV?d1 diff --git a/MdeModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf b/MdeModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf index 41ace76..1d9e22e 100644 --- a/MdeModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf +++ b/MdeModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf @@ -19,10 +19,11 @@ ## [Defines] INF_VERSION= 0x00010005 BASE_NAME = IsaBusDxe + MODULE_UNI_FILE= IsaBusDxe.uni FILE_GUID = DCBE6D66-D928-4138-8041-358F35CBCF80 MODULE_TYPE
[edk2] [Patch 1/3] MdePkg: Add the missing module UNI files
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao liming@intel.com --- MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf | 1 + MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.uni | Bin 0 - 1942 bytes 2 files changed, 1 insertion(+) create mode 100644 MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.uni diff --git a/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf b/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf index f813eae..811d769 100644 --- a/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf +++ b/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf @@ -12,10 +12,11 @@ ## [Defines] INF_VERSION= 0x00010006 BASE_NAME = UefiFileHandleLib + MODULE_UNI_FILE= UefiFileHandleLib.uni FILE_GUID = 9495D344-9D8A-41f3-8D17-E2FD238C4E71 MODULE_TYPE= UEFI_DRIVER VERSION_STRING = 1.0 LIBRARY_CLASS = FileHandleLib|DXE_DRIVER UEFI_APPLICATION UEFI_DRIVER DXE_RUNTIME_DRIVER diff --git a/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.uni b/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.uni new file mode 100644 index ..616f131a410e15d895a75111e6a02ad07be6e274 GIT binary patch literal 1942 zcmds%OK;Oq5QS%r#DB2T4WKpwBsK^k5^BH#ny5(xtg6H*t)(Q6Y!m38r~S@cJEox zc7U#YAM-r-%v@jp{-tuzDJD6UfEa6Y-#6q-|iumZe)e!wne@`ULwhCZ58_hzSqO zBF;H;X_uUqj0oK~{2utx;2(dc9mVZF30}eTvnJF~fG@dBQG2vSG+OW#7art-C|{ zucCd;oi{L2aJLJ%tKj4Tw|vO@)E?UtduE61lbUhyDxU%`%`FUH2s?SHkztcc-2` zExQG*y|96u+RHoGn}8v6?l;)yU{a11QJPv*USXY6hAOsk-4%Xo?5yW=#C7{l4xyp zW{xJRYk7`G6qI1s=xY7k}aRQab|O7$$HOs^VBA=m0w#|W7$)o-Eu#6(U{wtfQ} z+cD=4Sg3~smKN)G=OShP{k9qQiYN?$FXbvZi~Bh^o4l%vSQUD`i10Rq`3E-pm_m;? zSOS-NFZ0?zuNe@cK9(sITe+7?rB-6=KM~@Y{8{eL;PCd)${u{)3#(VnJDluN#b zk!IC-dPN)5nVL2x6FO}$T@-02u`(5kS6rmlwIsRPwj*?M3qfYmm^_F1NwJY=VS z*4$xLTt)4$4*aas;SO75pU?}}@}XCzFt!AWw*@7(r~%1PKIQ_cxivQgGx^#)sc zeqnuM#%LJ2p;YMQopUaoXq!T#V={vhOgAEke7#{ZsgI(W*_Y=4~Bgzo}DUo73 z1C6*6t9_W7xc31S)4RN$}?v5nCgCn*VrvOAo+X$-km?K;1Lu_Uf$Bu3~}1|Ah(N F_2%JK6vM literal 0 HcmV?d1 -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch] BaseTools: Fix the missing depex file in GenFds
If FDF FfsRule describes |.depex for depex file on source build, it may be missed in the generated FD image. GenFds tool needs to check the output file list and find the matched one. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao liming@intel.com Reviewed-by: Yingke Liu yingke.d@intel.com --- BaseTools/Source/Python/GenFds/Section.py | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/BaseTools/Source/Python/GenFds/Section.py b/BaseTools/Source/Python/GenFds/Section.py index 32314d6..fc25447 100644 --- a/BaseTools/Source/Python/GenFds/Section.py +++ b/BaseTools/Source/Python/GenFds/Section.py @@ -1,9 +1,9 @@ ## @file # section base class # -# Copyright (c) 2007-2014, Intel Corporation. All rights reserved.BR +# Copyright (c) 2007-2015, Intel Corporation. All rights reserved.BR # # 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 @@ -147,24 +147,24 @@ class Section (SectionClassObject): # MakefileDir = FfsInf.EfiOutputPath[:-len('OUTPUT')] Makefile = os.path.join(MakefileDir, 'Makefile') if not os.path.exists(Makefile): Makefile = os.path.join(MakefileDir, 'GNUmakefile') -if not os.path.exists(Makefile): -SuffixMap = FfsInf.GetFinalTargetSuffixMap() -if Suffix in SuffixMap: -FileList.extend(SuffixMap[Suffix]) -else: +if os.path.exists(Makefile): # Update to search files with suffix in all sub-dirs. Tuple = os.walk(FfsInf.EfiOutputPath) for Dirpath, Dirnames, Filenames in Tuple: for F in Filenames: if os.path.splitext(F)[1] in (Suffix): FullName = os.path.join(Dirpath, F) if os.path.getmtime(FullName) os.path.getmtime(Makefile): FileList.append(FullName) - +if not FileList: +SuffixMap = FfsInf.GetFinalTargetSuffixMap() +if Suffix in SuffixMap: +FileList.extend(SuffixMap[Suffix]) + #Process the file lists is alphabetical for a same section type if len (FileList) 1: FileList.sort() return FileList, IsSect -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2 0/6] Add generic PcdGetSize() API
V2: BaseTools generates the real size for the intital value of VOID* PCD. Update BasePcdLibNull library instance to add two new PcdApi. V1: PcdLib LibPcdGetSize() and LibPcdGetExSize() are type specific API. New generic PcdGetSize() API will be added to reterieve the size of PCD value. Like PcdGetValue(), it supports all PCD types and all PCD data types. BaseTools generates PCD size macros in AutoGen code. MdePkg PcdLib adds PcdGetSize() APIs to match those generated macros. Modules use PcdGetSize() API to replace LibPcdGetSize() and LibPcdGetExSize() APIs. Liming Gao (6): BaseTools: Generate macro for the size of PCD value BaseTools: Fix AutoGen issue for Patchable VOID* PCD. BaseTools: Update SetPcdPtr in AutoGen Code MdePkg: Add four PcdGetSize() API in PcdLib MdePkg: Add two PcdApi for Patch VOID* PCD set operation. SecurityPkg: Use PcdGetSize to get the size of VOID* PCD value. BaseTools/Source/Python/AutoGen/GenC.py| 90 +++-- MdePkg/Include/Library/PcdLib.h| 141 - MdePkg/Library/BasePcdLibNull/PcdLib.c | 120 +- MdePkg/Library/DxePcdLib/DxePcdLib.c | 119 - MdePkg/Library/PeiPcdLib/PeiPcdLib.c | 119 - .../DxeRsa2048Sha256GuidedSectionExtractLib.c | 4 +- .../DxeRsa2048Sha256GuidedSectionExtractLib.inf| 4 +- .../PeiRsa2048Sha256GuidedSectionExtractLib.c | 4 +- .../PeiRsa2048Sha256GuidedSectionExtractLib.inf| 2 +- 9 files changed, 567 insertions(+), 36 deletions(-) -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2 5/6] MdePkg: Add two PcdApi for Patch VOID* PCD set operation.
Two new APIs LibPatchPcdSetPtrAndSize() and LibPatchPcdSetPtrAndSizeS() are added to catch the size of the updated VOID* PCD value buffer, then PcdGetSize() API can return the actual size. Update three PcdLib instances to implement these two APIs. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao liming@intel.com Reviewed-by: Star Zeng star.z...@intel.com --- MdePkg/Include/Library/PcdLib.h| 83 +-- MdePkg/Library/BasePcdLibNull/PcdLib.c | 120 +++-- MdePkg/Library/DxePcdLib/DxePcdLib.c | 119 ++-- MdePkg/Library/PeiPcdLib/PeiPcdLib.c | 119 ++-- 4 files changed, 422 insertions(+), 19 deletions(-) diff --git a/MdePkg/Include/Library/PcdLib.h b/MdePkg/Include/Library/PcdLib.h index ce759fe..ad8a700 100644 --- a/MdePkg/Include/Library/PcdLib.h +++ b/MdePkg/Include/Library/PcdLib.h @@ -340,12 +340,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @return Return the pointer to the Buffer that was set. **/ #define PatchPcdSetPtr(TokenName, Size, Buffer) \ -LibPatchPcdSetPtr ( \ - _gPcd_BinaryPatch_##TokenName, \ +LibPatchPcdSetPtrAndSize ( \ + (VOID *)_gPcd_BinaryPatch_##TokenName, \ + _gPcd_BinaryPatch_Size_##TokenName, \ (UINTN)_PCD_PATCHABLE_##TokenName##_SIZE, \ (Size), \ (Buffer) \ ) /** @@ -2054,11 +2055,11 @@ LibPcdGetNextTokenSpace ( If PatchVariable is NULL, then ASSERT(). If SizeOfBuffer is NULL, then ASSERT(). If SizeOfBuffer 0 and Buffer is NULL, then ASSERT(). - @param[in] PatchVariable A pointer to the global variable in a module that is + @param[out] PatchVariable A pointer to the global variable in a module that is the target of the set operation. @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable. @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer. @param[in] Buffer A pointer to the buffer to used to set the target variable. @@ -2066,11 +2067,11 @@ LibPcdGetNextTokenSpace ( **/ VOID * EFIAPI LibPatchPcdSetPtr ( - INVOID*PatchVariable, + OUTVOID *PatchVariable, INUINTN MaximumDatumSize, IN OUTUINTN *SizeOfBuffer, IN CONST VOID*Buffer ); @@ -2086,11 +2087,11 @@ LibPatchPcdSetPtr ( If PatchVariable is NULL, then ASSERT(). If SizeOfBuffer is NULL, then ASSERT(). If SizeOfBuffer 0 and Buffer is NULL, then ASSERT(). - @param[in] PatchVariable A pointer to the global variable in a module that is + @param[out] PatchVariable A pointer to the global variable in a module that is the target of the set operation. @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable. @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer. @param[in] Buffer A pointer to the buffer to used to set the target variable. @@ -2098,11 +2099,81 @@ LibPatchPcdSetPtr ( **/ RETURN_STATUS EFIAPI LibPatchPcdSetPtrS ( - IN VOID *PatchVariable, + OUT VOID *PatchVariable, + IN UINTNMaximumDatumSize, + IN OUT UINTN*SizeOfBuffer, + IN CONST VOID *Buffer + ); + +/** + Sets a value and size of a patchable PCD entry that is type pointer. + + Sets the PCD entry specified by PatchVariable to the value specified by Buffer + and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than + MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return + NULL to indicate that the set operation was not actually performed. + If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to + MaximumDatumSize and NULL must be returned. + + If PatchVariable is NULL, then ASSERT(). + If SizeOfPatchVariable is NULL, then ASSERT(). + If SizeOfBuffer is NULL, then ASSERT(). + If SizeOfBuffer 0 and Buffer is NULL, then ASSERT(). + + @param[out] PatchVariable A pointer to the global variable in a module that is +the target of the set operation. + @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable. + @param[in] MaximumDatumSize The maximum size allowed for the PCD entry
[edk2] [PATCH v2 3/6] BaseTools: Update SetPcdPtr in AutoGen Code
For patchable PCD, map SetPcdPtr() to LibPatchPcdSetPtrAndSize(), then the size of the updated VOID* value can be cached. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao liming@intel.com Reviewed-by: Star Zeng star.z...@intel.com --- BaseTools/Source/Python/AutoGen/GenC.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py index 76e9fa7..77de165 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -1019,12 +1019,12 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd): AutoGenH.Append('extern %s %s %s%s;\n' % (Const, Pcd.DatumType, PcdVariableName, Array)) AutoGenH.Append('#define %s %s%s\n' % (GetModeName, Type, PcdVariableName)) if Pcd.Type == TAB_PCDS_PATCHABLE_IN_MODULE: if Pcd.DatumType == 'VOID*': -AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtr((VOID *)_gPcd_BinaryPatch_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), (Buffer))\n' % (SetModeName, Pcd.TokenCName, Pcd.TokenCName)) -AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtrS((VOID *)_gPcd_BinaryPatch_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), (Buffer))\n' % (SetModeStatusName, Pcd.TokenCName, Pcd.TokenCName)) +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: AutoGenH.Append('#define %s(Value) (%s = (Value))\n' % (SetModeName, PcdVariableName)) AutoGenH.Append('#define %s(Value) ((%s = (Value)), RETURN_SUCCESS) \n' % (SetModeStatusName, PcdVariableName)) else: AutoGenH.Append('//#define %s ASSERT(FALSE) // It is not allowed to set value for a FIXED_AT_BUILD PCD\n' % SetModeName) @@ -1142,12 +1142,12 @@ def CreateLibraryPcdCode(Info, AutoGenC, AutoGenH, Pcd): 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) ) AutoGenH.Append('#define %s %s_gPcd_BinaryPatch_%s\n' %(GetModeName, Type, TokenCName)) if Pcd.DatumType == 'VOID*': -AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtr((VOID *)_gPcd_BinaryPatch_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), (Buffer))\n' % (SetModeName, Pcd.TokenCName, Pcd.TokenCName)) -AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtrS((VOID *)_gPcd_BinaryPatch_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), (Buffer))\n' % (SetModeStatusName, Pcd.TokenCName, Pcd.TokenCName)) +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: AutoGenH.Append('#define %s(Value) (%s = (Value))\n' % (SetModeName, PcdVariableName)) AutoGenH.Append('#define %s(Value) ((%s = (Value)), RETURN_SUCCESS)\n' % (SetModeStatusName, PcdVariableName)) PcdDataSize = GetPcdSize(Pcd) -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2 2/6] BaseTools: Fix AutoGen issue for Patchable VOID* PCD.
Patchable VOID* PCD set operation should map LibPatchPcdSetPtr() and LibPatchPcdSetPtrS() API. This has been done when PCD is used in driver, but not done when PCD is used in library. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao liming@intel.com Reviewed-by: Star Zeng star.z...@intel.com --- BaseTools/Source/Python/AutoGen/GenC.py | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py index 381c14b..76e9fa7 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -1019,12 +1019,12 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd): AutoGenH.Append('extern %s %s %s%s;\n' % (Const, Pcd.DatumType, PcdVariableName, Array)) AutoGenH.Append('#define %s %s%s\n' % (GetModeName, Type, PcdVariableName)) if Pcd.Type == TAB_PCDS_PATCHABLE_IN_MODULE: if Pcd.DatumType == 'VOID*': -AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtr(_gPcd_BinaryPatch_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), (Buffer))\n' % (SetModeName, Pcd.TokenCName, Pcd.TokenCName)) -AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtrS(_gPcd_BinaryPatch_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), (Buffer))\n' % (SetModeStatusName, Pcd.TokenCName, Pcd.TokenCName)) +AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtr((VOID *)_gPcd_BinaryPatch_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), (Buffer))\n' % (SetModeName, Pcd.TokenCName, Pcd.TokenCName)) +AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtrS((VOID *)_gPcd_BinaryPatch_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), (Buffer))\n' % (SetModeStatusName, Pcd.TokenCName, Pcd.TokenCName)) else: AutoGenH.Append('#define %s(Value) (%s = (Value))\n' % (SetModeName, PcdVariableName)) AutoGenH.Append('#define %s(Value) ((%s = (Value)), RETURN_SUCCESS) \n' % (SetModeStatusName, PcdVariableName)) else: AutoGenH.Append('//#define %s ASSERT(FALSE) // It is not allowed to set value for a FIXED_AT_BUILD PCD\n' % SetModeName) @@ -1141,12 +1141,16 @@ def CreateLibraryPcdCode(Info, AutoGenC, AutoGenH, Pcd): 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) ) AutoGenH.Append('#define %s %s_gPcd_BinaryPatch_%s\n' %(GetModeName, Type, TokenCName)) -AutoGenH.Append('#define %s(Value) (%s = (Value))\n' % (SetModeName, PcdVariableName)) -AutoGenH.Append('#define %s(Value) ((%s = (Value)), RETURN_SUCCESS)\n' % (SetModeStatusName, PcdVariableName)) +if Pcd.DatumType == 'VOID*': +AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtr((VOID *)_gPcd_BinaryPatch_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), (Buffer))\n' % (SetModeName, Pcd.TokenCName, Pcd.TokenCName)) +AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtrS((VOID *)_gPcd_BinaryPatch_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), (Buffer))\n' % (SetModeStatusName, Pcd.TokenCName, Pcd.TokenCName)) +else: +AutoGenH.Append('#define %s(Value) (%s = (Value))\n' % (SetModeName, PcdVariableName)) +AutoGenH.Append('#define %s(Value) ((%s = (Value)), RETURN_SUCCESS)\n' % (SetModeStatusName, PcdVariableName)) PcdDataSize = GetPcdSize(Pcd) AutoGenH.Append('#define %s %s\n' % (PatchPcdSizeTokenName, PcdDataSize)) AutoGenH.Append('#define %s %s\n' % (GetModeSizeName,PatchPcdSizeVariableName)) AutoGenH.Append('extern UINTN %s; \n' % PatchPcdSizeVariableName) -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2 1/6] BaseTools: Generate macro for the size of PCD value
PcdLib introduces new APIs to get the size of PCD value. BaseTools generates those macros in AutoGen code. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Bob Feng bob.c.f...@intel.com Reviewed-by: Star Zeng star.z...@intel.com --- BaseTools/Source/Python/AutoGen/GenC.py | 78 ++--- 1 file changed, 73 insertions(+), 5 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py index 3afded6..381c14b 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -731,10 +731,33 @@ def DynExPcdTokenNumberMapping(Info, AutoGenH): # COMPAREGUID() will only be used if the Guid passed in is local to the module. AutoGenH.Append('#define _PCD_TOKEN_EX_%s(GuidPtr) __PCD_%s_ADDR_CMP(GuidPtr) ? __PCD_%s_ADDR_CMP(GuidPtr) : __PCD_%s_VAL_CMP(GuidPtr) \n' % (Pcd.TokenCName, Pcd.TokenCName, Pcd.TokenCName, Pcd.TokenCName)) TokenCNameList.append(TokenCName) +def GetPcdSize(Pcd): +if Pcd.DatumType == 'VOID*': +Value = Pcd.DefaultValue +if Value in [None, '']: +return 1 +elif Value[0] == 'L': +return (len(Value) - 2) * 2 +elif Value[0] == '{': +return len(Value.split(',')) +else: +return len(Value) - 1 +if Pcd.DatumType == 'UINT64': +return 8 +if Pcd.DatumType == 'UINT32': +return 4 +if Pcd.DatumType == 'UINT16': +return 2 +if Pcd.DatumType == 'UINT8': +return 1 +if Pcd.DatumType == 'BOOLEAN': +return 1 + + ## Create code for module PCDs # # @param InfoThe ModuleAutoGen object # @param AutoGenCThe TemplateString object for C code # @param AutoGenHThe TemplateString object for header file @@ -745,10 +768,14 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd): PcdTokenNumber = Info.PlatformInfo.PcdTokenNumber # # Write PCDs # PcdTokenName = '_PCD_TOKEN_' + Pcd.TokenCName +PatchPcdSizeTokenName = '_PCD_PATCHABLE_' + Pcd.TokenCName +'_SIZE' +PatchPcdSizeVariableName = '_gPcd_BinaryPatch_Size_' + Pcd.TokenCName +FixPcdSizeTokenName = '_PCD_SIZE_' + Pcd.TokenCName + if Pcd.Type in gDynamicExPcd: TokenNumber = int(Pcd.TokenValue, 0) # Add TokenSpaceGuidValue value to PcdTokenName to discriminate the DynamicEx PCDs with # different Guids but same TokenCName PcdExTokenName = '_PCD_TOKEN_' + Pcd.TokenSpaceGuidCName + '_' + Pcd.TokenCName @@ -786,11 +813,12 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd): DatumSize = gDatumSizeStringDatabase[Pcd.DatumType] DatumSizeLib = gDatumSizeStringDatabaseLib[Pcd.DatumType] GetModeName = '_PCD_GET_MODE_' + gDatumSizeStringDatabaseH[Pcd.DatumType] + '_' + Pcd.TokenCName SetModeName = '_PCD_SET_MODE_' + gDatumSizeStringDatabaseH[Pcd.DatumType] + '_' + Pcd.TokenCName SetModeStatusName = '_PCD_SET_MODE_' + gDatumSizeStringDatabaseH[Pcd.DatumType] + '_S_' + Pcd.TokenCName - +GetModeSizeName = '_PCD_GET_MODE_SIZE' + '_' + Pcd.TokenCName + PcdExCNameList = [] if Pcd.Type in gDynamicExPcd: if Info.IsLibrary: PcdList = Info.LibraryPcdList else: @@ -803,27 +831,30 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd): # If PcdToken and PcdGet/Set used in the Pcds with different Guids but same CName, it should failed to build. if PcdExCNameList.count(Pcd.TokenCName) 1: AutoGenH.Append('// Disabled the macros, as PcdToken and PcdGet/Set are not allowed in the case that more than one DynamicEx Pcds are different Guids but same CName.\n') AutoGenH.Append('// #define %s %s\n' % (PcdTokenName, PcdExTokenName)) AutoGenH.Append('// #define %s LibPcdGetEx%s(%s, %s)\n' % (GetModeName, DatumSizeLib, Pcd.TokenSpaceGuidCName, PcdTokenName)) +AutoGenH.Append('#define %s LibPcdGetExSize(%s, %s)\n' % (GetModeSizeName,Pcd.TokenSpaceGuidCName, PcdTokenName)) if Pcd.DatumType == 'VOID*': AutoGenH.Append('// #define %s(SizeOfBuffer, Buffer) LibPcdSetEx%s(%s, %s, (SizeOfBuffer), (Buffer))\n' % (SetModeName, DatumSizeLib, Pcd.TokenSpaceGuidCName, PcdTokenName)) AutoGenH.Append('// #define %s(SizeOfBuffer, Buffer) LibPcdSetEx%sS(%s, %s, (SizeOfBuffer), (Buffer))\n' % (SetModeStatusName, DatumSizeLib, Pcd.TokenSpaceGuidCName, PcdTokenName)) else: AutoGenH.Append('// #define %s(Value) LibPcdSetEx%s(%s, %s, (Value))\n' % (SetModeName, DatumSizeLib, Pcd.TokenSpaceGuidCName, PcdTokenName)) AutoGenH.Append('// #define %s(Value) LibPcdSetEx%sS(%s, %s, (Value))\n' % (SetModeStatusName, DatumSizeLib, Pcd.TokenSpaceGuidCName, PcdTokenName))
[edk2] [PATCH v2 4/6] MdePkg: Add four PcdGetSize() API in PcdLib
Add below four PcdGetSize() API in PcdLib header file. They can be used to get the size of PCD value. FixedPcdGetSize() PatchPcdGetSize() PcdGetSize() PcdGetExSize() Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao liming@intel.com Reviewed-by: Star Zeng star.z...@intel.com --- MdePkg/Include/Library/PcdLib.h | 58 - 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/Library/PcdLib.h b/MdePkg/Include/Library/PcdLib.h index a7e1e62..ce759fe 100644 --- a/MdePkg/Include/Library/PcdLib.h +++ b/MdePkg/Include/Library/PcdLib.h @@ -346,11 +346,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. _gPcd_BinaryPatch_##TokenName, \ (UINTN)_PCD_PATCHABLE_##TokenName##_SIZE, \ (Size), \ (Buffer) \ ) - /** Retrieves an 8-bit PCD token value based on a token name. Returns the 8-bit value for the token specified by TokenName. If TokenName is not a valid token in the token space, then the module will not build. @@ -431,10 +430,67 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ #define PcdGetBool(TokenName) _PCD_GET_MODE_BOOL_##TokenName +/** + Retrieves the size of a fixed PCD token based on a token name. + + Returns the size of the token specified by TokenName. + If TokenName is not a valid token in the token space, then the module will not build. + + @param[in] TokenName The name of the PCD token to retrieve a current value size for. + + @return Return the size + +**/ +#define FixedPcdGetSize(TokenName)_PCD_SIZE_##TokenName + + +/** + Retrieves the size of a binary patchable PCD token based on a token name. + + Returns the size of the token specified by TokenName. + If TokenName is not a valid token in the token space, then the module will not build. + + @param[in] TokenName The name of the PCD token to retrieve a current value size for. + + @return Return the size + +**/ +#define PatchPcdGetSize(TokenName)_gPcd_BinaryPatch_Size_##TokenName + + +/** + Retrieves the size of the PCD token based on a token name. + + Returns the size of the token specified by TokenName. + If TokenName is not a valid token in the token space, then the module will not build. + + @param[in] TokenName The name of the PCD token to retrieve a current value size for. + + @return Return the size + +**/ +#define PcdGetSize(TokenName) _PCD_GET_MODE_SIZE_##TokenName + + +/** + Retrieve the size of a given PCD token. + + Returns the size of the token specified by TokenNumber and Guid. + If Guid is NULL, then ASSERT(). + + @param[in] Guid Pointer to a 128-bit unique value that designates +which namespace to retrieve a value from. + @param[in] TokenNumber The PCD token number to retrieve a current value size for. + + @return Return the size. + +**/ +#define PcdGetExSize(Guid, TokenName) LibPcdGetExSize ((Guid), PcdTokenEx(Guid,TokenName)) + #ifndef DISABLE_NEW_DEPRECATED_INTERFACES /** Sets an 8-bit PCD token value based on a token name. Sets the 8-bit value for the token specified by TokenName. Value is returned. -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2 6/6] SecurityPkg: Use PcdGetSize to get the size of VOID* PCD value.
PcdLib introduces generic API to get the size of VOID* PCD value. Update Pei and Dxe RsaGuidedLib to use generic PCD API instead of GetEx API. This change can remove PCD type limitation in these two libraries. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao liming@intel.com Reviewed-by: Star Zeng star.z...@intel.com --- .../DxeRsa2048Sha256GuidedSectionExtractLib.c | 4 ++-- .../DxeRsa2048Sha256GuidedSectionExtractLib.inf | 4 ++-- .../PeiRsa2048Sha256GuidedSectionExtractLib.c | 4 ++-- .../PeiRsa2048Sha256GuidedSectionExtractLib.inf | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/DxeRsa2048Sha256GuidedSectionExtractLib.c b/SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/DxeRsa2048Sha256GuidedSectionExtractLib.c index 2b61014..1f7a299 100644 --- a/SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/DxeRsa2048Sha256GuidedSectionExtractLib.c +++ b/SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/DxeRsa2048Sha256GuidedSectionExtractLib.c @@ -2,11 +2,11 @@ This library registers RSA 2048 SHA 256 guided section handler to parse RSA 2048 SHA 256 encapsulation section and extract raw data. It uses the BaseCrypyLib based on OpenSSL to authenticate the signature. -Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.BR +Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.BR 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 @@ -270,11 +270,11 @@ Rsa2048Sha256GuidedSectionHandler ( // PublicKey = (UINT8 *)PcdGetPtr (PcdRsa2048Sha256PublicKeyBuffer); DEBUG ((DEBUG_VERBOSE, DxePcdRsa2048Sha256: PublicKeyBuffer = %p\n, PublicKey)); ASSERT (PublicKey != NULL); DEBUG ((DEBUG_VERBOSE, DxePcdRsa2048Sha256: PublicKeyBuffer Token = %08x\n, PcdToken (PcdRsa2048Sha256PublicKeyBuffer))); - PublicKeyBufferSize = LibPcdGetExSize (gEfiSecurityPkgTokenSpaceGuid, PcdToken (PcdRsa2048Sha256PublicKeyBuffer)); + PublicKeyBufferSize = PcdGetSize (PcdRsa2048Sha256PublicKeyBuffer); DEBUG ((DEBUG_VERBOSE, DxePcdRsa2048Sha256: PublicKeyBuffer Size = %08x\n, PublicKeyBufferSize)); ASSERT ((PublicKeyBufferSize % SHA256_DIGEST_SIZE) == 0); CryptoStatus = FALSE; while (PublicKeyBufferSize != 0) { if (CompareMem (Digest, PublicKey, SHA256_DIGEST_SIZE) == 0) { diff --git a/SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/DxeRsa2048Sha256GuidedSectionExtractLib.inf b/SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/DxeRsa2048Sha256GuidedSectionExtractLib.inf index f1777f4..4681f08 100644 --- a/SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/DxeRsa2048Sha256GuidedSectionExtractLib.inf +++ b/SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/DxeRsa2048Sha256GuidedSectionExtractLib.inf @@ -48,13 +48,13 @@ MemoryAllocationLib BaseCryptLib PcdLib PerformanceLib -[PcdEx] +[Pcd] gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer## SOMETIMES_CONSUMES - + [Protocols] gEfiSecurityPolicyProtocolGuid ## SOMETIMES_CONSUMES (Set platform override AUTH status if exist) [Guids] gEfiCertTypeRsa2048Sha256Guid ## PRODUCES ## UNDEFINED # Specifies RSA 2048 SHA 256 authentication algorithm. diff --git a/SecurityPkg/Library/PeiRsa2048Sha256GuidedSectionExtractLib/PeiRsa2048Sha256GuidedSectionExtractLib.c b/SecurityPkg/Library/PeiRsa2048Sha256GuidedSectionExtractLib/PeiRsa2048Sha256GuidedSectionExtractLib.c index 8c0047e..e2a0fb6 100644 --- a/SecurityPkg/Library/PeiRsa2048Sha256GuidedSectionExtractLib/PeiRsa2048Sha256GuidedSectionExtractLib.c +++ b/SecurityPkg/Library/PeiRsa2048Sha256GuidedSectionExtractLib/PeiRsa2048Sha256GuidedSectionExtractLib.c @@ -2,11 +2,11 @@ This library registers RSA 2048 SHA 256 guided section handler to parse RSA 2048 SHA 256 encapsulation section and extract raw data. It uses the BaseCrypyLib based on OpenSSL to authenticate the signature. -Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.BR +Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.BR 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
[edk2] [Patch] BaseTools: Add NULL pointer check in AutoGen code
For DynamicEx PCD, if NULL pointer is specified as token space GUID, it will directly be used to compare GUID value in AutoGen code. To avoid access NULL pointer, NULL pointer will be checked first. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao liming@intel.com --- BaseTools/Source/Python/AutoGen/GenC.py | 1 + 1 file changed, 1 insertion(+) diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py index b76d315..66756a3 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -715,10 +715,11 @@ def DynExPcdTokenNumberMapping(Info, AutoGenH): for Pcd in PcdExList: if Pcd.Type in gDynamicExPcd and Pcd.TokenCName == TokenCName: Index = Index + 1 if Index == 1: AutoGenH.Append('\n#define __PCD_%s_VAL_CMP(GuidPtr) (' % (Pcd.TokenCName)) +AutoGenH.Append('\\\n (GuidPtr == NULL) ? 0:') AutoGenH.Append('\\\n COMPAREGUID (GuidPtr, %s) ? _PCD_TOKEN_%s_%s:' % (Pcd.TokenSpaceGuidCName, Pcd.TokenSpaceGuidCName, Pcd.TokenCName)) else: AutoGenH.Append('\\\n COMPAREGUID (GuidPtr, %s) ? _PCD_TOKEN_%s_%s:' % (Pcd.TokenSpaceGuidCName, Pcd.TokenSpaceGuidCName, Pcd.TokenCName)) -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch] MdePkg: Update DEC and DSC version from 1.05 to 1.06
UEFI2.5 and PI1.4 have been added in MdePkg. Update DEC and DSC version to reflect those changes in MdePkg. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao liming@intel.com --- MdePkg/MdePkg.dec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 64dc5f9..c2e3ebe 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -21,11 +21,11 @@ [Defines] DEC_SPECIFICATION = 0x00010005 PACKAGE_NAME = MdePkg PACKAGE_UNI_FILE = MdePkg.uni PACKAGE_GUID = 1E73767F-8F52-4603-AEB4-F29B510B6766 - PACKAGE_VERSION= 1.05 + PACKAGE_VERSION= 1.06 [Includes] Include -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2] MdePkg: Update DEC and DSC version from 1.05 to 1.06
UEFI2.5 and PI1.4 have been added in MdePkg. Update DEC and DSC version to reflect those changes in MdePkg. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao liming@intel.com --- MdePkg/MdePkg.dec | 2 +- MdePkg/MdePkg.dsc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 64dc5f9..c2e3ebe 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -21,11 +21,11 @@ [Defines] DEC_SPECIFICATION = 0x00010005 PACKAGE_NAME = MdePkg PACKAGE_UNI_FILE = MdePkg.uni PACKAGE_GUID = 1E73767F-8F52-4603-AEB4-F29B510B6766 - PACKAGE_VERSION= 1.05 + PACKAGE_VERSION= 1.06 [Includes] Include diff --git a/MdePkg/MdePkg.dsc b/MdePkg/MdePkg.dsc index a9301fb..89fc630 100644 --- a/MdePkg/MdePkg.dsc +++ b/MdePkg/MdePkg.dsc @@ -15,11 +15,11 @@ ## [Defines] PLATFORM_NAME = Mde PLATFORM_GUID = 082F8BFC-0455-4859-AE3C-ECD64FB81642 - PLATFORM_VERSION = 1.05 + PLATFORM_VERSION = 1.06 DSC_SPECIFICATION = 0x00010005 OUTPUT_DIRECTORY = Build/Mde SUPPORTED_ARCHITECTURES= IA32|IPF|X64|EBC|ARM|AARCH64 BUILD_TARGETS = DEBUG|RELEASE SKUID_IDENTIFIER = DEFAULT -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 5/6] MdePkg: Add two PcdApi for Patch VOID* PCD set operation.
Two new APIs LibPatchPcdSetPtrAndSize() and LibPatchPcdSetPtrAndSizeS() are added to catch the size of the updated VOID* PCD value buffer, then PcdGetSize() API can return the actual size. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao liming@intel.com --- MdePkg/Include/Library/PcdLib.h | 75 ++- MdePkg/Library/DxePcdLib/DxePcdLib.c | 111 +++ MdePkg/Library/PeiPcdLib/PeiPcdLib.c | 111 +++ 3 files changed, 295 insertions(+), 2 deletions(-) diff --git a/MdePkg/Include/Library/PcdLib.h b/MdePkg/Include/Library/PcdLib.h index 962d442..0bbccb3 100644 --- a/MdePkg/Include/Library/PcdLib.h +++ b/MdePkg/Include/Library/PcdLib.h @@ -340,12 +340,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @return Return the pointer to the Buffer that was set. **/ #define PatchPcdSetPtr(TokenName, Size, Buffer) \ -LibPatchPcdSetPtr ( \ - _gPcd_BinaryPatch_##TokenName, \ +LibPatchPcdSetPtrAndSize ( \ + (VOID *)_gPcd_BinaryPatch_##TokenName, \ + _gPcd_BinaryPatch_Size_##TokenName, \ (UINTN)_PCD_PATCHABLE_##TokenName##_SIZE, \ (Size), \ (Buffer) \ ) /** @@ -2104,10 +2105,80 @@ LibPatchPcdSetPtrS ( IN UINTNMaximumDatumSize, IN OUT UINTN*SizeOfBuffer, IN CONST VOID *Buffer ); +/** + Sets a value and size of a patchable PCD entry that is type pointer. + + Sets the PCD entry specified by PatchVariable to the value specified by Buffer + and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than + MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return + NULL to indicate that the set operation was not actually performed. + If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to + MaximumDatumSize and NULL must be returned. + + If PatchVariable is NULL, then ASSERT(). + If SizeOfPatchVariable is NULL, then ASSERT(). + If SizeOfBuffer is NULL, then ASSERT(). + If SizeOfBuffer 0 and Buffer is NULL, then ASSERT(). + + @param[out] PatchVariable A pointer to the global variable in a module that is +the target of the set operation. + @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable. + @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable. + @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer. + @param[in] Buffer A pointer to the buffer to used to set the target variable. + + @return Return the pointer to the Buffer that was set. + +**/ +VOID * +EFIAPI +LibPatchPcdSetPtrAndSize ( + OUT VOID*PatchVariable, + OUT UINTN *SizeOfPatchVariable, + INUINTN MaximumDatumSize, + IN OUTUINTN *SizeOfBuffer, + IN CONST VOID*Buffer + ); + +/** + Sets a value and size of a patchable PCD entry that is type pointer. + + Sets the PCD entry specified by PatchVariable to the value specified + by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize, + then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER + to indicate that the set operation was not actually performed. + If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to + MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned. + + If PatchVariable is NULL, then ASSERT(). + If SizeOfPatchVariable is NULL, then ASSERT(). + If SizeOfBuffer is NULL, then ASSERT(). + If SizeOfBuffer 0 and Buffer is NULL, then ASSERT(). + + @param[in] PatchVariable A pointer to the global variable in a module that is +the target of the set operation. + @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable. + @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable. + @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer. + @param[in] Buffer A pointer to the buffer to used to set the target variable. + + @return The status of the set operation. + +**/ +RETURN_STATUS +EFIAPI +LibPatchPcdSetPtrAndSizeS ( + OUT VOID *PatchVariable, + OUT UINTN*SizeOfPatchVariable, + IN UINTNMaximumDatumSize, + IN OUT UINTN*SizeOfBuffer, + IN CONST VOID
[edk2] [Patch 3/6] BaseTools: Update SetPcdPtr in AutoGen Code
For patchable PCD, map SetPcdPtr() to LibPatchPcdSetPtrAndSize(), then the size of the updated VOID* value can be cached. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao liming@intel.com --- BaseTools/Source/Python/AutoGen/GenC.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py index c4d3307..b76d315 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -1010,12 +1010,12 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd): AutoGenH.Append('extern %s %s %s%s;\n' % (Const, Pcd.DatumType, PcdVariableName, Array)) AutoGenH.Append('#define %s %s%s\n' % (GetModeName, Type, PcdVariableName)) if Pcd.Type == TAB_PCDS_PATCHABLE_IN_MODULE: if Pcd.DatumType == 'VOID*': -AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtr((VOID *)_gPcd_BinaryPatch_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), (Buffer))\n' % (SetModeName, Pcd.TokenCName, Pcd.TokenCName)) -AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtrS((VOID *)_gPcd_BinaryPatch_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), (Buffer))\n' % (SetModeStatusName, Pcd.TokenCName, Pcd.TokenCName)) +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: AutoGenH.Append('#define %s(Value) (%s = (Value))\n' % (SetModeName, PcdVariableName)) AutoGenH.Append('#define %s(Value) ((%s = (Value)), RETURN_SUCCESS) \n' % (SetModeStatusName, PcdVariableName)) else: AutoGenH.Append('//#define %s ASSERT(FALSE) // It is not allowed to set value for a FIXED_AT_BUILD PCD\n' % SetModeName) @@ -1133,12 +1133,12 @@ def CreateLibraryPcdCode(Info, AutoGenC, AutoGenH, Pcd): 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) ) AutoGenH.Append('#define %s %s_gPcd_BinaryPatch_%s\n' %(GetModeName, Type, TokenCName)) if Pcd.DatumType == 'VOID*': -AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtr((VOID *)_gPcd_BinaryPatch_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), (Buffer))\n' % (SetModeName, Pcd.TokenCName, Pcd.TokenCName)) -AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtrS((VOID *)_gPcd_BinaryPatch_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), (Buffer))\n' % (SetModeStatusName, Pcd.TokenCName, Pcd.TokenCName)) +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: AutoGenH.Append('#define %s(Value) (%s = (Value))\n' % (SetModeName, PcdVariableName)) AutoGenH.Append('#define %s(Value) ((%s = (Value)), RETURN_SUCCESS)\n' % (SetModeStatusName, PcdVariableName)) PcdDataSize = GetPcdSize(Pcd) -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 0/6] Add generic PcdGetSize() API
PcdLib LibPcdGetSize() and LibPcdGetExSize() are type specific API. New generic PcdGetSize() API will be added to reterieve the size of PCD value. Like PcdGetValue(), it supports all PCD types and all PCD data types. BaseTools generates PCD size macros in AutoGen code. MdePkg PcdLib adds PcdGetSize() APIs to match those generated macros. Modules use PcdGetSize() API to replace LibPcdGetSize() and LibPcdGetExSize() APIs. Liming Gao (6): BaseTools: Generate macro for the size of PCD value BaseTools: Fix AutoGen issue for Patchable VOID* PCD. BaseTools: Update SetPcdPtr in AutoGen Code MdePkg: Add four PcdGetSize() API in PcdLib MdePkg: Add two PcdApi for Patch VOID* PCD set operation. SecurityPkg: Use PcdGetSize to get the size of VOID* PCD value. BaseTools/Source/Python/AutoGen/GenC.py| 82 +++-- MdePkg/Include/Library/PcdLib.h| 133 - MdePkg/Library/DxePcdLib/DxePcdLib.c | 111 + MdePkg/Library/PeiPcdLib/PeiPcdLib.c | 111 + .../DxeRsa2048Sha256GuidedSectionExtractLib.c | 4 +- .../DxeRsa2048Sha256GuidedSectionExtractLib.inf| 4 +- .../PeiRsa2048Sha256GuidedSectionExtractLib.c | 4 +- .../PeiRsa2048Sha256GuidedSectionExtractLib.inf| 2 +- 8 files changed, 432 insertions(+), 19 deletions(-) -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch 1/6] BaseTools: Generate macro for the size of PCD value
PcdLib introduces new APIs to get the size of PCD value. BaseTools generates those macros in AutoGen code. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Bob Feng bob.c.f...@intel.com --- BaseTools/Source/Python/AutoGen/GenC.py | 70 ++--- 1 file changed, 65 insertions(+), 5 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py index 84bd607..d706574 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -730,10 +730,25 @@ def DynExPcdTokenNumberMapping(Info, AutoGenH): # COMPAREGUID() will only be used if the Guid passed in is local to the module. AutoGenH.Append('#define _PCD_TOKEN_EX_%s(GuidPtr) __PCD_%s_ADDR_CMP(GuidPtr) ? __PCD_%s_ADDR_CMP(GuidPtr) : __PCD_%s_VAL_CMP(GuidPtr) \n' % (Pcd.TokenCName, Pcd.TokenCName, Pcd.TokenCName, Pcd.TokenCName)) TokenCNameList.append(TokenCName) +def GetPcdSize(Pcd): +if Pcd.DatumType == 'VOID*': +return Pcd.MaxDatumSize +if Pcd.DatumType == 'UINT64': +return 8 +if Pcd.DatumType == 'UINT32': +return 4 +if Pcd.DatumType == 'UINT16': +return 2 +if Pcd.DatumType == 'UINT8': +return 1 +if Pcd.DatumType == 'BOOLEAN': +return 1 + + ## Create code for module PCDs # # @param InfoThe ModuleAutoGen object # @param AutoGenCThe TemplateString object for C code # @param AutoGenHThe TemplateString object for header file @@ -744,10 +759,14 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd): PcdTokenNumber = Info.PlatformInfo.PcdTokenNumber # # Write PCDs # PcdTokenName = '_PCD_TOKEN_' + Pcd.TokenCName +PatchPcdSizeTokenName = '_PCD_PATCHABLE_' + Pcd.TokenCName +'_SIZE' +PatchPcdSizeVariableName = '_gPcd_BinaryPatch_Size_' + Pcd.TokenCName +FixPcdSizeTokenName = '_PCD_SIZE_' + Pcd.TokenCName + if Pcd.Type in gDynamicExPcd: TokenNumber = int(Pcd.TokenValue, 0) # Add TokenSpaceGuidValue value to PcdTokenName to discriminate the DynamicEx PCDs with # different Guids but same TokenCName PcdExTokenName = '_PCD_TOKEN_' + Pcd.TokenSpaceGuidCName + '_' + Pcd.TokenCName @@ -785,11 +804,12 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd): DatumSize = gDatumSizeStringDatabase[Pcd.DatumType] DatumSizeLib = gDatumSizeStringDatabaseLib[Pcd.DatumType] GetModeName = '_PCD_GET_MODE_' + gDatumSizeStringDatabaseH[Pcd.DatumType] + '_' + Pcd.TokenCName SetModeName = '_PCD_SET_MODE_' + gDatumSizeStringDatabaseH[Pcd.DatumType] + '_' + Pcd.TokenCName SetModeStatusName = '_PCD_SET_MODE_' + gDatumSizeStringDatabaseH[Pcd.DatumType] + '_S_' + Pcd.TokenCName - +GetModeSizeName = '_PCD_GET_MODE_SIZE' + '_' + Pcd.TokenCName + PcdExCNameList = [] if Pcd.Type in gDynamicExPcd: if Info.IsLibrary: PcdList = Info.LibraryPcdList else: @@ -802,27 +822,30 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd): # If PcdToken and PcdGet/Set used in the Pcds with different Guids but same CName, it should failed to build. if PcdExCNameList.count(Pcd.TokenCName) 1: AutoGenH.Append('// Disabled the macros, as PcdToken and PcdGet/Set are not allowed in the case that more than one DynamicEx Pcds are different Guids but same CName.\n') AutoGenH.Append('// #define %s %s\n' % (PcdTokenName, PcdExTokenName)) AutoGenH.Append('// #define %s LibPcdGetEx%s(%s, %s)\n' % (GetModeName, DatumSizeLib, Pcd.TokenSpaceGuidCName, PcdTokenName)) +AutoGenH.Append('#define %s LibPcdGetExSize(%s, %s)\n' % (GetModeSizeName,Pcd.TokenSpaceGuidCName, PcdTokenName)) if Pcd.DatumType == 'VOID*': AutoGenH.Append('// #define %s(SizeOfBuffer, Buffer) LibPcdSetEx%s(%s, %s, (SizeOfBuffer), (Buffer))\n' % (SetModeName, DatumSizeLib, Pcd.TokenSpaceGuidCName, PcdTokenName)) AutoGenH.Append('// #define %s(SizeOfBuffer, Buffer) LibPcdSetEx%sS(%s, %s, (SizeOfBuffer), (Buffer))\n' % (SetModeStatusName, DatumSizeLib, Pcd.TokenSpaceGuidCName, PcdTokenName)) else: AutoGenH.Append('// #define %s(Value) LibPcdSetEx%s(%s, %s, (Value))\n' % (SetModeName, DatumSizeLib, Pcd.TokenSpaceGuidCName, PcdTokenName)) AutoGenH.Append('// #define %s(Value) LibPcdSetEx%sS(%s, %s, (Value))\n' % (SetModeStatusName, DatumSizeLib, Pcd.TokenSpaceGuidCName, PcdTokenName)) else: AutoGenH.Append('#define %s %s\n' % (PcdTokenName, PcdExTokenName)) AutoGenH.Append('#define %s LibPcdGetEx%s(%s, %s)\n' % (GetModeName, DatumSizeLib, Pcd.TokenSpaceGuidCName, PcdTokenName)) +AutoGenH.Append('#define %s LibPcdGetExSize(%s,
[edk2] [Patch 2/6] BaseTools: Fix AutoGen issue for Patchable VOID* PCD.
Patchable VOID* PCD set operation should map LibPatchPcdSetPtr() and LibPatchPcdSetPtrS() API. This has been done when PCD is used in driver, but not done when PCD is used in library. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao liming@intel.com --- BaseTools/Source/Python/AutoGen/GenC.py | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py index d706574..c4d3307 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -1010,12 +1010,12 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd): AutoGenH.Append('extern %s %s %s%s;\n' % (Const, Pcd.DatumType, PcdVariableName, Array)) AutoGenH.Append('#define %s %s%s\n' % (GetModeName, Type, PcdVariableName)) if Pcd.Type == TAB_PCDS_PATCHABLE_IN_MODULE: if Pcd.DatumType == 'VOID*': -AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtr(_gPcd_BinaryPatch_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), (Buffer))\n' % (SetModeName, Pcd.TokenCName, Pcd.TokenCName)) -AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtrS(_gPcd_BinaryPatch_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), (Buffer))\n' % (SetModeStatusName, Pcd.TokenCName, Pcd.TokenCName)) +AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtr((VOID *)_gPcd_BinaryPatch_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), (Buffer))\n' % (SetModeName, Pcd.TokenCName, Pcd.TokenCName)) +AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtrS((VOID *)_gPcd_BinaryPatch_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), (Buffer))\n' % (SetModeStatusName, Pcd.TokenCName, Pcd.TokenCName)) else: AutoGenH.Append('#define %s(Value) (%s = (Value))\n' % (SetModeName, PcdVariableName)) AutoGenH.Append('#define %s(Value) ((%s = (Value)), RETURN_SUCCESS) \n' % (SetModeStatusName, PcdVariableName)) else: AutoGenH.Append('//#define %s ASSERT(FALSE) // It is not allowed to set value for a FIXED_AT_BUILD PCD\n' % SetModeName) @@ -1132,12 +1132,16 @@ def CreateLibraryPcdCode(Info, AutoGenC, AutoGenH, Pcd): 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) ) AutoGenH.Append('#define %s %s_gPcd_BinaryPatch_%s\n' %(GetModeName, Type, TokenCName)) -AutoGenH.Append('#define %s(Value) (%s = (Value))\n' % (SetModeName, PcdVariableName)) -AutoGenH.Append('#define %s(Value) ((%s = (Value)), RETURN_SUCCESS)\n' % (SetModeStatusName, PcdVariableName)) +if Pcd.DatumType == 'VOID*': +AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtr((VOID *)_gPcd_BinaryPatch_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), (Buffer))\n' % (SetModeName, Pcd.TokenCName, Pcd.TokenCName)) +AutoGenH.Append('#define %s(SizeOfBuffer, Buffer) LibPatchPcdSetPtrS((VOID *)_gPcd_BinaryPatch_%s, (UINTN)_PCD_PATCHABLE_%s_SIZE, (SizeOfBuffer), (Buffer))\n' % (SetModeStatusName, Pcd.TokenCName, Pcd.TokenCName)) +else: +AutoGenH.Append('#define %s(Value) (%s = (Value))\n' % (SetModeName, PcdVariableName)) +AutoGenH.Append('#define %s(Value) ((%s = (Value)), RETURN_SUCCESS)\n' % (SetModeStatusName, PcdVariableName)) PcdDataSize = GetPcdSize(Pcd) AutoGenH.Append('#define %s %s\n' % (PatchPcdSizeTokenName, PcdDataSize)) AutoGenH.Append('#define %s %s\n' % (GetModeSizeName,PatchPcdSizeVariableName)) AutoGenH.Append('extern UINTN %s; \n' % PatchPcdSizeVariableName) -- 1.9.5.msysgit.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [Patch] BaseTools: Add /arch:IA32 option in VS2012 and VS2013
VS2012 and VS2013 turn on optimizations by default that generate the use of CMOV instruction. This is a change from previous version VS2008. This means when you build with VS2012 or VS2013, it will generate UD exceptions on Quark. To resolve it, add /arch:IA32 options to not use enhanced instructions. https://msdn.microsoft.com/en-us/library/7t5yh4fd(v=vs.140).aspx Update the default options of VS2012 VS2013 tool chain IA32 arch in BaseTools\Conf\tools_def.template to make sure the generated Quark compatibility driver. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao liming@intel.com CC: Michael Kinney michael.d.kin...@intel.com --- BaseTools/Conf/tools_def.template | 48 +++ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 859fbe1..7f697bf 100644 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -2641,13 +2641,13 @@ NOOPT_VS2010x86xASL_IPF_DLINK_FLAGS= /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:R *_VS2012_IA32_ASLCC_PATH = DEF(VS2012_BIN)\cl.exe *_VS2012_IA32_ASLPP_PATH = DEF(VS2012_BIN)\cl.exe *_VS2012_IA32_ASLDLINK_PATH = DEF(VS2012_BIN)\link.exe *_VS2012_IA32_MAKE_FLAGS= /nologo - DEBUG_VS2012_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm -RELEASE_VS2012_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF -NOOPT_VS2012_IA32_CC_FLAGS= /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Od + DEBUG_VS2012_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm +RELEASE_VS2012_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF +NOOPT_VS2012_IA32_CC_FLAGS= /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Od DEBUG_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi RELEASE_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd NOOPT_VS2012_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi @@ -2759,13 +2759,13 @@ NOOPT_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT *_VS2012xASL_IA32_ASLCC_PATH= DEF(VS2012_BIN)\cl.exe *_VS2012xASL_IA32_ASLPP_PATH= DEF(VS2012_BIN)\cl.exe *_VS2012xASL_IA32_ASLDLINK_PATH = DEF(VS2012_BIN)\link.exe *_VS2012xASL_IA32_MAKE_FLAGS = /nologo - DEBUG_VS2012xASL_IA32_CC_FLAGS= /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm -RELEASE_VS2012xASL_IA32_CC_FLAGS= /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF -NOOPT_VS2012xASL_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Od + DEBUG_VS2012xASL_IA32_CC_FLAGS= /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm +RELEASE_VS2012xASL_IA32_CC_FLAGS= /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF +NOOPT_VS2012xASL_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Od DEBUG_VS2012xASL_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi RELEASE_VS2012xASL_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd NOOPT_VS2012xASL_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi @@ -2875,13 +2875,13 @@ NOOPT_VS2012xASL_X64_DLINK_FLAGS= /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:RE *_VS2012x86_IA32_APP_PATH = DEF(VS2012x86_BIN)\cl.exe *_VS2012x86_IA32_PP_PATH = DEF(VS2012x86_BIN)\cl.exe *_VS2012x86_IA32_ASM_PATH = DEF(VS2012x86_BIN)\ml.exe *_VS2012x86_IA32_MAKE_FLAGS = /nologo - DEBUG_VS2012x86_IA32_CC_FLAGS= /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm -RELEASE_VS2012x86_IA32_CC_FLAGS= /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF -NOOPT_VS2012x86_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Od + DEBUG_VS2012x86_IA32_CC_FLAGS= /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm +RELEASE_VS2012x86_IA32_CC_FLAGS= /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF +NOOPT_VS2012x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Od DEBUG_VS2012x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi RELEASE_VS2012x86_IA32_ASM_FLAGS
[edk2] [PATCH v2] MdeModulePkg PeiCore: Add PCD to specify PEIM Shadow
v2 changelog: Check CurrentPeimHandle to check the matched PeimHandle. Add check point to ShadowPeiCore based on PCD. v1 changelog: PeiCore LoadImage always shadow itself and PEIM on normal boot after the physical memory is installed. On the emulator platform, the shadow may be not necessary. To support such usage, new PCD PcdShadowPeimOnBoot is introduced to specify whether loads PEIM in memory by default. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao liming@intel.com --- MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 21 +--- MdeModulePkg/Core/Pei/Image/Image.c | 33 ++ MdeModulePkg/Core/Pei/PeiMain.inf | 1 + MdeModulePkg/Core/Pei/PeiMain/PeiMain.c | 6 - MdeModulePkg/MdeModulePkg.dec | 7 ++ MdeModulePkg/MdeModulePkg.uni | Bin 166792 - 168226 bytes 6 files changed, 59 insertions(+), 9 deletions(-) diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c index 3a85502..46e990d 100644 --- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c @@ -695,10 +695,13 @@ PeiDispatcher ( for (Index1 = 0; Index1 = SaveCurrentFvCount; Index1++) { for (Index2 = 0; (Index2 PcdGet32 (PcdPeiCoreMaxPeimPerFv)) (Private-Fv[Index1].FvFileHandles[Index2] != NULL); Index2++) { if (Private-Fv[Index1].PeimState[Index2] == PEIM_STATE_REGISITER_FOR_SHADOW) { PeimFileHandle = Private-Fv[Index1].FvFileHandles[Index2]; + Private-CurrentFileHandle = PeimFileHandle; + Private-CurrentPeimFvCount = Index1; + Private-CurrentPeimCount= Index2; Status = PeiLoadImage ( (CONST EFI_PEI_SERVICES **) Private-Ps, PeimFileHandle, PEIM_STATE_REGISITER_FOR_SHADOW, EntryPoint, @@ -707,13 +710,10 @@ PeiDispatcher ( if (Status == EFI_SUCCESS) { // // PEIM_STATE_REGISITER_FOR_SHADOW move to PEIM_STATE_DONE // Private-Fv[Index1].PeimState[Index2]++; -Private-CurrentFileHandle = PeimFileHandle; -Private-CurrentPeimFvCount = Index1; -Private-CurrentPeimCount= Index2; // // Call the PEIM entry point // PeimEntryPoint = (EFI_PEIM_ENTRY_POINT2)(UINTN)EntryPoint; @@ -1106,10 +1106,25 @@ PeiDispatcher ( // // If memory is availble we shadow images by default for performance reasons. // We call the entry point a 2nd time so the module knows it's shadowed. // //PERF_START (PeiServices, LPEIM, PeimFileHandle, 0); + if ((Private-HobList.HandoffInformationTable-BootMode != BOOT_ON_S3_RESUME) !PcdGetBool (PcdShadowPeimOnBoot)) { +// +// Load PEIM into Memory for Register for shadow PEIM. +// +Status = PeiLoadImage ( + PeiServices, + PeimFileHandle, + PEIM_STATE_REGISITER_FOR_SHADOW, + EntryPoint, + AuthenticationState + ); +if (Status == EFI_SUCCESS) { + PeimEntryPoint = (EFI_PEIM_ENTRY_POINT2)(UINTN)EntryPoint; +} + } ASSERT (PeimEntryPoint != NULL); PeimEntryPoint (PeimFileHandle, (const EFI_PEI_SERVICES **) PeiServices); //PERF_END (PeiServices, LPEIM, PeimFileHandle, 0); // diff --git a/MdeModulePkg/Core/Pei/Image/Image.c b/MdeModulePkg/Core/Pei/Image/Image.c index cab08fe..9c54192 100644 --- a/MdeModulePkg/Core/Pei/Image/Image.c +++ b/MdeModulePkg/Core/Pei/Image/Image.c @@ -1,9 +1,9 @@ /** @file Pei Core Load Image Support -Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.BR +Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.BR 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 @@ -115,11 +115,12 @@ GetImageReadFunction ( PEI_CORE_INSTANCE *Private; VOID* MemoryBuffer; Private = PEI_CORE_INSTANCE_FROM_PS_THIS (GetPeiServicesTablePointer ()); - if (Private-PeiMemoryInstalled ((Private-HobList.HandoffInformationTable-BootMode != BOOT_ON_S3_RESUME) || PcdGetBool (PcdShadowPeimOnS3Boot)) + if (Private-PeiMemoryInstalled (((Private-HobList.HandoffInformationTable-BootMode != BOOT_ON_S3_RESUME) PcdGetBool (PcdShadowPeimOnBoot)) || + ((Private-HobList.HandoffInformationTable
[edk2] [Patch] MdeModulePkg PeiCore: Add PCD to specify PEIM Shadow
PeiCore LoadImage always shadow itself and PEIM on normal boot after the physical memory is installed. On the emulator platform, the shadow may be not necessary. To support such usage, new PCD PcdShadowPeimOnBoot is introduced to specify whether loads PEIM in memory by default. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao liming@intel.com --- MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 21 ++--- MdeModulePkg/Core/Pei/Image/Image.c | 25 + MdeModulePkg/Core/Pei/PeiMain.inf | 1 + MdeModulePkg/MdeModulePkg.dec | 7 +++ MdeModulePkg/MdeModulePkg.uni | Bin 166792 - 168226 bytes 5 files changed, 47 insertions(+), 7 deletions(-) diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c index 3a85502..46e990d 100644 --- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c @@ -695,10 +695,13 @@ PeiDispatcher ( for (Index1 = 0; Index1 = SaveCurrentFvCount; Index1++) { for (Index2 = 0; (Index2 PcdGet32 (PcdPeiCoreMaxPeimPerFv)) (Private-Fv[Index1].FvFileHandles[Index2] != NULL); Index2++) { if (Private-Fv[Index1].PeimState[Index2] == PEIM_STATE_REGISITER_FOR_SHADOW) { PeimFileHandle = Private-Fv[Index1].FvFileHandles[Index2]; + Private-CurrentFileHandle = PeimFileHandle; + Private-CurrentPeimFvCount = Index1; + Private-CurrentPeimCount= Index2; Status = PeiLoadImage ( (CONST EFI_PEI_SERVICES **) Private-Ps, PeimFileHandle, PEIM_STATE_REGISITER_FOR_SHADOW, EntryPoint, @@ -707,13 +710,10 @@ PeiDispatcher ( if (Status == EFI_SUCCESS) { // // PEIM_STATE_REGISITER_FOR_SHADOW move to PEIM_STATE_DONE // Private-Fv[Index1].PeimState[Index2]++; -Private-CurrentFileHandle = PeimFileHandle; -Private-CurrentPeimFvCount = Index1; -Private-CurrentPeimCount= Index2; // // Call the PEIM entry point // PeimEntryPoint = (EFI_PEIM_ENTRY_POINT2)(UINTN)EntryPoint; @@ -1106,10 +1106,25 @@ PeiDispatcher ( // // If memory is availble we shadow images by default for performance reasons. // We call the entry point a 2nd time so the module knows it's shadowed. // //PERF_START (PeiServices, LPEIM, PeimFileHandle, 0); + if ((Private-HobList.HandoffInformationTable-BootMode != BOOT_ON_S3_RESUME) !PcdGetBool (PcdShadowPeimOnBoot)) { +// +// Load PEIM into Memory for Register for shadow PEIM. +// +Status = PeiLoadImage ( + PeiServices, + PeimFileHandle, + PEIM_STATE_REGISITER_FOR_SHADOW, + EntryPoint, + AuthenticationState + ); +if (Status == EFI_SUCCESS) { + PeimEntryPoint = (EFI_PEIM_ENTRY_POINT2)(UINTN)EntryPoint; +} + } ASSERT (PeimEntryPoint != NULL); PeimEntryPoint (PeimFileHandle, (const EFI_PEI_SERVICES **) PeiServices); //PERF_END (PeiServices, LPEIM, PeimFileHandle, 0); // diff --git a/MdeModulePkg/Core/Pei/Image/Image.c b/MdeModulePkg/Core/Pei/Image/Image.c index cab08fe..865c92e 100644 --- a/MdeModulePkg/Core/Pei/Image/Image.c +++ b/MdeModulePkg/Core/Pei/Image/Image.c @@ -1,9 +1,9 @@ /** @file Pei Core Load Image Support -Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.BR +Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.BR 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 @@ -115,11 +115,12 @@ GetImageReadFunction ( PEI_CORE_INSTANCE *Private; VOID* MemoryBuffer; Private = PEI_CORE_INSTANCE_FROM_PS_THIS (GetPeiServicesTablePointer ()); - if (Private-PeiMemoryInstalled ((Private-HobList.HandoffInformationTable-BootMode != BOOT_ON_S3_RESUME) || PcdGetBool (PcdShadowPeimOnS3Boot)) + if (Private-PeiMemoryInstalled (((Private-HobList.HandoffInformationTable-BootMode != BOOT_ON_S3_RESUME) PcdGetBool (PcdShadowPeimOnBoot)) || + ((Private-HobList.HandoffInformationTable-BootMode == BOOT_ON_S3_RESUME) PcdGetBool (PcdShadowPeimOnS3Boot))) (EFI_IMAGE_MACHINE_TYPE_SUPPORTED(EFI_IMAGE_MACHINE_X64) || EFI_IMAGE_MACHINE_TYPE_SUPPORTED(EFI_IMAGE_MACHINE_IA32