[edk2] [PATCH v3] EmbeddedPkg: add driver to set graphical/serial console preference

2017-10-20 Thread Ard Biesheuvel
Linux on ARM/arm64 will infer from the presence of a /chosen/stdout-path DT property or of a SPCR ACPI table that the primary console is the serial port, even if a graphical console is available as well. So let's introduce a driver that allows the user to set a preference between graphical and

Re: [edk2] [PATCH v1 1/1] CryptoPkg/BaseCryptLib: remove some duplicate initializations.

2017-10-20 Thread Peter Jones
> Assuming the maintainers are fine with the patch as well, I suggest that > they please replace the word "initializations" with "assignments" in the > subject, to be pedantic on the C-lang level. Well, that's why I said "initializations" instead of "initializers", but if it's more clear to you,

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

2017-10-20 Thread Laszlo Ersek
On 10/20/17 18:52, Ard Biesheuvel wrote: > On 20 October 2017 at 17:51, Laszlo Ersek wrote: >> On 10/20/17 18:39, Ard Biesheuvel wrote: >>> On 20 October 2017 at 17:37, Gao, Liming wrote: Ard: This case is to share the same value between

Re: [edk2] [PATCH v1 1/1] CryptoPkg/BaseCryptLib: remove some duplicate initializations.

2017-10-20 Thread Laszlo Ersek
(adding CryptoPkg maintainers from Maintainers.txt, plus Steven for clang) On 10/20/17 17:10, Peter Jones wrote: > clang-analyzer noticed this: > > Pk/CryptPkcs7Verify.c:600:5: warning: Value stored to 'OldSize' is never read > OldSize= BufferSize; > ^~~ >

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

2017-10-20 Thread Ard Biesheuvel
On 20 October 2017 at 17:51, Laszlo Ersek wrote: > On 10/20/17 18:39, Ard Biesheuvel wrote: >> On 20 October 2017 at 17:37, Gao, Liming wrote: >>> Ard: >>> This case is to share the same value between PeiCore and SecCore. I also >>> think it will be

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

2017-10-20 Thread Laszlo Ersek
On 10/20/17 18:39, Ard Biesheuvel wrote: > On 20 October 2017 at 17:37, Gao, Liming wrote: >> Ard: >> This case is to share the same value between PeiCore and SecCore. I also >> think it will be better to define one fixed PCD in MdeModulePkg.dec for this >> value. Could

Re: [edk2] [PATCH v2] EmbeddedPkg: add driver to set graphical/serial console preference

2017-10-20 Thread Laszlo Ersek
On 10/20/17 16:43, Ard Biesheuvel wrote: > Linux on ARM/arm64 will infer from the presence of a /chosen/stdout-path > DT property or of a SPCR ACPI table that the primary console is the serial > port, even if a graphical console is available as well. > > So let's introduce a driver that allows

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

2017-10-20 Thread Ard Biesheuvel
On 20 October 2017 at 17:37, Gao, Liming wrote: > Ard: > This case is to share the same value between PeiCore and SecCore. I also > think it will be better to define one fixed PCD in MdeModulePkg.dec for this > value. Could you submit bugzillar to catch this issue first?

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

2017-10-20 Thread Gao, Liming
Ard: This case is to share the same value between PeiCore and SecCore. I also think it will be better to define one fixed PCD in MdeModulePkg.dec for this value. Could you submit bugzillar to catch this issue first? Thanks Liming > -Original Message- > From: edk2-devel

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

2017-10-20 Thread Laszlo Ersek
On 10/20/17 18:10, Ard Biesheuvel wrote: > On 20 October 2017 at 16:43, Laszlo Ersek wrote: >> On 10/20/17 15:00, Leif Lindholm wrote: >>> On Fri, Oct 20, 2017 at 12:23:25PM +0100, Ard Biesheuvel wrote: DEBUG builds of PEI code will print a diagnostic message regarding

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

2017-10-20 Thread Ard Biesheuvel
On 20 October 2017 at 16:43, Laszlo Ersek wrote: > On 10/20/17 15:00, Leif Lindholm wrote: >> On Fri, Oct 20, 2017 at 12:23:25PM +0100, Ard Biesheuvel wrote: >>> DEBUG builds of PEI code will print a diagnostic message regarding >>> the utilization of temporary RAM before

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

2017-10-20 Thread Laszlo Ersek
On 10/20/17 15:00, Leif Lindholm wrote: > On Fri, Oct 20, 2017 at 12:23:25PM +0100, Ard Biesheuvel wrote: >> DEBUG builds of PEI code will print a diagnostic message regarding >> the utilization of temporary RAM before switching to permanent RAM. >> For example, >> >> Total temporary memory:

Re: [edk2] [PATCH] EmbeddedPkg/DtPlatformDxe: remove /chosen/stdout-path on GOP registration

2017-10-20 Thread Laszlo Ersek
On 10/20/17 13:40, Ard Biesheuvel wrote: > I think the best way forward is to implement a separate driver with > its own HII form, that removes /chosen/stdout-path and uninstalls the > SPCR table if either or both are present. I couldn't figure out how to > uninstall a ACPI table though, so I may

[edk2] [PATCH v1 1/1] CryptoPkg/BaseCryptLib: remove some duplicate initializations.

2017-10-20 Thread Peter Jones
clang-analyzer noticed this: Pk/CryptPkcs7Verify.c:600:5: warning: Value stored to 'OldSize' is never read OldSize= BufferSize; ^~~ Pk/CryptPkcs7Verify.c:644:5: warning: Value stored to 'OldSize' is never read OldSize= BufferSize; ^

Re: [edk2] [PATCH v2] EmbeddedPkg: add driver to set graphical/serial console preference

2017-10-20 Thread Ard Biesheuvel
On 20 October 2017 at 15:43, Ard Biesheuvel wrote: > Linux on ARM/arm64 will infer from the presence of a /chosen/stdout-path > DT property or of a SPCR ACPI table that the primary console is the serial > port, even if a graphical console is available as well. > > So

[edk2] [PATCH v2] EmbeddedPkg: add driver to set graphical/serial console preference

2017-10-20 Thread Ard Biesheuvel
Linux on ARM/arm64 will infer from the presence of a /chosen/stdout-path DT property or of a SPCR ACPI table that the primary console is the serial port, even if a graphical console is available as well. So let's introduce a driver that allows the user to set a preference between graphical and

Re: [edk2] [PATCH] EmbeddedPkg: add driver to set graphical/serial console preference

2017-10-20 Thread Ard Biesheuvel
On 20 October 2017 at 14:50, Leif Lindholm wrote: > On Fri, Oct 20, 2017 at 02:33:37PM +0100, Ard Biesheuvel wrote: >> Linux on ARM/arm64 will infer from the presence of a /chosen/stdout-path >> DT property or of a SPCR ACPI table that the primary console is the serial

Re: [edk2] [PATCH] EmbeddedPkg: add driver to set graphical/serial console preference

2017-10-20 Thread Leif Lindholm
On Fri, Oct 20, 2017 at 02:33:37PM +0100, Ard Biesheuvel wrote: > Linux on ARM/arm64 will infer from the presence of a /chosen/stdout-path > DT property or of a SPCR ACPI table that the primary console is the serial > port, even if a graphical console is available as well. > > So let's introduce

Re: [edk2] [PATCH] EmbeddedPkg: add driver to set graphical/serial console preference

2017-10-20 Thread Ard Biesheuvel
On 20 October 2017 at 14:33, Ard Biesheuvel wrote: > Linux on ARM/arm64 will infer from the presence of a /chosen/stdout-path > DT property or of a SPCR ACPI table that the primary console is the serial > port, even if a graphical console is available as well. > > So

[edk2] [PATCH] EmbeddedPkg: add driver to set graphical/serial console preference

2017-10-20 Thread Ard Biesheuvel
Linux on ARM/arm64 will infer from the presence of a /chosen/stdout-path DT property or of a SPCR ACPI table that the primary console is the serial port, even if a graphical console is available as well. So let's introduce a driver that allows the user to set a preference between graphical and

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

2017-10-20 Thread Leif Lindholm
On Fri, Oct 20, 2017 at 12:23:25PM +0100, Ard Biesheuvel wrote: > DEBUG builds of PEI code will print a diagnostic message regarding > the utilization of temporary RAM before switching to permanent RAM. > For example, > > Total temporary memory:16352 bytes. > temporary memory stack ever

Re: [edk2] [PATCH] EmbeddedPkg/DtPlatformDxe: remove /chosen/stdout-path on GOP registration

2017-10-20 Thread Ard Biesheuvel
On 20 October 2017 at 11:44, Laszlo Ersek wrote: > On 10/19/17 21:21, Ard Biesheuvel wrote: >> The presence of a /chosen/stdout-path property will force Linux to use >> the serial port as the primary console, even if a graphical console is >> available as well. But the presence

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

2017-10-20 Thread Ard Biesheuvel
DEBUG builds of PEI code will print a diagnostic message regarding the utilization of temporary RAM before switching to permanent RAM. For example, Total temporary memory:16352 bytes. temporary memory stack ever used: 4820 bytes. temporary memory heap used for HobList: 4720

Re: [edk2] [PATCH] EmbeddedPkg/DtPlatformDxe: remove /chosen/stdout-path on GOP registration

2017-10-20 Thread Laszlo Ersek
On 10/19/17 21:21, Ard Biesheuvel wrote: > The presence of a /chosen/stdout-path property will force Linux to use > the serial port as the primary console, even if a graphical console is > available as well. But the presence of the Graphics Output Protocol (GOP) > is a strong indication that the

Re: [edk2] dynamic PCD impact on temporary PEI memory

2017-10-20 Thread Ard Biesheuvel
On 20 October 2017 at 11:33, Laszlo Ersek wrote: > On 10/20/17 12:22, Ard Biesheuvel wrote: >> On 20 October 2017 at 10:43, Laszlo Ersek wrote: >>> On 10/20/17 09:57, Ard Biesheuvel wrote: On 19 October 2017 at 23:08, Laszlo Ersek

Re: [edk2] dynamic PCD impact on temporary PEI memory

2017-10-20 Thread Laszlo Ersek
On 10/20/17 12:22, Ard Biesheuvel wrote: > On 20 October 2017 at 10:43, Laszlo Ersek wrote: >> On 10/20/17 09:57, Ard Biesheuvel wrote: >>> On 19 October 2017 at 23:08, Laszlo Ersek wrote: >> * Symptom #1: I built OVMF for IA32, IA32X64 and

Re: [edk2] dynamic PCD impact on temporary PEI memory

2017-10-20 Thread Ard Biesheuvel
On 20 October 2017 at 10:43, Laszlo Ersek wrote: > On 10/20/17 09:57, Ard Biesheuvel wrote: >> On 19 October 2017 at 23:08, Laszlo Ersek wrote: > >>> * Symptom #1: >>> >>> I built OVMF for IA32, IA32X64 and X64, both "before" and "after". Then >>> I compared

[edk2] [PATCH] MdeModulePkg/PciBus: Fix bug that PCI BUS claims too much resource

2017-10-20 Thread Ruiyu Ni
The bug was caused by 728d74973c9262b6c7b7ef4be213223d55affec3 "MdeModulePkg/PciBus: Count multiple hotplug resource paddings". The patch firstly updated the Bridge->Alignment to the maximum alignment of all devices under the bridge, then aligned the Bridge->Length to Bridge->Alignment. It caused

Re: [edk2] dynamic PCD impact on temporary PEI memory

2017-10-20 Thread Laszlo Ersek
On 10/20/17 09:57, Ard Biesheuvel wrote: > On 19 October 2017 at 23:08, Laszlo Ersek wrote: >> * Symptom #1: >> >> I built OVMF for IA32, IA32X64 and X64, both "before" and "after". Then >> I compared the log files, to see the impact of the addition of exactly >> one UINT32

Re: [edk2] [PATCH] IntelSiliconPkg/VtdInfoSample: Fix IGD RMRR memory.

2017-10-20 Thread Yao, Jiewen
Correct email address thank you! Yao, Jiewen > 在 2017年10月20日,下午4:51,Jiewen Yao 写道: > > Fix a calculation problem in IGD RMRR memory. > > Cc: Zeng Star > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Jiewen Yao

[edk2] [PATCH] IntelSiliconPkg/VtdInfoSample: Fix IGD RMRR memory.

2017-10-20 Thread Jiewen Yao
Fix a calculation problem in IGD RMRR memory. Cc: Zeng Star Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jiewen Yao --- IntelSiliconPkg/Feature/VTd/PlatformVTdInfoSamplePei/PlatformVTdInfoSamplePei.c | 2 +- 1 file changed,

Re: [edk2] dynamic PCD impact on temporary PEI memory

2017-10-20 Thread Ard Biesheuvel
On 19 October 2017 at 23:08, Laszlo Ersek wrote: > Hi, > > I've encountered an interesting phenomenon, and I'd like to discuss it > before I submit an OvmfPkg patch. > > * Background #1: > > OVMF uses 32KB total memory for temporary SEC/PEI heap and stack, > combined. The fixed

[edk2] [Patch] MdeModulePkg/Ip4Dxe: Trigger Ip4Config2 to retrieve the default address.

2017-10-20 Thread Jiaxin Wu
According the UEFI spec 2.7 A: In section 28.3.2 for the IpConfigData.UseDefaultAddress, "While set to TRUE, Configure() will trigger the EFI_IP4_CONFIG2_PROTOCOL to retrieve the default IPv4 address if it is not available yet." In section 28.5 for the Ip4Config2PolicyDhcp, "...All of these