[edk2] [PATCH 2/4] BaseTools-Conf:Introduce CLANG38 new toolchain for x86

2016-08-02 Thread Shi, Steven
This adds support for LLVM 3.8.x in LTO mode for IA32 and X64. CLANG38 enable LLVM Link Time Optimization (LTO) and code size optimization flag (-Oz) by default for aggressive code size improvement. CLANG38 X64 code is small code model + PIE. CLANG LTO needs PIE in link flags to generate PIE code

[edk2] [PATCH 0/4] Introduce CLANG38 toolchain in edk2

2016-08-02 Thread Shi, Steven
Please review my new commits in public branch: https://github.com/shijunjing/edk2/commits/llvm_v4 The difference from last V2(https://github.com/shijunjing/edk2/commits/llvm_v2): 1. Seperate the CLANG38 from the other two toolchains (GCC5, CLANGSCAN38), and only focus on CLANG38 in this serial. 2

[edk2] [PATCH 1/4] BaseTools-Conf:Remove short dash in ar flag for LLVM

2016-08-02 Thread Shi, Steven
Both binutils ar and LLVM ar support "cr", but LLVM ar doens't support add "-" in the flags, and llvm-ar cannot accept "-cr". So remove the short dash "-" to make llvm archives work. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Steven Shi --- BaseTools/Conf/build_rule.t

[edk2] [PATCH 4/4] ShellPkg-UefiShellCommandLib: Add EFIAPI in VA_List library function

2016-08-02 Thread Shi, Steven
Add EFIAPI in CatPrint library function. Every function which uses variable list need explicit use EFIAPI to force use MS ABI. This change is needed to pass CLANG38 build. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Steven Shi --- ShellPkg/Library/UefiShellCommandLib/C

[edk2] [PATCH 3/4] ShellPkg-UefiShellTftpCommandLib: Replace compiler builtin

2016-08-02 Thread Shi, Steven
Use explicit CopyMem to replace compiler builtin to do the structure values assignment. This change is needed to pass CLANG38 build. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Steven Shi Reviewed-by: Jaben Carsey --- ShellPkg/Library/UefiShellTftpCommandLib/Tftp.c |

Re: [edk2] [PATCH] [staging/HTTPS-TLS] Delete extra TlsCipherMappingTable entries

2016-08-02 Thread Wu, Jiaxin
Reviewed-By: Wu Jiaxin Best Regards! Jiaxin > -Original Message- > From: Thomas Palmer [mailto:thomas.pal...@hpe.com] > Sent: Wednesday, August 3, 2016 5:34 AM > To: edk2-devel@lists.01.org > Cc: Wu, Jiaxin ; Long, Qin ; > joseph.shiffl...@hpe.com; Thomas Palmer > Subject: [PATCH] [stag

Re: [edk2] [staging/HTTPS-TLS][PATCH 0/4] Replace the TLS definitions with the standardized one

2016-08-02 Thread Wu, Jiaxin
Agree to remove the below cipher sets to make it consistent with current openssl configuration. IDEA-CBC-SHA DHE-DSS-AES256-SHA DHE-DSS-AES256-SHA256 DHE-DSS-AES128-SHA DHE-DSS-AES128-SHA256 EDH-DSS-DES-CBC3-SHA DES-CBC-SHA Thanks, Jiaxin > -Original Message- > From: edk2-devel [mailt

Re: [edk2] [patch] MdeModulePkg/UsbMass: Not retry if usb bot transfer execution fail

2016-08-02 Thread Zeng, Star
Reviewed-by: Star Zeng -Original Message- From: Tian, Feng Sent: Wednesday, August 3, 2016 10:08 AM To: Zeng, Star Cc: edk2-devel@lists.01.org Subject: [patch] MdeModulePkg/UsbMass: Not retry if usb bot transfer execution fail [Sorry, this patch was pushed into EDKII trunk by wrong op

[edk2] [patch] MdeModulePkg/UsbMass: Not retry if usb bot transfer execution fail

2016-08-02 Thread Feng Tian
[Sorry, this patch was pushed into EDKII trunk by wrong operation. If the review mail could pass review, I would prefer to not do a roll-back. Sorry again for that. If there is other opinions, please let me know.] The retry mechanism will bring issue if the usb device is unplugged from XHCI HC b

Re: [edk2] Foreign keyboard support in UEFI

2016-08-02 Thread Senthilarasu_ARUNACH
Aaron, Thanks for detailed information to start our investigation . Will keep update our findings in this forum. From: aaron@congatec.com [mailto:aaron@congatec.com] Sent: Tuesday, August 2, 2016 2:16 PM To: Arunachalam, Senthil mailto:senthilarasu_aru

Re: [edk2] Foreign keyboard support in UEFI

2016-08-02 Thread Senthilarasu_ARUNACH
Dell - Internal Use - Confidential Aaron, Thanks for detailed information to start our investigation . Will keep update our findings in this forum. From: aaron@congatec.com [mailto:aaron@congatec.com] Sent: Tuesday, August 2, 2016 2:16 PM To: Arunachalam, Senthil Cc: edk2-devel@lists.

Re: [edk2] [Patch] SecurityPkg OpalPasswordDxe: Fix buffer overflow issue.

2016-08-02 Thread Zeng, Star
Reviewed-by: Star Zeng -Original Message- From: Dong, Eric Sent: Tuesday, August 2, 2016 7:33 PM To: edk2-devel@lists.01.org Cc: Zeng, Star Subject: [Patch] SecurityPkg OpalPasswordDxe: Fix buffer overflow issue. In current code, PSID is processed as string and the length is 0x20. Curr

Re: [edk2] Build traceback with new CLANG35 toolset

2016-08-02 Thread Shi, Steven
Cran, We will send CLANG38 patch to support X86, and the new CLANG38 patch will base on current GCC5 implementation. FYI. Steven Shi Intel\SSG\STO\UEFI Firmware Tel: +86 021-61166522 iNet: 821-6522 > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Beh

[edk2] [PATCH] [staging/HTTPS-TLS] Delete extra TlsCipherMappingTable entries

2016-08-02 Thread Thomas Palmer
The TlsCipherMappingTable will be used to control which ciphers UEFI officially supports. When a user configures the ciphers, each cipher is checked against this table and if not found is sent the EFI_UNSUPPORTED error. However, when an entry is present in TlsCipherMappingTable, but our library do

Re: [edk2] [staging/HTTPS-TLS][PATCH 0/4] Replace the TLS definitions with the standardized one

2016-08-02 Thread Palmer, Thomas
I have two sets of lists, one for the ciphers the OpenSSL by default configures in a new CTX and the other after setting all ciphers available in the mapping table. For both sets I show the affect of removing no-idea/no-dsa and adding enable-weak-ciphers These are the ciphers that are support

Re: [edk2] Tianocore Bugzilla Server is now live

2016-08-02 Thread Andrew Fish
> On Aug 2, 2016, at 12:43 PM, Michael Zimmermann > wrote: > > How are security issues treated in UEFI anyway? They follow the standard ethical disclosure process like then one discussed here: http://www.uefi.org/security > Are they kept a secret forever or just for a specific time span? >

[edk2] Breaking change issue with NetworkPkg/Ip6Dxe/Ip6ConfigImlp.[c, h]

2016-08-02 Thread Larry Cleeton
This commit (fdc4b0b147b386e966e99893526181dfae9eaeef) changed a data structure that is stored in an NVRAM variable. See NetworkPkg/Ip6Dxe/Ip6ConfigImpl.[c,h] This data structure: typedef struct { UINT16Offset; UINTN DataSize; EFI_IP6_CONFIG_DATA_TY

[edk2] [PATCH] CorebootModulePkg/SecCore: Adding NASM files in SecCore module

2016-08-02 Thread Maurice Ma
Ported MASM/GAS assembly files into NASM files and updated the inf file to refer to NASM files. This change has been tested with GCC 4.8 and VS2013 build. Cc: Prince Agyeman Cc: Lee Leahy Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Maurice Ma --- CorebootModulePkg/S

Re: [edk2] [PATCH v2] OvmfPkg: use StatusCode Router and Handler from MdeModulePkg

2016-08-02 Thread Laszlo Ersek
On 08/02/16 20:23, Jordan Justen wrote: > On 2016-08-02 10:25:10, Cinnamon Shia wrote: >> In the Platform Init v1.4a spec, >> - Volume 1 "4.7 Status Code Service" defines the >> EFI_PEI_SERVICES.ReportStatusCode() service, >> - Volume 1 "6.3.5 Status Code PPI (Optional)" defines the >> EFI_PEI_

Re: [edk2] Tianocore Bugzilla Server is now live

2016-08-02 Thread Michael Zimmermann
How are security issues treated in UEFI anyway? Are they kept a secret forever or just for a specific time span? A reason for keeping them a secret forever(while pushing unsuspicious fixes) probably would be the fact that most UEFI systems don't get updated. Thanks Michael On Tue, Aug 2, 2016 at

Re: [edk2] Tianocore Bugzilla Server is now live

2016-08-02 Thread Laszlo Ersek
On 08/02/16 21:10, Kinney, Michael D wrote: > Michael, > > I am open to suggestions on this topic. > > If there is a strong opinion that we need to protect specific fields > from being modified, then we can look into updating the configuration. > > I think with Bugzilla change history and edk2-b

Re: [edk2] Foreign keyboard support in UEFI

2016-08-02 Thread Aaron . Pop
Hi Senthil, Multi language keyboards support should be pretty transparent to an application. The simple text input protocols are designed to return a unicode character, and the protocols leave the mapping of keypress into the current keyboard layout to the system firmware. Keyboard layouts are

Re: [edk2] Tianocore Bugzilla Server is now live

2016-08-02 Thread Laszlo Ersek
On 08/02/16 20:57, Michael Zimmermann wrote: > Is it just my account or does everybody have the permission "editbugsCan > edit all bug fields"? > > It sounds like this is something only moderators should be able to do. Indeed I noticed this permission when I last looked (in the "whine" thread).

Re: [edk2] Tianocore Bugzilla Server is now live

2016-08-02 Thread Kinney, Michael D
Michael, I am open to suggestions on this topic. If there is a strong opinion that we need to protect specific fields from being modified, then we can look into updating the configuration. I think with Bugzilla change history and edk2-bugs mailing list, we can all see the changes to any issue,

Re: [edk2] Tianocore Bugzilla Server is now live

2016-08-02 Thread Michael Zimmermann
Is it just my account or does everybody have the permission "editbugs Can edit all bug fields"? It sounds like this is something only moderators should be able to do. Thanks Michael On Thu, Jul 21, 2016 at 8:43 PM, Laszlo Ersek wrote: > On 07/21/16 20:07, Kinney, Michael D wrote: > > Laszlo, >

Re: [edk2] [Patch v5 00/48] MP Initialize Library

2016-08-02 Thread Kinney, Michael D
Jeff, All the updates look good to me. There are 2 copyright date updates missing in the SourceLevelDebugPkg that I replied to separately. I have tested this on Galileo Gen 2 with SOURCE_DEBUG_ENABLE on and off and also tested OS boot and ACPI S3. Series Reviewed-By: Michael Kinney Best rega

Re: [edk2] Build traceback with new CLANG35 toolset

2016-08-02 Thread Bruce Cran
On 8/2/2016 12:53 PM, Ard Biesheuvel wrote: CLANG35 is not new, and currently only supports ARM and AARCH64 Oops - thanks. I was thinking of CLANG38 that hasn't been committed yet. -- Bruce ___ edk2-devel mailing list edk2-devel@lists.01.org https:/

Re: [edk2] Build traceback with new CLANG35 toolset

2016-08-02 Thread Ard Biesheuvel
On 2 August 2016 at 20:24, Bruce Cran wrote: > I was just testing the new GCC5 and CLANG35 toolsets that have landed in git > master: GCC5 works perfectly, but with CLANG35 I get the following log and > traceback: > CLANG35 is not new, and currently only supports ARM and AARCH64 > Build environ

[edk2] Build traceback with new CLANG35 toolset

2016-08-02 Thread Bruce Cran
I was just testing the new GCC5 and CLANG35 toolsets that have landed in git master: GCC5 works perfectly, but with CLANG35 I get the following log and traceback: Build environment: Linux-4.6.4-2-default-x86_64-with-SuSE-20160728-x86_64 Build start time: 12:12:40, Aug.02 2016 WORKSPACE

Re: [edk2] [PATCH v2] OvmfPkg: use StatusCode Router and Handler from MdeModulePkg

2016-08-02 Thread Jordan Justen
On 2016-08-02 10:25:10, Cinnamon Shia wrote: > In the Platform Init v1.4a spec, > - Volume 1 "4.7 Status Code Service" defines the > EFI_PEI_SERVICES.ReportStatusCode() service, > - Volume 1 "6.3.5 Status Code PPI (Optional)" defines the > EFI_PEI_PROGRESS_CODE_PPI (equivalent to the above), >

[edk2] [PATCH v2] OvmfPkg: use StatusCode Router and Handler from MdeModulePkg

2016-08-02 Thread Cinnamon Shia
In the Platform Init v1.4a spec, - Volume 1 "4.7 Status Code Service" defines the EFI_PEI_SERVICES.ReportStatusCode() service, - Volume 1 "6.3.5 Status Code PPI (Optional)" defines the EFI_PEI_PROGRESS_CODE_PPI (equivalent to the above), - Volume 2 "14.2 Status Code Runtime Protocol" defines th

Re: [edk2] [Patch v5 01/48] UefiCpuPkg/LocalApic.h: Remove duplicated/conflicted definitions

2016-08-02 Thread Kinney, Michael D
Jeff, The copyright dates need to be updated to 2016 in the following 2 files: SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.h SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugMp.c With those updates, Reviewed-by: Michael Kinney Mike > -Original Messa

Re: [edk2] [Patch v5 02/48] UefiCpuPkg/MpInitLib: Add microcode definitions defined in IA32 SDM

2016-08-02 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru > -Original Message- > From: Fan, Jeff > Sent: Tuesday, August 2, 2016 1:59 AM > To: edk2-devel@lists.01.org > Cc: Kinney, Michael D ; Tian, Feng > ; Mudusuru, Giri P ; Laszlo > Ersek > Subject: [Patch v5 02/48] UefiCpuPkg/MpInitLib: Add microcode definition

Re: [edk2] [PATCH 1/3] BaseTools GCC: move -c compiler flag to build rules

2016-08-02 Thread Ard Biesheuvel
On 2 August 2016 at 17:02, Ard Biesheuvel wrote: > On 2 August 2016 at 17:01, Leif Lindholm wrote: >> On Tue, Aug 02, 2016 at 04:39:30PM +0200, Ard Biesheuvel wrote: >>> In order to be able to share the compiler flags with the linker (which >>> is required for LTO since it involves the linker doi

Re: [edk2] [PATCH 1/3] BaseTools GCC: move -c compiler flag to build rules

2016-08-02 Thread Ard Biesheuvel
On 2 August 2016 at 17:01, Leif Lindholm wrote: > On Tue, Aug 02, 2016 at 04:39:30PM +0200, Ard Biesheuvel wrote: >> In order to be able to share the compiler flags with the linker (which >> is required for LTO since it involves the linker doing code generation >> based on the LTO bytecode), move

Re: [edk2] [PATCH 1/3] BaseTools GCC: move -c compiler flag to build rules

2016-08-02 Thread Leif Lindholm
On Tue, Aug 02, 2016 at 04:39:30PM +0200, Ard Biesheuvel wrote: > In order to be able to share the compiler flags with the linker (which > is required for LTO since it involves the linker doing code generation > based on the LTO bytecode), move the -c GCC argument to the build rules, > and drop it

Re: [edk2] [PATCH v5 0/8] BaseTools: add support for GCC5 in LTO mode

2016-08-02 Thread Michael Zimmermann
> sry but I have to retest everything since I aciidentally checked out a wrong revision. will report back later. ignore this, everything in my report was correct. got confused with CommitDate vs AuthorDate. > Only 0x4 or 0x9 or others as well? This is relevent since 0x4 is a PLT relocation which

Re: [edk2] [PATCH 0/3] BaseTools GCC: pass CC flags to linker

2016-08-02 Thread Ard Biesheuvel
On 2 August 2016 at 16:50, Gao, Liming wrote: > Ard: > Without this change, GCC5 LTO can pass build. With it, what difference will > be in the generated image? Original way may generate the wrong image, or new > way will generate the smaller image? > This is not about code size but about corr

Re: [edk2] [PATCH 0/3] BaseTools GCC: pass CC flags to linker

2016-08-02 Thread Gao, Liming
Ard: Without this change, GCC5 LTO can pass build. With it, what difference will be in the generated image? Original way may generate the wrong image, or new way will generate the smaller image? Thanks Liming -Original Message- From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org]

Re: [edk2] [PATCH v5 0/8] BaseTools: add support for GCC5 in LTO mode

2016-08-02 Thread Michael Zimmermann
sry but I have to retest everything since I aciidentally checked out a wrong revision. will report back later. On Tue, Aug 2, 2016 at 4:39 PM, Michael Zimmermann wrote: > Sry for the late reply but I tried your latest gcc-lto branch to make sure > my answers are still correct. > I tested it with

Re: [edk2] [PATCH v5 0/8] BaseTools: add support for GCC5 in LTO mode

2016-08-02 Thread Ard Biesheuvel
On 2 August 2016 at 16:39, Michael Zimmermann wrote: > Sry for the late reply but I tried your latest gcc-lto branch to make sure > my answers are still correct. > I tested it with all configurations(StdLib:X64/ARM, Ovmf:X64, ArmVirtPkg:ARM > with both RELEASE and DEBUG). > In StdLib are many warn

Re: [edk2] [PATCH v5 0/8] BaseTools: add support for GCC5 in LTO mode

2016-08-02 Thread Michael Zimmermann
Sry for the late reply but I tried your latest gcc-lto branch to make sure my answers are still correct. I tested it with all configurations(StdLib:X64/ARM, Ovmf:X64, ArmVirtPkg:ARM with both RELEASE and DEBUG). In StdLib are many warnings actually. That's because of -Wunused-const-variable and -Wm

[edk2] [PATCH 2/3] BaseTools GCC5: disable warnings-as-errors for now

2016-08-02 Thread Ard Biesheuvel
GCC5 runs in LTO mode, which means it may generate code from an intermediate representation during the link stage, at which time additional diagnostics are run that may emit warnings. Some of these warnings seem to be spurious, e.g., the following warning which is emitted when building OVMF for IA

[edk2] [PATCH 3/3] BaseTools GCC: add the compiler flags to the linker command line

2016-08-02 Thread Ard Biesheuvel
Now that we invoke GCC as the linker for the GCC toolchain family, we can pass the CC flags to the linker as well. This is only required for LTO (which may involve code generation during the link stage), but does not interfere with non-LTO builds. Contributed-under: TianoCore Contribution Agreemen

[edk2] [PATCH 0/3] BaseTools GCC: pass CC flags to linker

2016-08-02 Thread Ard Biesheuvel
GCC5 runs in LTO mode, which means it may generate code during the link stage, and this code generation should be subject to the same settings as ordinary code generation. Since we now invoke GCC as the linker, we can start passing the CC_FLAGS to the linker as well, with only minor surgery. This

[edk2] [PATCH 1/3] BaseTools GCC: move -c compiler flag to build rules

2016-08-02 Thread Ard Biesheuvel
In order to be able to share the compiler flags with the linker (which is required for LTO since it involves the linker doing code generation based on the LTO bytecode), move the -c GCC argument to the build rules, and drop it from the GCC CC_FLAGS definitions in tools_def. Contributed-under: Tian

Re: [edk2] [PATCH v5 0/8] BaseTools: add support for GCC5 in LTO mode

2016-08-02 Thread Ard Biesheuvel
On 2 August 2016 at 15:55, Michael Zimmermann wrote: > btw, gcc6 seems to work fine too with these patches(it did with the GCC49 > configs too on both ARM and x86/x64). > Thanks for the data points. Do you see any warnings during the build? ___ edk2-dev

Re: [edk2] [PATCH v5 0/8] BaseTools: add support for GCC5 in LTO mode

2016-08-02 Thread Michael Zimmermann
btw, gcc6 seems to work fine too with these patches(it did with the GCC49 configs too on both ARM and x86/x64). Thanks Michael On Tue, Aug 2, 2016 at 1:42 PM, Ard Biesheuvel wrote: > On 2 August 2016 at 13:41, Shi, Steven wrote: > > Ard, > > Thank you to check in GCC5! > > > > My pleasure. Tha

Re: [edk2] [patch] MdeModulePkg/FvSimpleFileSystem: fix assertions when FV is empty

2016-08-02 Thread Zhang, Chao B
Reviewed-by: Chao Zhang Thanks & Best regards Chao Zhang -Original Message- From: Tian, Feng Sent: Tuesday, August 02, 2016 4:10 PM To: Zhang, Chao B Cc: edk2-devel@lists.01.org Subject: [patch] MdeModulePkg/FvSimpleFileSystem: fix assertions when FV is empty The original code wil

Re: [edk2] [PATCH] ArmVirtPkg/ArmVirtPrePiUniCoreRelocatable: deal with relaxed XIP alignment

2016-08-02 Thread Ard Biesheuvel
On 2 August 2016 at 13:35, Laszlo Ersek wrote: > On 08/02/16 12:17, Ard Biesheuvel wrote: >> Commit b89919ee8f8c ("BaseTools AARCH64: override XIP module linker >> alignment to 32 bytes") updated the various AARCH64 toolchain definitions >> to allow SEC, PEI_CORE and PEIM modules to be built with

Re: [edk2] [PATCH v2 2/7] BaseTools-GenFw:Add new x86_64 Elf relocation types for PIC/PIE code

2016-08-02 Thread Ard Biesheuvel
On 2 August 2016 at 13:40, Shi, Steven wrote: >> >> CoffAddFixup() must be used for absolute symbol references only. These >> instructions contain relative symbol references, which are >> recalculated in WriteSections64(). >> >> The only absolute symbol reference is the GOT entry for 'n', and your

Re: [edk2] [PATCH v5 0/8] BaseTools: add support for GCC5 in LTO mode

2016-08-02 Thread Ard Biesheuvel
On 2 August 2016 at 13:41, Shi, Steven wrote: > Ard, > Thank you to check in GCC5! > My pleasure. Thanks to you for the comments, discussion and review feedback. -- Ard. ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/

Re: [edk2] [PATCH v5 0/8] BaseTools: add support for GCC5 in LTO mode

2016-08-02 Thread Shi, Steven
Ard, Thank you to check in GCC5! Steven Shi Intel\SSG\STO\UEFI Firmware Tel: +86 021-61166522 iNet: 821-6522 > -Original Message- > From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org] > Sent: Tuesday, August 02, 2016 5:03 PM > To: Shi, Steven ; Zhu, Yonghong > ; Gao, Liming ; Just

Re: [edk2] [PATCH v2 2/7] BaseTools-GenFw:Add new x86_64 Elf relocation types for PIC/PIE code

2016-08-02 Thread Shi, Steven
> > CoffAddFixup() must be used for absolute symbol references only. These > instructions contain relative symbol references, which are > recalculated in WriteSections64(). > > The only absolute symbol reference is the GOT entry for 'n', and your > code (in WriteRelocations64()) calculates the ad

Re: [edk2] [Patch v5 36/48] OvmfPkg: Add MpInitLib reference in DSC files.

2016-08-02 Thread Laszlo Ersek
On 08/02/16 10:59, Jeff Fan wrote: > This update is for CpuMpPei&CpuDxe consuming MP Initialize library. > > Cc: Michael Kinney > Cc: Feng Tian > Cc: Jordan Justen > Cc: Laszlo Ersek > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Jeff Fan > --- > OvmfPkg/OvmfPkgIa

Re: [edk2] [PATCH] ArmVirtPkg/ArmVirtPrePiUniCoreRelocatable: deal with relaxed XIP alignment

2016-08-02 Thread Laszlo Ersek
On 08/02/16 12:17, Ard Biesheuvel wrote: > Commit b89919ee8f8c ("BaseTools AARCH64: override XIP module linker > alignment to 32 bytes") updated the various AARCH64 toolchain definitions > to allow SEC, PEI_CORE and PEIM modules to be built with minimal alignment > requirements even when using the

[edk2] [Patch] SecurityPkg OpalPasswordDxe: Fix buffer overflow issue.

2016-08-02 Thread Eric Dong
In current code, PSID is processed as string and the length is 0x20. Current code only reserved 0x20 length buffer for it, no extra buffer for the '\0'. When driver call UnicodeStrToAsciiStrS to convert PSID, it search the '\0' for the end. So extra dirty data saved in PSID info which caused PSID r

[edk2] [Patch] BaseTools: Allow string token identifier to use lower case letters

2016-08-02 Thread Yonghong Zhu
This patch is to align the code behavior with UNI spec that string token identifier can use upper case and lower case letters. Cc: Liming Gao Cc: Felix Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/UniClassObject.py | 12

Re: [edk2] [PATCH v5 0/8] BaseTools: add support for GCC5 in LTO mode

2016-08-02 Thread Ard Biesheuvel
On 2 August 2016 at 12:57, Laszlo Ersek wrote: > On 08/02/16 11:03, Ard Biesheuvel wrote: >> On 1 August 2016 at 10:01, Ard Biesheuvel wrote: >>> This v5 to introduce GCC5 is now a 8 piece series, including some >>> preparatory cleanup patches that allow all GCC4x and CLANG35 toolchains >>> to sw

Re: [edk2] [PATCH v5 0/8] BaseTools: add support for GCC5 in LTO mode

2016-08-02 Thread Laszlo Ersek
On 08/02/16 11:03, Ard Biesheuvel wrote: > On 1 August 2016 at 10:01, Ard Biesheuvel wrote: >> This v5 to introduce GCC5 is now a 8 piece series, including some >> preparatory cleanup patches that allow all GCC4x and CLANG35 toolchains >> to switch to using 'gcc' as the linker. This allows us to g

Re: [edk2] [PATCH] ShellBinPkg Arm/AArch64 Shell binary update

2016-08-02 Thread Ard Biesheuvel
On 2 August 2016 at 11:38, Leif Lindholm wrote: > On Tue, Aug 02, 2016 at 11:21:48AM +0200, Ard Biesheuvel wrote: >> The binaries of ShellBinPkg are generated with ShellPkg from b89919ee8f8c >> ("BaseTools AARCH64: override XIP module linker alignment to 32 bytes") >> >> Contributed-under: TianoCo

[edk2] [PATCH] ArmVirtPkg/ArmVirtPrePiUniCoreRelocatable: deal with relaxed XIP alignment

2016-08-02 Thread Ard Biesheuvel
Commit b89919ee8f8c ("BaseTools AARCH64: override XIP module linker alignment to 32 bytes") updated the various AARCH64 toolchain definitions to allow SEC, PEI_CORE and PEIM modules to be built with minimal alignment requirements even when using the AArch64 small code model which normally requires

Re: [edk2] [PATCH] ShellBinPkg Arm/AArch64 Shell binary update

2016-08-02 Thread Leif Lindholm
On Tue, Aug 02, 2016 at 11:21:48AM +0200, Ard Biesheuvel wrote: > The binaries of ShellBinPkg are generated with ShellPkg from b89919ee8f8c > ("BaseTools AARCH64: override XIP module linker alignment to 32 bytes") > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Bie

Re: [edk2] [Patch] BaseTools: Keep the Pcd order in the Asbuilt Inf is same with Source

2016-08-02 Thread Gao, Liming
Reviewed-by: Liming Gao > -Original Message- > From: Zhu, Yonghong > Sent: Tuesday, July 26, 2016 4:18 PM > To: edk2-devel@lists.01.org > Cc: Gao, Liming > Subject: [Patch] BaseTools: Keep the Pcd order in the Asbuilt Inf is same with > Source > > The original behavior is that in the As

[edk2] [PATCH] ShellBinPkg Arm/AArch64 Shell binary update

2016-08-02 Thread Ard Biesheuvel
The binaries of ShellBinPkg are generated with ShellPkg from b89919ee8f8c ("BaseTools AARCH64: override XIP module linker alignment to 32 bytes") Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- The binaries can be found here: https://git.linaro.org/peopl

Re: [edk2] [PATCH 1/2] BaseTools/GenFw AARCH64: convert ADRP to ADR if binary size allows it

2016-08-02 Thread Ard Biesheuvel
On 1 August 2016 at 16:19, Leif Lindholm wrote: > Apologies, lost track of this one. > > On Mon, Aug 01, 2016 at 01:53:09PM +0200, Ard Biesheuvel wrote: >> On 27 July 2016 at 13:26, Ard Biesheuvel wrote: >> > The ADRP instruction in the AArch64 ISA requires the link time and load >> > time offset

Re: [edk2] [PATCH v5 0/8] BaseTools: add support for GCC5 in LTO mode

2016-08-02 Thread Ard Biesheuvel
On 1 August 2016 at 10:01, Ard Biesheuvel wrote: > This v5 to introduce GCC5 is now a 8 piece series, including some > preparatory cleanup patches that allow all GCC4x and CLANG35 toolchains > to switch to using 'gcc' as the linker. This allows us to get rid of > the wrapper script to marshall ld

[edk2] [Patch v5 47/48] UefiCpuPkg/CpuDxe: Fixed typo in function header to match PI spec

2016-08-02 Thread Jeff Fan
Cc: Liming Gao Cc: Michael Kinney Cc: Feng Tian Cc: Giri P Mudusuru Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan Reviewed-by: Giri P Mudusuru --- UefiCpuPkg/CpuDxe/CpuMp.c | 36 ++-- 1 file changed, 18 inser

[edk2] [Patch v5 48/48] UefiCpuPkg/PiSmmCpuDxeSmm: Add gEfiVariableArchProtocolGuid dependency

2016-08-02 Thread Jeff Fan
PiSmmCpuDxeSmm driver's entry point will get some PCDs supported dynamic type. In case those PCDs are set as DynamicHii type in platform DSC File, it implies that EFI Variable Arch protocol is required. This fix is to add gEfiVariableArchProtocolGuid dependency on PiSmmCpuDxeSmm driver to make sur

[edk2] [Patch v5 44/48] UefiCpuPkg/CpuDxe: Remove PcdCpuMaxLogicalProcessorNumber consuming

2016-08-02 Thread Jeff Fan
v5: If PcdCpuMaxLogicalProcessorNumber is set to 1 on UP system, MpInitLibInitialize() will be invoked. This is one bug, we need to call MpInitLibInitialize() always and get the BSP information. Just to remove PcdCpuMaxLogicalProcessorNumber() consuming from this driver. Cc: Michael Kinn

[edk2] [Patch v5 46/48] MdePkg/MpService.h: Trim whitespace at end of line

2016-08-02 Thread Jeff Fan
Cc: Liming Gao Cc: Michael Kinney Cc: Feng Tian Cc: Giri P Mudusuru Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan Reviewed-by: Giri P Mudusuru --- MdePkg/Include/Protocol/MpService.h | 470 ++-- 1 file change

[edk2] [Patch v5 41/48] UefiCpuPkg/CpuDxe: Consume MpInitLib to produce CPU MP Protocol services

2016-08-02 Thread Jeff Fan
Consume MP Initialize library to produce CPU MP Protocol services to simply the code. v4: 1. Update CpuDxe.c file header to mention it produces CPU Arch protocol. 2. Update BistData type from UINT32 to EFI_HEALTH_FLAG. 3. Move some header location from CpuMp.h to CpuDxe.h. v3: 1. Move the

[edk2] [Patch v5 45/48] MdePkg/MpService.h: Fixed typo in function header to match PI spec

2016-08-02 Thread Jeff Fan
Cc: Liming Gao Cc: Michael Kinney Cc: Feng Tian Cc: Giri P Mudusuru Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan Reviewed-by: Giri P Mudusuru --- MdePkg/Include/Protocol/MpService.h | 34 +- 1 file changed,

[edk2] [Patch v5 42/48] UefiCpuPkg/CpuDxe: Move SetMtrrsFromBuffer() location.

2016-08-02 Thread Jeff Fan
Cc: Michael Kinney Cc: Feng Tian Cc: Giri P Mudusuru Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan --- UefiCpuPkg/CpuDxe/CpuDxe.c | 15 +++ UefiCpuPkg/CpuDxe/CpuMp.c | 16 2 files changed, 15 insertions(+), 16 de

[edk2] [Patch v5 43/48] UefiCpuPkg/CpuDxe: Remove unused codes and files

2016-08-02 Thread Jeff Fan
v5: 1. Remove unused PcdCpuApStackSize and PcdCpuApInitTimeOutInMicroSeconds. v4: 1. Keep GDT table setup to fix IA32 S3 boot issue. Cc: Michael Kinney Cc: Feng Tian Cc: Giri P Mudusuru Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan ---

[edk2] [Patch v5 34/48] UefiCpuPkg/MpInitLib: Implementation of MpInitLibStartupAllAPs()

2016-08-02 Thread Jeff Fan
v4: 1. Simply the internal function StartupAllAPsWorker()'s function header due to it is duplicated with MpInitLibStartupAllAPs(). v3: 1. Use CamelCase for mStopCheckAllApsStatus and CheckAndUpdateApsStatus() Cc: Michael Kinney Cc: Feng Tian Cc: Giri P Mudusuru Cc: Laszlo Ersek C

[edk2] [Patch v5 36/48] OvmfPkg: Add MpInitLib reference in DSC files.

2016-08-02 Thread Jeff Fan
This update is for CpuMpPei&CpuDxe consuming MP Initialize library. Cc: Michael Kinney Cc: Feng Tian Cc: Jordan Justen Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan --- OvmfPkg/OvmfPkgIa32.dsc| 2 ++ OvmfPkg/OvmfPkgIa32X64.dsc | 2 ++ Ov

[edk2] [Patch v5 39/48] UefiCpuPkg/CpuMpPei: Remove unused files and codes

2016-08-02 Thread Jeff Fan
Cc: Michael Kinney Cc: Feng Tian Cc: Giri P Mudusuru Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan --- UefiCpuPkg/CpuMpPei/CpuMpPei.c| 837 -- UefiCpuPkg/CpuMpPei/CpuMpPei.h| 248 -- Uef

[edk2] [Patch v5 33/48] UefiCpuPkg/MpInitLib: Implementation of MpInitLibStartupThisAP()

2016-08-02 Thread Jeff Fan
v4: 1. Simply the internal function StartupThisAPWorker()'s comment header due to it is duplicated with MpInitLibStartupThisAP(). v3: 1. Use CamelCase for mStopCheckAllApsStatus and CheckAndUpdateApsStatus(). Cc: Michael Kinney Cc: Feng Tian Cc: Giri P Mudusuru Cc: Laszlo Ersek

[edk2] [Patch v5 37/48] QuarkPlatformPkg: Add MpInitLib reference in DSC files.

2016-08-02 Thread Jeff Fan
This update is for CpuDxe consuming MP Initialize library. v5: 1. Update Quark DSC files to add PeiMpInitLib. Cc: Michael Kinney Cc: Feng Tian Cc: Kelly Steele Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan --- QuarkPlatformPkg/Quark.dsc| 2 ++ QuarkPla

[edk2] [Patch v5 40/48] UefiCpuPkg/CpuMpPei: Delete PeiMpServices.c and PeiMpServices.h

2016-08-02 Thread Jeff Fan
Move the code in PeiMpServices.c & PeiMpServices.h to CpuMpPei.c & CpuMpPei.h. v3: 1. Rename MpInitLibSwitchBSP to MpInitLibSwitchBSP 2. Add PeiMpInitLib.inf in DSC file Cc: Michael Kinney Cc: Feng Tian Cc: Giri P Mudusuru Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreeme

[edk2] [Patch v5 27/48] UefiCpuPkg/MpInitLib: Implementation of MpInitLibGetNumberOfProcessors()

2016-08-02 Thread Jeff Fan
Cc: Michael Kinney Cc: Feng Tian Cc: Giri P Mudusuru Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan --- UefiCpuPkg/Library/MpInitLib/MpLib.c | 39 +++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git

[edk2] [Patch v5 31/48] UefiCpuPkg/MpInitLib: Implementation of MpInitLibEnableDisableAP()

2016-08-02 Thread Jeff Fan
v4: 1. Simply the internal function MpInitLibEnableDisableAP()'s function header due to it is duplicated with MpInitLibEnableDisableAP(). v3: 1. Use CamelCase for mCheckAllAPsEvent, mStopCheckAllApsStatus. Cc: Michael Kinney Cc: Feng Tian Cc: Giri P Mudusuru Cc: Laszlo Ersek Contribut

[edk2] [Patch v5 35/48] UefiCpuPkg/MpInitLib: Place APs in safe loop before hand-off to OS

2016-08-02 Thread Jeff Fan
Register Exit Boot Service callback function MpInitExitBootServicesCallback() to place AP one safe loop before hand-off to OS. Allocated one reserved memory and copy the AsmRellocateApLoop() code into it. It could avoid the CPU Dxe driver (located in Boot Service data range) crashed after Exit Boo

[edk2] [Patch v5 38/48] UefiCpuPkg/CpuMpPei: Consume MpInitLib to produce CPU MP PPI services

2016-08-02 Thread Jeff Fan
Consume MP initialize library to produce CPU MP PPI, it could simply the code. Add STATIC for some internal functions to avoid build issue with the same functions name in PeiMpInit instance. They will be removed by the next patch. v4: 1. Update BistData type from UINT32 to EFI_HEALTH_FLAGS. v3

[edk2] [Patch v5 29/48] UefiCpuPkg/MpInitLib: Implementation of MpInitLibWhoAmI()

2016-08-02 Thread Jeff Fan
v5: 1. Move checking ProcessNumber before calling GetCpuMpData. Cc: Michael Kinney Cc: Feng Tian Cc: Giri P Mudusuru Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan --- UefiCpuPkg/Library/MpInitLib/MpLib.c | 10 +- 1 file changed, 9

[edk2] [Patch v5 30/48] UefiCpuPkg/MpInitLib: Implementation of MpInitLibSwitchBSP()

2016-08-02 Thread Jeff Fan
v4: 1. Simply the internal function SwitchBSPWorker()'s comment header due to it is duplicated with MpInitLibSwitchBSP(). v3: 1. Rename MpInitLibSwitchBsp to MpInitLibSwitchBSP. Cc: Michael Kinney Cc: Feng Tian Cc: Giri P Mudusuru Cc: Laszlo Ersek Contributed-under: TianoCore Contrib

[edk2] [Patch v5 21/48] UefiCpuPkg/MpInitLib: Fill MP_CPU_EXCHANGE_INFO fields

2016-08-02 Thread Jeff Fan
FillExchangeInfoData() is used to fill MP_CPU_EXCHANGE_INFO date exchanged between C code and assembly code of AP reset vector. v5: 1. Reference ApWakeupFunction instead of ApCFunction. Cc: Michael Kinney Cc: Feng Tian Cc: Giri P Mudusuru Cc: Laszlo Ersek Contributed-under: TianoCore Contri

[edk2] [Patch v5 26/48] UefiCpuPkg/MpInitLib: Skip collect processor count if GUIDed HOB exist

2016-08-02 Thread Jeff Fan
If GUIDed HOB mCpuInitMpLibHobGuid exists, we could get the processor count and processor APICID and Initial APICID from CPU_INFO_IN_HOB. We needn't to delay for broadcast INIT-SIPI-SIPI results and could improve performance. Cc: Michael Kinney Cc: Feng Tian Cc: Giri P Mudusuru Cc: Laszlo Ersek

[edk2] [Patch v5 32/48] UefiCpuPkg/MpInitLib: Check APs Status and update APs status

2016-08-02 Thread Jeff Fan
v3: 1. Use CamelCase for CheckAndUpdateApsStatus(). Cc: Michael Kinney Cc: Feng Tian Cc: Giri P Mudusuru Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan --- UefiCpuPkg/Library/MpInitLib/DxeMpLib.c | 37 UefiCpuPkg/Library/MpInitLib/MpL

[edk2] [Patch v5 28/48] UefiCpuPkg/MpInitLib: Implementation of MpInitLibGetProcessorInfo()

2016-08-02 Thread Jeff Fan
v5: 1. Remove (-1) and use the clean code to calculate the Location->Thread and Location->Core. v4: 1. Update HealthData type from UINT32 to EFI_HEALTH_FLAGS Cc: Michael Kinney Cc: Feng Tian Cc: Giri P Mudusuru Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0

[edk2] [Patch v5 16/48] UefiCpuPkg/MpInitLib: Save CPU MP Data pointer

2016-08-02 Thread Jeff Fan
In PeiMpInitLib, save CPU MP Data pointer into one local Guided HOB. In DxeMpInitLib, save CPU MP Data pointer into one global variable. Add helper functions GetCpuMpData()/SaveCpuMpData(). v5: 1. Move CPU_INIT_MP_LIB_HOB_GUID from MpLib.c to MpLib.h to make all C files visible. Cc: Micha

[edk2] [Patch v5 18/48] UefiCpuPkg/MpInitLib: Register one period event to check APs status

2016-08-02 Thread Jeff Fan
In DxeMpInitLib, register one period event callback function CheckAPsStatus() used to check AP Status. v5: 1. Introduce AP_CHECK_INTERVAL for adjust AP check timer interval potential. v3: 1. Use CamelCase for mCheckAllAPsEvent, mStopCheckAllApsStatus and CheckAndUpdateApsStatus(). 2. M

[edk2] [Patch v5 17/48] UefiCpuPkg/MpInitLib: Register one End of PEI callback function

2016-08-02 Thread Jeff Fan
In PeiMpInitLib, register End of PEI callback function CpuMpEndOfPeiCallback(). v5: 1. Add comment block for mMpInitLibNotifyList. Cc: Michael Kinney Cc: Feng Tian Cc: Giri P Mudusuru Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan --- Uefi

[edk2] [Patch v5 19/48] UefiCpuPkg/MpInitLib: Allocate AP reset vector buffer under 1MB

2016-08-02 Thread Jeff Fan
In PeiMpInitLib, searching unallocated memory under in EFI_HOB_TYPE_RESOURCE_DESCRIPTOR hobs to find the memory under 1MB for AP reset vector. After End of PEI event triggered, we need to restore original the buffer contents to avoid crash the OS on S3 boot. In DxeMpInitLib, allocate the memory und

[edk2] [Patch v5 23/48] UefiCpuPkg/MpInitLib: Send INIT-SIPI-SIPI to get processor count

2016-08-02 Thread Jeff Fan
CollectProcessorCount() will send the 1st INIT-SIPI-SIPI to get processor count in system. Cc: Michael Kinney Cc: Feng Tian Cc: Giri P Mudusuru Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan --- UefiCpuPkg/Library/MpInitLib/MpLib.c | 40 +

[edk2] [Patch v5 22/48] UefiCpuPkg/MpInitLib: Add WakeUpAP()

2016-08-02 Thread Jeff Fan
WakeUpAP() is used to wakeup APs per current ApLoopMode and make sure APs wake up successfully. Cc: Michael Kinney Cc: Feng Tian Cc: Giri P Mudusuru Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan --- UefiCpuPkg/Library/MpInitLib/MpLib.c | 121

[edk2] [Patch v5 25/48] UefiCpuPkg/MpInitLib: Sort processor by ascending order of APIC ID

2016-08-02 Thread Jeff Fan
Cc: Michael Kinney Cc: Feng Tian Cc: Giri P Mudusuru Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan --- UefiCpuPkg/Library/MpInitLib/MpLib.c | 72 1 file changed, 72 insertions(+) diff --git a/UefiCpuPkg/L

[edk2] [Patch v5 20/48] UefiCpuPkg/MpInitLib: Add ApWakeupFunction() executed by assembly code

2016-08-02 Thread Jeff Fan
ApWakeupFunction() is the first C function executed from AP reset vector. When APs waken up at the first time, it will sync BSP's MTRR setting and load microcode on APs and collect APs' BIST information. When AP tasked finished, it will place APs it one loop specified by ApLoopMode. v5: 1. Rena

[edk2] [Patch v5 24/48] UefiCpuPkg/MpInitLib: Enable x2APIC mode on BSP/APs

2016-08-02 Thread Jeff Fan
If x2APIC flag is set, enable x2APIC mode on all APs and BSP. Before we wakeup APs to enable x2APIC mode, we should wait all APs have finished initialization. Cc: Michael Kinney Cc: Feng Tian Cc: Giri P Mudusuru Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-of

  1   2   >