mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-31 01:24:12 +02:00
Port OvmfPkg commit 5c3481b0b611e to ArmVirtPkg. Some explanation should be in order (because 5c3481b0b611e doesn't offer any): - The UefiDevicePathLibDevicePathProtocol instance uses the Device Path Utilities Protocol, produced by DevicePathDxe, for formatting and parsing the textual device path representation. This allows for a lighter weight lib instance that gets linked into several DXE modules. In comparison, the more standalone UefiDevicePathLib instance includes the formatting and parsing routines in every client module. - The DXE core needs DevicePathLib before it dispatches DevicePathDxe, so it needs to stick with the standalone instance. - DevicePathDxe itself also needs the standalone instance, for implementing the protocol. - The DXE-phase PCD driver, "MdeModulePkg/Universal/PCD/Dxe/Pcd.inf", depends on DevicePathLib via UefiLib and DxeServicesLib at the least; so with this update, it inherits a dependency on the protocol. In reverse, DevicePathDxe depends on the PCD Protocol, via PcdLib. The cycle is broken by using BasePcdLibNull in DevicePathDxe. That restricts it to FixedAtBuild, Patch, and FeatureFlag PCDs, but that's fine. Example space savings (using ArmVirtQemu and the GCC5 toolchain): - NOOPT: 187KB in FVMAIN, 12KB in FVMAIN_COMPACT - DEBUG: 147KB in FVMAIN, 20KB in FVMAIN_COMPACT - RELEASE: 123KB in FVMAIN, 17KB in FVMAIN_COMPACT Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=940 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
235 lines
9.2 KiB
Plaintext
235 lines
9.2 KiB
Plaintext
#
|
|
# Copyright (c) 2011-2015, ARM Limited. All rights reserved.
|
|
# Copyright (c) 2014, Linaro Limited. All rights reserved.
|
|
# Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
|
|
#
|
|
# 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 Section - statements that will be processed to create a Makefile.
|
|
#
|
|
################################################################################
|
|
[Defines]
|
|
PLATFORM_NAME = ArmVirtXen
|
|
PLATFORM_GUID = d1c43be3-3373-4a06-86fb-d1cb3083a207
|
|
PLATFORM_VERSION = 0.1
|
|
DSC_SPECIFICATION = 0x00010005
|
|
OUTPUT_DIRECTORY = Build/ArmVirtXen-$(ARCH)
|
|
SUPPORTED_ARCHITECTURES = AARCH64|ARM
|
|
BUILD_TARGETS = DEBUG|RELEASE|NOOPT
|
|
SKUID_IDENTIFIER = DEFAULT
|
|
FLASH_DEFINITION = ArmVirtPkg/ArmVirtXen.fdf
|
|
|
|
!include ArmVirtPkg/ArmVirt.dsc.inc
|
|
|
|
[LibraryClasses]
|
|
SerialPortLib|OvmfPkg/Library/XenConsoleSerialPortLib/XenConsoleSerialPortLib.inf
|
|
RealTimeClockLib|ArmVirtPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib.inf
|
|
XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf
|
|
|
|
ArmGenericTimerCounterLib|ArmVirtPkg/Library/XenArmGenericTimerVirtCounterLib/XenArmGenericTimerVirtCounterLib.inf
|
|
ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
|
|
ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
|
|
|
|
# Virtio Support
|
|
VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
|
|
VirtioMmioDeviceLib|OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf
|
|
|
|
ArmVirtMemInfoLib|ArmVirtPkg/Library/XenVirtMemInfoLib/XenVirtMemInfoLib.inf
|
|
|
|
TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
|
|
|
|
CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
|
|
UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
|
|
BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
|
|
PlatformBootManagerLib|ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
|
|
CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
|
|
|
|
[LibraryClasses.common.UEFI_DRIVER]
|
|
UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
|
|
|
|
[BuildOptions.ARM.EDKII.SEC, BuildOptions.ARM.EDKII.BASE]
|
|
# Avoid MOVT/MOVW instruction pairs in code that may end up in the PIE
|
|
# executable we build for the relocatable PrePi. They are not runtime
|
|
# relocatable in ELF.
|
|
*_CLANG35_*_CC_FLAGS = -mno-movt
|
|
|
|
################################################################################
|
|
#
|
|
# Pcd Section - list of all EDK II PCD Entries defined by this Platform
|
|
#
|
|
################################################################################
|
|
|
|
[PcdsFixedAtBuild.common]
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"$(FIRMWARE_VER)"
|
|
|
|
gArmPlatformTokenSpaceGuid.PcdCoreCount|1
|
|
!if $(ARCH) == AARCH64
|
|
gArmTokenSpaceGuid.PcdVFPEnabled|1
|
|
!endif
|
|
|
|
gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x4000
|
|
|
|
# Size of the region used by UEFI in permanent memory (Reserved 64MB)
|
|
gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000
|
|
|
|
#
|
|
# ARM Virtual Architectural Timer
|
|
#
|
|
gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|0
|
|
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
|
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile|{ 0x83, 0xA5, 0x04, 0x7C, 0x3E, 0x9E, 0x1C, 0x4F, 0xAD, 0x65, 0xE0, 0x52, 0x68, 0xD0, 0xB4, 0xD1 }
|
|
|
|
## Default Terminal Type
|
|
## 0-PCANSI, 1-VT100, 2-VT00+, 3-UTF8, 4-TTYTERM
|
|
gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|4
|
|
|
|
# Set terminal type to TtyTerm, the value encoded is EFI_TTY_TERM_GUID
|
|
gArmVirtTokenSpaceGuid.PcdTerminalTypeGuidBuffer|{0x80, 0x6d, 0x91, 0x7d, 0xb1, 0x5b, 0x8c, 0x45, 0xa4, 0x8f, 0xe2, 0x5f, 0xdd, 0x51, 0xef, 0x94}
|
|
|
|
[PcdsPatchableInModule.common]
|
|
#
|
|
# This will be overridden in the code
|
|
#
|
|
gArmTokenSpaceGuid.PcdSystemMemoryBase|0x0
|
|
gArmTokenSpaceGuid.PcdSystemMemorySize|0x0
|
|
gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x0
|
|
|
|
gArmTokenSpaceGuid.PcdFdBaseAddress|0x0
|
|
gArmTokenSpaceGuid.PcdFvBaseAddress|0x0
|
|
|
|
[PcdsDynamicDefault.common]
|
|
|
|
gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum|0x0
|
|
gArmTokenSpaceGuid.PcdArmArchTimerIntrNum|0x0
|
|
gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum|0x0
|
|
gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum|0x0
|
|
|
|
#
|
|
# ARM General Interrupt Controller
|
|
#
|
|
gArmTokenSpaceGuid.PcdGicDistributorBase|0x0
|
|
gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x0
|
|
gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0
|
|
|
|
## PL031 RealTimeClock
|
|
gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0
|
|
|
|
gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3
|
|
|
|
################################################################################
|
|
#
|
|
# Components Section - list of all EDK II Modules needed by this Platform
|
|
#
|
|
################################################################################
|
|
[Components.common]
|
|
#
|
|
# PEI Phase modules
|
|
#
|
|
ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf {
|
|
<LibraryClasses>
|
|
ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf
|
|
LzmaDecompressLib|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
|
|
PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf
|
|
HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
|
|
PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf
|
|
MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf
|
|
SerialPortLib|OvmfPkg/Library/XenConsoleSerialPortLib/XenConsoleSerialPortLib.inf
|
|
}
|
|
|
|
#
|
|
# DXE
|
|
#
|
|
MdeModulePkg/Core/Dxe/DxeMain.inf {
|
|
<LibraryClasses>
|
|
NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
|
|
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
|
|
}
|
|
MdeModulePkg/Universal/PCD/Dxe/Pcd.inf {
|
|
<LibraryClasses>
|
|
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
|
|
}
|
|
|
|
#
|
|
# Architectural Protocols
|
|
#
|
|
ArmPkg/Drivers/CpuDxe/CpuDxe.inf
|
|
MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
|
|
MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
|
|
MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
|
|
|
|
MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf
|
|
|
|
MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
|
|
MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
|
|
EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
|
|
EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
|
|
|
|
MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
|
|
MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
|
|
MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
|
|
|
|
MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
|
|
|
|
ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
|
|
ArmPkg/Drivers/TimerDxe/TimerDxe.inf {
|
|
<LibraryClasses>
|
|
NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
|
|
}
|
|
MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
|
|
|
|
#
|
|
# Platform Driver
|
|
#
|
|
ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.inf
|
|
ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
|
|
|
|
#
|
|
# FAT filesystem + GPT/MBR partitioning + UDF filesystem
|
|
#
|
|
MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
|
|
MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
|
|
MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
|
|
FatPkg/EnhancedFatDxe/Fat.inf
|
|
MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
|
|
|
|
#
|
|
# Bds
|
|
#
|
|
MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf {
|
|
<LibraryClasses>
|
|
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
|
|
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
|
|
}
|
|
MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
|
|
MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
|
|
MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
|
|
MdeModulePkg/Application/UiApp/UiApp.inf {
|
|
<LibraryClasses>
|
|
NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf
|
|
NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf
|
|
NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf
|
|
}
|
|
|
|
OvmfPkg/XenBusDxe/XenBusDxe.inf
|
|
OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.inf
|
|
|
|
#
|
|
# ACPI support
|
|
#
|
|
ArmVirtPkg/XenPlatformHasAcpiDtDxe/XenPlatformHasAcpiDtDxe.inf
|
|
!if $(ARCH) == AARCH64
|
|
ArmVirtPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf
|
|
!endif
|