Re: [edk2] [PATCH] MdeModulePkg/DxeIpl: support more NX related PCDs

2018-09-13 Thread Wang, Jian J
Tests: a. try all related PCDs combinations and check the page table attributes and ASSERT message b. boot to shell on real intel platform with valid PCD setting combinations (IA32/X64) c. boot to fedora26, ubuntu18.04, windows 7 and windows 10 on OVMF emulated platform (X64) Regards,

[edk2] [PATCH] MdeModulePkg/DxeIpl: support more NX related PCDs

2018-09-13 Thread Jian J Wang
BZ#1116: https://bugzilla.tianocore.org/show_bug.cgi?id=1116 Currently IA32_EFER.NXE is only set against PcdSetNxForStack. This confuses developers because following two other PCDs also need NXE to be set, but actually not. PcdDxeNxMemoryProtectionPolicy PcdImageProtectionPolicy This

Re: [edk2] [Patch] BaseTools: Fix a bug for Unused PCDs section display in the report

2018-09-13 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 Yonghong Zhu Sent: Thursday, September 13, 2018 1:36 PM To: edk2-devel@lists.01.org Cc: Gao, Liming Subject: [edk2] [Patch] BaseTools: Fix a

Re: [edk2] [PATCH] UefiCpuPkg/MtrrLib: Add flag to skip disabling MTRRs prior to MTRR change.

2018-09-13 Thread Ni, Ruiyu
On 9/14/2018 3:31 AM, Duran, Leo wrote: -Original Message- From: Ni, Ruiyu Sent: Wednesday, September 12, 2018 9:39 PM To: Duran, Leo ; Laszlo Ersek ; edk2-devel@lists.01.org Cc: Dong, Eric Subject: RE: [PATCH] UefiCpuPkg/MtrrLib: Add flag to skip disabling MTRRs prior to MTRR

Re: [edk2] [PATCH V2 4/6] PcAtChipsetPkg PcRtc: Use new EfiLocateFirstAcpiTable()

2018-09-13 Thread Ni, Ruiyu
On 9/14/2018 12:41 PM, Ni, Ruiyu wrote: On 9/13/2018 6:26 PM, Star Zeng wrote: https://bugzilla.tianocore.org/show_bug.cgi?id=967 Request to add a library function for GetAcpiTable() in order to get ACPI table using signature as input. After evaluation, we found there are many duplicated code

Re: [edk2] [PATCH V2 4/6] PcAtChipsetPkg PcRtc: Use new EfiLocateFirstAcpiTable()

2018-09-13 Thread Ni, Ruiyu
On 9/13/2018 6:26 PM, Star Zeng wrote: https://bugzilla.tianocore.org/show_bug.cgi?id=967 Request to add a library function for GetAcpiTable() in order to get ACPI table using signature as input. After evaluation, we found there are many duplicated code to find ACPI table by signature in

Re: [edk2] [PATCH V2 1/6] MdePkg UefiLib: Add new EfiLocateXXXAcpiTable() APIs

2018-09-13 Thread Ni, Ruiyu
Star, I have two comments. see below. On 9/13/2018 6:26 PM, Star Zeng wrote: https://bugzilla.tianocore.org/show_bug.cgi?id=967 Request to add a library function for GetAcpiTable() in order to get ACPI table using signature as input. After evaluation, we found there are many duplicated code to

[edk2] [PATCH] BaseTools: Regression bug Linux script used windows line format

2018-09-13 Thread Feng, YunhuaX
regression by 15e20228258c1714cd90207a52101a5b1b54cd2c and 9f3594782de9051cbf599f9af006903ed3f6669e Linux execute script must use '\n' not '\r\n' for end of line Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng ---

Re: [edk2] [PATCH V2 6/6] UefiCpuPkg PiSmmCpuDxeSmm: Use new EfiLocateFirstAcpiTable()

2018-09-13 Thread Dong, Eric
Reviewed-by: Eric Dong > -Original Message- > From: Zeng, Star > Sent: Thursday, September 13, 2018 6:27 PM > To: edk2-devel@lists.01.org > Cc: Zeng, Star ; Younas khan > ; Kinney, Michael D > ; Gao, Liming ; Yao, > Jiewen ; Ni, Ruiyu ; Dong, Eric > ; Laszlo Ersek > Subject: [PATCH V2

Re: [edk2] [PATCH] UefiCpuPkg/MtrrLib: Add flag to skip disabling MTRRs prior to MTRR change.

2018-09-13 Thread Duran, Leo
> -Original Message- > From: Ni, Ruiyu > Sent: Wednesday, September 12, 2018 9:39 PM > To: Duran, Leo ; Laszlo Ersek ; > edk2-devel@lists.01.org > Cc: Dong, Eric > Subject: RE: [PATCH] UefiCpuPkg/MtrrLib: Add flag to skip disabling MTRRs > prior to MTRR change. > > Leo, > Sorry I was

Re: [edk2] [PATCH 0/4] MdeModulePkg: add support for dispatching foreign arch PE/COFF images

2018-09-13 Thread Kinney, Michael D
Ard, I think there is a fundamental assumption that the sizeof(UINTN) and size of pointers of the native CPU are the same as the emulated CPU. If that is not the case, then I would like to see more details. Otherwise that is a significant restriction that needs to be clearly documented.

Re: [edk2] [patch 1/3] EmbeddedPkg/VirtualKeyboard: Avoid notification called more than once

2018-09-13 Thread Ard Biesheuvel
On 10 September 2018 at 09:12, dandan bi wrote: > From: Dandan Bi > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=996 > > Issue: > In current code logic, when a key is pressed, it will search > the whole NotifyList to find whether a notification has been > registered with the keystroke.

Re: [edk2] [PATCH v2 0/4] SdMmc fixes

2018-09-13 Thread Wu, Hao A
Hi Marcin, Please give me some time to go through the series. I will provide feedbacks on these patches. Sorry for the possible delay. Best Regards, Hao Wu From: Marcin Wojtas [mailto:m...@semihalf.com] Sent: Wednesday, September 12, 2018 3:29 PM To: edk2-devel-01 Cc: Wu, Hao A; Ard

Re: [edk2] [PATCH v2 1/4] MdeModulePkg/SdMmcPciHcDxe: Fix HS200 operation

2018-09-13 Thread Wu, Hao A
> -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of > Marcin Wojtas > Sent: Friday, September 07, 2018 5:10 PM > To: edk2-devel@lists.01.org > Cc: Tian, Feng; t...@semihalf.com; nad...@marvell.com; Gao, Liming; Kinney, > Michael D > Subject: [edk2]

Re: [edk2] [PATCH] IntelSiliconPkg IntelVTdDxe: Check HeaderType if func 0 is implemented

2018-09-13 Thread Yao, Jiewen
Reviewed-by: jiewen@intel.com > -Original Message- > From: Zeng, Star > Sent: Thursday, September 13, 2018 2:29 PM > To: edk2-devel@lists.01.org > Cc: Zeng, Star ; Yao, Jiewen ; > Chaganty, Rangasai V ; Chang, Tomson > ; Huang, Jenny ; Chan, > Amy ; Ni, Ruiyu > Subject: [PATCH]

Re: [edk2] PciBusDxe: PCI-Express bug with dynamic PcdPciExpressBaseAddress

2018-09-13 Thread Laszlo Ersek
On 09/13/18 14:27, Nikita Leshenko wrote: > > >> On 11 Sep 2018, at 15:34, Laszlo Ersek wrote: >> >> "BasePciExpressLib" has the prefix "Base", meaning that it is supposed >> to be usable in all types of firmware modules, even in SEC and PEIMs -- >> which may not have access to writeable memory

Re: [edk2] PciBusDxe: PCI-Express bug with dynamic PcdPciExpressBaseAddress

2018-09-13 Thread Nikita Leshenko
> On 11 Sep 2018, at 15:34, Laszlo Ersek wrote: > > "BasePciExpressLib" has the prefix "Base", meaning that it is supposed > to be usable in all types of firmware modules, even in SEC and PEIMs -- > which may not have access to writeable memory except stack (i.e. > writeable global

Re: [edk2] [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: add message for S3 config error

2018-09-13 Thread Wang, Jian J
Thanks for the explanation. Regards, Jian From: Laszlo Ersek [mailto:ler...@redhat.com] Sent: Wednesday, September 12, 2018 6:04 PM To: Wang, Jian J ; Zeng, Star ; edk2-devel@lists.01.org Cc: You, Benjamin ; Dong, Eric Subject: Re: [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: add message for S3 config

Re: [edk2] [PATCH 3/4] MdeModulePkg/PciBusDxe: invoke PE/COFF emulator for foreign option ROMs

2018-09-13 Thread Ard Biesheuvel
On 13 September 2018 at 12:24, Zeng, Star wrote: > On 2018/9/12 21:21, Ard Biesheuvel wrote: >> >> When enumerating option ROM images, take into account whether an emulator >> exists that would allow dispatch of PE/COFF images built for foreign >> architectures. >> >> Contributed-under: TianoCore

Re: [edk2] [PATCH V2 6/6] UefiCpuPkg PiSmmCpuDxeSmm: Use new EfiLocateFirstAcpiTable()

2018-09-13 Thread Laszlo Ersek
On 09/13/18 12:27, Star Zeng wrote: > https://bugzilla.tianocore.org/show_bug.cgi?id=967 > Request to add a library function for GetAcpiTable() in order > to get ACPI table using signature as input. > > After evaluation, we found there are many duplicated code to > find ACPI table by signature in

Re: [edk2] [PATCH 2/4] MdeModulePkg/DxeCore: invoke the emulator protocol for foreign images

2018-09-13 Thread Ard Biesheuvel
On 13 September 2018 at 12:23, Zeng, Star wrote: > On 2018/9/12 21:21, Ard Biesheuvel wrote: >> >> When encountering PE/COFF images that cannot be supported natively, >> attempt to locate an instance of the PE/COFF image emulator protocol, >> and if it supports the image, proceed with loading it

Re: [edk2] [PATCH 1/4] MdeModulePkg: introduce PE/COFF image emulator protocol

2018-09-13 Thread Ard Biesheuvel
On 13 September 2018 at 12:05, Zeng, Star wrote: > On 2018/9/12 21:21, Ard Biesheuvel wrote: >> >> Introduce a protocol that can be invoked by the image loading services >> to execute foreign architecture PE/COFF images via an emulator. >> >> Contributed-under: TianoCore Contribution Agreement

Re: [edk2] [PATCH 0/4] MdeModulePkg: add support for dispatching foreign arch PE/COFF images

2018-09-13 Thread Ard Biesheuvel
On 12 September 2018 at 17:10, Kinney, Michael D wrote: > Ard, > > I think there may be a lot of assumptions in this > proposal that are not documented. > > I do not see any description of how an image is > started or how calls between native code and emulated > code are handled. > It is the job

Re: [edk2] [PATCH] IntelSiliconPkg IntelVTdDxe: Optimize when func 0 is not implemented

2018-09-13 Thread Zeng, Star
Thanks. Please also help review [PATCH] IntelSiliconPkg IntelVTdDxe: Check HeaderType if func 0 is implemented. Star -Original Message- From: Yao, Jiewen Sent: Thursday, September 13, 2018 2:42 PM To: Zeng, Star ; Ni, Ruiyu ; edk2-devel@lists.01.org Cc: Chang, Tomson ; Huang, Jenny

[edk2] [PATCH V2 6/6] UefiCpuPkg PiSmmCpuDxeSmm: Use new EfiLocateFirstAcpiTable()

2018-09-13 Thread Star Zeng
https://bugzilla.tianocore.org/show_bug.cgi?id=967 Request to add a library function for GetAcpiTable() in order to get ACPI table using signature as input. After evaluation, we found there are many duplicated code to find ACPI table by signature in different modules. This patch updates

[edk2] [PATCH V2 4/6] PcAtChipsetPkg PcRtc: Use new EfiLocateFirstAcpiTable()

2018-09-13 Thread Star Zeng
https://bugzilla.tianocore.org/show_bug.cgi?id=967 Request to add a library function for GetAcpiTable() in order to get ACPI table using signature as input. After evaluation, we found there are many duplicated code to find ACPI table by signature in different modules. This patch updates

[edk2] [PATCH V2 2/6] IntelSiliconPkg IntelVTdDxe: Use new EfiLocateFirstAcpiTable()

2018-09-13 Thread Star Zeng
https://bugzilla.tianocore.org/show_bug.cgi?id=967 Request to add a library function for GetAcpiTable() in order to get ACPI table using signature as input. After evaluation, we found there are many duplicated code to find ACPI table by signature in different modules. This patch updates

[edk2] [PATCH V2 3/6] MdeModulePkg S3SaveStateDxe: Use new EfiLocateFirstAcpiTable()

2018-09-13 Thread Star Zeng
https://bugzilla.tianocore.org/show_bug.cgi?id=967 Request to add a library function for GetAcpiTable() in order to get ACPI table using signature as input. After evaluation, we found there are many duplicated code to find ACPI table by signature in different modules. This patch updates

[edk2] [PATCH V2 5/6] ShellPkg DpDynamicCommand: Use new EfiLocateFirstAcpiTable()

2018-09-13 Thread Star Zeng
https://bugzilla.tianocore.org/show_bug.cgi?id=967 Request to add a library function for GetAcpiTable() in order to get ACPI table using signature as input. After evaluation, we found there are many duplicated code to find ACPI table by signature in different modules. This patch updates

[edk2] [PATCH V2 1/6] MdePkg UefiLib: Add new EfiLocateXXXAcpiTable() APIs

2018-09-13 Thread Star Zeng
https://bugzilla.tianocore.org/show_bug.cgi?id=967 Request to add a library function for GetAcpiTable() in order to get ACPI table using signature as input. After evaluation, we found there are many duplicated code to find ACPI table by signature in different modules. This patch adds new

[edk2] [PATCH V2 0/6] Add new EfiLocateXXXAcpiTable() APIs

2018-09-13 Thread Star Zeng
It is the V2 patch series of https://lists.01.org/pipermail/edk2-devel/2018-August/029214.html It is according to the discussion at https://lists.01.org/pipermail/edk2-devel/2018-September/029348.html V2: 1. Add EfiLocateFirstAcpiTable() and EfiLocateNextAcpiTable() instead of

Re: [edk2] [PATCH 3/4] MdeModulePkg/PciBusDxe: invoke PE/COFF emulator for foreign option ROMs

2018-09-13 Thread Zeng, Star
On 2018/9/12 21:21, Ard Biesheuvel wrote: When enumerating option ROM images, take into account whether an emulator exists that would allow dispatch of PE/COFF images built for foreign architectures. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel ---

Re: [edk2] [PATCH 2/4] MdeModulePkg/DxeCore: invoke the emulator protocol for foreign images

2018-09-13 Thread Zeng, Star
On 2018/9/12 21:21, Ard Biesheuvel wrote: When encountering PE/COFF images that cannot be supported natively, attempt to locate an instance of the PE/COFF image emulator protocol, and if it supports the image, proceed with loading it and register it with the emulator. Contributed-under:

Re: [edk2] [PATCH 1/4] MdeModulePkg: introduce PE/COFF image emulator protocol

2018-09-13 Thread Zeng, Star
On 2018/9/12 21:21, Ard Biesheuvel wrote: Introduce a protocol that can be invoked by the image loading services to execute foreign architecture PE/COFF images via an emulator. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel ---

Re: [edk2] [PATCH v2] MdePkg/SynchronizationLib: fix Interlocked[De|In]crement return value

2018-09-13 Thread Ni, Ruiyu
Please ignore this one. It's an incomplete patch. Please check V3. Thanks/Ray > -Original Message- > From: edk2-devel On Behalf Of Ruiyu Ni > Sent: Thursday, September 13, 2018 4:30 PM > To: edk2-devel@lists.01.org > Cc: Kinney, Michael D ; Yao, Jiewen > ; Gao, Liming > Subject: [edk2]

[edk2] [PATCH v3] MdePkg/SynchronizationLib: fix Interlocked[De|In]crement return value

2018-09-13 Thread Ruiyu Ni
Today's InterlockedIncrement()/InterlockedDecrement() guarantees to perform atomic increment/decrement but doesn't guarantee the return value equals to the new value. The patch fixes the behavior to use "XADD" instruction to guarantee the return value equals to the new value. The patch calls

[edk2] [PATCH v2] MdePkg/SynchronizationLib: fix Interlocked[De|In]crement return value

2018-09-13 Thread Ruiyu Ni
Today's InterlockedIncrement()/InterlockedDecrement() guarantees to perform atomic increment/decrement but doesn't guarantee the return value equals to the new value. The patch fixes the behavior to use "XADD" instruction to guarantee the return value equals to the new value. The patch calls

Re: [edk2] [PATCH] IntelSiliconPkg IntelVTdDxe: Optimize when func 0 is not implemented

2018-09-13 Thread Yao, Jiewen
Sounds good. Reviewed-by: jiewen@intel.com > -Original Message- > From: Zeng, Star > Sent: Thursday, September 13, 2018 2:30 PM > To: Yao, Jiewen ; Ni, Ruiyu ; > edk2-devel@lists.01.org > Cc: Chang, Tomson ; Huang, Jenny > ; Chan, Amy ; Zeng, Star > > Subject: RE: [edk2] [PATCH]

Re: [edk2] [PATCH] IntelSiliconPkg IntelVTdDxe: Optimize when func 0 is not implemented

2018-09-13 Thread Zeng, Star
Good information. :) The UEFI shell implementation also has the code below. if (PciHeader.VendorId == 0x && Func == 0) { break; } if (PciHeader.VendorId != 0x) { The ScanPciBus() has no functional issue, but has another

[edk2] [PATCH] IntelSiliconPkg IntelVTdDxe: Check HeaderType if func 0 is implemented

2018-09-13 Thread Star Zeng
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1169 Current code checks HeaderType of Function 0 even Function 0 is not implemented. HeaderType value will be 0xFF if Function 0 is not implemented, then MaxFunction will be set to PCI_MAX_FUNC + 1. The code can be optimized to only check