[edk2] [Patch 1/2] SecurityPkg/TcgStorageOpalLib: Return AUTHORITY_LOCKED_OUT error.

2018-07-09 Thread Eric Dong
Caller need to known this error to handle specially, but current error status not has specified value for this type. In order to keep compatibility, here use TcgResultFailureInvalidType as an replacement. Cc: Hao, Wu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong

[edk2] [Patch 0/2] Fixed correct password not works issue

2018-07-09 Thread Eric Dong
Opal device may have an count in firmware to decide whether to resistent user input password. If yes, even correct password will be reject by device firmware. This count will be reset only after an cold reboot or user input correct password. Opal driver also has an internal count to decide whethe

[edk2] [Patch 2/2] SecurityPkg/OpalPassword: Fixed input correct password not works issue

2018-07-09 Thread Eric Dong
When user input error password exceed the max allowed times, opal device will return Invalid type error code even user input the correct password. In this case, opal driver needs to force user shutdown the system before let user input new password. Cc: Hao, Wu Contributed-under: TianoCore Contrib

[edk2] [PATCH 09/14] BaseTools: Use absolute import in ECC

2018-07-09 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/Ecc/CParser.py | 5 ++-- BaseTools/Source/Python/Ecc/Check.py

[edk2] [PATCH 13/14] BaseTools: Use absolute import in Workspace

2018-07-09 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/Workspace/DscBuildData.py | 9 + BaseTools/Source/Python/Workspace/InfBuildData.p

[edk2] [PATCH 08/14] BaseTools: Use absolute import in Common

2018-07-09 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/Common/Database.py | 8 BaseTools/Source/Python/Common/EdkLogger.py

[edk2] [PATCH 11/14] BaseTools: Use absolute import in Table

2018-07-09 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/Table/TableDataModel.py | 3 ++- BaseTools/Source/Python/Table/TableDec.py| 3 ++- Ba

[edk2] [PATCH 10/14] BaseTools: Use absolute import in Eot

2018-07-09 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/Eot/CParser.py | 5 +++-- BaseTools/Source/Python/Eot/CodeFragmentCollector.py

[edk2] [PATCH 07/14] BaseTools: Use absolute import in BPDG

2018-07-09 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/BPDG/BPDG.py | 5 +++-- BaseTools/Source/Python/BPDG/GenVpd.py | 3 ++- 2 files changed, 5 i

[edk2] [PATCH 12/14] BaseTools: Use absolute import in UPT

2018-07-09 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/UPT/Library/Parsing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/B

[edk2] [PATCH 14/14] BaseTools: Use absolute import in Scripts

2018-07-09 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/basemodel/doxygen.py | 3 ++- BaseTools/Scripts/PackageDocu

[edk2] [PATCH 06/14] BaseTools: Use absolute import in AutoGen

2018-07-09 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/AutoGen/AutoGen.py| 17 + BaseTools/Source/Python/AutoGen/GenC.py

[edk2] [PATCH 05/14] BaseTools: Move ImageBinDict to GenFdsGlobalVariable.py

2018-07-09 Thread Gary Lin
Move "ImageBinDict" from GenFds.py to GenFdsGlobalVariable.py so that we can remove the requirement to import GenFds.GenFds in Capsule.py, Fd.py and Fv.py. This breaks the following circular imports: * GenFds.FdfParser => GenFds.Capsule => GenFds.GenFds => GenFds.FdfParser * GenFds.FdfParser => Ge

[edk2] [PATCH 02/14] BaseTools: Use absolute import in GenFds

2018-07-09 Thread Gary Lin
Based on "futurize -f libfuturize.fixes.fix_absolute_import" Since circular import is not allowed after adopting absolute import, the following changes are applied to break the circles. * BaseTools/Source/Python/GenFds/Capsule.py - Delay "from .GenFds import GenFds" until GenCapsule() - Delay

[edk2] [PATCH 03/14] BaseTools: Move OverrideAttribs to OptRomInfStatement.py

2018-07-09 Thread Gary Lin
Move "class OverrideAttribs" to OptRomInfStatement.py to remove "import OptionRom" which may form a circular import: GenFds.OptionRom => GenFds.OptRomInfStatement => GenFds.OptionRom Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin

[edk2] [PATCH 04/14] BaseTools: Move FindExtendTool to GenFdsGlobalVariable.py

2018-07-09 Thread Gary Lin
Importing "FindExtendTool" from GenFds.GenFds could create the following circular imports: * GenFds.FdfParser => GenFds.Capsule => GenFds.GenFds => GenFds.FdfParser * GenFds.FdfParser => GenFds.Fd => GenFds.Fv => GenFds.AprioriSection => GenFds.FfsFileStatement => GenFds.GuidSection => GenFds.Ge

[edk2] [PATCH 01/14] BaseTools: Treat GenFds.py as a python module

2018-07-09 Thread Gary Lin
Since GenFds.py import modules from its own directory, add "-m" to the python parameters so that they can import its own modules after adopting absolute import. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/BinWrap

[edk2] [PATCH 00/14] BaseTools: Adopt absolute import

2018-07-09 Thread Gary Lin
This patch series is based on "libfuturize.fixes.fix_absolute_import" to adopt abolute import since relative import is not allowed in python3. The command is applied to BaseTools modules individually. Most of the patches are straightforward except the GenFds patches. It's because there are several

[edk2] [Patch] BaseTools: Remove a unused function.

2018-07-09 Thread BobCF
the call statement of _CheckDuplicateInFV() was commented out in 2014. There is no call statement of _CheckDuplicateInFV(), so remove it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng Cc: Liming Gao Cc: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/AutoGen.

[edk2] MdeModulePkg/Universal/Disk/PartitionDxe/Gpt.c

2018-07-09 Thread Robinson, Herbie
I noticed this code in MdeModulePkg/Universal/Disk/PartitionDxe/Gpt.c: // // Verify that the Protective MBR is valid // for (Index = 0; Index < MAX_MBR_PARTITIONS; Index++) { if (ProtectiveMbr->Partition[Index].BootIndicator == 0x00 && ProtectiveMbr->Partition[Index].OSI

Re: [edk2] [PATCH v1] SecurityPkg: Fix assert when setting key from FAT formatted eMMC/SD/USB

2018-07-09 Thread Roman Bacik
Laszlo, Thank you very much for your comments. I will address them and post another patch. Regards, Roman On Mon, Jul 9, 2018 at 5:24 PM, Laszlo Ersek wrote: > On 07/10/18 02:02, Laszlo Ersek wrote: > > On 07/10/18 00:11, Roman Bacik wrote: > > >> +PathName = AllocateZeroPool (PathLength);

Re: [edk2] [PATCH v1] SecurityPkg: Fix assert when setting key from FAT formatted eMMC/SD/USB

2018-07-09 Thread Laszlo Ersek
On 07/10/18 02:02, Laszlo Ersek wrote: > On 07/10/18 00:11, Roman Bacik wrote: >> +PathName = AllocateZeroPool (PathLength); >> +CopyMem (PathName, ((FILEPATH_DEVICE_PATH*)*FilePath)->PathName, >> PathLength); > > (3) I think it's not necessary to zero-fill the buffer, we're going to > ov

Re: [edk2] GPT Partitions on RAID Disks

2018-07-09 Thread Robinson, Herbie
I wanted to hold off on responding to this for a while to see if anyone else chimed in and because it required quite a bit of thought. In the end I thought I should probably post what I ended up doing in case anyone scans the e-mail archives. [I edited the awful quoting job this employer manda

Re: [edk2] [PATCH v1] SecurityPkg: Fix assert when setting key from FAT formatted eMMC/SD/USB

2018-07-09 Thread Laszlo Ersek
I'm not officially a reviewer for SecurityPkg, so just some light comments: (1) Can you send out the patch with git-send-email? Currently it looks like the patch was pasted into a desktop or web mail client, and that makes it hard to apply the patch (it's wrapped etc). On 07/10/18 00:11, Roman Ba

[edk2] [PATCH v1] SecurityPkg: Fix assert when setting key from FAT formatted eMMC/SD/USB

2018-07-09 Thread Roman Bacik
When secure boot is enabled, if one loads keys from a FAT formatted eMMC/SD/USB when trying to provision PK/KEK/DB keys via the menu, an assert in StrLen() occurs. This is because the filename starts on odd address, which is not a uint16 aligned boundary: https://bugzilla.tianocore.org/show_bug.cgi

Re: [edk2] [PATCH 1/1] MdeModulePkg/PciBusDxe: Fix small memory leak in FreePciDevice

2018-07-09 Thread Palmer, Thomas
I can wait, thanks for the heads up -Original Message- From: Zeng, Star [mailto:star.z...@intel.com] Sent: Friday, July 6, 2018 2:34 AM To: Palmer, Thomas ; edk2-devel@lists.01.org Cc: Dong, Eric ; Ni, Ruiyu ; Li, Gary (HPS SW) ; Shifflett, Joseph ; Zeng, Star Subject: RE: [PATCH 1/1]

Re: [edk2] [PATCH 09/10] StandaloneMmPkg: Add CPU driver suitable for ARM Platforms.

2018-07-09 Thread Achin Gupta
Hi Sughosh, CIL. On Tue, Jul 03, 2018 at 03:12:52PM +0530, Supreeth Venkatesh wrote: > This patch adds a simple CPU driver that exports the > EFI_MM_CONFIGURATION_PROTOCOL to allow registration of the Standalone > MM Foundation entry point. It preserves the existing notification > mechanism for t

Re: [edk2] [PATCH 08/10] StandaloneMmPkg: Add an AArch64 specific entry point library.

2018-07-09 Thread Achin Gupta
Hi Sughosh, Thanks a lot for picking this up. CIL.. On Tue, Jul 03, 2018 at 03:12:39PM +0530, Supreeth Venkatesh wrote: > The Standalone MM environment runs in S-EL0 in AArch64 on ARM Standard > Platforms and is initialised during the SEC phase. ARM Trusted firmware > in EL3 is responsible for in

[edk2] [PATCH v4] BaseTools/GenFw: Add X64 GOTPCREL Support to GenFw

2018-07-09 Thread Zenith432
Adds support for the following X64 ELF relocations to GenFw R_X86_64_GOTPCREL R_X86_64_GOTPCRELX R_X86_64_REX_GOTPCRELX Background: The GCC49 and GCC5 toolchains use the small pie model for X64. In the small pie model, gcc emits a GOTPCREL relocation whenever C code takes the address of a

[edk2] [Patch] BaseTools: Fix the bug that incorrect size info in the Lib autogen

2018-07-09 Thread Yonghong Zhu
The case is a PCD used in one library only, and in DSC component section the PCD value is override in one of module inf. Then it cause the bug the PCD size in the Lib autogen use the PCD value in the DSC PCD section, but not use the override value. Contributed-under: TianoCore Contribution Agreeme

Re: [edk2] [PATCH 2/6] ArmPkg/Drivers: Add EFI_MM_COMMUNICATION_PROTOCOL DXE driver.

2018-07-09 Thread Leif Lindholm
On Mon, Jul 09, 2018 at 02:05:32PM +0530, Sughosh Ganu wrote: > hi Leif, > > On Tue, Jul 3, 2018 at 7:42 PM, Leif Lindholm > wrote: > > On Tue, Jul 03, 2018 at 03:25:11PM +0530, Supreeth Venkatesh wrote: > >> PI v1.5 Specification Volume 4 defines Management Mode Core Interface > >> and defines

[edk2] [PATCH] BaseTools/GenFw: Disable support for R_X86_64_32S

2018-07-09 Thread Zenith432
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=999 Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zenith432 --- BaseTools/Source/C/GenFw/Elf64Convert.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/BaseTools/Source/C/Ge

Re: [edk2] 答复: [Patch] UefiCpuPkg/MpInitLib: Optimize get processor number performance.

2018-07-09 Thread Laszlo Ersek
On 07/09/18 08:13, Dong, Eric wrote: > Hi Laszlo, > > I have created https://bugzilla.tianocore.org/show_bug.cgi?id=1002 to request > to add AsmReadEsp() / AsmReadRsp(). Much appreciated! Laszlo ___ edk2-devel mailing list edk2-devel@lists.01.org https

Re: [edk2] 答复: [Patch] UefiCpuPkg/MpInitLib: Optimize get processor number performance.

2018-07-09 Thread Laszlo Ersek
On 07/09/18 05:04, Dong, Eric wrote: > Hi Laszlo, > >> -Original Message- >> From: Laszlo Ersek [mailto:ler...@redhat.com] >> Sent: Thursday, July 5, 2018 9:04 PM >> To: Fan Jeff ; Dong, Eric ; >> edk2-devel@lists.01.org >> Cc: Ni, Ruiyu >> Subject: Re: [edk2] 答复: [Patch] UefiCpuPkg/MpIni

Re: [edk2] [PATCH 2/6] ArmPkg/Drivers: Add EFI_MM_COMMUNICATION_PROTOCOL DXE driver.

2018-07-09 Thread Sughosh Ganu
hi Leif, On Tue, Jul 3, 2018 at 7:42 PM, Leif Lindholm wrote: > On Tue, Jul 03, 2018 at 03:25:11PM +0530, Supreeth Venkatesh wrote: >> PI v1.5 Specification Volume 4 defines Management Mode Core Interface >> and defines EFI_MM_COMMUNICATION_PROTOCOL. This protocol provides a >> means of communica

Re: [edk2] question about uefi shell pipe.

2018-07-09 Thread Gao, Liming
Krishna: Sorry, I am not clear what's your question here? Would you like to share this grep.efi tool? Or you meet with the problem in this grep.efi tool? Thanks Liming >-Original Message- >From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of >krishnaLee >Sent: Friday, J