On Wed, Sep 08, 2021 at 11:01:11 +0200, Gerd Hoffmann wrote:
> Skip host bridge setup on microvm.
> 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3599
> Signed-off-by: Gerd Hoffmann <kra...@redhat.com>
> Acked-by: Jiewen Yao <jiewen....@intel.com>
> ---
>  OvmfPkg/PlatformPei/MemDetect.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/OvmfPkg/PlatformPei/MemDetect.c b/OvmfPkg/PlatformPei/MemDetect.c
> index 2c2c4641ec8a..d736b85e0d90 100644
> --- a/OvmfPkg/PlatformPei/MemDetect.c
> +++ b/OvmfPkg/PlatformPei/MemDetect.c
> @@ -135,6 +135,10 @@ QemuUc32BaseInitialization (
>    UINT32 LowerMemorySize;
>    UINT32 Uc32Size;
>  
> +  if (mHostBridgeDevId == 0xffff /* microvm */) {
> +    return;
> +  }
> +

This, and the same conditional in the subsequent patch, weirds me out
a bit. This doesn't tell us we're on microvm, it tells us the device
ID is invalid.
Since we know at compile-time that we want to skip this function,
could we achieve that some other way?

/
    Leif

>    if (mHostBridgeDevId == INTEL_Q35_MCH_DEVICE_ID) {
>      //
>      // On q35, the 32-bit area that we'll mark as UC, through variable MTRRs,
> -- 
> 2.31.1
> 


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


Reply via email to