Re: [edk2-devel] [PATCH v2 0/3] add and use more video modes

2022-04-22 Thread Ard Biesheuvel
On Fri, 22 Apr 2022 at 15:29, Ard Biesheuvel  wrote:
>
> On Fri, 22 Apr 2022 at 14:41, Gerd Hoffmann  wrote:
> >
> > v2:
> >  - rebase to latest master
> >  - add review tags
> >
>
> Thanks Gerd, I'll pick these up later today.
>

Merged as #2819

Thanks all,

>
> > Gerd Hoffmann (3):
> >   MdeModulePkg/GraphicsConsoleDxe: add modes
> >   OvmfPkg: clear PcdConOut{Row,Column}
> >   ArmVirtPkg: clear PcdConOut{Row,Column}
> >
> >  ArmVirtPkg/ArmVirtQemu.dsc   | 2 ++
> >  ArmVirtPkg/ArmVirtQemuKernel.dsc | 2 ++
> >  OvmfPkg/AmdSev/AmdSevX64.dsc | 2 ++
> >  OvmfPkg/Microvm/MicrovmX64.dsc   | 2 ++
> >  OvmfPkg/OvmfPkgIa32.dsc  | 2 ++
> >  OvmfPkg/OvmfPkgIa32X64.dsc   | 2 ++
> >  OvmfPkg/OvmfPkgX64.dsc   | 2 ++
> >  OvmfPkg/OvmfXen.dsc  | 2 ++
> >  .../Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c   | 5 -
> >  9 files changed, 20 insertions(+), 1 deletion(-)
> >
> > --
> > 2.35.1
> >


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89241): https://edk2.groups.io/g/devel/message/89241
Mute This Topic: https://groups.io/mt/90626839/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [edk2-platforms][PATCH v1 00/10] Add variableFlashInfoLib

2022-04-22 Thread Michael D Kinney
Hi Michael,

1) This patch series is dependent on the edk2 repo patch series that adds the 
   VariableFlashInfoLib.  This patch series cannot be committed until the 
   edk2 changes are committed because it will break all the edk2-platforms
   if this one is committed first.

2) The related edk2 changes are a breaking change for all downstream platforms
   that also need to add VariableFlashInfoLib to their DSC files.

   Should breaking changes like this also require a separate email that
   is sent to devel@edk2.groups.io, annou...@edk2.groups.io, and 
disc...@edk2.groups.io
   to increase the visibility of breaking changes?


Series Reviewed-by: Michael D Kinney 


Best regards,

Mike

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Michael Kubacki
> Sent: Wednesday, April 20, 2022 1:44 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner ; Ard Biesheuvel 
> ; Chiu, Chasel ;
> Schaefer, Daniel ; Dong, Eric ; 
> Gilbert Chen ; Graeme Gregory
> ; Ilias Apalodimas ; Jeremy 
> Linton ; Leif Lindholm
> ; Gao, Liming ; Masami 
> Hiramatsu ; Desimone,
> Nathaniel L ; Radoslaw Biernacki 
> ; Sami Mujawar 
> Subject: [edk2-devel] [edk2-platforms][PATCH v1 00/10] Add 
> variableFlashInfoLib
> 
> From: Michael Kubacki 
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3479
> 
> Adds an instance for the library class VariableFlashInfoLib that
> was recently introduced in MdeModulePkg. This change is made to
> allow the new variable driver to build that has a dependency on
> this library class and does not require any further platform
> changes.
> 
> Note that this series is for an upcoming change in MdeModulePkg
> and requires that change to be present locally for testing.
> 
> https://edk2.groups.io/g/devel/message/88787
> 
> Cc: Abner Chang 
> Cc: Ard Biesheuvel 
> Cc: Chasel Chiu 
> Cc: Daniel Schaefer 
> Cc: Eric Dong 
> Cc: Gilbert Chen 
> Cc: Graeme Gregory 
> Cc: Ilias Apalodimas 
> Cc: Jeremy Linton 
> Cc: Leif Lindholm 
> Cc: Liming Gao 
> Cc: Masami Hiramatsu 
> Cc: Nate DeSimone 
> Cc: Radoslaw Biernacki 
> Cc: Sami Mujawar 
> Signed-off-by: Michael Kubacki 
> 
> Michael Kubacki (10):
>   OverdriveBoard: Add VariableFlashInfoLib
>   BeagleBoardPkg: Add VariableFlashInfoLib
>   MinPlatformPkg: Add VariableFlashInfoLib
>   CelloBoard: Add VariableFlashInfoLib
>   SbsaQemu: Add VariableFlashInfoLib
>   RaspberryPi: Add VariableFlashInfoLib
>   U5SeriesPkg: Add VariableFlashInfoLib
>   Socionext: Add VariableFlashInfoLib
>   Softiron: Add VariableFlashInfoLib
>   PlatformStandaloneMmPkg: Add VariableFlashInfoLib
> 
>  Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 
> 1 +
>  Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc | 
> 1 +
>  Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc| 
> 1 +
>  Platform/LeMaker/CelloBoard/CelloBoard.dsc | 
> 1 +
>  Platform/Qemu/SbsaQemu/SbsaQemu.dsc| 
> 1 +
>  Platform/RaspberryPi/RPi3/RPi3.dsc | 
> 1 +
>  Platform/RaspberryPi/RPi4/RPi4.dsc | 
> 1 +
>  Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc | 
> 1 +
>  Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc   | 
> 1 +
>  Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc   | 
> 1 +
>  Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc| 
> 1 +
>  Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc | 
> 1 +
>  12 files changed, 12 insertions(+)
> 
> --
> 2.28.0.windows.1
> 
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#89148): https://edk2.groups.io/g/devel/message/89148
> Mute This Topic: https://groups.io/mt/90592905/1643496
> Group Owner: devel+ow...@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [michael.d.kin...@intel.com]
> -=-=-=-=-=-=
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89240): https://edk2.groups.io/g/devel/message/89240
Mute This Topic: https://groups.io/mt/90592905/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] Status of GSoC 2022 proposal; status of currently implemented functions and protocols related to USB and USB audio

2022-04-22 Thread Ethin Probst
So this message is a bit of a question and an information dump; if you 
want me to split this off into two separate discussions that's fine by me.
First, I'm writing to inquire about the status of my proposal; I 
received some feedback and believe I corrected my proposal as directed, 
but unless it got lost in the flood of emails I get I have yet to hear 
anything about that, so I thought I'd inquire as to if anything has 
happened on that front.
Second, I've been digging through the EDK II sources (as of commit 
ee582858c4) and I've decided that it would be helpful to list all the 
functions/protocols that need implementation for my project. I'm however 
unsure how to scan for what and what is not implemented without writing 
an application and testing for each protocol. Is there a more efficient 
way for me to look for these?



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89239): https://edk2.groups.io/g/devel/message/89239
Mute This Topic: https://groups.io/mt/90634720/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v5 2/6] OvmfPkg/FdtPciHostBridgeLib: io range is not mandatory

2022-04-22 Thread Abner Chang
Gerd, I have some comments in line.

With those fixes,
Reviewed-by: Abner Chang 

> -Original Message-
> From: Gerd Hoffmann 
> Sent: Friday, April 22, 2022 3:37 PM
> To: devel@edk2.groups.io
> Cc: Pawel Polawski ; Ard Biesheuvel
> ; Liming Gao ;
> Hao A Wu ; Ray Ni ; Oliver Steffen
> ; Leif Lindholm ; Jordan
> Justen ; Jiewen Yao ;
> Gerd Hoffmann ; Chang, Abner (HPS SW/FW
> Technologist) ; Jian J Wang
> 
> Subject: [PATCH v5 2/6] OvmfPkg/FdtPciHostBridgeLib: io range is not
> mandatory
> 
> io range is not mandatory according to pcie spec,
> so allow host bridges without io address space.
> 
> Signed-off-by: Gerd Hoffmann 
> ---
>  .../FdtPciHostBridgeLib/FdtPciHostBridgeLib.c | 45 ++-
>  1 file changed, 23 insertions(+), 22 deletions(-)
> 
> diff --git a/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c
> b/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c
> index 98828e0b262b..823ea47c80a3 100644
> --- a/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c
> +++ b/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c
> @@ -292,13 +292,8 @@ ProcessPciHost (
>  }
>}
> 
> -  if ((*IoSize == 0) || (*Mmio32Size == 0)) {
> -DEBUG ((
> -  DEBUG_ERROR,
> -  "%a: %a space empty\n",
> -  __FUNCTION__,
> -  (*IoSize == 0) ? "IO" : "MMIO32"
> -  ));
> +  if (*Mmio32Size == 0) {
> +DEBUG ((DEBUG_ERROR, "%a: MMIO32 space empty\n",
> __FUNCTION__));
>  return EFI_PROTOCOL_ERROR;
>}
> 
> @@ -333,13 +328,15 @@ ProcessPciHost (
>  return Status;
>}
> 
> -  //
> -  // Map the MMIO window that provides I/O access - the PCI host bridge
> code
> -  // is not aware of this translation and so it will only map the I/O view
> -  // in the GCD I/O map.
> -  //
> -  Status = MapGcdMmioSpace (*IoBase + IoTranslation, *IoSize);
> -  ASSERT_EFI_ERROR (Status);
> +  if (*IoSize) {
I think I missed this in the previous review.
According to coding standard, this line should be
if (*IoSize != 0)

> +//
> +// Map the MMIO window that provides I/O access - the PCI host bridge
> code
> +// is not aware of this translation and so it will only map the I/O view
> +// in the GCD I/O map.
> +//
> +Status = MapGcdMmioSpace (*IoBase + IoTranslation, *IoSize);
> +ASSERT_EFI_ERROR (Status);
> +  }
> 
>return Status;
>  }
> @@ -413,17 +410,21 @@ PciHostBridgeGetRootBridges (
> 
>AllocationAttributes = EFI_PCI_HOST_BRIDGE_COMBINE_MEM_PMEM;
> 
> -  Io.Base   = IoBase;
> -  Io.Limit  = IoBase + IoSize - 1;
> +  if (IoSize) {
Same here

> +Io.Base  = IoBase;
> +Io.Limit = IoBase + IoSize - 1;
> +  } else {
> +Io.Base  = MAX_UINT64;
> +Io.Limit = 0;
> +  }
> +
>Mem.Base  = Mmio32Base;
>Mem.Limit = Mmio32Base + Mmio32Size - 1;
> 
> -  if (sizeof (UINTN) == sizeof (UINT64)) {
> -MemAbove4G.Base  = Mmio64Base;
> -MemAbove4G.Limit = Mmio64Base + Mmio64Size - 1;
> -if (Mmio64Size > 0) {
> -  AllocationAttributes |= EFI_PCI_HOST_BRIDGE_MEM64_DECODE;
> -}
> +  if ((sizeof (UINTN) == sizeof (UINT64)) && Mmio64Size) {
Same here for Mmio64Size.

Abner

> +MemAbove4G.Base   = Mmio64Base;
> +MemAbove4G.Limit  = Mmio64Base + Mmio64Size - 1;
> +AllocationAttributes |= EFI_PCI_HOST_BRIDGE_MEM64_DECODE;
>} else {
>  //
>  // UEFI mandates a 1:1 virtual-to-physical mapping, so on a 32-bit
> --
> 2.35.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89237): https://edk2.groups.io/g/devel/message/89237
Mute This Topic: https://groups.io/mt/90624445/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v1 1/1] .pytool/Plugin/UncrustifyCheck: Add Azure DevOps UI debug instructions

2022-04-22 Thread Michael Kubacki

PR with R-b tag is ready to push:

https://github.com/tianocore/edk2/pull/2799

On 4/21/2022 5:08 PM, Sean wrote:

Reviewed-by: Sean Brogan 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89236): https://edk2.groups.io/g/devel/message/89236
Mute This Topic: https://groups.io/mt/90576240/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [edk2-platforms][PATCH v1 06/10] RaspberryPi: Add VariableFlashInfoLib

2022-04-22 Thread Michael Kubacki

Thanks for testing it.

On 4/22/2022 10:41 AM, Jeremy Linton wrote:

Hi,

On 4/20/22 15:44, mikub...@linux.microsoft.com wrote:

From: Michael Kubacki 

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3479

Adds an instance for the library class VariableFlashInfoLib that
was recently introduced in MdeModulePkg. This change is made to
allow the new variable driver to build that has a dependency on
this library class and does not require any further platform
changes.

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Cc: Jeremy Linton 
Signed-off-by: Michael Kubacki 
---
  Platform/RaspberryPi/RPi3/RPi3.dsc | 1 +
  Platform/RaspberryPi/RPi4/RPi4.dsc | 1 +
  2 files changed, 2 insertions(+)

diff --git a/Platform/RaspberryPi/RPi3/RPi3.dsc 
b/Platform/RaspberryPi/RPi3/RPi3.dsc

index 6dc48dc23302..0eed03c097f8 100644
--- a/Platform/RaspberryPi/RPi3/RPi3.dsc
+++ b/Platform/RaspberryPi/RPi3/RPi3.dsc
@@ -174,6 +174,7 @@ [LibraryClasses.common]

AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf 


  !endif
    VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf
+  
VariableFlashInfoLib|MdeModulePkg/Library/BaseVariableFlashInfoLib/BaseVariableFlashInfoLib.inf 


VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf 


VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf 


    GpioLib|Silicon/Broadcom/Bcm283x/Library/GpioLib/GpioLib.inf
diff --git a/Platform/RaspberryPi/RPi4/RPi4.dsc 
b/Platform/RaspberryPi/RPi4/RPi4.dsc

index a9c0c36bb12b..eabddd7382cf 100644
--- a/Platform/RaspberryPi/RPi4/RPi4.dsc
+++ b/Platform/RaspberryPi/RPi4/RPi4.dsc
@@ -174,6 +174,7 @@ [LibraryClasses.common]

AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf 


  !endif
    VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf
+  
VariableFlashInfoLib|MdeModulePkg/Library/BaseVariableFlashInfoLib/BaseVariableFlashInfoLib.inf 


VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf 


VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf 


    GpioLib|Silicon/Broadcom/Bcm283x/Library/GpioLib/GpioLib.inf


I applied both this and the other required set, built and booted them, 
and the variable store appears to continue behaving as before (both 
with/without my SPI flash patches).


And this looks fairly trivial, I'm not sure why its not just picked up 
as part of one of the other variable store related .inf's but 


So for this patch:

Tested-by: Jeremy Linton 
Reviewed-by: Jeremy Linton 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89235): https://edk2.groups.io/g/devel/message/89235
Mute This Topic: https://groups.io/mt/90592924/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [edk2-platforms][PATCH v1 06/10] RaspberryPi: Add VariableFlashInfoLib

2022-04-22 Thread Jeremy Linton

Hi,

On 4/20/22 15:44, mikub...@linux.microsoft.com wrote:

From: Michael Kubacki 

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3479

Adds an instance for the library class VariableFlashInfoLib that
was recently introduced in MdeModulePkg. This change is made to
allow the new variable driver to build that has a dependency on
this library class and does not require any further platform
changes.

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Cc: Jeremy Linton 
Signed-off-by: Michael Kubacki 
---
  Platform/RaspberryPi/RPi3/RPi3.dsc | 1 +
  Platform/RaspberryPi/RPi4/RPi4.dsc | 1 +
  2 files changed, 2 insertions(+)

diff --git a/Platform/RaspberryPi/RPi3/RPi3.dsc 
b/Platform/RaspberryPi/RPi3/RPi3.dsc
index 6dc48dc23302..0eed03c097f8 100644
--- a/Platform/RaspberryPi/RPi3/RPi3.dsc
+++ b/Platform/RaspberryPi/RPi3/RPi3.dsc
@@ -174,6 +174,7 @@ [LibraryClasses.common]

AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
  !endif
VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf
+  
VariableFlashInfoLib|MdeModulePkg/Library/BaseVariableFlashInfoLib/BaseVariableFlashInfoLib.inf

VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf

VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf
GpioLib|Silicon/Broadcom/Bcm283x/Library/GpioLib/GpioLib.inf
diff --git a/Platform/RaspberryPi/RPi4/RPi4.dsc 
b/Platform/RaspberryPi/RPi4/RPi4.dsc
index a9c0c36bb12b..eabddd7382cf 100644
--- a/Platform/RaspberryPi/RPi4/RPi4.dsc
+++ b/Platform/RaspberryPi/RPi4/RPi4.dsc
@@ -174,6 +174,7 @@ [LibraryClasses.common]

AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
  !endif
VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf
+  
VariableFlashInfoLib|MdeModulePkg/Library/BaseVariableFlashInfoLib/BaseVariableFlashInfoLib.inf

VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf

VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf
GpioLib|Silicon/Broadcom/Bcm283x/Library/GpioLib/GpioLib.inf


I applied both this and the other required set, built and booted them, 
and the variable store appears to continue behaving as before (both 
with/without my SPI flash patches).


And this looks fairly trivial, I'm not sure why its not just picked up 
as part of one of the other variable store related .inf's but 


So for this patch:

Tested-by: Jeremy Linton 
Reviewed-by: Jeremy Linton 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89234): https://edk2.groups.io/g/devel/message/89234
Mute This Topic: https://groups.io/mt/90592924/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v1 1/1] .azurepipelines: Add NOOPT to all package builds

2022-04-22 Thread Michael Kubacki

PR with R-b tag is ready to push:

https://github.com/tianocore/edk2/pull/2818

On 4/21/2022 5:07 PM, Sean wrote:

Reviewed-by: Sean Brogan 




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89233): https://edk2.groups.io/g/devel/message/89233
Mute This Topic: https://groups.io/mt/90576320/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH 2/2] ShellPkg/SmbiosView: Print BIOS extension size

2022-04-22 Thread Hsu, Roger
Update for printing BIOS extension size information.

Signed-off-by: Roger Hsu 
Cc: Ray Ni 
Cc: Zhichao Gao 
Cc: Abner Chang 
---
 .../SmbiosView/PrintInfo.c   | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
index b144600a25..ee0dbc19be 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
@@ -3,7 +3,7 @@
 
   Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
   (C) Copyright 2014 Hewlett-Packard Development Company, L.P.
-  (C) Copyright 2015-2019 Hewlett Packard Enterprise Development LP
+  (C) Copyright 2015-2022 Hewlett Packard Enterprise Development LP
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -338,7 +338,15 @@ SmbiosPrintStructure (
   PRINT_PENDING_STRING (Struct, Type0, BiosVersion);
   PRINT_STRUCT_VALUE_H (Struct, Type0, BiosSegment);
   PRINT_PENDING_STRING (Struct, Type0, BiosReleaseDate);
-  ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN 
(STR_SMBIOSVIEW_PRINTINFO_BIOS_SIZE), gShellDebug1HiiHandle, 64 * 
(Struct->Type0->BiosSize + 1));
+  if (Struct->Type0->BiosSize == EXCEED_BIOS_ROM_SIZE) {
+if (Struct->Type0->ExtendedBiosSize.Unit == 
BIOS_ROM_SIZE_IN_MEGABYTES) {
+  ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN 
(STR_SMBIOSVIEW_PRINTINFO_BIOS_SIZE), gShellDebug1HiiHandle, 
(BYTES_IN_MEGABYTES * (Struct->Type0->ExtendedBiosSize.Size)) / 
BYTES_IN_KILOBYTES);
+} else if (Struct->Type0->ExtendedBiosSize.Unit == 
BIOS_ROM_SIZE_IN_GIGABYTES) {
+  ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN 
(STR_SMBIOSVIEW_PRINTINFO_BIOS_SIZE), gShellDebug1HiiHandle, 
(BYTES_IN_GIGABYTES *(Struct->Type0->ExtendedBiosSize.Size)) / 
BYTES_IN_KILOBYTES);
+}
+  } else {
+ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN 
(STR_SMBIOSVIEW_PRINTINFO_BIOS_SIZE), gShellDebug1HiiHandle, 64 * 
(Struct->Type0->BiosSize + 1));
+  }
 
   DisplayBiosCharacteristics (ReadUnaligned64 ((UINT64 
*)(UINTN)&(Struct->Type0->BiosCharacteristics)), Option);
 
-- 
2.28.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89232): https://edk2.groups.io/g/devel/message/89232
Mute This Topic: https://groups.io/mt/90628978/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH 1/2] MdePkg/Include: Update SMBIOS type 0

2022-04-22 Thread Hsu, Roger
Update SMBIOS type 0 to support BIOS extended size.

Signed-off-by: Roger Hsu 
Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Zhiguang Liu 
Cc: Abner Chang 
---
 MdePkg/Include/IndustryStandard/SmBios.h | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/MdePkg/Include/IndustryStandard/SmBios.h 
b/MdePkg/Include/IndustryStandard/SmBios.h
index 828ea6d753..baa0fc96b8 100644
--- a/MdePkg/Include/IndustryStandard/SmBios.h
+++ b/MdePkg/Include/IndustryStandard/SmBios.h
@@ -3,7 +3,7 @@
 
 Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
 (C) Copyright 2015-2017 Hewlett Packard Enterprise Development LP
-(C) Copyright 2015 - 2019 Hewlett Packard Enterprise Development LP
+(C) Copyright 2015 - 2022 Hewlett Packard Enterprise Development LP
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -293,6 +293,17 @@ typedef struct {
   EXTENDED_BIOS_ROM_SIZE   ExtendedBiosSize;
 } SMBIOS_TABLE_TYPE0;
 
+///
+/// Extended BIOS ROM Size is added from SMBIOS 3.1. Add support to store 
different
+/// storage capacity unit (megabytes, gigabytes)
+///
+#define EXCEED_BIOS_ROM_SIZE 0xFF
+#define BIOS_ROM_SIZE_IN_GIGABYTES 1
+#define BIOS_ROM_SIZE_IN_MEGABYTES 0
+#define BYTES_IN_GIGABYTES (1024*1024*1024)
+#define BYTES_IN_MEGABYTES (1024*1024)
+#define BYTES_IN_KILOBYTES 1024
+
 ///
 ///  System Wake-up Type.
 ///
-- 
2.28.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89231): https://edk2.groups.io/g/devel/message/89231
Mute This Topic: https://groups.io/mt/90628976/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH 0/2] Update SMBIOS type 0

2022-04-22 Thread Hsu, Roger
Update for supporting SMBIOS type zero extended size.

Signed-off-by: Roger Hsu 
Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Zhiguang Liu 
Cc: Abner Chang 
Cc: Ray Ni 
Cc: Zhichao Gao 

Hsu, Roger (2):
  MdePkg/Include: Update SMBIOS type 0
  ShellPkg/SmbiosView: Print BIOS extension size

 MdePkg/Include/IndustryStandard/SmBios.h| 13 -
 .../SmbiosView/PrintInfo.c  | 12 ++--
 2 files changed, 22 insertions(+), 3 deletions(-)

-- 
2.28.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89230): https://edk2.groups.io/g/devel/message/89230
Mute This Topic: https://groups.io/mt/90628958/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH 0/2] Update SMBIOS type 0

2022-04-22 Thread Hsu, Roger
Update for supporting SMBIOS type zero extended size.

Signed-off-by: Roger Hsu 
Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Zhiguang Liu 
Cc: Abner Chang 
Cc: Ray Ni 
Cc: Zhichao Gao 

Hsu, Roger (2):
  MdePkg/Include: Update SMBIOS type 0
  ShellPkg/SmbiosView: Print BIOS extension size

 MdePkg/Include/IndustryStandard/SmBios.h| 13 -
 .../SmbiosView/PrintInfo.c  | 12 ++--
 2 files changed, 22 insertions(+), 3 deletions(-)

-- 
2.28.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89229): https://edk2.groups.io/g/devel/message/89229
Mute This Topic: https://groups.io/mt/90628958/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH 0/2] Update SMBIOS type 0

2022-04-22 Thread Hsu, Roger
Update for supporting SMBIOS type zero extended size.

Signed-off-by: Roger Hsu 
Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Zhiguang Liu 
Cc: Abner Chang 
Cc: Ray Ni 
Cc: Zhichao Gao 

Hsu, Roger (2):
  MdePkg/Include: Update SMBIOS type 0
  ShellPkg/SmbiosView: Print BIOS extension size

 MdePkg/Include/IndustryStandard/SmBios.h| 13 -
 .../SmbiosView/PrintInfo.c  | 12 ++--
 2 files changed, 22 insertions(+), 3 deletions(-)

-- 
2.28.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89228): https://edk2.groups.io/g/devel/message/89228
Mute This Topic: https://groups.io/mt/90628958/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [edk2-platforms][PATCH v1 00/10] Add variableFlashInfoLib

2022-04-22 Thread Michael Kubacki
Reminder to all to review this series for your package. It is a simple 
change needed to keep your package building.


So far, only Abner Chang  has responded for 
U5SeriesPkg.


On 4/20/2022 4:44 PM, Michael Kubacki wrote:

From: Michael Kubacki 

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3479

Adds an instance for the library class VariableFlashInfoLib that
was recently introduced in MdeModulePkg. This change is made to
allow the new variable driver to build that has a dependency on
this library class and does not require any further platform
changes.

Note that this series is for an upcoming change in MdeModulePkg
and requires that change to be present locally for testing.

https://edk2.groups.io/g/devel/message/88787

Cc: Abner Chang 
Cc: Ard Biesheuvel 
Cc: Chasel Chiu 
Cc: Daniel Schaefer 
Cc: Eric Dong 
Cc: Gilbert Chen 
Cc: Graeme Gregory 
Cc: Ilias Apalodimas 
Cc: Jeremy Linton 
Cc: Leif Lindholm 
Cc: Liming Gao 
Cc: Masami Hiramatsu 
Cc: Nate DeSimone 
Cc: Radoslaw Biernacki 
Cc: Sami Mujawar 
Signed-off-by: Michael Kubacki 

Michael Kubacki (10):
   OverdriveBoard: Add VariableFlashInfoLib
   BeagleBoardPkg: Add VariableFlashInfoLib
   MinPlatformPkg: Add VariableFlashInfoLib
   CelloBoard: Add VariableFlashInfoLib
   SbsaQemu: Add VariableFlashInfoLib
   RaspberryPi: Add VariableFlashInfoLib
   U5SeriesPkg: Add VariableFlashInfoLib
   Socionext: Add VariableFlashInfoLib
   Softiron: Add VariableFlashInfoLib
   PlatformStandaloneMmPkg: Add VariableFlashInfoLib

  Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 
1 +
  Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc | 
1 +
  Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc| 
1 +
  Platform/LeMaker/CelloBoard/CelloBoard.dsc | 
1 +
  Platform/Qemu/SbsaQemu/SbsaQemu.dsc| 
1 +
  Platform/RaspberryPi/RPi3/RPi3.dsc | 
1 +
  Platform/RaspberryPi/RPi4/RPi4.dsc | 
1 +
  Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc | 
1 +
  Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc   | 
1 +
  Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc   | 
1 +
  Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc| 
1 +
  Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc | 
1 +
  12 files changed, 12 insertions(+)




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89227): https://edk2.groups.io/g/devel/message/89227
Mute This Topic: https://groups.io/mt/90592905/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [edk2-platforms][PATCH v1 0/3] MinPlatformPkg: Add FADT duty offset and width PCDs

2022-04-22 Thread Michael Kubacki

Reminder to review this series.

Ankit Sinha has reviewed it but need a maintainer to review and merge.

On 4/11/2022 4:58 PM, Michael Kubacki wrote:

From: Michael Kubacki 

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3543

Adds PCDs to the MinPlatformPkg DEC file so MinPlatformPkg consumers
(board packages) can customize the DUTY_OFFSET and DUTY_CYCLE
values in their build files.

The copy of AcpiPlatform in SimicsOpenBoardPkg is also updated to
keep the change in sync with the source MinPlatformPkg module.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Liming Gao 
Cc: Eric Dong 
Signed-off-by: Michael Kubacki 

Michael Kubacki (3):
   MinPlatformPkg: Add FADT duty offset and duty width PCDs
   MinPlatformPkg/AcpiPlatform: Use FADT duty offset and width PCDs
   SimicsOpenBoardPkg/AcpiPlatform: Use FADT duty offset and width PCDs

  Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c  
  |  3 +++
  Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/Fadt/Fadt.c 
  |  4 ++--
  
Platform/Intel/SimicsOpenBoardPkg/AcpiTables/MinPlatformAcpiTables/AcpiPlatform.c
   |  3 +++
  
Platform/Intel/SimicsOpenBoardPkg/AcpiTables/MinPlatformAcpiTables/Fadt/Fadt.c  
|  4 ++--
  Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.inf
  |  2 ++
  Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec  
  | 15 +++
  
Platform/Intel/SimicsOpenBoardPkg/AcpiTables/MinPlatformAcpiTables/AcpiPlatform.inf
 |  2 ++
  7 files changed, 29 insertions(+), 4 deletions(-)




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89226): https://edk2.groups.io/g/devel/message/89226
Mute This Topic: https://groups.io/mt/90405218/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [edk2-platforms][PATCH v1 1/1] IntelSiliconPkg/SpiFvbService: Add support for VariableFlashInfoLib

2022-04-22 Thread Michael Kubacki

Reminder to review this patch.


On 4/18/2022 7:43 PM, Michael Kubacki wrote:

From: Michael Kubacki 

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3478

Adds support for getting the variable flash information from
VariableFlashInfoLib. This library abstracts the source of flash
information so platforms could expect the information to come
from a different source in the library implementation than the
PCDs previously used as the information source in this module.

In particular, the library allows Standalone MM platforms to
dynamically pass the information behind the library API.

Cc: Rangasai V Chaganty 
Cc: Ray Ni 
Cc: Nate DeSimone 
Signed-off-by: Michael Kubacki 
---

Notes:
 Depends on https://bugzilla.tianocore.org/show_bug.cgi?id=3479
 to complete

  Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/FvbInfo.c   
  | 120 +---
  
Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceCommon.c 
|  93 +--
  Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceMm.c   
  |  28 -
  
Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceCommon.h 
|  18 ++-
  
Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceSmm.inf  
|   6 +-
  
Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceStandaloneMm.inf
 |   6 +-
  Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dsc 
  |   7 ++
  7 files changed, 215 insertions(+), 63 deletions(-)

diff --git 
a/Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/FvbInfo.c 
b/Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/FvbInfo.c
index 7f2678fa9e5a..5e78c1ce0c14 100644
--- a/Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/FvbInfo.c
+++ b/Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/FvbInfo.c
@@ -3,6 +3,7 @@
These data is intent to decouple FVB driver with FV header.
  
  Copyright (c) 2017, Intel Corporation. All rights reserved.

+Copyright (c) Microsoft Corporation.
  SPDX-License-Identifier: BSD-2-Clause-Patent
  
  **/

@@ -11,51 +12,84 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
  
  #define FIRMWARE_BLOCK_SIZE 0x1

  #define FVB_MEDIA_BLOCK_SIZEFIRMWARE_BLOCK_SIZE
-
-#define NV_STORAGE_BASE_ADDRESS 
FixedPcdGet32(PcdFlashNvStorageVariableBase)
-#define SYSTEM_NV_BLOCK_NUM 
((FixedPcdGet32(PcdFlashNvStorageVariableSize)+ 
FixedPcdGet32(PcdFlashNvStorageFtwWorkingSize) + 
FixedPcdGet32(PcdFlashNvStorageFtwSpareSize))/ FVB_MEDIA_BLOCK_SIZE)
-
  typedef struct {
EFI_PHYSICAL_ADDRESSBaseAddress;
EFI_FIRMWARE_VOLUME_HEADER  FvbInfo;
EFI_FV_BLOCK_MAP_ENTRY  End[1];
  } EFI_FVB2_MEDIA_INFO;
  
-//

-// This data structure contains a template of all correct FV headers, which is 
used to restore
-// Fv header if it's corrupted.
-//
-EFI_FVB2_MEDIA_INFO mPlatformFvbMediaInfo[] = {
-  //
-  // Systen NvStorage FVB
-  //
-  {
-NV_STORAGE_BASE_ADDRESS,
-{
-  {0,}, //ZeroVector[16]
-  EFI_SYSTEM_NV_DATA_FV_GUID,
-  FVB_MEDIA_BLOCK_SIZE * SYSTEM_NV_BLOCK_NUM,
-  EFI_FVH_SIGNATURE,
-  0x0004feff, // check MdePkg/Include/Pi/PiFirmwareVolume.h for details on 
EFI_FVB_ATTRIBUTES_2
-  sizeof (EFI_FIRMWARE_VOLUME_HEADER) + sizeof (EFI_FV_BLOCK_MAP_ENTRY),
-  0,//CheckSum which will be calucated dynamically.
-  0,//ExtHeaderOffset
-  {0,}, //Reserved[1]
-  2,//Revision
-  {
-{
-  SYSTEM_NV_BLOCK_NUM,
-  FVB_MEDIA_BLOCK_SIZE,
-}
-  }
-},
-{
-  {
-0,
-0
-  }
-}
+/**
+  Returns FVB media information for NV variable storage.
+
+  @return   FvbMediaInfo  A pointer to an instance of FVB media 
info produced by this function.
+  The buffer is allocated internally to 
this function and it is the caller's
+  responsibility to free the memory
+
+**/
+typedef
+EFI_STATUS
+(*FVB_MEDIA_INFO_GENERATOR)(
+  OUT EFI_FVB2_MEDIA_INFO *FvbMediaInfo
+  );
+
+/**
+  Returns FVB media information for NV variable storage.
+
+  @return   FvbMediaInfo  A pointer to an instance of FVB media 
info produced by this function.
+  The buffer is allocated internally to 
this function and it is the caller's
+  responsibility to free the memory
+
+**/
+EFI_STATUS
+GenerateNvStorageFvbMediaInfo (
+  OUT EFI_FVB2_MEDIA_INFO *FvbMediaInfo
+  )
+{
+  UINT32  NvBlockNum;
+  UINT32  TotalNvVariableStorageSize;
+  EFI_PHYSICAL_ADDRESSNvStorageBaseAddress;
+  EFI_FIRMWARE_VOLUME_HEADER  FvbInfo = {
+  {0,},
   //ZeroVector[16]
+  EFI_SYSTEM_NV_DAT

Re: [edk2-devel] [PATCH v2 0/3] add and use more video modes

2022-04-22 Thread Ard Biesheuvel
On Fri, 22 Apr 2022 at 14:41, Gerd Hoffmann  wrote:
>
> v2:
>  - rebase to latest master
>  - add review tags
>

Thanks Gerd, I'll pick these up later today.


> Gerd Hoffmann (3):
>   MdeModulePkg/GraphicsConsoleDxe: add modes
>   OvmfPkg: clear PcdConOut{Row,Column}
>   ArmVirtPkg: clear PcdConOut{Row,Column}
>
>  ArmVirtPkg/ArmVirtQemu.dsc   | 2 ++
>  ArmVirtPkg/ArmVirtQemuKernel.dsc | 2 ++
>  OvmfPkg/AmdSev/AmdSevX64.dsc | 2 ++
>  OvmfPkg/Microvm/MicrovmX64.dsc   | 2 ++
>  OvmfPkg/OvmfPkgIa32.dsc  | 2 ++
>  OvmfPkg/OvmfPkgIa32X64.dsc   | 2 ++
>  OvmfPkg/OvmfPkgX64.dsc   | 2 ++
>  OvmfPkg/OvmfXen.dsc  | 2 ++
>  .../Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c   | 5 -
>  9 files changed, 20 insertions(+), 1 deletion(-)
>
> --
> 2.35.1
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89224): https://edk2.groups.io/g/devel/message/89224
Mute This Topic: https://groups.io/mt/90626839/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v2 3/3] ArmVirtPkg: clear PcdConOut{Row,Column}

2022-04-22 Thread Gerd Hoffmann
ConSplitterDxe will pick the highest available resolution then,
thereby making better use of the available display space.

Signed-off-by: Gerd Hoffmann 
Reviewed-by: Liming Gao 
---
 ArmVirtPkg/ArmVirtQemu.dsc   | 2 ++
 ArmVirtPkg/ArmVirtQemuKernel.dsc | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index b2b0d304d335..aa0ce61630f7 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -259,6 +259,8 @@ [PcdsDynamicDefault.common]
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|800
   gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution|640
   gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480
+  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|0
+  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|0
 
   #
   # SMBIOS entry point version
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index 36343f347bab..7f7d15d6eee3 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -238,6 +238,8 @@ [PcdsDynamicDefault.common]
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|800
   gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution|640
   gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480
+  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|0
+  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|0
 
   #
   # SMBIOS entry point version
-- 
2.35.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89223): https://edk2.groups.io/g/devel/message/89223
Mute This Topic: https://groups.io/mt/90626840/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v2 0/3] add and use more video modes

2022-04-22 Thread Gerd Hoffmann
v2:
 - rebase to latest master
 - add review tags

Gerd Hoffmann (3):
  MdeModulePkg/GraphicsConsoleDxe: add modes
  OvmfPkg: clear PcdConOut{Row,Column}
  ArmVirtPkg: clear PcdConOut{Row,Column}

 ArmVirtPkg/ArmVirtQemu.dsc   | 2 ++
 ArmVirtPkg/ArmVirtQemuKernel.dsc | 2 ++
 OvmfPkg/AmdSev/AmdSevX64.dsc | 2 ++
 OvmfPkg/Microvm/MicrovmX64.dsc   | 2 ++
 OvmfPkg/OvmfPkgIa32.dsc  | 2 ++
 OvmfPkg/OvmfPkgIa32X64.dsc   | 2 ++
 OvmfPkg/OvmfPkgX64.dsc   | 2 ++
 OvmfPkg/OvmfXen.dsc  | 2 ++
 .../Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c   | 5 -
 9 files changed, 20 insertions(+), 1 deletion(-)

-- 
2.35.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89222): https://edk2.groups.io/g/devel/message/89222
Mute This Topic: https://groups.io/mt/90626839/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v2 2/3] OvmfPkg: clear PcdConOut{Row,Column}

2022-04-22 Thread Gerd Hoffmann
ConSplitterDxe will pick the highest available resolution then,
thereby making better use of the available display space.

Signed-off-by: Gerd Hoffmann 
Reviewed-by: Liming Gao 
---
 OvmfPkg/AmdSev/AmdSevX64.dsc   | 2 ++
 OvmfPkg/Microvm/MicrovmX64.dsc | 2 ++
 OvmfPkg/OvmfPkgIa32.dsc| 2 ++
 OvmfPkg/OvmfPkgIa32X64.dsc | 2 ++
 OvmfPkg/OvmfPkgX64.dsc | 2 ++
 OvmfPkg/OvmfXen.dsc| 2 ++
 6 files changed, 12 insertions(+)

diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc b/OvmfPkg/AmdSev/AmdSevX64.dsc
index 1c088f25fa4b..f0700035c116 100644
--- a/OvmfPkg/AmdSev/AmdSevX64.dsc
+++ b/OvmfPkg/AmdSev/AmdSevX64.dsc
@@ -530,6 +530,8 @@ [PcdsDynamicDefault]
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|1280
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|800
+  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|0
+  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable|FALSE
   gUefiOvmfPkgTokenSpaceGuid.PcdVideoResolutionSource|0
   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId|0
diff --git a/OvmfPkg/Microvm/MicrovmX64.dsc b/OvmfPkg/Microvm/MicrovmX64.dsc
index c9c843e116a9..20c3c9c4d862 100644
--- a/OvmfPkg/Microvm/MicrovmX64.dsc
+++ b/OvmfPkg/Microvm/MicrovmX64.dsc
@@ -563,6 +563,8 @@ [PcdsDynamicDefault]
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|1280
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|800
+  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|0
+  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable|FALSE
   gUefiOvmfPkgTokenSpaceGuid.PcdVideoResolutionSource|0
   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId|0
diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
index 9e4ecd21fb17..f02b371f7427 100644
--- a/OvmfPkg/OvmfPkgIa32.dsc
+++ b/OvmfPkg/OvmfPkgIa32.dsc
@@ -593,6 +593,8 @@ [PcdsDynamicDefault]
 !endif
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|1280
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|800
+  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|0
+  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable|FALSE
   gUefiOvmfPkgTokenSpaceGuid.PcdVideoResolutionSource|0
   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId|0
diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
index 75fb8095eec2..cb68e612bd35 100644
--- a/OvmfPkg/OvmfPkgIa32X64.dsc
+++ b/OvmfPkg/OvmfPkgIa32X64.dsc
@@ -601,6 +601,8 @@ [PcdsDynamicDefault]
 !endif
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|1280
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|800
+  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|0
+  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable|FALSE
   gUefiOvmfPkgTokenSpaceGuid.PcdVideoResolutionSource|0
   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId|0
diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
index 2e534d0d2478..45ffa2dbe35f 100644
--- a/OvmfPkg/OvmfPkgX64.dsc
+++ b/OvmfPkg/OvmfPkgX64.dsc
@@ -612,6 +612,8 @@ [PcdsDynamicDefault]
 !endif
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|1280
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|800
+  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|0
+  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable|FALSE
   gUefiOvmfPkgTokenSpaceGuid.PcdVideoResolutionSource|0
   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId|0
diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc
index 8d420cf54371..a1626d06dfc3 100644
--- a/OvmfPkg/OvmfXen.dsc
+++ b/OvmfPkg/OvmfXen.dsc
@@ -470,6 +470,8 @@ [PcdsDynamicDefault]
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|1280
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|800
+  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|0
+  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable|FALSE
   gUefiOvmfPkgTokenSpaceGuid.PcdVideoResolutionSource|0
   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId|0
-- 
2.35.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89221): https://edk2.groups.io/g/devel/message/89221
Mute This Topic: https://groups.io/mt/90626837/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v2 1/3] MdeModulePkg/GraphicsConsoleDxe: add modes

2022-04-22 Thread Gerd Hoffmann
Add modes for a few common display resolutions higher than 800x600,
specifically 1024x768, 1280x800 and 1920x1080, so ConSplitterDxe has
more options available.

The mode list is not use as-is, InitializeGraphicsConsoleTextMode() will
check the list and filter out any modes which don't fit to the screen,
so this will also work fine for small displays.

Signed-off-by: Gerd Hoffmann 
Reviewed-by: Liming Gao 
---
 .../Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c   | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c 
b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
index 07436cbd15bf..b895dafedeaa 100644
--- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
+++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
@@ -40,7 +40,10 @@ GRAPHICS_CONSOLE_DEV  mGraphicsConsoleDevTemplate = {
 };
 
 GRAPHICS_CONSOLE_MODE_DATA  mGraphicsConsoleModeData[] = {
-  { 100, 31 },
+  { 100, 31 },  //  800 x 600
+  { 128, 40 },  // 1024 x 768
+  { 160, 42 },  // 1280 x 800
+  { 240, 56 },  // 1920 x 1080
   //
   // New modes can be added here.
   // The last entry is specific for full screen mode.
-- 
2.35.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89220): https://edk2.groups.io/g/devel/message/89220
Mute This Topic: https://groups.io/mt/90626832/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v1 1/1] MdePkg: add SmmCpuRendezvousLib.h and SmmCpuRendezvousLibNull implement.

2022-04-22 Thread Li, Zhihao
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3912

UefiCpuPkg define a new Protocol with the new services
SmmWaitForAllProcessor(), which can be used by SMI handler
to optionally wait for other APs to complete SMM rendezvous in
relaxed AP mode.

VariableSmm and VariableStandaloneMM driver in MdeModulePkg need
to use this services but MdeModulePkg can't depend on UefiCpuPkg.

Thus, the solution is moving SmmCpuRendezvouslib.h from UefiCpuPkg
to MdePkg and creating SmmCpuRendezvousLib NullLib version
implementation in MdePkg as dependency for the pkg that can't
depend on UefiCpuPkg.

Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Eric Dong 
Cc: Ray Ni 
Cc: Michael Kubacki 
Cc: Siyuan Fu 

Signed-off-by: Zhihao Li 
---
 MdePkg/Library/SmmCpuRendezvousLibNull/SmmCpuRendezvousLibNull.c   | 29 

 {UefiCpuPkg => MdePkg}/Include/Library/SmmCpuRendezvousLib.h   |  0
 MdePkg/Library/SmmCpuRendezvousLibNull/SmmCpuRendezvousLibNull.inf | 26 
++
 MdePkg/MdePkg.dec  |  3 ++
 MdePkg/MdePkg.dsc  |  1 +
 UefiCpuPkg/UefiCpuPkg.dec  |  3 --
 6 files changed, 59 insertions(+), 3 deletions(-)

diff --git a/MdePkg/Library/SmmCpuRendezvousLibNull/SmmCpuRendezvousLibNull.c 
b/MdePkg/Library/SmmCpuRendezvousLibNull/SmmCpuRendezvousLibNull.c
new file mode 100644
index ..474195bbb374
--- /dev/null
+++ b/MdePkg/Library/SmmCpuRendezvousLibNull/SmmCpuRendezvousLibNull.c
@@ -0,0 +1,29 @@
+/** @file

+  SMM CPU Rendezvous sevice implement.

+

+  Copyright (c) 2022, Intel Corporation. All rights reserved.

+  SPDX-License-Identifier: BSD-2-Clause-Patent

+

+**/

+

+#include 

+#include 

+

+/**

+  This routine wait for all AP processors to arrive in SMM.

+

+  @param[in] BlockingMode  Blocking mode or non-blocking mode.

+

+  @retval EFI_SUCCESS  All avaiable APs arrived.

+  @retval EFI_TIMEOUT  Wait for all APs until timeout.

+  @retval OTHERFail to register SMM CPU Rendezvous service Protocol.

+**/

+EFI_STATUS

+EFIAPI

+SmmWaitForAllProcessor (

+  IN BOOLEAN  BlockingMode

+  )

+{

+  ASSERT (FALSE);

+  return EFI_SUCCESS;

+}

diff --git a/UefiCpuPkg/Include/Library/SmmCpuRendezvousLib.h 
b/MdePkg/Include/Library/SmmCpuRendezvousLib.h
similarity index 100%
rename from UefiCpuPkg/Include/Library/SmmCpuRendezvousLib.h
rename to MdePkg/Include/Library/SmmCpuRendezvousLib.h
diff --git a/MdePkg/Library/SmmCpuRendezvousLibNull/SmmCpuRendezvousLibNull.inf 
b/MdePkg/Library/SmmCpuRendezvousLibNull/SmmCpuRendezvousLibNull.inf
new file mode 100644
index ..7c9bac9af2ff
--- /dev/null
+++ b/MdePkg/Library/SmmCpuRendezvousLibNull/SmmCpuRendezvousLibNull.inf
@@ -0,0 +1,26 @@
+## @file

+# SMM CPU Rendezvous service lib.

+#

+# This is SMM CPU rendezvous service lib that wait for all

+# APs to enter SMM mode.

+#

+# Copyright (c) 2022, Intel Corporation. All rights reserved.

+# SPDX-License-Identifier: BSD-2-Clause-Patent

+#

+##

+

+[Defines]

+  INF_VERSION= 0x00010005

+  BASE_NAME  = SmmCpuRendezvousLibNull

+  FILE_GUID  = 1e5790ea-d013-4d7b-9047-b4342a762027

+  MODULE_TYPE= DXE_SMM_DRIVER

+  LIBRARY_CLASS  = SmmCpuRendezvousLib|MM_STANDALONE 
DXE_SMM_DRIVER

+

+[Sources]

+  SmmCpuRendezvousLibNull.c

+

+[Packages]

+  MdePkg/MdePkg.dec

+

+[LibraryClasses]

+  DebugLib

diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index faeb28c80cbd..85a4398e8f65 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -272,6 +272,9 @@
   #

   CcProbeLib|Include/Library/CcProbeLib.h

 

+  ## @libraryclass  Provides function for SMM CPU Rendezvous Library.

+  SmmCpuRendezvousLib|Include/Library/SmmCpuRendezvousLib.h

+

 [LibraryClasses.IA32, LibraryClasses.X64, LibraryClasses.AARCH64]

   ##  @libraryclass  Provides services to generate random number.

   #

diff --git a/MdePkg/MdePkg.dsc b/MdePkg/MdePkg.dsc
index c8d282882ec1..5e2ea32088fa 100644
--- a/MdePkg/MdePkg.dsc
+++ b/MdePkg/MdePkg.dsc
@@ -131,6 +131,7 @@
 

   MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf

   MdePkg/Library/CcProbeLibNull/CcProbeLibNull.inf

+  MdePkg/Library/SmmCpuRendezvousLibNull/SmmCpuRendezvousLibNull.inf

 

 [Components.IA32, Components.X64, Components.ARM, Components.AARCH64]

   #

diff --git a/UefiCpuPkg/UefiCpuPkg.dec b/UefiCpuPkg/UefiCpuPkg.dec
index 525cde463435..1951eb294c6c 100644
--- a/UefiCpuPkg/UefiCpuPkg.dec
+++ b/UefiCpuPkg/UefiCpuPkg.dec
@@ -62,9 +62,6 @@
   ##  @libraryclass  Provides function for loading microcode.

   MicrocodeLib|Include/Library/MicrocodeLib.h

 

-  ## @libraryclass  Provides function for SMM CPU Rendezvous Library.

-  SmmCpuRendezvousLib|Include/Library/SmmCpuRendezvousLib.h

-

 [Guids]

   gUefiCpuPkgTokenSpaceGuid  = { 0xac05bf33, 0x995a, 0x4ed4, { 0xaa, 0xb8, 
0xef, 0x7a, 0xe8, 0x

[edk2-devel] [PATCH v5 2/6] OvmfPkg/FdtPciHostBridgeLib: io range is not mandatory

2022-04-22 Thread Gerd Hoffmann
io range is not mandatory according to pcie spec,
so allow host bridges without io address space.

Signed-off-by: Gerd Hoffmann 
---
 .../FdtPciHostBridgeLib/FdtPciHostBridgeLib.c | 45 ++-
 1 file changed, 23 insertions(+), 22 deletions(-)

diff --git a/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c 
b/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c
index 98828e0b262b..823ea47c80a3 100644
--- a/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c
+++ b/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c
@@ -292,13 +292,8 @@ ProcessPciHost (
 }
   }
 
-  if ((*IoSize == 0) || (*Mmio32Size == 0)) {
-DEBUG ((
-  DEBUG_ERROR,
-  "%a: %a space empty\n",
-  __FUNCTION__,
-  (*IoSize == 0) ? "IO" : "MMIO32"
-  ));
+  if (*Mmio32Size == 0) {
+DEBUG ((DEBUG_ERROR, "%a: MMIO32 space empty\n", __FUNCTION__));
 return EFI_PROTOCOL_ERROR;
   }
 
@@ -333,13 +328,15 @@ ProcessPciHost (
 return Status;
   }
 
-  //
-  // Map the MMIO window that provides I/O access - the PCI host bridge code
-  // is not aware of this translation and so it will only map the I/O view
-  // in the GCD I/O map.
-  //
-  Status = MapGcdMmioSpace (*IoBase + IoTranslation, *IoSize);
-  ASSERT_EFI_ERROR (Status);
+  if (*IoSize) {
+//
+// Map the MMIO window that provides I/O access - the PCI host bridge code
+// is not aware of this translation and so it will only map the I/O view
+// in the GCD I/O map.
+//
+Status = MapGcdMmioSpace (*IoBase + IoTranslation, *IoSize);
+ASSERT_EFI_ERROR (Status);
+  }
 
   return Status;
 }
@@ -413,17 +410,21 @@ PciHostBridgeGetRootBridges (
 
   AllocationAttributes = EFI_PCI_HOST_BRIDGE_COMBINE_MEM_PMEM;
 
-  Io.Base   = IoBase;
-  Io.Limit  = IoBase + IoSize - 1;
+  if (IoSize) {
+Io.Base  = IoBase;
+Io.Limit = IoBase + IoSize - 1;
+  } else {
+Io.Base  = MAX_UINT64;
+Io.Limit = 0;
+  }
+
   Mem.Base  = Mmio32Base;
   Mem.Limit = Mmio32Base + Mmio32Size - 1;
 
-  if (sizeof (UINTN) == sizeof (UINT64)) {
-MemAbove4G.Base  = Mmio64Base;
-MemAbove4G.Limit = Mmio64Base + Mmio64Size - 1;
-if (Mmio64Size > 0) {
-  AllocationAttributes |= EFI_PCI_HOST_BRIDGE_MEM64_DECODE;
-}
+  if ((sizeof (UINTN) == sizeof (UINT64)) && Mmio64Size) {
+MemAbove4G.Base   = Mmio64Base;
+MemAbove4G.Limit  = Mmio64Base + Mmio64Size - 1;
+AllocationAttributes |= EFI_PCI_HOST_BRIDGE_MEM64_DECODE;
   } else {
 //
 // UEFI mandates a 1:1 virtual-to-physical mapping, so on a 32-bit
-- 
2.35.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89218): https://edk2.groups.io/g/devel/message/89218
Mute This Topic: https://groups.io/mt/90624445/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH] .pytool: Fix python command error in self introduction doc

2022-04-22 Thread Chao Li
Fix misspelling of word "Prerequisites".

In the step 5 of the Prerequisites section, the python command was missing
the "-r" option, what the command really meant was to install from the given
requirements file, so fix that.

Cc: sean.bro...@microsoft.com
Cc: bret.barke...@microsoft.com
Cc: michael.d.kin...@intel.com
Cc: gaolim...@byosoft.com.cn

Signed-off-by: Chao Li 
---
 .pytool/Readme.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pytool/Readme.md b/.pytool/Readme.md
index e0d07f3170..9c7b7f9abb 100644
--- a/.pytool/Readme.md
+++ b/.pytool/Readme.md
@@ -82,7 +82,7 @@ easily and consistently running locally and in a cloud ci 
environment.  To do
 that a few steps should be followed.  Details of EDKII Tools can be found in 
the
 [docs folder 
here](https://github.com/tianocore/edk2-pytool-extensions/tree/master/docs)
 
-### Prerequisets
+### Prerequisites
 
 1. A supported toolchain (others might work but this is what is tested and 
validated)
* Windows 10:
@@ -95,7 +95,7 @@ that a few steps should be followed.  Details of EDKII Tools 
can be found in the
 2. Python 3.7.x or newer on path
 3. git on path
 4. Recommended to setup and activate a python virtual environment
-5. Install the requirements `pip install --upgrade pip-requirements.txt`
+5. Install the requirements `pip install --upgrade -r pip-requirements.txt`
 
 ### Running CI
 
-- 
2.27.0



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89217): https://edk2.groups.io/g/devel/message/89217
Mute This Topic: https://groups.io/mt/90623543/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v5 6/6] OvmfPkg/Microvm/pcie: add pcie support

2022-04-22 Thread Gerd Hoffmann
Link in pcie and host bridge bits.  Enables support for PCIe in microvm
(qemu-system-x86_64 -M microvm,pcie=on).

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3777
Signed-off-by: Gerd Hoffmann 
---
 OvmfPkg/Microvm/MicrovmX64.dsc | 40 +-
 OvmfPkg/Microvm/README |  2 +-
 2 files changed, 26 insertions(+), 16 deletions(-)

diff --git a/OvmfPkg/Microvm/MicrovmX64.dsc b/OvmfPkg/Microvm/MicrovmX64.dsc
index c9c843e116a9..82e3f2195aff 100644
--- a/OvmfPkg/Microvm/MicrovmX64.dsc
+++ b/OvmfPkg/Microvm/MicrovmX64.dsc
@@ -336,7 +336,9 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER]
 !endif
   UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
-  PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
+#  PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
+#  PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+#  
PciExpressLib|OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf
   QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/DxeQemuFwCfgS3LibFwCfg.inf
   
VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLibRuntimeDxe.inf
 
@@ -353,7 +355,9 @@ [LibraryClasses.common.UEFI_DRIVER]
   DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
 !endif
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
-  PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
+  PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
+  PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+  
PciExpressLib|OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf
 
 [LibraryClasses.common.DXE_DRIVER]
   PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
@@ -375,7 +379,9 @@ [LibraryClasses.common.DXE_DRIVER]
 !if $(SOURCE_DEBUG_ENABLE) == TRUE
   DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
 !endif
-  PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
+  PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
+  PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+  
PciExpressLib|OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf
   MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
   QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/DxeQemuFwCfgS3LibFwCfg.inf
   QemuLoadImageLib|OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.inf
@@ -391,7 +397,9 @@ [LibraryClasses.common.UEFI_APPLICATION]
 !else
   DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
 !endif
-  PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
+  PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
+  PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+  
PciExpressLib|OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf
 
 [LibraryClasses.common.DXE_SMM_DRIVER]
   PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
@@ -412,7 +420,9 @@ [LibraryClasses.common.DXE_SMM_DRIVER]
   DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.inf
 !endif
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
-  PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
+  PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
+  PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+  
PciExpressLib|OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf
 
 [LibraryClasses.common.SMM_CORE]
   PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
@@ -428,7 +438,9 @@ [LibraryClasses.common.SMM_CORE]
 !else
   DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
 !endif
-  PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
+  PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
+  PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+  
PciExpressLib|OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf
 
 

 #
@@ -503,14 +515,6 @@ [PcdsFixedAtBuild]
   gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F
 !endif
 
-  # This PCD is used to set the base address of the PCI express hierarchy. It
-  # is only consulted when OVMF runs on Q35. In that case it is programmed into
-  # the PCIEXBAR register.
-  #
-  # On Q35 machine types that QEMU intends to support in the long term, QEMU
-  # never lets the RAM below 4 GB exceed 2816 MB.
-  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xB000
-
 !if $(SOURCE_DEBUG_ENABLE) == TRUE
   gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2
 !endif
@@ -576,6 +580,12 @@ [PcdsDynamicDefault]
   gEfiMdePkgTokenSpaceGuid.PcdFSBClock|10
   gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|0
 
+  # set PcdPciExpres

[edk2-devel] [PATCH v5 3/6] OvmfPkg/Platform: unfix PcdPciExpressBaseAddress

2022-04-22 Thread Gerd Hoffmann
Will be set by FdtPciHostBridgeLib, so it can't be an fixed when we
want use that library.

Signed-off-by: Gerd Hoffmann 
---
 OvmfPkg/Library/PlatformInitLib/PlatformInitLib.inf | 4 +++-
 OvmfPkg/PlatformPei/PlatformPei.inf | 2 +-
 OvmfPkg/Library/PlatformInitLib/MemDetect.c | 4 ++--
 OvmfPkg/Library/PlatformInitLib/Platform.c  | 4 ++--
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/OvmfPkg/Library/PlatformInitLib/PlatformInitLib.inf 
b/OvmfPkg/Library/PlatformInitLib/PlatformInitLib.inf
index d0fab5cc1f4f..d2a0bec43452 100644
--- a/OvmfPkg/Library/PlatformInitLib/PlatformInitLib.inf
+++ b/OvmfPkg/Library/PlatformInitLib/PlatformInitLib.inf
@@ -54,8 +54,10 @@ [LibraryClasses]
 [LibraryClasses.X64]
   TdxLib
 
-[FixedPcd]
+[Pcd]
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
+
+[FixedPcd]
   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfWorkAreaBase
   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfWorkAreaSize
   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfLockBoxStorageBase
diff --git a/OvmfPkg/PlatformPei/PlatformPei.inf 
b/OvmfPkg/PlatformPei/PlatformPei.inf
index 00372fa0ebb5..3cd83e6ec3e5 100644
--- a/OvmfPkg/PlatformPei/PlatformPei.inf
+++ b/OvmfPkg/PlatformPei/PlatformPei.inf
@@ -95,6 +95,7 @@ [Pcd]
   gUefiOvmfPkgTokenSpaceGuid.PcdXenPvhStartOfDayStructPtr
   gUefiOvmfPkgTokenSpaceGuid.PcdXenPvhStartOfDayStructPtrSize
   gEfiMdePkgTokenSpaceGuid.PcdGuidedExtractHandlerTableAddress
+  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved
@@ -118,7 +119,6 @@ [Pcd]
 [FixedPcd]
   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfCpuidBase
   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfCpuidSize
-  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
   gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIMemoryNVS
   gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory
   gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiReservedMemoryType
diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c 
b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
index 4c1dedf863c3..83a7b6726bb7 100644
--- a/OvmfPkg/Library/PlatformInitLib/MemDetect.c
+++ b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
@@ -61,8 +61,8 @@ PlatformQemuUc32BaseInitialization (
 // [PcdPciExpressBaseAddress, 4GB) range require a very small number of
 // variable MTRRs (preferably 1 or 2).
 //
-ASSERT (FixedPcdGet64 (PcdPciExpressBaseAddress) <= MAX_UINT32);
-PlatformInfoHob->Uc32Base = (UINT32)FixedPcdGet64 
(PcdPciExpressBaseAddress);
+ASSERT (PcdGet64 (PcdPciExpressBaseAddress) <= MAX_UINT32);
+PlatformInfoHob->Uc32Base = (UINT32)PcdGet64 (PcdPciExpressBaseAddress);
 return;
   }
 
diff --git a/OvmfPkg/Library/PlatformInitLib/Platform.c 
b/OvmfPkg/Library/PlatformInitLib/Platform.c
index 101074f6100d..60a30a01f3b5 100644
--- a/OvmfPkg/Library/PlatformInitLib/Platform.c
+++ b/OvmfPkg/Library/PlatformInitLib/Platform.c
@@ -154,7 +154,7 @@ PlatformMemMapInitialization (
 // The MMCONFIG area is expected to fall between the top of low RAM and
 // the base of the 32-bit PCI host aperture.
 //
-PciExBarBase = FixedPcdGet64 (PcdPciExpressBaseAddress);
+PciExBarBase = PcdGet64 (PcdPciExpressBaseAddress);
 ASSERT (TopOfLowRam <= PciExBarBase);
 ASSERT (PciExBarBase <= MAX_UINT32 - SIZE_256MB);
 PciBase = (UINT32)(PciExBarBase + SIZE_256MB);
@@ -278,7 +278,7 @@ PciExBarInitialization (
   // determined in AddressWidthInitialization(), i.e., 36 bits, will suffice
   // for DXE's page tables to cover the MMCONFIG area.
   //
-  PciExBarBase.Uint64 = FixedPcdGet64 (PcdPciExpressBaseAddress);
+  PciExBarBase.Uint64 = PcdGet64 (PcdPciExpressBaseAddress);
   ASSERT ((PciExBarBase.Uint32[1] & MCH_PCIEXBAR_HIGHMASK) == 0);
   ASSERT ((PciExBarBase.Uint32[0] & MCH_PCIEXBAR_LOWMASK) == 0);
 
-- 
2.35.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89215): https://edk2.groups.io/g/devel/message/89215
Mute This Topic: https://groups.io/mt/90623483/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v5 5/6] OvmfPkg/Microvm/pcie: mPhysMemAddressWidth tweak

2022-04-22 Thread Gerd Hoffmann
microvm places the 64bit mmio space at the end of the physical address
space.  So mPhysMemAddressWidth must be correct, otherwise the pci host
bridge setup throws an error because it thinks the 64bit mmio window is
not addressable.

On microvm we can simply use standard cpuid to figure the address width
because the host-phys-bits option (-cpu ${name},host-phys-bits=on) is
forced to be enabled.  Side note: For 'pc' and 'q35' this is not the
case for backward compatibility reasons.

Signed-off-by: Gerd Hoffmann 
---
 OvmfPkg/Library/PlatformInitLib/MemDetect.c | 41 +
 OvmfPkg/PlatformPei/Platform.c  |  2 +-
 2 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c 
b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
index 83a7b6726bb7..c28d7601f87e 100644
--- a/OvmfPkg/Library/PlatformInitLib/MemDetect.c
+++ b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
@@ -491,6 +491,42 @@ PlatformGetFirstNonAddress (
   return FirstNonAddress;
 }
 
+/*
+ * Use CPUID to figure physical address width.  Does *not* work
+ * reliable on qemu.  For historical reasons qemu returns phys-bits=40
+ * even in case the host machine supports less than that.
+ *
+ * qemu has a cpu property (host-phys-bits={on,off}) to change that
+ * and make sure guest phys-bits are not larger than host phys-bits.,
+ * but it is off by default.  Exception: microvm machine type
+ * hard-wires that property to on.
+ */
+VOID
+EFIAPI
+PlatformAddressWidthFromCpuid (
+  IN OUT EFI_HOB_PLATFORM_INFO  *PlatformInfoHob
+  )
+{
+  UINT32  RegEax;
+
+  AsmCpuid (0x8000, &RegEax, NULL, NULL, NULL);
+  if (RegEax >= 0x8008) {
+AsmCpuid (0x8008, &RegEax, NULL, NULL, NULL);
+PlatformInfoHob->PhysMemAddressWidth = (UINT8)RegEax;
+  } else {
+PlatformInfoHob->PhysMemAddressWidth = 36;
+  }
+
+  PlatformInfoHob->FirstNonAddress = LShiftU64 (1, 
PlatformInfoHob->PhysMemAddressWidth);
+
+  DEBUG ((
+DEBUG_INFO,
+"%a: cpuid: phys-bits is %d\n",
+__FUNCTION__,
+PlatformInfoHob->PhysMemAddressWidth
+));
+}
+
 /**
   Initialize the PhysMemAddressWidth field in PlatformInfoHob based on guest 
RAM size.
 **/
@@ -503,6 +539,11 @@ PlatformAddressWidthInitialization (
   UINT64  FirstNonAddress;
   UINT8   PhysMemAddressWidth;
 
+  if (PlatformInfoHob->HostBridgeDevId == 0x /* microvm */) {
+PlatformAddressWidthFromCpuid (PlatformInfoHob);
+return;
+  }
+
   //
   // As guest-physical memory size grows, the permanent PEI RAM requirements
   // are dominated by the identity-mapping page tables built by the DXE IPL.
diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c
index f006755d5fdb..009db67ee60a 100644
--- a/OvmfPkg/PlatformPei/Platform.c
+++ b/OvmfPkg/PlatformPei/Platform.c
@@ -357,12 +357,12 @@ InitializePlatform (
 
   S3Verification ();
   BootModeInitialization (&mPlatformInfoHob);
-  AddressWidthInitialization (&mPlatformInfoHob);
 
   //
   // Query Host Bridge DID
   //
   mPlatformInfoHob.HostBridgeDevId = PciRead16 (OVMF_HOSTBRIDGE_DID);
+  AddressWidthInitialization (&mPlatformInfoHob);
 
   MaxCpuCountInitialization (&mPlatformInfoHob);
 
-- 
2.35.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89214): https://edk2.groups.io/g/devel/message/89214
Mute This Topic: https://groups.io/mt/90623482/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v5 4/6] OvmfPkg/Microvm/pcie: no vbeshim please

2022-04-22 Thread Gerd Hoffmann
Those old windows versions which need the vbeshim hack
will not run on microvm anyway.

Signed-off-by: Gerd Hoffmann 
---
 OvmfPkg/QemuVideoDxe/VbeShim.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/OvmfPkg/QemuVideoDxe/VbeShim.c b/OvmfPkg/QemuVideoDxe/VbeShim.c
index 8faa146b6cce..2a048211a823 100644
--- a/OvmfPkg/QemuVideoDxe/VbeShim.c
+++ b/OvmfPkg/QemuVideoDxe/VbeShim.c
@@ -156,6 +156,8 @@ InstallVbeShim (
 case INTEL_Q35_MCH_DEVICE_ID:
   Pam1Address = DRAMC_REGISTER_Q35 (MCH_PAM1);
   break;
+case MICROVM_PSEUDO_DEVICE_ID:
+  return;
 default:
   DEBUG ((
 DEBUG_ERROR,
-- 
2.35.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89212): https://edk2.groups.io/g/devel/message/89212
Mute This Topic: https://groups.io/mt/90623480/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v5 0/6] OvmfPkg/Microvm/pcie: add pcie support

2022-04-22 Thread Gerd Hoffmann
Needs two little tweaks in PCI code because microvm supports mmio only.
Other than that just wire up the existing code (the PCIe host adapter
used by microvm is the same (virtual) hardware used by the arm/aarch64
virtual machines).

v5:
 - codestyle (uncrustify) fix.

v4:
 - update PciHostBridge check (Abner Chang).

v3:
 - rebase to latest master, adapt to PlatformInitLib.
 - rework PhysMemAddressWidth handling for microvm.

v2:
 - rebase to latest master
 - pick up review tags

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3777

Gerd Hoffmann (6):
  MdeModulePkg/PciHostBridge: io range is not mandatory
  OvmfPkg/FdtPciHostBridgeLib: io range is not mandatory
  OvmfPkg/Platform: unfix PcdPciExpressBaseAddress
  OvmfPkg/Microvm/pcie: no vbeshim please
  OvmfPkg/Microvm/pcie: mPhysMemAddressWidth tweak
  OvmfPkg/Microvm/pcie: add pcie support

 OvmfPkg/Microvm/MicrovmX64.dsc| 40 ++---
 .../PlatformInitLib/PlatformInitLib.inf   |  4 +-
 OvmfPkg/PlatformPei/PlatformPei.inf   |  2 +-
 .../Bus/Pci/PciHostBridgeDxe/PciHostBridge.c  |  3 ++
 .../FdtPciHostBridgeLib/FdtPciHostBridgeLib.c | 45 ++-
 OvmfPkg/Library/PlatformInitLib/MemDetect.c   | 45 ++-
 OvmfPkg/Library/PlatformInitLib/Platform.c|  4 +-
 OvmfPkg/PlatformPei/Platform.c|  2 +-
 OvmfPkg/QemuVideoDxe/VbeShim.c|  2 +
 OvmfPkg/Microvm/README|  2 +-
 10 files changed, 104 insertions(+), 45 deletions(-)

-- 
2.35.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89213): https://edk2.groups.io/g/devel/message/89213
Mute This Topic: https://groups.io/mt/90623481/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v5 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory

2022-04-22 Thread Gerd Hoffmann
io range is not mandatory according to pcie spec,
so allow bridge configurations without io address
space assigned.

Signed-off-by: Gerd Hoffmann 
Reviewed-by: Ard Biesheuvel 
---
 MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c 
b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c
index b20bcd310ad5..712662707931 100644
--- a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c
+++ b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c
@@ -1085,6 +1085,9 @@ NotifyPhase (
   RootBridge->ResAllocNode[Index].Base   = BaseAddress;
   RootBridge->ResAllocNode[Index].Status = ResAllocated;
   DEBUG ((DEBUG_INFO, "Success\n"));
+} else if ((Index == TypeIo) && (RootBridge->Io.Base == 
MAX_UINT64)) {
+  /* optional on PCIe */
+  DEBUG ((DEBUG_INFO, "PCI Root Bridge does not provide IO 
Resources.\n"));
 } else {
   ReturnStatus = EFI_OUT_OF_RESOURCES;
   DEBUG ((DEBUG_ERROR, "Out Of Resource!\n"));
-- 
2.35.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89211): https://edk2.groups.io/g/devel/message/89211
Mute This Topic: https://groups.io/mt/90623478/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-