Re: [PATCH 1/5] MdeModulePkg/CapsulePei: clean Dcache before consuming capsule data
Ard Biesheuvel
On 8 June 2018 at 04:53, Zeng, Star <star.zeng@...> wrote:
I suggest to use goto/adjust code to have one place for both paths to perform cache maintenance (with comments).Something like this? @@ -253,6 +254,7 @@ ValidateCapsuleByMemoryResource ( ) { UINTN Index; + BOOLEAN Found; // // Sanity Check @@ -274,19 +276,32 @@ ValidateCapsuleByMemoryResource ( // // No memory resource descriptor reported in HOB list before capsule Coalesce. // - return TRUE; + Found = TRUE; + } else { + Found = FALSE; } - for (Index = 0; MemoryResource[Index].ResourceLength != 0; Index++) { + for (Index = 0; !Found && MemoryResource[Index].ResourceLength != 0; Index++) { if ((Address >= MemoryResource[Index].PhysicalStart) && ((Address + Size) <= (MemoryResource[Index].PhysicalStart + MemoryResource[Index].ResourceLength))) { DEBUG ((EFI_D_INFO, "Address(0x%lx) Size(0x%lx) in MemoryResource[0x%x] - Start(0x%lx) Length(0x%lx)\n", Address, Size, Index, MemoryResource[Index].PhysicalStart, MemoryResource[Index].ResourceLength)); - return TRUE; + Found = TRUE; } } + if (Found) { + // + // At this point, we may still be running with the MMU and caches disabled, + // and on architectures such as ARM or AARCH64, capsule [meta]data loaded + // into memory with the caches on is only guaranteed to be visible to the + // CPU running with the caches off after performing an explicit writeback. + // + WriteBackDataCacheRange ((VOID *)(UINTN)Address, (UINTN)Size); + return TRUE; + } + DEBUG ((EFI_D_ERROR, "ERROR: Address(0x%lx) Size(0x%lx) not in any MemoryResource\n", Address, Size)); return FALSE; }
|
|
Re: [PATCH] CorebootModulePkg/CbSupportDxe: Remove SCI_EN setting
Benjamin You
Hi Matt,
toggle quoted messageShow quoted text
Thanks. I've submitted patch v2 based on your feedbacks. - ben
From: Matt Delco [mailto:delco@...]
|
|
[PATCH v2] CorebootModulePkg/CbSupportDxe: Remove SCI_EN setting
Benjamin You
Current implemenation sets PM1_CNT.SCI_EN bit at ReadyToBoot event.
However, this should not be done because this causes OS to skip triggering FADT.SMI_CMD, which leads to the functions implemented in the SMI handler being omitted. This issue was identified by Matt Delco <delco@...>. The fix does the following: - The SCI_EN bit setting is removed from CbSupportDxe driver. - Some additional checks are added in CbParseFadtInfo() in CbParseLib.c to output some error message and ASSERT (FALSE) if ALL of the following conditions are met: 1) HARDWARE_REDUCED_ACPI is not set; 2) SMI_CMD field is zero; 3) SCI_EN bit is zero; which indicates the ACPI enabling status is inconsistent: SCI is not enabled but the ACPI table does not provide a means to enable it through FADT->SMI_CMD. This may cause issues in OS. Cc: Maurice Ma <maurice.ma@...> Cc: Prince Agyeman <prince.agyeman@...> Cc: Matt Delco <delco@...> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Benjamin You <benjamin.you@...> --- CorebootModulePkg/CbSupportDxe/CbSupportDxe.c | 51 ---------------------- CorebootModulePkg/CbSupportDxe/CbSupportDxe.inf | 1 - CorebootModulePkg/Library/CbParseLib/CbParseLib.c | 34 +++++++++++++++ .../Library/CbParseLib/CbParseLib.inf | 3 +- 4 files changed, 36 insertions(+), 53 deletions(-) diff --git a/CorebootModulePkg/CbSupportDxe/CbSupportDxe.c b/CorebootModulePkg/CbSupportDxe/CbSupportDxe.c index c526c9e871..ec42f7ff35 100755 --- a/CorebootModulePkg/CbSupportDxe/CbSupportDxe.c +++ b/CorebootModulePkg/CbSupportDxe/CbSupportDxe.c @@ -14,7 +14,6 @@ **/ #include "CbSupportDxe.h" -UINTN mPmCtrlReg = 0; /** Reserve MMIO/IO resource in GCD @@ -86,31 +85,6 @@ CbReserveResourceInGcd ( return Status; } -/** - Notification function of EVT_GROUP_READY_TO_BOOT event group. - - This is a notification function registered on EVT_GROUP_READY_TO_BOOT event group. - When the Boot Manager is about to load and execute a boot option, it reclaims variable - storage if free size is below the threshold. - - @param Event Event whose notification function is being invoked. - @param Context Pointer to the notification function's context. - -**/ -VOID -EFIAPI -OnReadyToBoot ( - IN EFI_EVENT Event, - IN VOID *Context - ) -{ - // - // Enable SCI - // - IoOr16 (mPmCtrlReg, BIT0); - - DEBUG ((EFI_D_ERROR, "Enable SCI bit at 0x%lx before boot\n", (UINT64)mPmCtrlReg)); -} /** Main entry for the Coreboot Support DXE module. @@ -130,10 +104,8 @@ CbDxeEntryPoint ( ) { EFI_STATUS Status; - EFI_EVENT ReadyToBootEvent; EFI_HOB_GUID_TYPE *GuidHob; SYSTEM_TABLE_INFO *pSystemTableInfo; - ACPI_BOARD_INFO *pAcpiBoardInfo; FRAME_BUFFER_INFO *FbInfo; Status = EFI_SUCCESS; @@ -171,16 +143,6 @@ CbDxeEntryPoint ( ASSERT_EFI_ERROR (Status); } - // - // Find the acpi board information guid hob - // - GuidHob = GetFirstGuidHob (&gUefiAcpiBoardInfoGuid); - ASSERT (GuidHob != NULL); - pAcpiBoardInfo = (ACPI_BOARD_INFO *)GET_GUID_HOB_DATA (GuidHob); - - mPmCtrlReg = (UINTN)pAcpiBoardInfo->PmCtrlRegBase; - DEBUG ((EFI_D_ERROR, "PmCtrlReg at 0x%lx\n", (UINT64)mPmCtrlReg)); - // // Find the frame buffer information and update PCDs // @@ -197,19 +159,6 @@ CbDxeEntryPoint ( ASSERT_EFI_ERROR (Status); } - // - // Register callback on the ready to boot event - // in order to enable SCI - // - ReadyToBootEvent = NULL; - Status = EfiCreateEventReadyToBootEx ( - TPL_CALLBACK, - OnReadyToBoot, - NULL, - &ReadyToBootEvent - ); - ASSERT_EFI_ERROR (Status); - return EFI_SUCCESS; } diff --git a/CorebootModulePkg/CbSupportDxe/CbSupportDxe.inf b/CorebootModulePkg/CbSupportDxe/CbSupportDxe.inf index 99245183ea..15b0dac774 100644 --- a/CorebootModulePkg/CbSupportDxe/CbSupportDxe.inf +++ b/CorebootModulePkg/CbSupportDxe/CbSupportDxe.inf @@ -46,7 +46,6 @@ DebugLib BaseMemoryLib UefiLib - IoLib HobLib [Guids] diff --git a/CorebootModulePkg/Library/CbParseLib/CbParseLib.c b/CorebootModulePkg/Library/CbParseLib/CbParseLib.c index 0909b0f492..da227dea5e 100644 --- a/CorebootModulePkg/Library/CbParseLib/CbParseLib.c +++ b/CorebootModulePkg/Library/CbParseLib/CbParseLib.c @@ -18,6 +18,7 @@ #include <Library/BaseMemoryLib.h> #include <Library/DebugLib.h> #include <Library/PcdLib.h> +#include <Library/IoLib.h> #include <Library/CbParseLib.h> #include <IndustryStandard/Acpi.h> @@ -477,6 +478,39 @@ CbParseFadtInfo ( ASSERT(Fadt->Pm1aEvtBlk != 0); ASSERT(Fadt->Gpe0Blk != 0); + DEBUG_CODE_BEGIN (); + BOOLEAN SciEnabled; + + // + // Check the consistency of SCI enabling + // + + // + // Get SCI_EN value + // + if (Fadt->Pm1CntLen == 4) { + SciEnabled = (IoRead32 (Fadt->Pm1aCntBlk) & BIT0)? TRUE : FALSE; + } else { + // + // if (Pm1CntLen == 2), use 16 bit IO read; + // if (Pm1CntLen != 2 && Pm1CntLen != 4), use 16 bit IO read as a fallback + // + SciEnabled = (IoRead16 (Fadt->Pm1aCntBlk) & BIT0)? TRUE : FALSE; + } + + if (!(Fadt->Flags & EFI_ACPI_5_0_HW_REDUCED_ACPI) && + (Fadt->SmiCmd == 0) && + !SciEnabled) { + // + // The ACPI enabling status is inconsistent: SCI is not enabled but ACPI + // table does not provide a means to enable it through FADT->SmiCmd + // + DEBUG ((DEBUG_ERROR, "ERROR: The ACPI enabling status is inconsistent: SCI is not" + " enabled but the ACPI table does not provide a means to enable it through FADT->SmiCmd." + " This may cause issues in OS.\n")); + ASSERT (FALSE); + } + DEBUG_CODE_END (); return RETURN_SUCCESS; } } diff --git a/CorebootModulePkg/Library/CbParseLib/CbParseLib.inf b/CorebootModulePkg/Library/CbParseLib/CbParseLib.inf index d7146a415b..25b847946c 100644 --- a/CorebootModulePkg/Library/CbParseLib/CbParseLib.inf +++ b/CorebootModulePkg/Library/CbParseLib/CbParseLib.inf @@ -37,7 +37,8 @@ [LibraryClasses] BaseLib BaseMemoryLib - DebugLib + IoLib + DebugLib PcdLib [Pcd] -- 2.14.3.windows.1
|
|
Re: [PATCH v2] BaseTools/GenFw: Add X64 GOTPCREL Support to GenFw
Zenith,
toggle quoted messageShow quoted text
Stupid question, I'm not trying to derail the code review..... In a static lib world like EFI, I can't figure out why we need support for GOT PC REL addressing modes? I say that as I would think they would be relocation entries in object files, and then the final link would happen and these relocation types would not be required in the final executable? Seems like the linker, at link time, would know the relative offset for all the static libraries that got linked together (edk2 build) and there is no need for a relocation. So I want to make sure this is not an issue caused by the wrong linker flags (emitting relocation for dynamic libs that is not supported in EF)? I'll freely admit there could be some circumstances I don't understand that require this support, but I just want to make sure we understand why we need to do it. Or maybe I'm missing something fundamental? Thanks, Andrew Fish
On Jun 7, 2018, at 5:49 AM, Zenith432 <zenith432@...> wrote:
|
|
Re: [Patch] BaseTools: Fix Section header size larger than elf file size bug
Liming Gao
Reviewed-by: Liming Gao <liming.gao@...>
toggle quoted messageShow quoted text
-----Original Message-----
|
|
Re: [Patch] BaseTools: Check elf sections alignment with MAX_COFF_ALIGNMENT
Liming Gao
Reviewed-by: Liming Gao <liming.gao@...>
toggle quoted messageShow quoted text
-----Original Message-----
|
|
Re: [PATCH] MdeModulePkg/EmmcDxe: demote DEBUG print to DEBUG_BLKIO
Zeng, Star <star.zeng@...>
Good patch.
toggle quoted messageShow quoted text
Another choice is to use DEBUG_VERBOSE. We see other driver uses DEBUG_VERBOSE for BlockIo service (Hao can comment on that). We'd better to align them for consistency. Thanks, Star
-----Original Message-----
From: Laszlo Ersek [mailto:lersek@...] Sent: Friday, June 8, 2018 1:23 AM To: Ard Biesheuvel <ard.biesheuvel@...>; edk2-devel@... Cc: Zeng, Star <star.zeng@...> Subject: Re: [edk2] [PATCH] MdeModulePkg/EmmcDxe: demote DEBUG print to DEBUG_BLKIO On 06/07/18 11:10, Ard Biesheuvel wrote: Lower the priority of the DEBUG print in EmmcReadWrite(), which isReviewed-by: Laszlo Ersek <lersek@...>
|
|
Re: [PATCH 2/5] MdeModulePkg/DxeCapsuleLibFmp: permit ProcessCapsules () to be called once
Zeng, Star <star.zeng@...>
Without the patch, PopulateCapsuleInConfigurationTable is only run at first round.
toggle quoted messageShow quoted text
With the patch, PopulateCapsuleInConfigurationTable is only run at last round. Is that expected? Jiewen, could you help check whether the patch meets the original design purpose or any security concern? Thanks, Star
-----Original Message-----
From: Ard Biesheuvel [mailto:ard.biesheuvel@...] Sent: Thursday, June 7, 2018 7:08 PM To: edk2-devel@... Cc: leif.lindholm@...; Kinney, Michael D <michael.d.kinney@...>; Yao, Jiewen <jiewen.yao@...>; Zeng, Star <star.zeng@...>; Ard Biesheuvel <ard.biesheuvel@...> Subject: [PATCH 2/5] MdeModulePkg/DxeCapsuleLibFmp: permit ProcessCapsules () to be called once Permit ProcessCapsules () to be called only a single time, after EndOfDxe. This allows platforms that are able to update system firmware after EndOfDxe (e.g., because the flash ROM is not locked down) to do so at a time when a non-trusted console is up and running, and progress can be reported to the user. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@...> --- MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleProcessLib.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleProcessLib.c b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleProcessLib.c index 26ca4e295f20..52691fa68be4 100644 --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleProcessLib.c +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleProcessLib.c @@ -100,6 +100,7 @@ IsValidCapsuleHeader ( extern BOOLEAN mDxeCapsuleLibEndOfDxe; BOOLEAN mNeedReset; +BOOLEAN mFirstRound = TRUE; VOID **mCapsulePtr; EFI_STATUS *mCapsuleStatusArray; @@ -364,8 +365,10 @@ PopulateCapsuleInConfigurationTable ( Each individual capsule result is recorded in capsule record variable. - @param[in] FirstRound TRUE: First round. Need skip the FMP capsules with non zero EmbeddedDriverCount. - FALSE: Process rest FMP capsules. + @param[in] LastRound FALSE: First of multiple rounds. Need skip the + FMP capsules with non zero + EmbeddedDriverCount. + TRUE: Process rest FMP capsules. @retval EFI_SUCCESS There is no error when processing capsules. @retval EFI_OUT_OF_RESOURCES No enough resource to process capsules. @@ -373,7 +376,7 @@ PopulateCapsuleInConfigurationTable ( **/ EFI_STATUS ProcessTheseCapsules ( - IN BOOLEAN FirstRound + IN BOOLEAN LastRound ) { EFI_STATUS Status; @@ -384,8 +387,9 @@ ProcessTheseCapsules ( REPORT_STATUS_CODE(EFI_PROGRESS_CODE, (EFI_SOFTWARE | PcdGet32(PcdStatusCodeSubClassCapsule) | PcdGet32(PcdCapsuleStatusCodeProcessCapsulesBegin))); - if (FirstRound) { + if (mFirstRound) { InitCapsulePtr (); + mFirstRound = FALSE; } if (mCapsuleTotalNumber == 0) { @@ -404,7 +408,7 @@ ProcessTheseCapsules ( // Check the capsule flags,if contains CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE, install // capsuleTable to configure table with EFI_CAPSULE_GUID // - if (FirstRound) { + if (LastRound) { PopulateCapsuleInConfigurationTable (); } @@ -453,7 +457,7 @@ ProcessTheseCapsules ( continue; } - if ((!FirstRound) || (EmbeddedDriverCount == 0)) { + if (LastRound || (EmbeddedDriverCount == 0)) { DEBUG((DEBUG_INFO, "ProcessCapsuleImage - 0x%x\n", CapsuleHeader)); Status = ProcessCapsuleImage (CapsuleHeader); mCapsuleStatusArray [Index] = Status; @@ -546,7 +550,7 @@ ProcessCapsules ( EFI_STATUS Status; if (!mDxeCapsuleLibEndOfDxe) { - Status = ProcessTheseCapsules(TRUE); + Status = ProcessTheseCapsules(FALSE); // // Reboot System if and only if all capsule processed. @@ -556,7 +560,7 @@ ProcessCapsules ( DoResetSystem(); } } else { - Status = ProcessTheseCapsules(FALSE); + Status = ProcessTheseCapsules(TRUE); // // Reboot System if required after all capsule processed // -- 2.17.0
|
|
Re: [PATCH 1/5] MdeModulePkg/CapsulePei: clean Dcache before consuming capsule data
Zeng, Star <star.zeng@...>
I suggest to use goto/adjust code to have one place for both paths to perform cache maintenance (with comments).
toggle quoted messageShow quoted text
Thanks, Star
-----Original Message-----
From: Ard Biesheuvel [mailto:ard.biesheuvel@...] Sent: Thursday, June 7, 2018 7:08 PM To: edk2-devel@... Cc: leif.lindholm@...; Kinney, Michael D <michael.d.kinney@...>; Yao, Jiewen <jiewen.yao@...>; Zeng, Star <star.zeng@...>; Ard Biesheuvel <ard.biesheuvel@...> Subject: [PATCH 1/5] MdeModulePkg/CapsulePei: clean Dcache before consuming capsule data When capsule updates are staged for processing after a warm reboot, they are copied into memory with the MMU and caches enabled. When the capsule PEI gets around to coalescing the capsule, the MMU and caches may still be disabled, and so on architectures where uncached accesses are incoherent with the caches (such as ARM and AARCH64), we may read stale data if we don't clean the caches to memory first. Note that this cache maintenance cannot be done during the invocation of UpdateCapsule(), since the ScatterGatherList structures are only identified by physical address, and at runtime, the firmware doesn't know whether and where this memory is mapped, and cache maintenance requires a virtual address. Reviewed-by: Jiewen Yao <jiewen.yao@...> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@...> --- MdeModulePkg/Universal/CapsulePei/CapsulePei.inf | 1 + MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/MdeModulePkg/Universal/CapsulePei/CapsulePei.inf b/MdeModulePkg/Universal/CapsulePei/CapsulePei.inf index c54bc21a95a8..594e110d1f8a 100644 --- a/MdeModulePkg/Universal/CapsulePei/CapsulePei.inf +++ b/MdeModulePkg/Universal/CapsulePei/CapsulePei.inf @@ -48,6 +48,7 @@ [Packages] [LibraryClasses] BaseLib + CacheMaintenanceLib HobLib BaseMemoryLib PeiServicesLib diff --git a/MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c b/MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c index 3e7054cd38a9..fb59f338f100 100644 --- a/MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c +++ b/MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c @@ -27,6 +27,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Guid/CapsuleVendor.h> #include <Library/BaseMemoryLib.h> +#include <Library/CacheMaintenanceLib.h> #include <Library/DebugLib.h> #include <Library/PrintLib.h> #include <Library/BaseLib.h> @@ -274,6 +275,7 @@ ValidateCapsuleByMemoryResource ( // // No memory resource descriptor reported in HOB list before capsule Coalesce. // + WriteBackDataCacheRange ((VOID *)(UINTN)Address, (UINTN)Size); return TRUE; } @@ -283,6 +285,14 @@ ValidateCapsuleByMemoryResource ( DEBUG ((EFI_D_INFO, "Address(0x%lx) Size(0x%lx) in MemoryResource[0x%x] - Start(0x%lx) Length(0x%lx)\n", Address, Size, Index, MemoryResource[Index].PhysicalStart, MemoryResource[Index].ResourceLength)); + + // + // At this point, we may still be running with the MMU and caches disabled, + // and on architectures such as ARM or AARCH64, capsule [meta]data loaded + // into memory with the caches on is only guaranteed to be visible to the + // CPU running with the caches off after performing an explicit writeback. + // + WriteBackDataCacheRange ((VOID *)(UINTN)Address, (UINTN)Size); return TRUE; } } -- 2.17.0
|
|
[Patch] BaseTools/UPT: Update the import statement to use StringUtils
Yonghong Zhu <yonghong.zhu@...>
The patch 5a57246eab80 Rename String to StringUtils, but it didn't
update the UPT Tool for the import statement which cause UPT tool break. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@...> --- BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py | 4 ++-- BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py | 6 +++--- BaseTools/Source/Python/UPT/Library/CommentGenerating.py | 4 ++-- BaseTools/Source/Python/UPT/Library/CommentParsing.py | 6 +++--- BaseTools/Source/Python/UPT/Library/Misc.py | 4 ++-- BaseTools/Source/Python/UPT/Library/ParserValidate.py | 4 ++-- BaseTools/Source/Python/UPT/Library/Parsing.py | 14 +++++++------- BaseTools/Source/Python/UPT/Library/StringUtils.py | 4 ++-- BaseTools/Source/Python/UPT/Library/UniClassObject.py | 2 +- .../Source/Python/UPT/Object/Parser/InfDefineObject.py | 4 ++-- BaseTools/Source/Python/UPT/Object/Parser/InfPcdObject.py | 6 +++--- BaseTools/Source/Python/UPT/Parser/DecParser.py | 10 +++++----- BaseTools/Source/Python/UPT/Parser/InfAsBuiltProcess.py | 4 ++-- BaseTools/Source/Python/UPT/Parser/InfParser.py | 6 +++--- BaseTools/Source/Python/UPT/Parser/InfParserMisc.py | 6 +++--- BaseTools/Source/Python/UPT/Parser/InfPcdSectionParser.py | 4 ++-- BaseTools/Source/Python/UPT/Parser/InfSectionParser.py | 4 ++-- BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py | 10 +++++----- .../Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py | 4 ++-- .../Python/UPT/UnitTest/CommentGeneratingUnitTest.py | 4 ++-- .../Source/Python/UPT/UnitTest/CommentParsingUnitTest.py | 4 ++-- BaseTools/Source/Python/UPT/Xml/CommonXml.py | 10 +++++----- BaseTools/Source/Python/UPT/Xml/GuidProtocolPpiXml.py | 8 ++++---- BaseTools/Source/Python/UPT/Xml/IniToXml.py | 4 ++-- BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py | 10 +++++----- BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py | 4 ++-- BaseTools/Source/Python/UPT/Xml/PcdXml.py | 8 ++++---- 27 files changed, 79 insertions(+), 79 deletions(-) diff --git a/BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py b/BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py index d39c182..9397359 100644 --- a/BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py +++ b/BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py @@ -1,10 +1,10 @@ ## @file GenDecFile.py # # This file contained the logical of transfer package object to DEC files. # -# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2018, 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 @@ -63,11 +63,11 @@ from Library.DataType import TAB_PCD_ERROR from Library.DataType import TAB_SECTION_START from Library.DataType import TAB_SECTION_END from Library.DataType import TAB_SPLIT import Library.DataType as DT from Library.UniClassObject import FormatUniEntry -from Library.String import GetUniFileName +from Library.StringUtils import GetUniFileName def GenPcd(Package, Content): # # generate [Pcd] section # <TokenSpcCName>.<TokenCName>|<Value>|<DatumType>|<Token> diff --git a/BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py b/BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py index 9373a14..bfd422b 100644 --- a/BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py +++ b/BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py @@ -1,10 +1,10 @@ ## @file GenInfFile.py # # This file contained the logical of transfer package object to INF files. # -# Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2018, 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 @@ -18,11 +18,11 @@ GenInf import os import stat import codecs import md5 from Core.FileHook import __FileHookOpen__ -from Library.String import GetSplitValueList +from Library.StringUtils import GetSplitValueList from Library.Parsing import GenSection from Library.Parsing import GetWorkspacePackage from Library.Parsing import ConvertArchForInstall from Library.Misc import SaveFileOnChange from Library.Misc import IsAllModuleList @@ -39,11 +39,11 @@ from Logger import StringTable as ST from Logger import ToolError import Logger.Log as Logger from Library import DataType as DT from GenMetaFile import GenMetaFileMisc from Library.UniClassObject import FormatUniEntry -from Library.String import GetUniFileName +from Library.StringUtils import GetUniFileName ## Transfer Module Object to Inf files # # Transfer all contents of a standard Module Object to an Inf file diff --git a/BaseTools/Source/Python/UPT/Library/CommentGenerating.py b/BaseTools/Source/Python/UPT/Library/CommentGenerating.py index 9c6e3aa..ab1725f 100644 --- a/BaseTools/Source/Python/UPT/Library/CommentGenerating.py +++ b/BaseTools/Source/Python/UPT/Library/CommentGenerating.py @@ -1,9 +1,9 @@ ## @file # This file is used to define comment generating interface # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2018, 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 @@ -17,11 +17,11 @@ CommentGenerating ''' ## # Import Modules # -from Library.String import GetSplitValueList +from Library.StringUtils import GetSplitValueList from Library.DataType import TAB_SPACE_SPLIT from Library.DataType import TAB_INF_GUIDTYPE_VAR from Library.DataType import USAGE_ITEM_NOTIFY from Library.DataType import ITEM_UNDEFINED from Library.DataType import TAB_HEADER_COMMENT diff --git a/BaseTools/Source/Python/UPT/Library/CommentParsing.py b/BaseTools/Source/Python/UPT/Library/CommentParsing.py index 38f7012..4713614 100644 --- a/BaseTools/Source/Python/UPT/Library/CommentParsing.py +++ b/BaseTools/Source/Python/UPT/Library/CommentParsing.py @@ -1,9 +1,9 @@ ## @file # This file is used to define comment parsing interface # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2018, 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 @@ -19,12 +19,12 @@ CommentParsing ## # Import Modules # import re -from Library.String import GetSplitValueList -from Library.String import CleanString2 +from Library.StringUtils import GetSplitValueList +from Library.StringUtils import CleanString2 from Library.DataType import HEADER_COMMENT_NOT_STARTED from Library.DataType import TAB_COMMENT_SPLIT from Library.DataType import HEADER_COMMENT_LICENSE from Library.DataType import HEADER_COMMENT_ABSTRACT from Library.DataType import HEADER_COMMENT_COPYRIGHT diff --git a/BaseTools/Source/Python/UPT/Library/Misc.py b/BaseTools/Source/Python/UPT/Library/Misc.py index 719445b..e16d309 100644 --- a/BaseTools/Source/Python/UPT/Library/Misc.py +++ b/BaseTools/Source/Python/UPT/Library/Misc.py @@ -1,9 +1,9 @@ ## @file # Common routines used by all tools # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2018, 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 @@ -43,11 +43,11 @@ from Library.DataType import END_OF_LINE from Library.DataType import TAB_SPLIT from Library.DataType import TAB_LANGUAGE_EN_US from Library.DataType import TAB_LANGUAGE_EN from Library.DataType import TAB_LANGUAGE_EN_X from Library.DataType import TAB_UNI_FILE_SUFFIXS -from Library.String import GetSplitValueList +from Library.StringUtils import GetSplitValueList from Library.ParserValidate import IsValidHexVersion from Library.ParserValidate import IsValidPath from Object.POM.CommonObject import TextObject from Core.FileHook import __FileHookOpen__ from Common.MultipleWorkspace import MultipleWorkspace as mws diff --git a/BaseTools/Source/Python/UPT/Library/ParserValidate.py b/BaseTools/Source/Python/UPT/Library/ParserValidate.py index 2def90a..3f8ca9d 100644 --- a/BaseTools/Source/Python/UPT/Library/ParserValidate.py +++ b/BaseTools/Source/Python/UPT/Library/ParserValidate.py @@ -1,9 +1,9 @@ ## @file ParserValidate.py # Functions for parser validation # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2018, 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 @@ -22,11 +22,11 @@ import platform from Library.DataType import MODULE_LIST from Library.DataType import COMPONENT_TYPE_LIST from Library.DataType import PCD_USAGE_TYPE_LIST_OF_MODULE from Library.DataType import TAB_SPACE_SPLIT -from Library.String import GetSplitValueList +from Library.StringUtils import GetSplitValueList from Library.ExpressionValidate import IsValidBareCString from Library.ExpressionValidate import IsValidFeatureFlagExp from Common.MultipleWorkspace import MultipleWorkspace as mws ## __HexDigit() method diff --git a/BaseTools/Source/Python/UPT/Library/Parsing.py b/BaseTools/Source/Python/UPT/Library/Parsing.py index 791e064..22030e7 100644 --- a/BaseTools/Source/Python/UPT/Library/Parsing.py +++ b/BaseTools/Source/Python/UPT/Library/Parsing.py @@ -1,10 +1,10 @@ ## @file # This file is used to define common parsing related functions used in parsing # INF/DEC/DSC process # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2018, 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 @@ -21,16 +21,16 @@ Parsing # Import Modules # import os.path import re -from Library.String import RaiseParserError -from Library.String import GetSplitValueList -from Library.String import CheckFileType -from Library.String import CheckFileExist -from Library.String import CleanString -from Library.String import NormPath +from Library.StringUtils import RaiseParserError +from Library.StringUtils import GetSplitValueList +from Library.StringUtils import CheckFileType +from Library.StringUtils import CheckFileExist +from Library.StringUtils import CleanString +from Library.StringUtils import NormPath from Logger.ToolError import FILE_NOT_FOUND from Logger.ToolError import FatalError from Logger.ToolError import FORMAT_INVALID diff --git a/BaseTools/Source/Python/UPT/Library/StringUtils.py b/BaseTools/Source/Python/UPT/Library/StringUtils.py index b79891e..a7a7b86 100644 --- a/BaseTools/Source/Python/UPT/Library/StringUtils.py +++ b/BaseTools/Source/Python/UPT/Library/StringUtils.py @@ -1,21 +1,21 @@ ## @file # This file is used to define common string related functions used in parsing # process # -# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2018, 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 # # 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 +StringUtils ''' ## # Import Modules # import re diff --git a/BaseTools/Source/Python/UPT/Library/UniClassObject.py b/BaseTools/Source/Python/UPT/Library/UniClassObject.py index 66eefee..7dcf0cf 100644 --- a/BaseTools/Source/Python/UPT/Library/UniClassObject.py +++ b/BaseTools/Source/Python/UPT/Library/UniClassObject.py @@ -21,11 +21,11 @@ Collect all defined strings in multiple uni files import os, codecs, re import distutils.util from Logger import ToolError from Logger import Log as EdkLogger from Logger import StringTable as ST -from Library.String import GetLineNo +from Library.StringUtils import GetLineNo from Library.Misc import PathClass from Library.Misc import GetCharIndexOutStr from Library import DataType as DT from Library.ParserValidate import CheckUTF16FileHeader diff --git a/BaseTools/Source/Python/UPT/Object/Parser/InfDefineObject.py b/BaseTools/Source/Python/UPT/Object/Parser/InfDefineObject.py index bbc797f..3995546 100644 --- a/BaseTools/Source/Python/UPT/Object/Parser/InfDefineObject.py +++ b/BaseTools/Source/Python/UPT/Object/Parser/InfDefineObject.py @@ -1,10 +1,10 @@ ## @file # This file is used to define class objects of [Defines] section for INF file. # It will consumed by InfParser # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2018, 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 @@ -21,11 +21,11 @@ import re from Logger import StringTable as ST from Logger import ToolError from Library import GlobalData from Library import DataType as DT -from Library.String import GetSplitValueList +from Library.StringUtils import GetSplitValueList from Library.Misc import CheckGuidRegFormat from Library.Misc import Sdict from Library.Misc import ConvPathFromAbsToRel from Library.Misc import ValidateUNIFilePath from Library.ExpressionValidate import IsValidFeatureFlagExp diff --git a/BaseTools/Source/Python/UPT/Object/Parser/InfPcdObject.py b/BaseTools/Source/Python/UPT/Object/Parser/InfPcdObject.py index d2712a9..62c1e84 100644 --- a/BaseTools/Source/Python/UPT/Object/Parser/InfPcdObject.py +++ b/BaseTools/Source/Python/UPT/Object/Parser/InfPcdObject.py @@ -1,10 +1,10 @@ ## @file # This file is used to define class objects of INF file [Pcds] section. # It will consumed by InfParser. # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2018, 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 @@ -29,12 +29,12 @@ from Library.Misc import GetHelpStringByRemoveHashKey from Library.ParserValidate import IsValidPcdType from Library.ParserValidate import IsValidCVariableName from Library.ParserValidate import IsValidPcdValue from Library.ParserValidate import IsValidArch from Library.CommentParsing import ParseComment -from Library.String import GetSplitValueList -from Library.String import IsHexDigitUINT32 +from Library.StringUtils import GetSplitValueList +from Library.StringUtils import IsHexDigitUINT32 from Library.ExpressionValidate import IsValidFeatureFlagExp from Parser.InfAsBuiltProcess import GetPackageListInfo from Parser.DecParser import Dec from Object.Parser.InfPackagesObject import InfPackageItem diff --git a/BaseTools/Source/Python/UPT/Parser/DecParser.py b/BaseTools/Source/Python/UPT/Parser/DecParser.py index 85b8a17..7ac0dfa 100644 --- a/BaseTools/Source/Python/UPT/Parser/DecParser.py +++ b/BaseTools/Source/Python/UPT/Parser/DecParser.py @@ -1,9 +1,9 @@ ## @file # This file is used to parse DEC file. It will consumed by DecParser # -# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2018, 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 @@ -55,14 +55,14 @@ from Object.Parser.DecObject import DecUserExtensionObject from Object.Parser.DecObject import DecUserExtensionItemObject from Object.Parser.DecObject import DecPcdObject from Object.Parser.DecObject import DecPcdItemObject from Library.Misc import GuidStructureStringToGuidString from Library.Misc import CheckGuidRegFormat -from Library.String import ReplaceMacro -from Library.String import GetSplitValueList -from Library.String import gMACRO_PATTERN -from Library.String import ConvertSpecialChar +from Library.StringUtils import ReplaceMacro +from Library.StringUtils import GetSplitValueList +from Library.StringUtils import gMACRO_PATTERN +from Library.StringUtils import ConvertSpecialChar from Library.CommentParsing import ParsePcdErrorCode ## # _DecBase class for parsing # diff --git a/BaseTools/Source/Python/UPT/Parser/InfAsBuiltProcess.py b/BaseTools/Source/Python/UPT/Parser/InfAsBuiltProcess.py index 4eed04c..760f28a 100644 --- a/BaseTools/Source/Python/UPT/Parser/InfAsBuiltProcess.py +++ b/BaseTools/Source/Python/UPT/Parser/InfAsBuiltProcess.py @@ -1,9 +1,9 @@ ## @file # This file is used to provide method for process AsBuilt INF file. It will consumed by InfParser # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2018, 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 @@ -21,11 +21,11 @@ import re from Library import GlobalData import Logger.Log as Logger from Logger import StringTable as ST from Logger import ToolError -from Library.String import GetSplitValueList +from Library.StringUtils import GetSplitValueList from Library.Misc import GetHelpStringByRemoveHashKey from Library.Misc import ValidFile from Library.Misc import ProcessLineExtender from Library.ParserValidate import IsValidPath from Library.Parsing import MacroParser diff --git a/BaseTools/Source/Python/UPT/Parser/InfParser.py b/BaseTools/Source/Python/UPT/Parser/InfParser.py index 7bea49e..e6048a1 100644 --- a/BaseTools/Source/Python/UPT/Parser/InfParser.py +++ b/BaseTools/Source/Python/UPT/Parser/InfParser.py @@ -1,9 +1,9 @@ ## @file # This file contained the parser for INF file # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2018, 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 @@ -21,12 +21,12 @@ InfParser # import re import os from copy import deepcopy -from Library.String import GetSplitValueList -from Library.String import ConvertSpecialChar +from Library.StringUtils import GetSplitValueList +from Library.StringUtils import ConvertSpecialChar from Library.Misc import ProcessLineExtender from Library.Misc import ProcessEdkComment from Library.Parsing import NormPath from Library.ParserValidate import IsValidInfMoudleTypeList from Library.ParserValidate import IsValidArch diff --git a/BaseTools/Source/Python/UPT/Parser/InfParserMisc.py b/BaseTools/Source/Python/UPT/Parser/InfParserMisc.py index 6a335e8..df32225 100644 --- a/BaseTools/Source/Python/UPT/Parser/InfParserMisc.py +++ b/BaseTools/Source/Python/UPT/Parser/InfParserMisc.py @@ -1,9 +1,9 @@ ## @file # This file contained the miscellaneous functions for INF parser # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2018, 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 @@ -23,12 +23,12 @@ import re from Library import DataType as DT -from Library.String import gMACRO_PATTERN -from Library.String import ReplaceMacro +from Library.StringUtils import gMACRO_PATTERN +from Library.StringUtils import ReplaceMacro from Object.Parser.InfMisc import ErrorInInf from Logger.StringTable import ERR_MARCO_DEFINITION_MISS_ERROR # # Global variable diff --git a/BaseTools/Source/Python/UPT/Parser/InfPcdSectionParser.py b/BaseTools/Source/Python/UPT/Parser/InfPcdSectionParser.py index a9b87fd..13535a37 100644 --- a/BaseTools/Source/Python/UPT/Parser/InfPcdSectionParser.py +++ b/BaseTools/Source/Python/UPT/Parser/InfPcdSectionParser.py @@ -1,9 +1,9 @@ ## @file # This file contained the parser for [Pcds] sections in INF file # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2018, 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 @@ -24,11 +24,11 @@ from Logger.ToolError import FORMAT_INVALID from Parser.InfParserMisc import InfExpandMacro from Library import DataType as DT from Library.Parsing import MacroParser from Library.Misc import GetSplitValueList from Library import GlobalData -from Library.String import SplitPcdEntry +from Library.StringUtils import SplitPcdEntry from Parser.InfParserMisc import InfParserSectionRoot class InfPcdSectionParser(InfParserSectionRoot): ## Section PCD related parser # diff --git a/BaseTools/Source/Python/UPT/Parser/InfSectionParser.py b/BaseTools/Source/Python/UPT/Parser/InfSectionParser.py index 727164c..8ba4c3f 100644 --- a/BaseTools/Source/Python/UPT/Parser/InfSectionParser.py +++ b/BaseTools/Source/Python/UPT/Parser/InfSectionParser.py @@ -1,9 +1,9 @@ ## @file # This file contained the parser for sections in INF file # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2018, 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 @@ -19,11 +19,11 @@ InfSectionParser # Import Modules # from copy import deepcopy import re -from Library.String import GetSplitValueList +from Library.StringUtils import GetSplitValueList from Library.CommentParsing import ParseHeaderCommentSection from Library.CommentParsing import ParseComment from Library import DataType as DT diff --git a/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py b/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py index 165ac11..a5929e1 100644 --- a/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py +++ b/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py @@ -1,9 +1,9 @@ ## @file InfPomAlignment.py # This file contained the adapter for convert INF parser object to POM Object # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2018, 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 @@ -18,14 +18,14 @@ InfPomAlignment # Import modules # import os.path from Logger import StringTable as ST import Logger.Log as Logger -from Library.String import FORMAT_INVALID -from Library.String import PARSER_ERROR -from Library.String import NormPath -from Library.String import GetSplitValueList +from Library.StringUtils import FORMAT_INVALID +from Library.StringUtils import PARSER_ERROR +from Library.StringUtils import NormPath +from Library.StringUtils import GetSplitValueList from Library.Misc import ConvertVersionToDecimal from Library.Misc import GetHelpStringByRemoveHashKey from Library.Misc import ConvertArchList from Library.Misc import GetRelativePath from Library.Misc import PathClass diff --git a/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py b/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py index cca70e5..cee4251 100644 --- a/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py +++ b/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py @@ -1,9 +1,9 @@ ## @file InfPomAlignmentMisc.py # This file contained the routines for InfPomAlignment # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2018, 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 @@ -22,11 +22,11 @@ InfPomAlignmentMisc import Logger.Log as Logger from Library import DataType as DT from Library.Misc import ConvertArchList from Object.POM.ModuleObject import BinaryFileObject from Object.POM import CommonObject -from Library.String import FORMAT_INVALID +from Library.StringUtils import FORMAT_INVALID from Library.Misc import CheckGuidRegFormat from Logger import StringTable as ST ## GenModuleHeaderUserExt diff --git a/BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py b/BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py index 42a2ba3..9c50d2d 100644 --- a/BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py +++ b/BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py @@ -1,9 +1,9 @@ ## @file # This file contain unit test for CommentParsing # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2018, 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 @@ -26,11 +26,11 @@ from Object.POM.CommonObject import GuidObject from Object.POM.CommonObject import ProtocolObject from Object.POM.CommonObject import PpiObject from Object.POM.CommonObject import PcdObject from Object.POM.ModuleObject import HobObject -from Library.String import GetSplitValueList +from Library.StringUtils import GetSplitValueList from Library.DataType import TAB_SPACE_SPLIT from Library.DataType import TAB_LANGUAGE_EN_US from Library.DataType import TAB_LANGUAGE_ENG from Library.DataType import ITEM_UNDEFINED from Library.DataType import TAB_INF_FEATURE_PCD diff --git a/BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py b/BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py index a114ff2..4593506 100644 --- a/BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py +++ b/BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py @@ -1,9 +1,9 @@ ## @file # This file contain unit test for CommentParsing # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2018, 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 @@ -17,11 +17,11 @@ import Logger.Log as Logger from Library.CommentParsing import ParseHeaderCommentSection, \ ParseGenericComment, \ ParseDecPcdGenericComment, \ ParseDecPcdTailComment from Library.CommentParsing import _IsCopyrightLine -from Library.String import GetSplitValueList +from Library.StringUtils import GetSplitValueList from Library.DataType import TAB_SPACE_SPLIT from Library.DataType import TAB_LANGUAGE_EN_US # # Test ParseHeaderCommentSection diff --git a/BaseTools/Source/Python/UPT/Xml/CommonXml.py b/BaseTools/Source/Python/UPT/Xml/CommonXml.py index e28aec5..805310d 100644 --- a/BaseTools/Source/Python/UPT/Xml/CommonXml.py +++ b/BaseTools/Source/Python/UPT/Xml/CommonXml.py @@ -1,9 +1,9 @@ ## @file # This file is used to parse a PCD file of .PKG file # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2018, 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 @@ -19,14 +19,14 @@ CommonXml ## # Import Modules # from Core.DistributionPackageClass import DistributionPackageHeaderObject -from Library.String import ConvertNEToNOTEQ -from Library.String import ConvertNOTEQToNE -from Library.String import GetSplitValueList -from Library.String import GetStringOfList +from Library.StringUtils import ConvertNEToNOTEQ +from Library.StringUtils import ConvertNOTEQToNE +from Library.StringUtils import GetSplitValueList +from Library.StringUtils import GetStringOfList from Library.Xml.XmlRoutines import XmlElement from Library.Xml.XmlRoutines import XmlElement2 from Library.Xml.XmlRoutines import XmlAttribute from Library.Xml.XmlRoutines import XmlNode from Library.Xml.XmlRoutines import XmlList diff --git a/BaseTools/Source/Python/UPT/Xml/GuidProtocolPpiXml.py b/BaseTools/Source/Python/UPT/Xml/GuidProtocolPpiXml.py index bfd8d4f..a747b02 100644 --- a/BaseTools/Source/Python/UPT/Xml/GuidProtocolPpiXml.py +++ b/BaseTools/Source/Python/UPT/Xml/GuidProtocolPpiXml.py @@ -1,9 +1,9 @@ ## @file # This file is used to parse a xml file of .PKG file # -# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2018, 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 @@ -13,13 +13,13 @@ # ''' GuidProtocolPpiXml ''' -from Library.String import ConvertNEToNOTEQ -from Library.String import ConvertNOTEQToNE -from Library.String import GetStringOfList +from Library.StringUtils import ConvertNEToNOTEQ +from Library.StringUtils import ConvertNOTEQToNE +from Library.StringUtils import GetStringOfList from Library.Xml.XmlRoutines import XmlElement from Library.Xml.XmlRoutines import XmlAttribute from Library.Xml.XmlRoutines import XmlNode from Library.Xml.XmlRoutines import XmlList from Library.Xml.XmlRoutines import CreateXmlElement diff --git a/BaseTools/Source/Python/UPT/Xml/IniToXml.py b/BaseTools/Source/Python/UPT/Xml/IniToXml.py index 0374710..aa6f230 100644 --- a/BaseTools/Source/Python/UPT/Xml/IniToXml.py +++ b/BaseTools/Source/Python/UPT/Xml/IniToXml.py @@ -1,9 +1,9 @@ ## @file # This file is for converting package information data file to xml file. # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2018, 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 @@ -28,11 +28,11 @@ from Library.Xml.XmlRoutines import CreateXmlElement from Library.DataType import TAB_VALUE_SPLIT from Library.DataType import TAB_EQUAL_SPLIT from Library.DataType import TAB_SECTION_START from Library.DataType import TAB_SECTION_END from Logger import StringTable as ST -from Library.String import ConvertSpecialChar +from Library.StringUtils import ConvertSpecialChar from Library.ParserValidate import IsValidPath from Library import GlobalData ## log error: # diff --git a/BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py b/BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py index 51ac48a..7480cb5 100644 --- a/BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py +++ b/BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py @@ -1,9 +1,9 @@ ## @file # This file is used to parse a Module file of .PKG file # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2018, 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 @@ -15,14 +15,14 @@ ''' ModuleSurfaceAreaXml ''' from xml.dom import minidom -from Library.String import ConvertNEToNOTEQ -from Library.String import ConvertNOTEQToNE -from Library.String import GetStringOfList -from Library.String import IsMatchArch +from Library.StringUtils import ConvertNEToNOTEQ +from Library.StringUtils import ConvertNOTEQToNE +from Library.StringUtils import GetStringOfList +from Library.StringUtils import IsMatchArch from Library.Xml.XmlRoutines import XmlElement from Library.Xml.XmlRoutines import XmlAttribute from Library.Xml.XmlRoutines import XmlNode from Library.Xml.XmlRoutines import XmlList from Library.Xml.XmlRoutines import CreateXmlElement diff --git a/BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py b/BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py index d6ed8c5..30091c6 100644 --- a/BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py +++ b/BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py @@ -1,9 +1,9 @@ ## @file # This file is used to parse a Package file of .PKG file # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2018, 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 @@ -15,11 +15,11 @@ ''' PackageSurfaceAreaXml ''' from xml.dom import minidom -from Library.String import GetStringOfList +from Library.StringUtils import GetStringOfList from Library.Xml.XmlRoutines import XmlElement from Library.Xml.XmlRoutines import XmlNode from Library.Xml.XmlRoutines import XmlList from Library.Xml.XmlRoutines import CreateXmlElement from Object.POM.CommonObject import IncludeObject diff --git a/BaseTools/Source/Python/UPT/Xml/PcdXml.py b/BaseTools/Source/Python/UPT/Xml/PcdXml.py index 4603918..c0dc654 100644 --- a/BaseTools/Source/Python/UPT/Xml/PcdXml.py +++ b/BaseTools/Source/Python/UPT/Xml/PcdXml.py @@ -1,9 +1,9 @@ ## @file # This file is used to parse a PCD file of .PKG file # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2011 - 2018, 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 @@ -23,13 +23,13 @@ PcdXml from Library.Xml.XmlRoutines import XmlElement from Library.Xml.XmlRoutines import XmlAttribute from Library.Xml.XmlRoutines import XmlNode from Library.Xml.XmlRoutines import CreateXmlElement from Library.Xml.XmlRoutines import XmlList -from Library.String import GetStringOfList -from Library.String import ConvertNEToNOTEQ -from Library.String import ConvertNOTEQToNE +from Library.StringUtils import GetStringOfList +from Library.StringUtils import ConvertNEToNOTEQ +from Library.StringUtils import ConvertNOTEQToNE from Library import GlobalData from Object.POM.CommonObject import PcdObject from Object.POM.CommonObject import PcdErrorObject from Xml.CommonXml import HelpTextXml from Xml.CommonXml import PromptXml -- 2.6.1.windows.1
|
|
Re: [PATCH] BaseTools/GenFw: Add X64 GOTPCREL Support to GenFw
Shi, Steven <steven.shi@...>
Next week is OK, take your time. I appreciate the test cases with build steps, thanks!
toggle quoted messageShow quoted text
BTW, I'm not sure where is the right place in edk2 to submit a patch's test cases, but I do welcome the test case contribution. Steven Shi Intel\SSG\STO\UEFI Firmware Tel: +86 021-61166522 iNet: 821-6522
-----Original Message-----
|
|
Re: OSFC 2018
Philipp Deppenwiese <zaolin.daisuki@...>
Yes.
toggle quoted messageShow quoted text
On 07.06.2018 17:56, Rafael Machado wrote:
Nice initiative!
|
|
Re: [PATCH] MdeModulePkg/EmmcDxe: demote DEBUG print to DEBUG_BLKIO
Laszlo Ersek
On 06/07/18 11:10, Ard Biesheuvel wrote:
Lower the priority of the DEBUG print in EmmcReadWrite(), whichReviewed-by: Laszlo Ersek <lersek@...>
|
|
Re: [PATCH] MdePkg/BaseIoLibIntrinsic: make BaseIoLibIntrinsic safe for ArmVirt/KVM
Laszlo Ersek
On 06/07/18 12:46, Ard Biesheuvel wrote:
KVM on ARM refuses to decode load/store instructions used to performAssuming Liming is OK with this patch for MdePkg, I have some comments (specific to adding this package to MdePkg): (1) ArmVirtPkg and MdePkg should likely not be modified in the same patch. (2) The library instance should be added as a standalone component to MdePkg.dsc (so it can be built without any client modules): [Components.ARM, Components.AARCH64] MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicArmVirt.inf <-HERE (3) Library instances under MdePkg are supposed to have MODULE_UNI_FILEs. I think customizing "BaseIoLibIntrinsic.uni" shouldn't be hard; it's basically a different format for re-stating the blurb of the new INF file. (Obviously, don't do anything about these until Liming follows up.) The rest looks OK to me! Thank you for this! Laszlo
|
|
Re: [PATCH] CorebootModulePkg/CbSupportDxe: Remove SCI_EN setting
Matt Delco <delco@...>
Thanks for working on this. I did a quick test to confirm that things
toggle quoted messageShow quoted text
still work okay. The code change looks fine though there's some optional optimizations to consider: The new code added to CbParseFadtInfo() is mostly to add debug checks but I think it'll still result in a IO port access in a release build so it might be worthwhile to make the entire code block specific to a debug build (possibly by sticking the code within a "#if !defined(MDEPKG_NDEBUG)" block, though I don't see any other such cases in edk2 so I suspect this isn't an ideal suggestion). Regarding "Pm1CntLen" It looks like the "if (==2) {} else if (==4) {} else {}" could be simplified to "if (==4) {} else {}". In CbDxeEntryPoint() the "Find the acpi board information guid hob" code block can probably be deleted. Its only remaining use is the debug log regarding the value of PmCtrlReg, which I suspect isn't that valuable given the other deletions. This would also allow the removal of the "mPmCtrlReg" variable at file scope.
On Thu, Jun 7, 2018 at 8:40 AM, Ma, Maurice <maurice.ma@...> wrote:
It looks good to me.
|
|
Re: [PATCH] ArmPkg/ArmDisassemblerLib: fix check for MSR instruction
Michael Zimmermann
yes I'll do that next time. Thanks for the hint.
toggle quoted messageShow quoted text
Thanks Michael
On Thu, Jun 7, 2018 at 9:10 AM Ard Biesheuvel <ard.biesheuvel@...> wrote:
|
|
Re: [PATCH] ArmPkg/CompilerIntrinsicsLib: fix GCC8 warning for __aeabi_memcpy aliases
Michael Zimmermann
Hi Ard,
toggle quoted messageShow quoted text
yes that fixes the problem too and looks much better, thx!
On Thu, Jun 7, 2018 at 9:05 AM Ard Biesheuvel <ard.biesheuvel@...> wrote:
|
|
Re: [PATCH] MdePkg/BaseIoLibIntrinsic: make BaseIoLibIntrinsic safe for ArmVirt/KVM
Laszlo Ersek
On 06/07/18 17:09, Ard Biesheuvel wrote:
On 7 June 2018 at 17:08, Gao, Liming <liming.gao@...> wrote:Certainly.Ard:Laszlo, do you want to take this question? Liming, in commit b6d11d7c4678, we added "BaseIoLibIntrinsicSev.inf" to "MdePkg/Library/BaseIoLibIntrinsic", with some custom Ia32 and X64 NASM files, but mostly reusing the large existent files ("IoLibMmioBuffer.c", "IoHighLevel.c" etc). That library instance (and the NASM customizations) target AMD SEV; that is, when the code runs in a virtual machine for which AMD Secure Encrypted Virtualization is enabled. The NASM code uses CPUID to dynamically determine whether it runs in a SEV guest, or in a normal guest, and in the former case, it avoids using the REP prefix in the IoFifo routines (it uses open-coded LOOPs). The "BaseIoLibIntrinsicSev.inf" instance is only ever used in OvmfPkg (it only makes sense in virtual machines), but the consensus back then was to add the lib instance to MdePkg. This time, Ard has already implemented (and posted) the IoLib instance that we need for ARM KVM such that it lands under ArmVirtPkg -- however, that library instance duplicates a huge amount of code, un-changed, from "BaseIoLibIntrinsic" (such as "IoLibMmioBuffer.c", "IoHighLevel.c"). I suggested that Ard instead post the new library instance as a new INF file (plus some assembly files) for BaseIoLibIntrinsic itself, because: (a) this way we avoid code duplication, and (b) that's exactly what we did -- for another virtualization-only use case -- in commit b6d11d7c4678 earlier. If you'd like us to add the code to ArmVirtPkg, I don't think that's the right or consequent action, but technically, we can simply fall back to the ArmVirtPkg patches that Ard already wrote and posted. Thanks, Laszlo -----Original Message-----
|
|
Re: [PATCH] MdePkg/BaseIoLibIntrinsic: make BaseIoLibIntrinsic safe for ArmVirt/KVM
Leif Lindholm <leif.lindholm@...>
This addresses all of the items I mentioned in my review of the
toggle quoted messageShow quoted text
previous solution to this problem, so for me: Reviewed-by: Leif Lindholm <leif.lindholm@...>
On Thu, Jun 07, 2018 at 12:46:45PM +0200, Ard Biesheuvel wrote:
KVM on ARM refuses to decode load/store instructions used to perform
|
|
Re: [PATCH edk2-platforms 0/2] DeveloperBox: prepare for expanding the capsule payload
Ard Biesheuvel
On 7 June 2018 at 17:08, Ard Biesheuvel <ard.biesheuvel@...> wrote:
We intend to start distributing firmware update capsules that include the SCPAdditional note: this approach allows you to downgrade to older capsules as well, although a) you will keep the newer versions of the pieces that the older capsule does not cover b) upgrading to the latest version will require you to go via an intermediate version that includes these changes. Ard Biesheuvel (2):
|
|