public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 1/1] OvmfPkg: rename QemuBootOrderNNNN to VMMBootOrderNNNN
@ 2022-10-04 11:21 Gerd Hoffmann
  2022-10-07 21:49 ` Ard Biesheuvel
  0 siblings, 1 reply; 2+ messages in thread
From: Gerd Hoffmann @ 2022-10-04 11:21 UTC (permalink / raw)
  To: devel
  Cc: Ard Biesheuvel, Oliver Steffen, Gerd Hoffmann, Jordan Justen,
	Jiewen Yao, Pawel Polawski

While the actual implementation (using qemu fw_cfg) is qemu-specific,
the idea to store the boot order as configured by the VMM in EFI
variables is not.  So lets give the variables a more neutral name while
we still can (i.e. no stable tag yet with the new feature).

While being at it also fix the NNNN format (use %x instead of %d for
consistency with BootNNNN).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 OvmfPkg/OvmfPkg.dec                                   | 2 +-
 OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf | 2 +-
 OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c   | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec
index 6d689ecc5d55..f13dd4a61f01 100644
--- a/OvmfPkg/OvmfPkg.dec
+++ b/OvmfPkg/OvmfPkg.dec
@@ -146,7 +146,7 @@ [Guids]
   gConfidentialComputingSecretGuid      = {0xadf956ad, 0xe98c, 0x484c, {0xae, 0x11, 0xb5, 0x1c, 0x7d, 0x33, 0x64, 0x47}}
   gConfidentialComputingSevSnpBlobGuid  = {0x067b1f5f, 0xcf26, 0x44c5, {0x85, 0x54, 0x93, 0xd7, 0x77, 0x91, 0x2d, 0x42}}
   gUefiOvmfPkgPlatformInfoGuid          = {0xdec9b486, 0x1f16, 0x47c7, {0x8f, 0x68, 0xdf, 0x1a, 0x41, 0x88, 0x8b, 0xa5}}
-  gQemuBootOrderGuid                    = {0x668f4529, 0x63d0, 0x4bb5, {0xb6, 0x5d, 0x6f, 0xbb, 0x9d, 0x36, 0xa4, 0x4a}}
+  gVMMBootOrderGuid                     = {0x668f4529, 0x63d0, 0x4bb5, {0xb6, 0x5d, 0x6f, 0xbb, 0x9d, 0x36, 0xa4, 0x4a}}
 
 [Ppis]
   # PPI whose presence in the PPI database signals that the TPM base address
diff --git a/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf b/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
index 211344fb0b89..6e320e3e8514 100644
--- a/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
+++ b/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
@@ -49,7 +49,7 @@ [LibraryClasses]
 [Guids]
   gEfiGlobalVariableGuid
   gVirtioMmioTransportGuid
-  gQemuBootOrderGuid
+  gVMMBootOrderGuid
 
 [FeaturePcd]
   gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderPciTranslation
diff --git a/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c b/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c
index 18646daa67e3..cea4b7a099e3 100644
--- a/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c
+++ b/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c
@@ -1709,7 +1709,7 @@ ConnectDevicesFromQemu (
   Attempt to retrieve the "bootorder" fw_cfg file from QEMU. Translate
   the OpenFirmware device paths therein to UEFI device path fragments.
 
-  On Success store the device path in QemuBootOrderNNNN variables.
+  On Success store the device path in VMMBootOrderNNNN variables.
 **/
 VOID
 EFIAPI
@@ -1794,13 +1794,13 @@ StoreQemuBootOrder (
       UnicodeSPrint (
         VariableName,
         sizeof (VariableName),
-        L"QemuBootOrder%04d",
+        L"VMMBootOrder%04x",
         VariableIndex++
         );
       DEBUG ((DEBUG_INFO, "%a: %s = %s\n", __FUNCTION__, VariableName, Translated));
       gRT->SetVariable (
              VariableName,
-             &gQemuBootOrderGuid,
+             &gVMMBootOrderGuid,
              EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
              GetDevicePathSize (DevicePath),
              DevicePath
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] OvmfPkg: rename QemuBootOrderNNNN to VMMBootOrderNNNN
  2022-10-04 11:21 [PATCH 1/1] OvmfPkg: rename QemuBootOrderNNNN to VMMBootOrderNNNN Gerd Hoffmann
@ 2022-10-07 21:49 ` Ard Biesheuvel
  0 siblings, 0 replies; 2+ messages in thread
From: Ard Biesheuvel @ 2022-10-07 21:49 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: devel, Ard Biesheuvel, Oliver Steffen, Jordan Justen, Jiewen Yao,
	Pawel Polawski

Merged #3449 into master.

On Tue, 4 Oct 2022 at 13:22, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> While the actual implementation (using qemu fw_cfg) is qemu-specific,
> the idea to store the boot order as configured by the VMM in EFI
> variables is not.  So lets give the variables a more neutral name while
> we still can (i.e. no stable tag yet with the new feature).
>
> While being at it also fix the NNNN format (use %x instead of %d for
> consistency with BootNNNN).
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  OvmfPkg/OvmfPkg.dec                                   | 2 +-
>  OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf | 2 +-
>  OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c   | 6 +++---
>  3 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec
> index 6d689ecc5d55..f13dd4a61f01 100644
> --- a/OvmfPkg/OvmfPkg.dec
> +++ b/OvmfPkg/OvmfPkg.dec
> @@ -146,7 +146,7 @@ [Guids]
>    gConfidentialComputingSecretGuid      = {0xadf956ad, 0xe98c, 0x484c, {0xae, 0x11, 0xb5, 0x1c, 0x7d, 0x33, 0x64, 0x47}}
>    gConfidentialComputingSevSnpBlobGuid  = {0x067b1f5f, 0xcf26, 0x44c5, {0x85, 0x54, 0x93, 0xd7, 0x77, 0x91, 0x2d, 0x42}}
>    gUefiOvmfPkgPlatformInfoGuid          = {0xdec9b486, 0x1f16, 0x47c7, {0x8f, 0x68, 0xdf, 0x1a, 0x41, 0x88, 0x8b, 0xa5}}
> -  gQemuBootOrderGuid                    = {0x668f4529, 0x63d0, 0x4bb5, {0xb6, 0x5d, 0x6f, 0xbb, 0x9d, 0x36, 0xa4, 0x4a}}
> +  gVMMBootOrderGuid                     = {0x668f4529, 0x63d0, 0x4bb5, {0xb6, 0x5d, 0x6f, 0xbb, 0x9d, 0x36, 0xa4, 0x4a}}
>
>  [Ppis]
>    # PPI whose presence in the PPI database signals that the TPM base address
> diff --git a/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf b/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
> index 211344fb0b89..6e320e3e8514 100644
> --- a/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
> +++ b/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
> @@ -49,7 +49,7 @@ [LibraryClasses]
>  [Guids]
>    gEfiGlobalVariableGuid
>    gVirtioMmioTransportGuid
> -  gQemuBootOrderGuid
> +  gVMMBootOrderGuid
>
>  [FeaturePcd]
>    gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderPciTranslation
> diff --git a/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c b/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c
> index 18646daa67e3..cea4b7a099e3 100644
> --- a/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c
> +++ b/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c
> @@ -1709,7 +1709,7 @@ ConnectDevicesFromQemu (
>    Attempt to retrieve the "bootorder" fw_cfg file from QEMU. Translate
>    the OpenFirmware device paths therein to UEFI device path fragments.
>
> -  On Success store the device path in QemuBootOrderNNNN variables.
> +  On Success store the device path in VMMBootOrderNNNN variables.
>  **/
>  VOID
>  EFIAPI
> @@ -1794,13 +1794,13 @@ StoreQemuBootOrder (
>        UnicodeSPrint (
>          VariableName,
>          sizeof (VariableName),
> -        L"QemuBootOrder%04d",
> +        L"VMMBootOrder%04x",
>          VariableIndex++
>          );
>        DEBUG ((DEBUG_INFO, "%a: %s = %s\n", __FUNCTION__, VariableName, Translated));
>        gRT->SetVariable (
>               VariableName,
> -             &gQemuBootOrderGuid,
> +             &gVMMBootOrderGuid,
>               EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
>               GetDevicePathSize (DevicePath),
>               DevicePath
> --
> 2.37.3
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-07 21:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-04 11:21 [PATCH 1/1] OvmfPkg: rename QemuBootOrderNNNN to VMMBootOrderNNNN Gerd Hoffmann
2022-10-07 21:49 ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox