[edk2] [RFC] Formalize source files to follow DOS format

2018-05-20 Thread Liming Gao
FormatDosFiles.py is added to clean up dos source files. It bases on the rules defined in EDKII C Coding Standards Specification. 5.1.2 Do not use tab characters 5.1.6 Only use CRLF (Carriage Return Line Feed) line endings. 5.1.7 All files must end with CRLF No trailing white space in one line.

[edk2] [Patch][edk2-platforms/devel-MinnowBoardMax-UDK2017] Bus Master DMA protection.

2018-05-20 Thread zwei4
(1) Clean up code which enables PCI Bus Master DMA before SMRAM lock. (2) Lock SMRAM before PCI bus enumeration at BDS stage. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: zwei4 CC: Yao, Jiewen ---

Re: [edk2] Set "db" variable in secure boot setup mode still requires generating PKCS#7?

2018-05-20 Thread Zhang, Chao B
David: Have you tried to enroll .crt from HII Secure Boot Configure Page? Basically when PK exists , PhysicalPresence and Customized Mode must be asserted in order to enroll a signature without CertData to KEK/DB…, From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of David

Re: [edk2] How to retrieve HII form's default value

2018-05-20 Thread methavanitpong.pipat
> FCE supports Linux also. Nice. > There is no MACRO to describe VFR default value as PCD value in DSC file. Too bad :( For my case, the variable is UINT64, so it's easy to assign in a DSC file. FCE looks needed for HII variables not being primitive data types. > MdeModulePkg HiiLib has one

Re: [edk2] How to retrieve HII form's default value

2018-05-20 Thread Gao, Liming
FCE supports Linux also. There is no MACRO to describe VFR default value as PCD value in DSC file. MdeModulePkg HiiLib has one function HiiSetToDefaults() to retrieve the default setting and set it at boot time. Its first parameter is ConfigRequestHdr that represents one varstore or efi

Re: [edk2] Does __attribute__ ((selectany)) make sense now for GCC?

2018-05-20 Thread Gao, Liming
Andrew: VS has added /Gw option to Optimize Global Data since VS2013. With /Gw option, __declspec(selectany) is not used any more. Now, __declspec(selectany) is kept for old VS tool chain. So, I suggest GCC uses its native optimization option instead of it. Thanks Liming > -Original

Re: [edk2] [PATCH] BaseTools/tools_def: add "-fno-unwind-tables" to GCC_AARCH64_CC_FLAGS

2018-05-20 Thread Gao, Liming
Laszlo: Is this change required for IA32 and X64 arch? Thanks Liming > -Original Message- > From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org] > Sent: Saturday, May 19, 2018 4:21 PM > To: Laszlo Ersek > Cc: edk2-devel-01 ; Danilo C. L.

Re: [edk2] How to retrieve HII form's default value

2018-05-20 Thread methavanitpong.pipat
> Intel provides FCE tool. It can parse the generated BIOS image and output > the default value for every HII question. You can try it. Thanks Gao. This looks useful :) I have to prepare my Windows environment before trying this out. But, is there a way to do it at build time? Since default

Re: [edk2] Set "db" variable in secure boot setup mode still requires generating PKCS#7?

2018-05-20 Thread David F.
>Do you mean this code snippet can succeed to enroll KEK, but fail to enroll DB data? Correct. > What’s the returned errcode value? (And one reminder is that KEK and DB are binding with different vendor GUID: gEfiGlobalVariableGuid, and gEfiImageSecurityDatabaseGuid). It was a access denied

[edk2] [Patch] SecurityPkg:Tcg2Smm: Update TcgNvs info after memory is allocated

2018-05-20 Thread Zhang, Chao B
Update package format info in _PRS to TcgNvs after memory is allocated. Change-Id: Icfadb350e60d3ed2df332e92c257ce13309c0018 Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yao Jiewen Cc: Long Qin Signed-off-by: Zhang, Chao B

[edk2] [Patch] BaseTools: Report more clear error message when PCD type mismatch

2018-05-20 Thread Yonghong Zhu
From: Yunhua Feng Error message is not clear when PCD type defined in driver's Library is different with PCD type defined in DSC components or PCD type defined in DSC PCD section. Case as below: DSC: [PcdsFixedAtBuild] PcdToken.PcdCName | "A" [Components]

[edk2] [Patch] BaseTools: Library PCD type will inherit from the driver

2018-05-20 Thread Yonghong Zhu
From: Yunhua Feng If a PCD is not referenced in global PCD section of DSC file at all, but is referenced in module scope, then the default PCD type for libs should be the module scoped PCD type. Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=901 Cc: Liming Gao

[edk2] [Patch] BaseTools: Fix bug PCD type in component is not same with Pcd section

2018-05-20 Thread Yonghong Zhu
From: Yunhua Feng Per DSC spec 3.11 [Components] Sections: The PCD access methods (and storage methods) are selected on a platform basis - it is not permitted to have a PCD listed in one of the Pcd sections and use it differently in an individual module. For example, if a

Re: [edk2] [Patch] BaseTools: Separate HOST and PREFIX env for GCC tool chain

2018-05-20 Thread Zhu, Yonghong
Reviewed-by: Yonghong Zhu Best Regards, Zhu Yonghong -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Liming Gao Sent: Wednesday, April 25, 2018 6:12 PM To: edk2-devel@lists.01.org Subject: [edk2] [Patch] BaseTools: