audk/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDx...

61 lines
1.8 KiB
INI
Raw Normal View History

## @file
# This module install ACPI Boot Graphics Resource Table (BGRT).
#
MdeModulePkg/BootGraphicsResourceTableDxe: Use BmpSupportLib https://bugzilla.tianocore.org/show_bug.cgi?id=800 Based on content from the following branch/commits: https://github.com/Microsoft/MS_UEFI/tree/share/MsCapsuleSupport https://github.com/Microsoft/MS_UEFI/commit/33bab4031a417d7d5a7d356c15a14c2e60302b2d https://github.com/Microsoft/MS_UEFI/commit/ca516b1a61315c2d823f453e12d2135098f53d61 https://github.com/Microsoft/MS_UEFI/commit/2b9f111f2e74a4c2ef4c4e32379e111f016dbd9b Use BmpSupportLib to convert a GOP BLT Buffer to the BMP graphics image that is published in an ACPI BGRT table. * Remove use of IndustryStandard/Bmp.h include file * Remove mBmpImageHeaderTemplate. This is handled by BmpSupportLib * Clean up code style with function prototypes at top and all module global variables together * Update SetBootLogo() to use SafeIntLib to check input parameters for overflows. * Remove internal function BgrtAcpiTableChecksum(). Use CalculateCheckSum8() directly from BgrtReadyToBootEventNotify() * Remove InstallBootGraphicsResourceTable(). Move all the code into BgrtReadyToBootEventNotify() that is signaled at ready to boot. * Remove all logic that converts a GOP BLT buffer to a BMP graphics image and use BmpSupportLib function TranslateGopBltToBmp() instead. * Use AllocatePool() instead of AllocatePages() to allocate copy of BMP image that is provided by BGRT. This is required to be compatible with BmpSupportLib function TranslateGopBltToBmp() that uses AllocatePool(). * Zero OemId in BGRT header before filling in value from PCD. * Get size of PcdAcpiDefaultOemId and only copy the the size of the PCD if it is smaller than the size of the OemId field in the BGRT header. * Use WriteUnaligned24() instead of CopyMem() for the OemTableId field of the BGRT header. Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Bret Barkelew <Bret.Barkelew@microsoft.com>
2017-12-29 20:26:42 +01:00
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2016, Microsoft Corporation<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = BootGraphicsResourceTableDxe
MODULE_UNI_FILE = BootGraphicsResourceTableDxe.uni
FILE_GUID = B8E62775-BB0A-43f0-A843-5BE8B14F8CCD
MODULE_TYPE = UEFI_DRIVER
VERSION_STRING = 1.0
ENTRY_POINT = BootGraphicsDxeEntryPoint
#
# The following information is for reference only and not required by the build tools.
#
# VALID_ARCHITECTURES = IA32 X64 EBC
#
[Sources]
BootGraphicsResourceTableDxe.c
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
[LibraryClasses]
UefiDriverEntryPoint
BaseLib
BaseMemoryLib
MemoryAllocationLib
UefiLib
UefiBootServicesTableLib
DebugLib
PcdLib
MdeModulePkg/BootGraphicsResourceTableDxe: Use BmpSupportLib https://bugzilla.tianocore.org/show_bug.cgi?id=800 Based on content from the following branch/commits: https://github.com/Microsoft/MS_UEFI/tree/share/MsCapsuleSupport https://github.com/Microsoft/MS_UEFI/commit/33bab4031a417d7d5a7d356c15a14c2e60302b2d https://github.com/Microsoft/MS_UEFI/commit/ca516b1a61315c2d823f453e12d2135098f53d61 https://github.com/Microsoft/MS_UEFI/commit/2b9f111f2e74a4c2ef4c4e32379e111f016dbd9b Use BmpSupportLib to convert a GOP BLT Buffer to the BMP graphics image that is published in an ACPI BGRT table. * Remove use of IndustryStandard/Bmp.h include file * Remove mBmpImageHeaderTemplate. This is handled by BmpSupportLib * Clean up code style with function prototypes at top and all module global variables together * Update SetBootLogo() to use SafeIntLib to check input parameters for overflows. * Remove internal function BgrtAcpiTableChecksum(). Use CalculateCheckSum8() directly from BgrtReadyToBootEventNotify() * Remove InstallBootGraphicsResourceTable(). Move all the code into BgrtReadyToBootEventNotify() that is signaled at ready to boot. * Remove all logic that converts a GOP BLT buffer to a BMP graphics image and use BmpSupportLib function TranslateGopBltToBmp() instead. * Use AllocatePool() instead of AllocatePages() to allocate copy of BMP image that is provided by BGRT. This is required to be compatible with BmpSupportLib function TranslateGopBltToBmp() that uses AllocatePool(). * Zero OemId in BGRT header before filling in value from PCD. * Get size of PcdAcpiDefaultOemId and only copy the the size of the PCD if it is smaller than the size of the OemId field in the BGRT header. * Use WriteUnaligned24() instead of CopyMem() for the OemTableId field of the BGRT header. Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Bret Barkelew <Bret.Barkelew@microsoft.com>
2017-12-29 20:26:42 +01:00
SafeIntLib
BmpSupportLib
[Protocols]
gEfiAcpiTableProtocolGuid ## CONSUMES
gEfiBootLogoProtocolGuid ## PRODUCES
gEdkiiBootLogo2ProtocolGuid ## PRODUCES
[Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemId ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemTableId ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemRevision ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorId ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorRevision ## CONSUMES
[Guids]
gEfiEventReadyToBootGuid ## CONSUMES ## Event
[UserExtensions.TianoCore."ExtraFiles"]
BootGraphicsResourceTableDxeExtra.uni