[edk2] Questions about SubmitResources()

2017-11-09 Thread Tiger Liu
Hi, experts: I have a question about PciHostBridge’s SubmitResources() function. For example: 1. PciBus driver scanned a pci bus, found no pci devices needed resource, such as : MMIO ranges Then, Mem32Bridge->Length:0x0, Mem32Bridge->Alignment:0Xf , and AddrSpaceGranularity = 0 Then

Re: [edk2] GRUB issue on device priority

2017-11-09 Thread Haojian Zhuang
On 2017/11/8 21:53, Leif Lindholm wrote: On Tue, Nov 07, 2017 at 10:02:30PM +0800, Haojian Zhuang wrote: Hi all, It seems there's a device priority issue in GRUB. GRUB is behaving as expected. All block io handles are linked into the list in edk2, and GRUB could fetch it. Then GRUB creates

Re: [edk2] [PATCH edk2-non-osi v1] Hisilicon D0x: Remove uncacheable attribute from memory resource HOB

2017-11-09 Thread Ard Biesheuvel
On 9 November 2017 at 03:30, Ming Huang wrote: > If uncacheable attribute is included in memory resource HOB, > GCD spaces will also have EFI_MEMORY_UC capability, > then NonCoherentPciIoAllocateBuffer of NonDiscoverablePciDeviceDxe > module will allocate DMA buffer of EFI_MEMORY_UC type, which wi

[edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Set MaxPkgCState

2017-11-09 Thread Guo, Mang
Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Guo Mang --- .../Board/BensonGlacier/BoardInitPostMem/BoardInit.c | 11 +-- .../Board/BensonGlacier/BoardInitPostMem/BoardInitMiscs.h | 7 +++ .../Board/BensonGlacier/BoardInitPostMem/BoardInitPostMe

[edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Change BIOS version

2017-11-09 Thread Guo, Mang
Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Guo Mang --- Platform/BroxtonPlatformPkg/BiosId.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Platform/BroxtonPlatformPkg/BiosId.env b/Platform/BroxtonPlatformPkg/BiosId.env index 97510e5..3993fb2 1

Re: [edk2] [PATCH v2] UefiCpuPkg/CpuDxe: Fix multiple entries of RT_CODE in memory map

2017-11-09 Thread Laszlo Ersek
On 11/09/17 02:48, Yao, Jiewen wrote: > FED0 is HPET region. It is MMIO. Right, we add it in OvmfPkg/PlatformPei/Platform.c: // // address purpose size // - ... // 0xFED0HPET 1 KB

Re: [edk2] [Patch] MdeModulePkg/Core/Dxe: Remove extra connects for UEFI Applications

2017-11-09 Thread Zeng, Star
Reviewed-by: Star Zeng BTW: I see the code is using Image->ImageContext.ImageType at some places and Image->Type at other place, it seems a little inconsistent. Thanks, Star -Original Message- From: Kinney, Michael D Sent: Thursday, November 9, 2017 1:55 AM To: edk2-devel@lists.01.org

Re: [edk2] [PATCH 3/4] UefiCpuPkg/MtrrLib: Update algorithm to calculate optimal settings

2017-11-09 Thread Laszlo Ersek
On 11/09/17 08:11, Ni, Ruiyu wrote: > The old version is not just slow. > It cannot work in certain cases. That's why the new version was developed. > > The new version adds a new API which allows caller to pass in the scratch > buffer instead of using the stack. If a platform has limited stack, i

Re: [edk2] [platforms: PATCH 1/4] Marvell/Drivers: MvSpiFlash: Enable using driver in RT

2017-11-09 Thread Leif Lindholm
On Sun, Nov 05, 2017 at 11:55:36AM +0100, Marcin Wojtas wrote: > This patch applies necessary modifications, which allow to use > MvSpiFlash driver in variable support as a runtime service. > Its type is modified to DXE_RUNTIME_DRIVER, as well as > an event is created, which converts the pointers t

Re: [edk2] [platforms: PATCH 2/4] Marvell/Drivers: MvSpiDxe: Enable using driver in RT

2017-11-09 Thread Leif Lindholm
On Sun, Nov 05, 2017 at 11:55:37AM +0100, Marcin Wojtas wrote: > This patch applies necessary modifications, which allow to use > MvSpiDxe driver in variable support as a runtime service. > Its type is modified to DXE_RUNTIME_DRIVER, as well as > a new callback is introduced as a part of the SpiMas

Re: [edk2] [platforms: PATCH 2/4] Marvell/Drivers: MvSpiDxe: Enable using driver in RT

2017-11-09 Thread Marcin Wojtas
Leif 2017-11-09 14:44 GMT+01:00 Leif Lindholm : > On Sun, Nov 05, 2017 at 11:55:37AM +0100, Marcin Wojtas wrote: >> This patch applies necessary modifications, which allow to use >> MvSpiDxe driver in variable support as a runtime service. >> Its type is modified to DXE_RUNTIME_DRIVER, as well as

Re: [edk2] [PATCH v3] UefiCpuPkg/CpuDxe: Fix multiple entries of RT_CODE in memory map

2017-11-09 Thread Laszlo Ersek
Hi Jian, this is v4, but the subject says v3 :) If you post a new version, please make sure that it says "v5" in the subject. The logic looks OK to me; I've got some comments on style: On 11/09/17 02:39, Jian J Wang wrote: >> v4: >> a. Remove DoUpdate and check attributes mismatch all the time t

Re: [edk2] [platforms: PATCH 3/4] Platform/Marvell: Introduce MvFvbDxe variable support driver

2017-11-09 Thread Leif Lindholm
On Sun, Nov 05, 2017 at 11:55:38AM +0100, Marcin Wojtas wrote: > MvFvbDxe driver introduces non-volatile EFI variable support > for Armada platforms. It relies on memory-mapped SPI read access. > Implementation of EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL > is done with using existing Marvell SPI infras

Re: [edk2] [platforms: PATCH 4/4] Marvell/Armada: Enable variables support

2017-11-09 Thread Leif Lindholm
On Sun, Nov 05, 2017 at 11:55:39AM +0100, Marcin Wojtas wrote: > Wire up the non-volatile EFI variable store support, by switching from > the emulation driver to the real one. Define default values for > memory mapped SPI access, which must be configured by the early > firmware. In order to ensure

Re: [edk2] [platforms: PATCH 3/4] Platform/Marvell: Introduce MvFvbDxe variable support driver

2017-11-09 Thread Marcin Wojtas
Hi Leif, 2017-11-09 16:02 GMT+01:00 Leif Lindholm : > > On Sun, Nov 05, 2017 at 11:55:38AM +0100, Marcin Wojtas wrote: > > MvFvbDxe driver introduces non-volatile EFI variable support > > for Armada platforms. It relies on memory-mapped SPI read access. > > > Implementation of EFI_FIRMWARE_VOLUME_

Re: [edk2] [platforms: PATCH 3/4] Platform/Marvell: Introduce MvFvbDxe variable support driver

2017-11-09 Thread Leif Lindholm
On Thu, Nov 09, 2017 at 04:16:54PM +0100, Marcin Wojtas wrote: > Hi Leif, > > > > + { > > > +MvFvbGetAttributes, // GetAttributes > > > +MvFvbSetAttributes, // SetAttributes > > > +MvFvbGetPhysicalAddress, // GetPhysicalAddress > > > +MvFvbGetBlockSize,// GetB

Re: [edk2] [platforms: PATCH 3/4] Platform/Marvell: Introduce MvFvbDxe variable support driver

2017-11-09 Thread Marcin Wojtas
2017-11-09 16:40 GMT+01:00 Leif Lindholm : > On Thu, Nov 09, 2017 at 04:16:54PM +0100, Marcin Wojtas wrote: >> Hi Leif, >> >> > > + { >> > > +MvFvbGetAttributes, // GetAttributes >> > > +MvFvbSetAttributes, // SetAttributes >> > > +MvFvbGetPhysicalAddress, // GetPhysicalAd

Re: [edk2] [platforms: PATCH 3/4] Platform/Marvell: Introduce MvFvbDxe variable support driver

2017-11-09 Thread Leif Lindholm
On Thu, Nov 09, 2017 at 04:48:05PM +0100, Marcin Wojtas wrote: > 2017-11-09 16:40 GMT+01:00 Leif Lindholm : > > On Thu, Nov 09, 2017 at 04:16:54PM +0100, Marcin Wojtas wrote: > >> Hi Leif, > >> > >> > > + { > >> > > +MvFvbGetAttributes, // GetAttributes > >> > > +MvFvbSetAttributes,

Re: [edk2] [PATCH v2 1/3] EmbeddedPkg/RealTimeClockRuntimeDxe: move common functionality into core

2017-11-09 Thread Leif Lindholm
On Mon, Nov 06, 2017 at 06:20:36PM +, Ard Biesheuvel wrote: > RealTimeClockRuntimeDxe defers the hardware/platform specific handling > of reading/setting the hardware clock to RealTimeClockLib, but for > unknown reasons, it also defers common functionality such as input > validation and recordi

Re: [edk2] [PATCH v2 2/3] ArmPlatformPkg/PL031RealTimeClockLib: remove validation and DST handling

2017-11-09 Thread Leif Lindholm
On Mon, Nov 06, 2017 at 06:20:37PM +, Ard Biesheuvel wrote: > This library, which is intended to encapsulate the hardware specifics > of the ARM PL031 RTC, also implements its own input validation routines > and record the timezone and DST settings in its own set of EFI variables. > > This fun

Re: [edk2] [PATCH v2 3/3] ArmPlatformPkg/PL031RealTimeClockLib: ignore DST setting when timezone is set

2017-11-09 Thread Leif Lindholm
On Mon, Nov 06, 2017 at 06:20:38PM +, Ard Biesheuvel wrote: > According to the UEFI spec, the timezone setting which the platform needs > to record in addition to the actual date and time already reflects the > current DST setting. In other words, moving the clock from standard time > to daylig

Re: [edk2] [Patch] MdeModulePkg/Core/Dxe: Remove extra connects for UEFI Applications

2017-11-09 Thread Kinney, Michael D
Star, Thanks for noticing the inconsistency. I agree that Image->Type is a better choice. Mike > -Original Message- > From: Zeng, Star > Sent: Thursday, November 9, 2017 5:10 AM > To: Kinney, Michael D ; > edk2-devel@lists.01.org > Cc: Dong, Eric ; Zeng, Star > > Subject: RE: [Patch] M

Re: [edk2] [PATCH v2] ArmPlatformPkg/PrePeiCore: seed temporary stack before entering PEI core

2017-11-09 Thread Ard Biesheuvel
On 8 November 2017 at 16:12, Leif Lindholm wrote: > On Sun, Nov 05, 2017 at 04:29:15PM +, Ard Biesheuvel wrote: >> >> OK, this may sound completely unreasonable, but seeing those >> >> implementations overwrite callee-saved registers without saving them >> >> makes my brain unhappy. (Yes, I kn

Re: [edk2] [PATCH v2] ArmPlatformPkg/PrePeiCore: seed temporary stack before entering PEI core

2017-11-09 Thread Ard Biesheuvel
On 7 November 2017 at 18:13, Ard Biesheuvel wrote: > On 7 November 2017 at 18:09, Laszlo Ersek wrote: >> On 11/05/17 17:29, Ard Biesheuvel wrote: >>> On 5 November 2017 at 16:27, Ard Biesheuvel >>> wrote: On 5 November 2017 at 05:52, Leif Lindholm wrote: > On Fri, Nov 03, 2017 a

Re: [edk2] [PATCH v2 1/3] EmbeddedPkg/RealTimeClockRuntimeDxe: move common functionality into core

2017-11-09 Thread Ard Biesheuvel
On 9 November 2017 at 16:26, Leif Lindholm wrote: > On Mon, Nov 06, 2017 at 06:20:36PM +, Ard Biesheuvel wrote: >> RealTimeClockRuntimeDxe defers the hardware/platform specific handling >> of reading/setting the hardware clock to RealTimeClockLib, but for >> unknown reasons, it also defers com

Re: [edk2] [PATCH v3] UefiCpuPkg/CpuDxe: Fix multiple entries of RT_CODE in memory map

2017-11-09 Thread Wang, Jian J
Thanks for catching them. There'll be v5 today:) > -Original Message- > From: Laszlo Ersek [mailto:ler...@redhat.com] > Sent: Thursday, November 09, 2017 10:13 PM > To: Wang, Jian J ; edk2-devel@lists.01.org > Cc: Yao, Jiewen ; Dong, Eric > Subject: Re: [edk2] [PATCH v3] UefiCpuPkg/CpuDxe

[edk2] [PATCH] UefiCpuPkg/CpuDxe: Fix multiple entries of RT_CODE in memory map

2017-11-09 Thread Jian J Wang
> v5: >Coding style clean-up > v4: > a. Remove DoUpdate and check attributes mismatch all the time to avoid >a logic hole > b. Add warning message if failed to update capability > c. Add local variable to hold new attributes to make code cleaner > v3: > a. Add comment to explain more on u

Re: [edk2] [PATCH 3/4] UefiCpuPkg/MtrrLib: Update algorithm to calculate optimal settings

2017-11-09 Thread Ni, Ruiyu
> -Original Message- > From: Laszlo Ersek [mailto:ler...@redhat.com] > Sent: Thursday, November 9, 2017 9:16 PM > To: Ni, Ruiyu ; Justen, Jordan L > ; Jeff Fan > Cc: Kinney, Michael D ; edk2-devel@lists.01.org; > Yao, Jiewen ; Dong, Eric ; Ard > Biesheuvel > Subject: Re: [edk2] [PATCH 3

[edk2] [PATCH v5] UefiCpuPkg/CpuDxe: Fix multiple entries of RT_CODE in memory map

2017-11-09 Thread Jian J Wang
> v5: >Coding style clean-up > v4: > a. Remove DoUpdate and check attributes mismatch all the time to avoid >a logic hole > b. Add warning message if failed to update capability > c. Add local variable to hold new attributes to make code cleaner > v3: > a. Add comment to explain more on u

Re: [edk2] [PATCH] UefiCpuPkg/CpuDxe: Fix multiple entries of RT_CODE in memory map

2017-11-09 Thread Wang, Jian J
Sorry guys. I did update the title but v5 is still missing. A new one will be sent out. > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Jian J > Wang > Sent: Friday, November 10, 2017 8:42 AM > To: edk2-devel@lists.01.org > Cc: Laszlo Ersek ;

[edk2] [PATCH V2 0/5] Fix MSFT C4255 warning

2017-11-09 Thread Song, BinX
V2: Fix MSFT C4255 warning. V1: Enable MSFT C4255 warning. >From MSDN: Compiler Warning (level 4) C4255 function' : no function prototype given: converting '()' to '(void)' The compiler did not find an explicit list of arguments to a function. This warning is for the C compiler only. Cc: Liming G

[edk2] [PATCH V2 1/5] IntelFrameworkModulePkg: Fix MSFT C4255 warning

2017-11-09 Thread Song, BinX
V2: Fix MSFT C4255 warning V1: Enable MSFT C4255 warning. >From MSDN: Compiler Warning (level 4) C4255 function' : no function prototype given: converting '()' to '(void)' The compiler did not find an explicit list of arguments to a function. This warning is for the C compiler only. Cc: Liming Ga

[edk2] [PATCH V2 4/5] NetworkPkg: Fix MSFT C4255 warning

2017-11-09 Thread Song, BinX
V2: Fix MSFT C4255 warning V1: Enable MSFT C4255 warning. >From MSDN: Compiler Warning (level 4) C4255 function' : no function prototype given: converting '()' to '(void)' The compiler did not find an explicit list of arguments to a function. This warning is for the C compiler only. Cc: Liming Ga

[edk2] [PATCH V2 5/5] ShellPkg: Fix MSFT C4255 warning

2017-11-09 Thread Song, BinX
V2: Fix MSFT C4255 warning V1: Enable MSFT C4255 warning. >From MSDN: Compiler Warning (level 4) C4255 function' : no function prototype given: converting '()' to '(void)' The compiler did not find an explicit list of arguments to a function. This warning is for the C compiler only. Cc: Liming Ga

[edk2] [PATCH V2 2/5] MdeModulePkg: Fix MSFT C4255 warning

2017-11-09 Thread Song, BinX
V2: Fix MSFT C4255 warning V1: Enable MSFT C4255 warning. >From MSDN: Compiler Warning (level 4) C4255 function' : no function prototype given: converting '()' to '(void)' The compiler did not find an explicit list of arguments to a function. This warning is for the C compiler only. Cc: Liming Ga

[edk2] [PATCH V2 3/5] MdePkg: Fix MSFT C4255 warning

2017-11-09 Thread Song, BinX
V2: Fix MSFT C4255 warning V1: Enable MSFT C4255 warning. >From MSDN: Compiler Warning (level 4) C4255 function' : no function prototype given: converting '()' to '(void)' The compiler did not find an explicit list of arguments to a function. This warning is for the C compiler only. Cc: Liming Ga

Re: [edk2] [PATCH V2 0/5] Fix MSFT C4255 warning

2017-11-09 Thread Gao, Liming
Reviewed-by: Liming Gao >-Original Message- >From: Song, BinX >Sent: Friday, November 10, 2017 12:10 PM >To: edk2-devel@lists.01.org >Cc: Gao, Liming >Subject: [PATCH V2 0/5] Fix MSFT C4255 warning > >V2: >Fix MSFT C4255 warning. >V1: >Enable MSFT C4255 warning. > >From MSDN: >Compiler W

[edk2] [PATCH v5 4/7] MdeModulePkg/DxeIpl: Enable paging for heap guard

2017-11-09 Thread Jian J Wang
Heap guard feature needs paging to work properly. 64-bit BIOS uses PcdDxeIplBuildPageTables to control the page table setup. 32-bit BIOS has to check heap guard feature to decide enabling paging or not. Cc: Star Zeng Cc: Eric Dong Cc: Jiewen Yao Suggested-by: Ayellet Wolman Contributed-under:

[edk2] [PATCH v5 1/7] MdeModulePkg/MdeModulePkg.dec, .uni: Add Protocol, PCDs and string tokens

2017-11-09 Thread Jian J Wang
>v4: > No content change but move this patch to be the first one Cc: Star Zeng Cc: Eric Dong Cc: Jiewen Yao Suggested-by: Ayellet Wolman Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang Reviewed-by: Jiewen Yao Regression-tested-by: Laszlo Ersek --- MdeModu

[edk2] [PATCH v5 7/7] MdeModulePkg/PiSmmCore: Implement heap guard feature for SMM mode

2017-11-09 Thread Jian J Wang
> v5 > a. Remove lib and pcd no longer needed from PiSmmCore.inf > v4 > a. According to Ray's feedback, change the name of new protocol definitions from EFI_ to EDKII_. > b. Coding style cleanup > v3 > According to Jiewen's feedback, use new added protocol > gEdkiiSmmMemoryAttributeProto

[edk2] [PATCH v5 5/7] MdeModulePkg/DxeCore: Implement heap guard feature for UEFI

2017-11-09 Thread Jian J Wang
> v4 > Coding style cleanup > v3 > Fix build error with GCC toolchain > v2 > According to Eric's feedback: > a. Remove local variable initializer with memory copy from globals > b. Add comment for the use of mOnGuarding > c. Change map table dump code to use DEBUG_PAGE|DEBUG_POOL level >messa

[edk2] [PATCH v5 3/7] UefiCpuPkg/CpuDxe: Reduce debug message

2017-11-09 Thread Jian J Wang
Heap guard feature will frequently update page attributes. The debug message in CpuDxe driver will slow down the boot performance noticeably. Changing the debug level to DEBUG_POOL and DEBUG_PAGE to reduce the message output for normal debug configuration. Cc: Eric Dong Cc: Jiewen Yao Suggested-

[edk2] [PATCH v5 0/7] Implement heap guard feature

2017-11-09 Thread Jian J Wang
> Patch V5 changes: > a. Remove EFI from comment for SMM memory attribute protocol. > b. Change parameter modifier of GetAttribute from IN to OUT > c. Add ASSERT to make sure static paging and heap guard are not enabled >at the same time > d. Remove lib and pcd no longer needed in PiSmmCore.inf

[edk2] [PATCH v5 2/7] MdeModulePkg/SmmMemoryAttribute.h: Add new protocol definitions

2017-11-09 Thread Jian J Wang
> v5 > a. Remove EFI wording in comment for SMM memory attribute protocol. > b. Change parameter modifier from IN to OUT The new protocol gEdkiiSmmMemoryAttributeProtocolGuid is intended for PiSmmCore to be able to change memory page attributes for the sake of heap guard feature. This protocol pr

[edk2] [PATCH v5 6/7] UefiCpuPkg/PiSmmCpuDxeSmm: Add SmmMemoryAttribute protocol

2017-11-09 Thread Jian J Wang
> v5 > a. Change parameter modifier from IN to OUT. > b. Add ASSERT to make sure static paging and heap guard are not enabled at >the same time. > v4 > a. According to Ray's feedback, change the definition name prefix from EFI_ >to EDKII_ > b. Coding style cleanup > c. Add more comments fo

Re: [edk2] [Patch] MdeModulePkg: Update IP4 stack to support point-to-point link with 31-bit mask.

2017-11-09 Thread Wu, Jiaxin
Reviewed-by: Wu Jiaxin > -Original Message- > From: Fu, Siyuan > Sent: Wednesday, October 18, 2017 1:17 PM > To: edk2-devel@lists.01.org > Cc: Wu, Jiaxin ; Ye, Ting > Subject: [Patch] MdeModulePkg: Update IP4 stack to support point-to-point > link with 31-bit mask. > > This patch is t

[edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] fTPM

2017-11-09 Thread xianhu2x
Boot failed after PTT is enabled with gcc-built image Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: xianhu2x --- .../Txe/Library/PeiDxePttPtpLib/PeiDxePttPtpLib.c | 44 ++ 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/Silicon/Brox

[edk2] [PATCH edk2-non-osi v2] Hisilicon D0x: Remove uncacheable attribute from memory resource HOB

2017-11-09 Thread Ming Huang
If uncacheable attribute is included in memory resource HOB, GCD spaces will also have EFI_MEMORY_UC capability, then NonCoherentPciIoAllocateBuffer of NonDiscoverablePciDeviceDxe module will allocate DMA buffer of EFI_MEMORY_UC type, which will cause alignment fault exception with BaseMemoryLibOpt

[edk2] [PATCH edk2-non-osi v2] Update D03/D05 MemoryInit.efi binary for bug 3419

2017-11-09 Thread Ming Huang
https://bugs.linaro.org/show_bug.cgi?id=3061 For fix this bug,the function PciIoPciRead of NonDiscoverablePciDeviceDxe should be modified also. Code can also be found in github: https://github.com/hisilicon/OpenPlatformPkg.git branch: rp-osi-bug-v2 Ming Huang (1): Hisilicon D0x: Remove uncache