ArmVirtPkg/ArmVirtQemu: implement ArmPlatformLib with static ID map
To substantially reduce the amount of processing that takes place with the MMU and caches off, implement a version of ArmPlatformLib specific for QEMU/mach-virt in AArch64 mode that carries a statically allocated and populated ID map that covers the NOR flash and device region, and 128 MiB of DRAM at the base of memory (0x4000_0000). Note that 128 MiB has always been the minimum amount of DRAM we support for this configuration, and the existing code already ASSERT()s in DEBUG mode when booting with less. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
committed by
mergify[bot]
parent
9ca2dc7bec
commit
2eff4ddc77
40
ArmVirtPkg/Library/ArmPlatformLibQemu/ArmPlatformLibQemu.inf
Normal file
40
ArmVirtPkg/Library/ArmPlatformLibQemu/ArmPlatformLibQemu.inf
Normal file
@@ -0,0 +1,40 @@
|
||||
## @file
|
||||
# ArmPlatformLib implementation for QEMU/mach-virt on AArch64 that contains a
|
||||
# statically allocated 1:1 mapping of the first 128 MiB of DRAM, as well as
|
||||
# the NOR flash and the device region
|
||||
#
|
||||
# Copyright (c) 2011-2012, ARM Limited. All rights reserved.
|
||||
# Copyright (c) 2022, Google LLC. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
#
|
||||
##
|
||||
|
||||
[Defines]
|
||||
INF_VERSION = 1.27
|
||||
BASE_NAME = ArmPlatformLibQemu
|
||||
FILE_GUID = 40af3a25-f02c-4aef-94ef-7ac0282d21d4
|
||||
MODULE_TYPE = BASE
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = ArmPlatformLib
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
MdeModulePkg/MdeModulePkg.dec
|
||||
ArmPkg/ArmPkg.dec
|
||||
ArmPlatformPkg/ArmPlatformPkg.dec
|
||||
|
||||
[LibraryClasses]
|
||||
ArmLib
|
||||
DebugLib
|
||||
|
||||
[Sources.common]
|
||||
ArmPlatformLibQemu.c
|
||||
IdMap.S
|
||||
|
||||
[Sources.AArch64]
|
||||
AArch64/ArmPlatformHelper.S
|
||||
|
||||
[FixedPcd]
|
||||
gArmTokenSpaceGuid.PcdArmPrimaryCoreMask
|
||||
gArmTokenSpaceGuid.PcdArmPrimaryCore
|
Reference in New Issue
Block a user