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

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

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

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

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

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

[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

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

[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:

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

[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 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

[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

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 consuming MP Initialize library. > > Cc: Michael Kinney > Cc: Feng Tian > Cc: Jordan Justen > Cc: Laszlo Ersek > Contributed-under:

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

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

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

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
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, > >

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 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

[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:

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

[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

[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

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

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

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] [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

[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

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

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

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

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

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

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

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

[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

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), >

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

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

[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] 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

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

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 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

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

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

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 >>

[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

Re: [edk2] [patch] BaseTool/UPT: Not expand macro for UserExtension

2016-08-02 Thread Zhu, Yonghong
Reviewed-by: Yonghong Zhu Best Regards, Zhu Yonghong -Original Message- From: Chen, Hesheng Sent: Monday, August 01, 2016 11:26 PM To: edk2-devel@lists.01.org Cc: Zhu, Yonghong Subject: [patch] BaseTool/UPT: Not expand macro for

Re: [edk2] [PATCH] MdePkg: move to 'hidden' visibility for all symbols under GCC/X64

2016-08-02 Thread Ard Biesheuvel
On 2 August 2016 at 04:49, Gao, Liming wrote: > Reviewed-by: Liming Gao > Thanks Pushed as 28ade7b802e0 -- Ard. >> -Original Message- >> From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org] >> Sent: Monday, August 01, 2016 2:57 PM >> To:

Re: [edk2] [Patch] MdeModulePkg LoadFileOnFv2: Fix the potential NULL pointer access

2016-08-02 Thread Tian, Feng
Reviewed-by: Feng Tian Thanks Feng -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Liming Gao Sent: Tuesday, August 2, 2016 1:39 PM To: edk2-devel@lists.01.org Subject: [edk2] [Patch] MdeModulePkg LoadFileOnFv2: Fix the

[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;

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

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

2016-08-02 Thread Laszlo Ersek
On 08/02/16 03:13, Laszlo Ersek wrote: > (1) So, here's what I would like to see in the commit message: > > -- > > In the Platform Init v1.4a spec, > - Volume 1 "4.7 Status Code Service" defines the > EFI_PEI_REPORT_STATUS_CODE.ReportStatusCode() service, sorry, the above is a typo,

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

2016-08-02 Thread Jeff Fan
We add MP Initialize Library defined in UefiCpuPkg/Include/Library/MpInitLib.h. It will provide basic functionalities of MP services and could be consumed by CPU MP PEI and CPU MP DXE to produce CPU MP PPI and CPU MP Protocol. Then most of code could be shared between PEI and DXE modules.

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

2016-08-02 Thread Jeff Fan
#define MSR_IA32_APIC_BASE_ADDRESS is duplicated with #define MSR_IA32_APIC_BASE defined in UefiCpuPkg/Include/Register/ArchitecturalMsr.h, so we could remove it and update the modules to use MSR_IA32_APIC_BASE from ArchitecturalMsr.h. Structure MSR_IA32_APIC_BASE conflicts with #define

[edk2] [Patch v5 12/48] UefiCpuPkg/MpInitLib: Allocate and initialize memory of MP Data buffer

2016-08-02 Thread Jeff Fan
v5: 1. Add comment block for enum AP_INIT_STATE and structure CPU_AP_DATA. 2. Add more comment for structure CPU_INFO_IN_HOB. 3. Add more clarification in structure _CPU_MP_DATA for those fields pass from PEI to DXE. Cc: Michael Kinney Cc: Feng Tian

[edk2] [Patch v5 03/48] UefiCpuPkg/CpuS3DataDxe: Move StartupVector allocation to EndOfDxe()

2016-08-02 Thread Jeff Fan
Currently, we will allocate StartupVector buffer under 1MB at entry point function. But some modules may allocate some hard code address under 1MB. For example, LegacyBiosDxe driver tries to manage some legacy range under 640KB. To avoid the conflicts, we move StartupVector buffer allocation to

[edk2] [Patch v5 07/48] UefiCpuPkg/MpInitLib: Fix typo and clean up the code

2016-08-02 Thread Jeff Fan
1. Rename NumApsExecutingLoction to NumApsExecutingLocation 2. Update some comments in NASM files. 3. Remove PeiCpuMpData from MP_CPU_EXCHANGE_INFO. Cc: Michael Kinney Cc: Feng Tian Cc: Giri P Mudusuru Cc: Laszlo Ersek

[edk2] [Patch v5 08/48] UefiCpuPkg/MpInitLib: Add EnableExecuteDisable in MP_CPU_EXCHANGE_INFO

2016-08-02 Thread Jeff Fan
EnableExecuteDisable in MP_CPU_EXCHANGE_INFO is used to tell AP reset vector if enable execute disable feature on APs. This feature should be enabled before CR3 is written. Cc: Michael Kinney Cc: Feng Tian Cc: Giri P Mudusuru

[edk2] [Patch v5 09/48] UefiCpuPkg/MpInitLib: Add AsmRelocateApLoop() assembly code

2016-08-02 Thread Jeff Fan
AsmRelocateApLoop() is used to place APs into MWAIT-loop if MonitorMwait feature is supported before hand-off to OS, or place APs into HLT-loop if MonitorMwait feature is not supported. If the current mode is long mode, we will switch APs to protected mode before placing APs in MWAIT-loop or

[edk2] [Patch v5 14/48] UefiCpuPkg/MpInitLib: Add CPU_VOLATILE_REGISTERS & worker functions

2016-08-02 Thread Jeff Fan
Add CPU_VOLATILE_REGISTERS definitions for CRx and DRx required to be restored after APs received INIT IPI. Add worker functions SaveVolatileRegisters()/RestoreVolatileRegisters() used to save/restore CRx and DRx. It also check if Debugging Extensions supported or not. v5: 1. Add comment block

[edk2] [Patch v5 06/48] UefiCpuPkg/MpInitLib: Add AP assembly code and MP_CPU_EXCHANGE_INFO

2016-08-02 Thread Jeff Fan
Add assembly code for AP reset vector and the definition of MP_CPU_EXCHANGE_INFO that are used to exchange the data between C code and assembly code when AP wake up. v4: 1. Copy MP_CPU_EXCHANGE_INFO from UefiCpuPkg/CpuMpPei/CpuMpPei.h 2. Copy MpEqu.inc and MpFuncs.nasm from

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

2016-08-02 Thread Jeff Fan
Add microcode definitions defined in Intel(R) 64 and IA-32 Architectures Software Developer's Manual Volume 3A, Section 9.11. v4: 1. ProcessorSignature type changed to CPU_MICROCODE_PROCESSOR_SIGNATURE 2. Add pack(1) for structure CPU_MICROCODE_HEADER and CPU_MICROCODE_EXTENDED_TABLE.

[edk2] [Patch v5 05/48] UefiCpuPkg/MpInitLib: Add two instances PeiMpInitLib and DxeMpInitLib

2016-08-02 Thread Jeff Fan
Add two MP Initialize Library instances PeiMpInitLib.inf and DxeMpInitLib.inf with NULL implementation. One PeiMpInitLib.inf is consumed by PEI MP driver. Another DxeMpInitLib.inf is consumed by DXE MP driver. Place MpInitLibStartupAllAPs()/MpInitLibStartupThisAp()/MpInitLibSwitchBSP()/

[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.

[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

[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

[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

[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:

[edk2] [Patch v5 13/48] UefiCpuPkg/MpInitLib: Initialize CPU_AP_DATA for CPU APs

2016-08-02 Thread Jeff Fan
Initialize CPU_AP_DATA for CPU APs and add GetApState()/SetApState() helper functions to get/set AP state. Cc: Michael Kinney Cc: Feng Tian Cc: Giri P Mudusuru Cc: Laszlo Ersek Contributed-under:

[edk2] [Patch v5 10/48] UefiCpuPkg/MpInitLib: Add MP_ASSEMBLY_ADDRESS_MAP

2016-08-02 Thread Jeff Fan
In MpInitLibInitialize(), invoke AsmGetAddress() to get get assembly functions' entry addresses and the sizes from returned MP_ASSEMBLY_ADDRESS_MAP structure. v5: 1. Add more detailed comments for structure MP_ASSEMBLY_ADDRESS_MAP. v4: 1. Add AsmRelocateApLoop information return in

[edk2] [Patch v5 11/48] UefiCpuPkg/MpInitLib: Get ApLoopMode and MointorFilter size

2016-08-02 Thread Jeff Fan
Firstly, get ApLoopMode from PcdCpuApLoopMode. If MonitorMwait feature is not supported, update ApLoopMode to ApHltLoop. If MonitorMwait feature is supported, get MointorFilter size by CPUID.[EAX=05H]:EBX.BIT0-15. v5: 1. Add comment block for enum AP_LOOP_MODE. Cc: Michael Kinney

[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:

[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.

[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 ---

[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

[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

[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

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

2016-08-02 Thread Jeff Fan
This update is for CpuMpPei consuming MP Initialize library. Cc: Michael Kinney Cc: Feng Tian Cc: Jordan Justen Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0

[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

[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

[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

[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:

[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 ---

[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

[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

[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.

[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

[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

[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

[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

[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 ---

[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

[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

[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

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

  1   2   >