[edk2-devel] [PATCH 24/43] OvmfPkg/Bhyve: make "PcdPciDisableBusEnumeration" Fixed-at-Build

Laszlo Ersek posted 43 patches 4 years, 8 months ago
[edk2-devel] [PATCH 24/43] OvmfPkg/Bhyve: make "PcdPciDisableBusEnumeration" Fixed-at-Build
Posted by Laszlo Ersek 4 years, 8 months ago
The Bhyve platform specifies the dynamic access method for
"PcdPciDisableBusEnumeration" needlessly.

After the DSC file sets the PCD to TRUE by default, the PCD is never
written again. In particular, the
"OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf" file references the PCD
superfluously.

Make the PCD Fixed-At-Build, and remove the PCD reference from the INF
file.

(Note that further simplifications are possible in
"OvmfPkg/Bhyve/AcpiPlatformDxe", but those are out of scope for this patch
series.)

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Peter Grehan <grehan@freebsd.org>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Cc: Rebecca Cran <rebecca@bsdio.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2122
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 OvmfPkg/Bhyve/BhyveX64.dsc                | 2 +-
 OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/OvmfPkg/Bhyve/BhyveX64.dsc b/OvmfPkg/Bhyve/BhyveX64.dsc
index 7d9e88040000..896b62881bdb 100644
--- a/OvmfPkg/Bhyve/BhyveX64.dsc
+++ b/OvmfPkg/Bhyve/BhyveX64.dsc
@@ -428,12 +428,13 @@ [PcdsFeatureFlag]
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE
 
 [PcdsFixedAtBuild]
+  gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE
   gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE
   gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1
   gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
   gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler|0x10
   gEfiMdePkgTokenSpaceGuid.PcdMaximumLinkedListLength|0
@@ -526,13 +527,12 @@ [PcdsDynamicDefault]
   #   ($(SMM_REQUIRE) == FALSE)
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
 
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0
-  gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|800
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|600
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable|FALSE
   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId|0
   gUefiOvmfPkgTokenSpaceGuid.PcdPciIoBase|0x0
   gUefiOvmfPkgTokenSpaceGuid.PcdPciIoSize|0x0
diff --git a/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf b/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf
index 12203e9f804d..739d63098b1e 100644
--- a/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf
+++ b/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf
@@ -83,13 +83,12 @@ [Pcd]
   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDecompressionScratchEnd
   gUefiOvmfPkgTokenSpaceGuid.PcdQ35TsegMbytes
   gEfiMdePkgTokenSpaceGuid.PcdGuidedExtractHandlerTableAddress
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved
-  gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode
   gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable
   gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable
   gEfiMdeModulePkgTokenSpaceGuid.PcdPteMemoryEncryptionAddressOrMask
   gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy
-- 
2.19.1.3.g30247aa5d201




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#75693): https://edk2.groups.io/g/devel/message/75693
Mute This Topic: https://groups.io/mt/83110800/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH 24/43] OvmfPkg/Bhyve: make "PcdPciDisableBusEnumeration" Fixed-at-Build
Posted by Rebecca Cran 4 years, 8 months ago
On 5/26/21 2:14 PM, Laszlo Ersek wrote:
> The Bhyve platform specifies the dynamic access method for
> "PcdPciDisableBusEnumeration" needlessly.
>
> After the DSC file sets the PCD to TRUE by default, the PCD is never
> written again. In particular, the
> "OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf" file references the PCD
> superfluously.
>
> Make the PCD Fixed-At-Build, and remove the PCD reference from the INF
> file.
>
> (Note that further simplifications are possible in
> "OvmfPkg/Bhyve/AcpiPlatformDxe", but those are out of scope for this patch
> series.)
>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Peter Grehan <grehan@freebsd.org>
> Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
> Cc: Rebecca Cran <rebecca@bsdio.com>
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2122
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
>   OvmfPkg/Bhyve/BhyveX64.dsc                | 2 +-
>   OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf | 1 -
>   2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/OvmfPkg/Bhyve/BhyveX64.dsc b/OvmfPkg/Bhyve/BhyveX64.dsc
> index 7d9e88040000..896b62881bdb 100644
> --- a/OvmfPkg/Bhyve/BhyveX64.dsc
> +++ b/OvmfPkg/Bhyve/BhyveX64.dsc
> @@ -428,12 +428,13 @@ [PcdsFeatureFlag]
>     gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
>     gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
>     gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
>     gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE
>   
>   [PcdsFixedAtBuild]
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE
>     gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
>     gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE
>     gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1
>     gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
>     gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler|0x10
>     gEfiMdePkgTokenSpaceGuid.PcdMaximumLinkedListLength|0
> @@ -526,13 +527,12 @@ [PcdsDynamicDefault]
>     #   ($(SMM_REQUIRE) == FALSE)
>     gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
>   
>     gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
>     gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0
>     gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE
>     gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|800
>     gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|600
>     gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable|FALSE
>     gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId|0
>     gUefiOvmfPkgTokenSpaceGuid.PcdPciIoBase|0x0
>     gUefiOvmfPkgTokenSpaceGuid.PcdPciIoSize|0x0
> diff --git a/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf b/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf
> index 12203e9f804d..739d63098b1e 100644
> --- a/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf
> +++ b/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf
> @@ -83,13 +83,12 @@ [Pcd]
>     gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDecompressionScratchEnd
>     gUefiOvmfPkgTokenSpaceGuid.PcdQ35TsegMbytes
>     gEfiMdePkgTokenSpaceGuid.PcdGuidedExtractHandlerTableAddress
>     gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
>     gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
>     gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration
>     gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode
>     gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable
>     gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack
>     gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable
>     gEfiMdeModulePkgTokenSpaceGuid.PcdPteMemoryEncryptionAddressOrMask
>     gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy


Reviewed-by: Rebecca Cran <rebecca@bsdio.com>




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#75696): https://edk2.groups.io/g/devel/message/75696
Mute This Topic: https://groups.io/mt/83110800/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH 24/43] OvmfPkg/Bhyve: make "PcdPciDisableBusEnumeration" Fixed-at-Build
Posted by Philippe Mathieu-Daudé 4 years, 8 months ago
On 5/26/21 10:14 PM, Laszlo Ersek wrote:
> The Bhyve platform specifies the dynamic access method for
> "PcdPciDisableBusEnumeration" needlessly.
> 
> After the DSC file sets the PCD to TRUE by default, the PCD is never
> written again. In particular, the
> "OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf" file references the PCD
> superfluously.
> 
> Make the PCD Fixed-At-Build, and remove the PCD reference from the INF
> file.
> 
> (Note that further simplifications are possible in
> "OvmfPkg/Bhyve/AcpiPlatformDxe", but those are out of scope for this patch
> series.)
> 
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Peter Grehan <grehan@freebsd.org>
> Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
> Cc: Rebecca Cran <rebecca@bsdio.com>
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2122
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
>  OvmfPkg/Bhyve/BhyveX64.dsc                | 2 +-
>  OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf | 1 -
>  2 files changed, 1 insertion(+), 2 deletions(-)

Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#75784): https://edk2.groups.io/g/devel/message/75784
Mute This Topic: https://groups.io/mt/83110800/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-