[edk2-devel] [PATCH 43/43] OvmfPkg: restrict XenPlatformLib to BdsDxe in the IA32, IA32X64, X64 DSCs

Philippe Mathieu-Daudé philmd at redhat.com
Mon May 31 14:58:17 UTC 2021


On 5/26/21 10:14 PM, Laszlo Ersek wrote:
> The "OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf"
> library instance is used in the following platform DSC files in edk2:
> 
>   OvmfPkg/OvmfPkgIa32.dsc
>   OvmfPkg/OvmfPkgIa32X64.dsc
>   OvmfPkg/OvmfPkgX64.dsc
>   OvmfPkg/OvmfXen.dsc
> 
> The Xen customizations are very light-weight in this
> PlatformBootManagerLib instance. Isolating them statically, for the sake
> of the first three DSC files, would save negligible binary code size, and
> would likely worsen code complexity (by way of introducing new internal
> interfaces) or blow up source code size (by duplicating almost the entire
> lib instance source code). So for now, keep this one bit of Xen dynamism
> even on QEMU.
> 
> However, because it's only PlatformBootManagerLib now that uses
> XenPlatformLib (for the above-stated enlightenment), restrict the
> XenPlatformLib class resolution in the first three DSC files to the only
> DXE driver that consumes PlatformBootManagerLib (and therefore
> XenPlatformLib): BdsDxe. This will cause a build failure later if someone
> attempts to call a XenPlatformLib API (that is, tries to re-introduce Xen
> enlightenment) in a different module in these non-Xen DSC files.
> 
> Cc: Ard Biesheuvel <ardb+tianocore at kernel.org>
> Cc: Jordan Justen <jordan.l.justen at intel.com>
> Cc: Philippe Mathieu-Daudé <philmd at redhat.com>
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2122
> Signed-off-by: Laszlo Ersek <lersek at redhat.com>
> ---
>  OvmfPkg/OvmfPkgIa32.dsc    | 2 +-
>  OvmfPkg/OvmfPkgIa32X64.dsc | 2 +-
>  OvmfPkg/OvmfPkgX64.dsc     | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)

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



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#75874): https://edk2.groups.io/g/devel/message/75874
Mute This Topic: https://groups.io/mt/83111260/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list