[edk2-devel] [PATCH v2] edksetup.sh: Simplify SetupPython3 and SetupPython functions.

2019-07-15 Thread rebecca
On Linux, "whereis" matches python3, python3.7, as well as man pages, libs etc. While on macOS it only matches the specified name, and so misses python3.7. Improve this by looping over potential version numbers and seeing if such a binary exists and can be executed. Signed-off-by: Rebecca Cran -

Re: [edk2-devel] [PATCH 5/6] edksetup.sh: Simplify SetupPython3 and SetupPython functions.

2019-07-15 Thread rebecca
On 2019-07-15 20:16, Laszlo Ersek wrote: > That said, if you wouldn't like to rework the patch, I can give my R-b > as-is (please confirm). Thanks, I like your suggested changes. And I just ran shellcheck and was told "SC2230: which is non-standard. Use builtin 'command -v' instead.". -- Rebec

Re: [edk2-devel] [PATCH 6/6] edksetup.sh: Add quotes and explicit checks in test statements

2019-07-15 Thread rebecca
On 2019-07-15 19:53, Laszlo Ersek wrote: > > But, I think the question stands; there's more that could be quoted. > What is the reason for quoting just these? Mainly because I thought those were the ones that were most important to add quotes around. I'll probably submit a follow-up patch to fix

Re: [edk2-devel] [PATCH 5/6] edksetup.sh: Simplify SetupPython3 and SetupPython functions.

2019-07-15 Thread Laszlo Ersek
On 07/16/19 00:25, Rebecca Cran wrote: > On Linux, "whereis" matches python3, python3.7, as well as > man pages, libs etc. While on macOS it only matches the specified > name, and so misses python3.7. Improve this by looping over > potential version numbers and seeing if such a binary exists and >

Re: [edk2-devel] [PATCH 1/6] edksetup.sh: Use bash variable $PWD instead of executing pwd command

2019-07-15 Thread rebecca
On 2019-07-15 19:37, Laszlo Ersek wrote: > > (Sorry if the reason was already given and I missed it:) > > Why is this an improvement? > > The docs at say: > > "pwd also exists as a built-in to ksh(1), which may have a different > default behavior". Is that the reason

Re: [edk2-devel] [PATCH] UefiCpuPkg CpuCommonFeaturesLib: Enhance Ppin code

2019-07-15 Thread Ni, Ray
Reviewed-by: Ray Ni > -Original Message- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > Zeng, Star > Sent: Friday, July 12, 2019 6:13 PM > To: devel@edk2.groups.io > Cc: Zeng, Star ; Laszlo Ersek ; > Dong, Eric ; Ni, Ray ; Kumar, > Chandana C ; Li, Kevin Y > >

Re: [edk2-devel] [PATCH 6/6] edksetup.sh: Add quotes and explicit checks in test statements

2019-07-15 Thread Laszlo Ersek
On 07/16/19 03:47, Laszlo Ersek wrote: > On 07/16/19 00:25, Rebecca Cran wrote: >> Signed-off-by: Rebecca Cran >> --- >> edksetup.sh | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/edksetup.sh b/edksetup.sh >> index e2f116f8bc..ba055d5d5a 100755 >> --- a/edksetup.s

Re: [edk2-devel] [PATCH 6/6] edksetup.sh: Add quotes and explicit checks in test statements

2019-07-15 Thread Laszlo Ersek
On 07/16/19 00:25, Rebecca Cran wrote: > Signed-off-by: Rebecca Cran > --- > edksetup.sh | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/edksetup.sh b/edksetup.sh > index e2f116f8bc..ba055d5d5a 100755 > --- a/edksetup.sh > +++ b/edksetup.sh > @@ -118,7 +118,7 @@ func

Re: [edk2-devel] [PATCH 4/6] edksetup.sh: remove redundant -?, -h and --help in options parsing

2019-07-15 Thread Laszlo Ersek
On 07/16/19 00:25, Rebecca Cran wrote: > Signed-off-by: Rebecca Cran > --- > edksetup.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/edksetup.sh b/edksetup.sh > index 76c8d7916e..06d2f041e6 100755 > --- a/edksetup.sh > +++ b/edksetup.sh > @@ -194,7 +194,7 @@ do >

Re: [edk2-devel] [PATCH 3/6] edksetup.sh: when executing arithmetic commands, $ isn't needed

2019-07-15 Thread Laszlo Ersek
On 07/16/19 00:25, Rebecca Cran wrote: > Signed-off-by: Rebecca Cran > --- > edksetup.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/edksetup.sh b/edksetup.sh > index 752e47e7cb..76c8d7916e 100755 > --- a/edksetup.sh > +++ b/edksetup.sh > @@ -199,7 +199,7 @@ do >

Re: [edk2-devel] [PATCH 2/6] edksetup.sh: Use $SCRIPTNAME consistently instead of 'edksetup.sh'

2019-07-15 Thread Laszlo Ersek
On 07/16/19 00:25, Rebecca Cran wrote: > Signed-off-by: Rebecca Cran > --- > edksetup.sh | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/edksetup.sh b/edksetup.sh > index ab58fe4a6e..752e47e7cb 100755 > --- a/edksetup.sh > +++ b/edksetup.sh > @@ -49,11 +49,11 @@ func

Re: [edk2-devel] [PATCH 1/6] edksetup.sh: Use bash variable $PWD instead of executing pwd command

2019-07-15 Thread Laszlo Ersek
On 07/16/19 00:25, Rebecca Cran wrote: > Signed-off-by: Rebecca Cran > --- > edksetup.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/edksetup.sh b/edksetup.sh > index 12a3e26a67..ab58fe4a6e 100755 > --- a/edksetup.sh > +++ b/edksetup.sh > @@ -71,7 +71,7 @@ function S

Re: [edk2-devel] [PATCH 2/3] MdePkg/BaseLib: rewrite Base64Decode()

2019-07-15 Thread Gao, Zhichao
> -Original Message- > From: Laszlo Ersek [mailto:ler...@redhat.com] > Sent: Tuesday, July 16, 2019 5:56 AM > To: Gao, Liming ; Gao, Zhichao > > Cc: devel@edk2.groups.io; Kinney, Michael D ; > Marvin Häuser ; Philippe Mathieu-Daudé > > Subject: Re: [edk2-devel] [PATCH 2/3] MdePkg/BaseLi

Re: [edk2-devel] [PATCH 2/3] MdePkg/BaseLib: rewrite Base64Decode()

2019-07-15 Thread Laszlo Ersek
Hi Marvin, On 07/15/19 20:44, Marvin Häuser wrote: > I feel like my rushed message mentioning 'MAX_ADDRESS' was misleading > a little - the point with that was a potential index overflow (I may > actually have meant 'MAX_UINTN', I am not sure about the details > anymore) in the original code, I pe

Re: [edk2-devel] [PATCH] ShellPkg/Type.c: Add value check before (LoopVar - 1)

2019-07-15 Thread Gao, Zhichao
You are right. I missed the USC2 section. I would update that in next version. Thanks, Zhichao > -Original Message- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > Jim Dailey > Sent: Monday, July 15, 2019 9:09 PM > To: Gao, Zhichao > Cc: Carsey, Jaben ; Ni, Ray

Re: [edk2-devel] [PATCH] ClevoOpenBoardPkg: Added NVMe boot support

2019-07-15 Thread Chiu, Chasel
Reviewed-by: Chasel Chiu > -Original Message- > From: Agyeman, Prince > Sent: Tuesday, July 16, 2019 6:24 AM > To: devel@edk2.groups.io > Cc: Gao, Liming ; Sinha, Ankit ; > Kubacki, Michael A ; Desimone, Nathaniel L > ; Chiu, Chasel > Subject: [PATCH] ClevoOpenBoardPkg: Added NVMe boo

Re: [edk2-devel] [edk2-platforms] [PATCH] KabylakeSiliconPkg: Possible out-of-bounds memory writes

2019-07-15 Thread Chiu, Chasel
Please extend copyright to 2019, with that change, Reviewed-by: Chasel Chiu > -Original Message- > From: Desimone, Nathaniel L > Sent: Tuesday, July 16, 2019 4:40 AM > To: devel@edk2.groups.io > Cc: Chiu, Chasel ; Kubacki, Michael A > ; Chaganty, Rangasai V > > Subject: [edk2-platform

Re: [edk2-devel] [edk2-platforms] [PATCH] KabylakeSiliconPkg: Possible out-of-bounds memory writes

2019-07-15 Thread Chaganty, Rangasai V
Looks good. Can we assign a local variable for "EndPtr" and use that in the For loop, instead of the expression and keep the implementation cleaner? EndPtr = CurrPtr + ((EFI_ACPI_COMMON_HEADER *) CurrPtr)->Length; for (DsdtPointer = CurrPtr; DsdtPointer < EndPtr; DsdtPointer++) { -Origin

Re: [edk2-devel] [PATCH] Simplify edksetup.sh

2019-07-15 Thread rebecca
On 2019-07-15 11:45, Laszlo Ersek wrote: > > Fair enough, as long as you don't insist on my Reviewed-by in > particular. :) I won't block the patch just because of this, but I also > won't try to decipher changes made for six different goals from each other. Not six different goals: *one* goal, o

[edk2-devel] [PATCH 6/6] edksetup.sh: Add quotes and explicit checks in test statements

2019-07-15 Thread rebecca
Signed-off-by: Rebecca Cran --- edksetup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edksetup.sh b/edksetup.sh index e2f116f8bc..ba055d5d5a 100755 --- a/edksetup.sh +++ b/edksetup.sh @@ -118,7 +118,7 @@ function SetupPython3() function SetupPython() { - if [ $P

[edk2-devel] [PATCH 4/6] edksetup.sh: remove redundant -?, -h and --help in options parsing

2019-07-15 Thread rebecca
Signed-off-by: Rebecca Cran --- edksetup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edksetup.sh b/edksetup.sh index 76c8d7916e..06d2f041e6 100755 --- a/edksetup.sh +++ b/edksetup.sh @@ -194,7 +194,7 @@ do RECONFIG=TRUE shift ;; --?|-h|--help|*) +

[edk2-devel] [PATCH 2/6] edksetup.sh: Use $SCRIPTNAME consistently instead of 'edksetup.sh'

2019-07-15 Thread rebecca
Signed-off-by: Rebecca Cran --- edksetup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edksetup.sh b/edksetup.sh index ab58fe4a6e..752e47e7cb 100755 --- a/edksetup.sh +++ b/edksetup.sh @@ -49,11 +49,11 @@ function SetWorkspace() return 0 fi - if [ ! ${BASH_

[edk2-devel] [PATCH 5/6] edksetup.sh: Simplify SetupPython3 and SetupPython functions.

2019-07-15 Thread rebecca
On Linux, "whereis" matches python3, python3.7, as well as man pages, libs etc. While on macOS it only matches the specified name, and so misses python3.7. Improve this by looping over potential version numbers and seeing if such a binary exists and can be executed. Signed-off-by: Rebecca Cran -

[edk2-devel] [PATCH 3/6] edksetup.sh: when executing arithmetic commands, $ isn't needed

2019-07-15 Thread rebecca
Signed-off-by: Rebecca Cran --- edksetup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edksetup.sh b/edksetup.sh index 752e47e7cb..76c8d7916e 100755 --- a/edksetup.sh +++ b/edksetup.sh @@ -199,7 +199,7 @@ do break ;; esac - I=$(($I - 1)) + I=$((I - 1)) d

[edk2-devel] [PATCH 1/6] edksetup.sh: Use bash variable $PWD instead of executing pwd command

2019-07-15 Thread rebecca
Signed-off-by: Rebecca Cran --- edksetup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edksetup.sh b/edksetup.sh index 12a3e26a67..ab58fe4a6e 100755 --- a/edksetup.sh +++ b/edksetup.sh @@ -71,7 +71,7 @@ function SetWorkspace() # # Set $WORKSPACE # - export WORKS

[edk2-devel] [PATCH] ClevoOpenBoardPkg: Added NVMe boot support

2019-07-15 Thread Agyeman, Prince
Added NVMe dxe driver to enable N1xxWU platforms boot from NVMe Cc: Liming Gao Cc: Ankit Sinha Cc: Michael Kubacki Cc: Nate DeSimone Cc: Chasel Chiu Signed-off-by: Agyeman --- Platform/Intel/ClevoOpenBoardPkg/N1xxWU/OpenBoardPkg.dsc | 1 + Platform/Intel/ClevoOpenBoardPkg/N1xxWU/OpenBoardP

Re: [edk2-devel] [PATCH 3/3] OvmfPkg/EnrollDefaultKeys: clean up Base64Decode() retval handling

2019-07-15 Thread Laszlo Ersek
Jordan, can you please ACK this one patch in the series? Thanks! Laszlo On 07/02/19 12:28, Laszlo Ersek wrote: > Base64Decode() now guarantees that DestinationSize is larger on output > than it was on input if RETURN_BUFFER_TOO_SMALL is returned. Clean up the > retval handling for the first Base6

Re: [edk2-devel] [PATCH 2/3] MdePkg/BaseLib: rewrite Base64Decode()

2019-07-15 Thread Laszlo Ersek
On 07/15/19 17:22, Gao, Liming wrote: > Laszlo: > >> -Original Message- >> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Laszlo >> Ersek >> Sent: Saturday, July 13, 2019 3:31 AM >> To: Gao, Zhichao ; devel@edk2.groups.io; Gao, Liming >> ; Kinney, Michael D >> >>

[edk2-devel] [edk2-platforms] [PATCH] KabylakeSiliconPkg: Possible out-of-bounds memory writes

2019-07-15 Thread Nate DeSimone
- Add check for the DSDT not existing. - Fixed logic errors in loop boundary check. Cc: Chasel Chiu Cc: Michael A Kubacki Cc: Sai Chaganty Co-authored-by: John Mathews Signed-off-by: Nate DeSimone --- .../Library/DxeAslUpdateLib/DxeAslUpdateLib.c | 6 +- 1 file changed, 5

Re: [edk2-devel] [PATCH 2/3] MdePkg/BaseLib: rewrite Base64Decode()

2019-07-15 Thread Marvin Häuser
Good day, Please excuse my late reply and thank you very much for your reimplementation effort. I feel like my rushed message mentioning 'MAX_ADDRESS' was misleading a little - the point with that was a potential index overflow (I may actually have meant 'MAX_UINTN', I am not sure about the de

Re: [edk2-devel] [PATCH] Simplify edksetup.sh

2019-07-15 Thread Laszlo Ersek
On 07/15/19 17:01, Rebecca Cran wrote: > On 2019-07-15 08:55, Leif Lindholm wrote: >> >> For me, the question is more with being able to trivially discern >> which patch does what. I agree they're all individually trivial, but >> as a single patch there is enough going on at once that it makes it >

Re: [edk2-devel] [PATCH] Simplify edksetup.sh

2019-07-15 Thread Laszlo Ersek
On 07/15/19 16:40, Rebecca Cran wrote: > On 2019-07-12 16:21, Laszlo Ersek wrote: >> >> As long as my opinion counts... (and I totally don't insist that it do): >> the above task list will make for a nice 6-part patch series. :) >> >> (When someone is tempted to capture a *list* of changes in a sin

Re: [edk2-devel] [PATCH 3/3] BaseTools: add GetMaintainer.py script

2019-07-15 Thread Laszlo Ersek
On 07/13/19 12:41, Leif Lindholm wrote: > On Sat, Jul 13, 2019 at 12:58:18AM +0200, Laszlo Ersek wrote: >> On 07/12/19 19:01, Leif Lindholm wrote: >>> Add a new script GetMaintainer.py that uses the new Maintainer.txt format >>> to determine which addresses to cc on patch submission. >>> >>> Signed

Re: [edk2-devel] [PATCH 4/4] Maintainers.txt: split out section "OvmfPkg: CSM modules"

2019-07-15 Thread Philippe Mathieu-Daudé
On 7/15/19 7:04 PM, Laszlo Ersek wrote: > We ask contributors to copy David on patches that affect "CSM modules" > under OvmfPkg. With the "GetMaintainer.py" script being introduced later, > express this expectation in "Maintainers.txt" in machine-readable format. > > Cc: Andrew Fish > Cc: Ard Bi

Re: [edk2-devel] [PATCH 3/4] Maintainers.txt: split out section "OvmfPkg: TCG- and TPM2-related modules"

2019-07-15 Thread Philippe Mathieu-Daudé
On 7/15/19 7:04 PM, Laszlo Ersek wrote: > We ask contributors to copy Marc-André and Stefan on patches that affect > "TPM2 modules" under OvmfPkg. With the "GetMaintainer.py" script being > introduced later, express this expectation in "Maintainers.txt" in > machine-readable format. > > Cc: Andrew

[edk2-devel] [PATCH 0/4] Maintainers.txt: formalize ArmVirtPkg and OvmfPkg subsystem pathnames

2019-07-15 Thread Laszlo Ersek
Repo: https://github.com/lersek/edk2.git Branch: ovmfpkg_maintainers The patches in this series should be inserted between Leif's patches * [edk2-devel] [PATCH 2/3] Maintainers.txt: add wildcard path association for Arm/AArch64 20190712170128.6495-3-leif.lindholm@linaro.org">http://mid.mail-

[edk2-devel] [PATCH 4/4] Maintainers.txt: split out section "OvmfPkg: CSM modules"

2019-07-15 Thread Laszlo Ersek
We ask contributors to copy David on patches that affect "CSM modules" under OvmfPkg. With the "GetMaintainer.py" script being introduced later, express this expectation in "Maintainers.txt" in machine-readable format. Cc: Andrew Fish Cc: Ard Biesheuvel Cc: David Woodhouse Cc: Jordan Justen Cc

[edk2-devel] [PATCH 2/4] Maintainers.txt: split out section "OvmfPkg: Xen-related modules"

2019-07-15 Thread Laszlo Ersek
We ask contributors to copy Anthony and Julien on patches that affect "Xen modules" under OvmfPkg. With the "GetMaintainer.py" script being introduced later, express this expectation in "Maintainers.txt" in machine-readable format. Cc: Andrew Fish Cc: Anthony Perard Cc: Ard Biesheuvel Cc: Jorda

[edk2-devel] [PATCH 3/4] Maintainers.txt: split out section "OvmfPkg: TCG- and TPM2-related modules"

2019-07-15 Thread Laszlo Ersek
We ask contributors to copy Marc-André and Stefan on patches that affect "TPM2 modules" under OvmfPkg. With the "GetMaintainer.py" script being introduced later, express this expectation in "Maintainers.txt" in machine-readable format. Cc: Andrew Fish Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Le

[edk2-devel] [PATCH 1/4] Maintainers.txt: split out section "ArmVirtPkg: modules used on Xen"

2019-07-15 Thread Laszlo Ersek
We ask contributors to copy Julien on patches that affect "Xen modules" under ArmVirtPkg. With the "GetMaintainer.py" script being introduced later, express this expectation in "Maintainers.txt" in machine-readable format. Cc: Andrew Fish Cc: Ard Biesheuvel Cc: Julien Grall Cc: Leif Lindholm C

Re: [edk2-devel] [PATCH 2/3] MdePkg/BaseLib: rewrite Base64Decode()

2019-07-15 Thread Liming Gao
Laszlo: > -Original Message- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Laszlo > Ersek > Sent: Saturday, July 13, 2019 3:31 AM > To: Gao, Zhichao ; devel@edk2.groups.io; Gao, Liming > ; Kinney, Michael D > > Cc: Marvin Häuser ; Philippe Mathieu-Daudé > > S

Re: [edk2-devel] [PATCH] Simplify edksetup.sh

2019-07-15 Thread rebecca
On 2019-07-15 08:55, Leif Lindholm wrote: > > For me, the question is more with being able to trivially discern > which patch does what. I agree they're all individually trivial, but > as a single patch there is enough going on at once that it makes it > easier for bugs to slip through review. (And

Re: [edk2-devel] [PATCH] Simplify edksetup.sh

2019-07-15 Thread Leif Lindholm
On Mon, Jul 15, 2019 at 08:40:21AM -0600, Rebecca Cran wrote: > On 2019-07-12 16:21, Laszlo Ersek wrote: > > > > As long as my opinion counts... (and I totally don't insist that it do): > > the above task list will make for a nice 6-part patch series. :) > > > > (When someone is tempted to capture

Re: [edk2-devel] [PATCH] BaseTools: Fix python3.8 SyntaxWarning

2019-07-15 Thread Laszlo Ersek
On 07/13/19 04:54, Bob Feng wrote: > I tested this patch on python2.7 and 3.7. It works fine. > > Reviewed-by: Bob Feng (This is commit eebc135ffb21 now, thanks!) Laszlo > -Original Message- > From: Laszlo Ersek [mailto:ler...@redhat.com] > Sent: Saturday, July 13, 2019 5:03 AM > To: C

Re: [edk2-devel] [PATCH] Simplify edksetup.sh

2019-07-15 Thread rebecca
On 2019-07-12 16:21, Laszlo Ersek wrote: > > As long as my opinion counts... (and I totally don't insist that it do): > the above task list will make for a nice 6-part patch series. :) > > (When someone is tempted to capture a *list* of changes in a single > commit message, that frequently indicate

Re: [edk2-devel] [PATCH v6 5/5] OvmfPkg: link SM3 support into Tcg2Pei and Tcg2Dxe

2019-07-15 Thread Laszlo Ersek
On 07/13/19 02:47, Imran Desai wrote: > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1781 > GITHUB: https://github.com/idesai/edk2/tree/enable_sm3_measured_boot_v6 > > EDK2 Support for SM3 digest algorithm is needed to enable TPM with SM3 PCR > banks. This digest algorithm is part of the Chi

Re: [edk2-devel] [PATCH] ShellPkg/Type.c: Add value check before (LoopVar - 1)

2019-07-15 Thread Carsey, Jaben
Please remove the typo (there is an extra S after 'return'). This line: // return Swith line feed for displaying each new line from left. > -Original Message- > From: Gao, Zhichao > Sent: Monday, July 15, 2019 12:30 AM > To: devel@edk2.groups.io > Cc: Carsey, Jaben ; Ni, Ray ; > Andrew Fi

Re: [edk2-devel] [PATCH v3 06/35] OvmfPkg/XenResetVector: Add new entry point for Xen PVH

2019-07-15 Thread Roger Pau Monné
On Mon, Jul 15, 2019 at 12:50:29PM +0100, Andrew Cooper wrote: > On 15/07/2019 12:46, Roger Pau Monné wrote: > >> +; > >> +; Jump to the main routine of the pre-SEC code > >> +; skiping the 16-bit part of the routine and > >> +; into the 32-bit flat mode part > >> +; > >> +O

Re: [edk2-devel] [PATCH v3 09/35] OvmfPkg/OvmfXen: use a TimerLib instance that depends only on the CPU

2019-07-15 Thread Roger Pau Monné
On Thu, Jul 04, 2019 at 03:42:07PM +0100, Anthony PERARD wrote: > ACPI Timer does not work in a PVH guest, but local APIC works on both This is not accurate. It's not that the ACPI timer doesn't work, it's just that it's not present. The PM_TMR_BLK should be set to 0 to indicate the lack of PM tim

Re: [edk2-devel] [PATCH v3 24/35] OvmfPkg/XenPlatformPei: Rework memory detection

2019-07-15 Thread Roger Pau Monné
On Thu, Jul 04, 2019 at 03:42:22PM +0100, Anthony PERARD wrote: > When running as a Xen PVH guest, there is no CMOS to read the memory > size from. Rework GetSystemMemorySize(Below|Above)4gb() so they can > works without CMOS by reading the e820 table. > > Rework XenPublishRamRegions for PVH, han

Re: [edk2-devel] [PATCH] ShellPkg/Type.c: Add value check before (LoopVar - 1)

2019-07-15 Thread Jim Dailey
Zhichao, I believe the same problem exists further into the function in the 'else' clause handling UCS2 characters. Regards, Jim -Original Message- From: devel@edk2.groups.io On Behalf Of Gao, Zhichao Sent: Monday, July 15, 2019 2:30 AM To: devel@edk2.groups.io Cc: Jaben Carsey; Ray Ni;

Re: [edk2-devel] [PATCH v3 06/35] OvmfPkg/XenResetVector: Add new entry point for Xen PVH

2019-07-15 Thread Andrew Cooper
On 15/07/2019 12:46, Roger Pau Monné wrote: >> diff --git a/OvmfPkg/XenResetVector/Ia32/XenPVHMain.asm >> b/OvmfPkg/XenResetVector/Ia32/XenPVHMain.asm >> new file mode 100644 >> index 00..2a17fed52f >> --- /dev/null >> +++ b/OvmfPkg/XenResetVector/Ia32/XenPVHMain.asm >> @@ -0,0 +1,49 @@ >>

Re: [edk2-devel] [PATCH v3 06/35] OvmfPkg/XenResetVector: Add new entry point for Xen PVH

2019-07-15 Thread Roger Pau Monné
On Thu, Jul 04, 2019 at 03:42:04PM +0100, Anthony PERARD wrote: > Add a new entry point for Xen PVH that enter directly in 32bits. > > Information on the expected state of the machine when this entry point > is used can be found at: > https://xenbits.xenproject.org/docs/unstable/misc/pvh.html > >

Re: [edk2-devel] [Patch v2 2/2] UefiCpuPkg/RegisterCpuFeaturesLib: avoid use dynamic PCD.

2019-07-15 Thread Zeng, Star
IsBitMaskMatchCheck() is still using PcdGetSize (PcdCpuFeaturesSetting). Compared to V1 patch, I guess the patch wants to 1. add BitMaskSize input parameter for IsCpuFeatureMatch(). 2. use GetCpuFeaturesData () in IsBitMaskMatchCheck(). Right? Thanks, Star > -Original Message- > From:

[edk2-devel] [PATCH] ShellPkg/UefiHandleParsingLib: Fix error allocate pool

2019-07-15 Thread Gao, Zhichao
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1965 For function InsertNewGuidNameMapping, it rellocate the mGuidList with new size "mGuidListCount+1 * sizeof(GUID_INFO_BLOCK)". That isn't its purpose and would cause a overflow operation in "mGuidList[mGuidListCount - 1].xxx = xxx". Its purpo

[edk2-devel] [PATCH] ShellPkg/UefiShellDriver1CommandsLib: Make array big enough

2019-07-15 Thread Gao, Zhichao
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1941 The two CHAR16 array ChildCountStr and DeviceCountStr is defined to hold the decimal string data of UINTN. The max of UINTN is 18446744073709551615 and it contain 20 characters. So make their size to 21 CHAR16s to hold the string data with a

[edk2-devel] [PATCH] ShellPkg/Type.c: Add value check before (LoopVar - 1)

2019-07-15 Thread Gao, Zhichao
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1964 If the file begin with single line Feed ('\n'), then "AsciiChar == '\n' && ((CHAR8*)Buffer)[LoopVar-1] != '\r'" would cause a underflow. Add this condition "(AsciiChar == '\n' && LoopVar == 0)" before it to make sure (LoopVar - 1) would neve

[edk2-devel] [PATCH] ShellPkg/Pci.c: Update supported link speed to PCI4.0

2019-07-15 Thread Gao, Zhichao
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1955 Refer PCI express base specification Reversion 4.0, Version 1.0, Table 7-32, Supported Link Speeds Vector bit 3 indicate the speed 16 GT/s. Add it to shell command 'pci ...'. Change the MaxLinkSpeed other values' result from 'Unknown' to 'R

Re: [edk2-devel] [Patch v2 2/2] UefiCpuPkg/RegisterCpuFeaturesLib: avoid use dynamic PCD.

2019-07-15 Thread Ni, Ray
Reviewed-by: Ray Ni > -Original Message- > From: Dong, Eric > Sent: Monday, July 15, 2019 3:01 PM > To: devel@edk2.groups.io > Cc: Ni, Ray ; Laszlo Ersek ; Kumar, > Chandana C ; Zeng, > Star > Subject: [Patch v2 2/2] UefiCpuPkg/RegisterCpuFeaturesLib: avoid use dynamic > PCD. > > REF:

Re: [edk2-devel] [Patch 2/2] UefiCpuPkg/Library/RegisterCpuFeaturesLib: avoid use dynamic PCD.

2019-07-15 Thread Dong, Eric
Hi Star & Ray, Thanks for your comments, updated the related code. Please check my v2 changes. Thanks, Eric > -Original Message- > From: Ni, Ray > Sent: Monday, July 15, 2019 12:58 PM > To: devel@edk2.groups.io; Dong, Eric > Cc: Laszlo Ersek ; Kumar, Chandana C > ; Zeng, Star > Subject:

[edk2-devel] [Patch v2 1/2] UefiCpuPkg/RegisterCpuFeaturesLib: Avoid AP calls PeiServices table.

2019-07-15 Thread Dong, Eric
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1972 AP calls CollectProcessorData() to collect processor info. CollectProcessorData function finally calls PcdGetSize function to get DynamicPCD PcdCpuFeaturesSetting value. PcdGetSize will use PeiServices table which caused below assert info: P

[edk2-devel] [Patch v2 0/2] UefiCpuPkg/RegisterCpuFeaturesLib: Avoid AP calls PeiServices table.

2019-07-15 Thread Dong, Eric
V2 Changes: 1. Revert IsBitMaskMatchCheck change which is not correct. 2. refine some variable name. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1972 AP calls CollectProcessorData() to collect processor info. CollectProcessorData function finally calls PcdGetSize function to get DynamicPC

[edk2-devel] [Patch v2 2/2] UefiCpuPkg/RegisterCpuFeaturesLib: avoid use dynamic PCD.

2019-07-15 Thread Dong, Eric
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1972 Function in this library may be used by APs. Assert will be trig if AP uses dynamic pcd. This patch enhance the current code, remove the unnecessary usage of dynamic PCD. This change try to avoid report this issue again later. Cc: Ray Ni C