mirror of https://github.com/acidanthera/audk.git
Update BGRT image buffer to be stored in EfiBootSerivesData according to ACPI5.0 spec
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Yao Jiewen <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14659 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
7b8883c6a9
commit
4c58575ecc
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
This module install ACPI Boot Graphics Resource Table (BGRT).
|
This module install ACPI Boot Graphics Resource Table (BGRT).
|
||||||
|
|
||||||
Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -235,9 +235,9 @@ BgrtAcpiTableChecksum (
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Allocate EfiReservedMemoryType below 4G memory address.
|
Allocate EfiBootServicesData below 4G memory address.
|
||||||
|
|
||||||
This function allocates EfiReservedMemoryType below 4G memory address.
|
This function allocates EfiBootServicesData below 4G memory address.
|
||||||
|
|
||||||
@param[in] Size Size of memory to allocate.
|
@param[in] Size Size of memory to allocate.
|
||||||
|
|
||||||
|
@ -245,7 +245,7 @@ BgrtAcpiTableChecksum (
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID *
|
VOID *
|
||||||
BgrtAllocateReservedMemoryBelow4G (
|
BgrtAllocateBsDataMemoryBelow4G (
|
||||||
IN UINTN Size
|
IN UINTN Size
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -259,7 +259,7 @@ BgrtAllocateReservedMemoryBelow4G (
|
||||||
|
|
||||||
Status = gBS->AllocatePages (
|
Status = gBS->AllocatePages (
|
||||||
AllocateMaxAddress,
|
AllocateMaxAddress,
|
||||||
EfiReservedMemoryType,
|
EfiBootServicesData,
|
||||||
Pages,
|
Pages,
|
||||||
&Address
|
&Address
|
||||||
);
|
);
|
||||||
|
@ -361,9 +361,12 @@ InstallBootGraphicsResourceTable (
|
||||||
if (mLogoHeight > (((UINT32) ~0) - sizeof (BMP_IMAGE_HEADER)) / (mLogoWidth * 3 + PaddingSize)) {
|
if (mLogoHeight > (((UINT32) ~0) - sizeof (BMP_IMAGE_HEADER)) / (mLogoWidth * 3 + PaddingSize)) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// The image should be stored in EfiBootServicesData, allowing the system to reclaim the memory
|
||||||
|
//
|
||||||
BmpSize = (mLogoWidth * 3 + PaddingSize) * mLogoHeight + sizeof (BMP_IMAGE_HEADER);
|
BmpSize = (mLogoWidth * 3 + PaddingSize) * mLogoHeight + sizeof (BMP_IMAGE_HEADER);
|
||||||
ImageBuffer = BgrtAllocateReservedMemoryBelow4G (BmpSize);
|
ImageBuffer = BgrtAllocateBsDataMemoryBelow4G (BmpSize);
|
||||||
if (ImageBuffer == NULL) {
|
if (ImageBuffer == NULL) {
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue