ArmVirtPkg/ArmVirtQemu: add ArmVirtMemInfoLib implementation
Create a new ArmVirtMemInfoLib for ArmVirtQemuKernel by cloning the existing ArmPlatformGetVirtualMemoryMap () for this platform, (ArmQemuRelocatablePlatformLib *not* ArmVirtPlatformLib), and cleaning it up: - remove support for uncached DRAM mappings - replace EFI_D_xxx with DEBUG_xxx throughout - use a temp variable to hold the top of the physical address space - use AllocatePool () instead of AllocatePages (), given that we use 160 bytes only, and the memory is never freed. In a future patch, we will add this library to the ordinary ArmVirtQemu platform as well. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
54
ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.inf
Normal file
54
ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.inf
Normal file
@@ -0,0 +1,54 @@
|
||||
#/* @file
|
||||
#
|
||||
# Copyright (c) 2011-2015, ARM Limited. All rights reserved.
|
||||
# Copyright (c) 2014-2017, Linaro Limited. All rights reserved.
|
||||
#
|
||||
# This program and the accompanying materials 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
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
#*/
|
||||
|
||||
[Defines]
|
||||
INF_VERSION = 0x0001001A
|
||||
BASE_NAME = QemuVirtMemInfoLib
|
||||
FILE_GUID = 9b30ca82-6746-4a82-a3e6-11ea79df3b46
|
||||
MODULE_TYPE = BASE
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = ArmVirtMemInfoLib
|
||||
|
||||
[Sources]
|
||||
QemuVirtMemInfoLib.c
|
||||
|
||||
[Sources.ARM]
|
||||
Arm/PhysAddrTop.S
|
||||
|
||||
[Sources.AARCH64]
|
||||
AArch64/PhysAddrTop.S
|
||||
|
||||
[Packages]
|
||||
ArmPkg/ArmPkg.dec
|
||||
ArmVirtPkg/ArmVirtPkg.dec
|
||||
EmbeddedPkg/EmbeddedPkg.dec
|
||||
MdeModulePkg/MdeModulePkg.dec
|
||||
MdePkg/MdePkg.dec
|
||||
|
||||
[LibraryClasses]
|
||||
ArmLib
|
||||
BaseMemoryLib
|
||||
DebugLib
|
||||
MemoryAllocationLib
|
||||
PcdLib
|
||||
|
||||
[Pcd]
|
||||
gArmTokenSpaceGuid.PcdFdBaseAddress
|
||||
gArmTokenSpaceGuid.PcdSystemMemoryBase
|
||||
gArmTokenSpaceGuid.PcdSystemMemorySize
|
||||
|
||||
[FixedPcd]
|
||||
gArmTokenSpaceGuid.PcdFdSize
|
||||
gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize
|
Reference in New Issue
Block a user