]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPkg/ArmPkg.dec
ArmPkg: MTL Library interface and Null library implementation
[mirror_edk2.git] / ArmPkg / ArmPkg.dec
CommitLineData
8bbf0f09
A
1#/** @file\r
2# ARM processor package.\r
3#\r
d6ebcab7 4# Copyright (c) 2009 - 2010, Apple Inc. All rights reserved.<BR>\r
38a00bae 5# Copyright (c) 2011 - 2018, ARM Limited. All rights reserved.\r
8bbf0f09 6#\r
d6ebcab7 7# This program and the accompanying materials\r
8bbf0f09
A
8# are licensed and made available under the terms and conditions of the BSD License\r
9# which accompanies this distribution. The full text of the license may be found at\r
10# http://opensource.org/licenses/bsd-license.php\r
11#\r
12# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
13# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
14#\r
15#**/\r
16\r
2ef2b01e
A
17[Defines]\r
18 DEC_SPECIFICATION = 0x00010005\r
19 PACKAGE_NAME = ArmPkg\r
20 PACKAGE_GUID = 5CFBD99E-3C43-4E7F-8054-9CDEAFF7710F\r
21 PACKAGE_VERSION = 0.1\r
22\r
23################################################################################\r
24#\r
25# Include Section - list of Include Paths that are provided by this package.\r
26# Comments are used for Keywords and Module Types.\r
27#\r
28# Supported Module Types:\r
29# BASE SEC PEI_CORE PEIM DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER DXE_SAL_DRIVER UEFI_DRIVER UEFI_APPLICATION\r
30#\r
31################################################################################\r
32[Includes.common]\r
33 Include # Root include for the package\r
34\r
35[LibraryClasses.common]\r
8bbf0f09 36 ArmLib|Include/Library/ArmLib.h\r
12728e11 37 ArmMmuLib|Include/Library/ArmMmuLib.h\r
2ef2b01e 38 SemihostLib|Include/Library/Semihosting.h\r
11c20f4e 39 DefaultExceptionHandlerLib|Include/Library/DefaultExceptionHandlerLib.h\r
097bd461 40 ArmDisassemblerLib|Include/Library/ArmDisassemblerLib.h\r
8d13298b 41 ArmGicArchLib|Include/Library/ArmGicArchLib.h\r
38a00bae 42 ArmMtlLib|ArmPlatformPkg/Include/Library/ArmMtlLib.h\r
4d163696 43 ArmSvcLib|Include/Library/ArmSvcLib.h\r
c32aaba9 44\r
2ef2b01e
A
45[Guids.common]\r
46 gArmTokenSpaceGuid = { 0xBB11ECFE, 0x820F, 0x4968, { 0xBB, 0xA6, 0xF7, 0x6A, 0xFE, 0x30, 0x25, 0x96 } }\r
47\r
44788bae 48 ## ARM MPCore table\r
49 # Include/Guid/ArmMpCoreInfo.h\r
50 gArmMpCoreInfoGuid = { 0xa4ee0728, 0xe5d7, 0x4ac5, {0xb2, 0x1e, 0x65, 0x8e, 0xd8, 0x57, 0xe8, 0x34} }\r
51\r
52[Ppis]\r
53 ## Include/Ppi/ArmMpCoreInfo.h\r
54 gArmMpCoreInfoPpiGuid = { 0x6847cc74, 0xe9ec, 0x4f8f, {0xa2, 0x9d, 0xab, 0x44, 0xe7, 0x54, 0xa8, 0xfc} }\r
55\r
2ef2b01e
A
56[PcdsFeatureFlag.common]\r
57 gArmTokenSpaceGuid.PcdCpuDxeProduceDebugSupport|FALSE|BOOLEAN|0x00000001\r
58\r
1bfda055 59 # On ARM Architecture with the Security Extension, the address for the\r
60 # Vector Table can be mapped anywhere in the memory map. It means we can\r
61 # point the Exception Vector Table to its location in CpuDxe.\r
f0bbcdf8 62 # By default we copy the Vector Table at PcdGet64(PcdCpuVectorBaseAddress)\r
1bfda055 63 gArmTokenSpaceGuid.PcdRelocateVectorTable|TRUE|BOOLEAN|0x00000022\r
eeec69c5 64 # Set this PCD to TRUE if the Exception Vector is changed to add debugger support before\r
65 # it has been configured by the CPU DXE\r
66 gArmTokenSpaceGuid.PcdDebuggerExceptionSupport|FALSE|BOOLEAN|0x00000032\r
c32aaba9 67\r
9232ee53
OM
68 # Define if the spin-table mechanism is used by the secondary cores when booting\r
69 # Linux (instead of PSCI)\r
70 gArmTokenSpaceGuid.PcdArmLinuxSpinTable|FALSE|BOOLEAN|0x00000033\r
c32aaba9 71\r
f6d46e29
AB
72 # Define if the GICv3 controller should use the GICv2 legacy\r
73 gArmTokenSpaceGuid.PcdArmGicV3WithV2Legacy|FALSE|BOOLEAN|0x00000042\r
74\r
65ceda91
AB
75[PcdsFeatureFlag.ARM]\r
76 # Whether to map normal memory as non-shareable. FALSE is the safe choice, but\r
77 # TRUE may be appropriate to fix performance problems if you don't care about\r
78 # hardware coherency (i.e., no virtualization or cache coherent DMA)\r
79 gArmTokenSpaceGuid.PcdNormalMemoryNonshareableOverride|FALSE|BOOLEAN|0x00000043\r
80\r
2ef2b01e 81[PcdsFixedAtBuild.common]\r
12c5ae23 82 gArmTokenSpaceGuid.PcdTrustzoneSupport|FALSE|BOOLEAN|0x00000006\r
83\r
1bfda055 84 # This PCD should be a FeaturePcd. But we used this PCD as an '#if' in an ASM file.\r
85 # Using a FeaturePcd make a '(BOOLEAN) casting for its value which is not understood by the preprocessor.\r
86 gArmTokenSpaceGuid.PcdVFPEnabled|0|UINT32|0x00000024\r
87\r
f0bbcdf8 88 gArmTokenSpaceGuid.PcdCpuVectorBaseAddress|0xffff0000|UINT64|0x00000004\r
2ef2b01e 89 gArmTokenSpaceGuid.PcdCpuResetAddress|0x00000000|UINT32|0x00000005\r
c32aaba9 90\r
1bfda055 91 #\r
262a9b04 92 # ARM Secure Firmware PCDs\r
1bfda055 93 #\r
bb5420bb 94 gArmTokenSpaceGuid.PcdSecureFdBaseAddress|0|UINT64|0x00000015\r
1bfda055 95 gArmTokenSpaceGuid.PcdSecureFdSize|0|UINT32|0x00000016\r
bb5420bb 96 gArmTokenSpaceGuid.PcdSecureFvBaseAddress|0x0|UINT64|0x0000002F\r
1ad14bc8 97 gArmTokenSpaceGuid.PcdSecureFvSize|0x0|UINT32|0x00000030\r
1bfda055 98\r
7245b435 99 #\r
100 # ARM Hypervisor Firmware PCDs\r
c32aaba9 101 #\r
7245b435 102 gArmTokenSpaceGuid.PcdHypFdBaseAddress|0|UINT32|0x0000003A\r
103 gArmTokenSpaceGuid.PcdHypFdSize|0|UINT32|0x0000003B\r
104 gArmTokenSpaceGuid.PcdHypFvBaseAddress|0|UINT32|0x0000003C\r
105 gArmTokenSpaceGuid.PcdHypFvSize|0|UINT32|0x0000003D\r
d6dc67ba 106\r
0787bc61 107 # Use ClusterId + CoreId to identify the PrimaryCore\r
108 gArmTokenSpaceGuid.PcdArmPrimaryCoreMask|0xF03|UINT32|0x00000031\r
c32aaba9 109 # The Primary Core is ClusterId[0] & CoreId[0]\r
0787bc61 110 gArmTokenSpaceGuid.PcdArmPrimaryCore|0|UINT32|0x00000037\r
111\r
1bfda055 112 #\r
113 # ARM L2x0 PCDs\r
114 #\r
115 gArmTokenSpaceGuid.PcdL2x0ControllerBase|0|UINT32|0x0000001B\r
c32aaba9 116\r
523b5266
AB
117 #\r
118 # ARM Normal (or Non Secure) Firmware PCDs\r
119 #\r
120 gArmTokenSpaceGuid.PcdFdSize|0|UINT32|0x0000002C\r
121 gArmTokenSpaceGuid.PcdFvSize|0|UINT32|0x0000002E\r
122\r
bfe34275
AB
123 #\r
124 # Value to add to a host address to obtain a device address, using\r
125 # unsigned 64-bit integer arithmetic on both ARM and AArch64. This\r
126 # means we can rely on truncation on overflow to specify negative\r
127 # offsets.\r
128 #\r
129 gArmTokenSpaceGuid.PcdArmDmaDeviceOffset|0x0|UINT64|0x0000044\r
130\r
523b5266
AB
131[PcdsFixedAtBuild.common, PcdsPatchableInModule.common]\r
132 gArmTokenSpaceGuid.PcdFdBaseAddress|0|UINT64|0x0000002B\r
133 gArmTokenSpaceGuid.PcdFvBaseAddress|0|UINT64|0x0000002D\r
387653a4 134\r
135[PcdsFixedAtBuild.ARM]\r
cc935544
OM
136 #\r
137 # ARM Security Extension\r
138 #\r
139\r
140 # Secure Configuration Register\r
141 # - BIT0 : NS - Non Secure bit\r
142 # - BIT1 : IRQ Handler\r
143 # - BIT2 : FIQ Handler\r
144 # - BIT3 : EA - External Abort\r
145 # - BIT4 : FW - F bit writable\r
146 # - BIT5 : AW - A bit writable\r
147 # - BIT6 : nET - Not Early Termination\r
148 # - BIT7 : SCD - Secure Monitor Call Disable\r
149 # - BIT8 : HCE - Hyp Call enable\r
150 # - BIT9 : SIF - Secure Instruction Fetch\r
151 # 0x31 = NS | EA | FW\r
152 gArmTokenSpaceGuid.PcdArmScr|0x31|UINT32|0x00000038\r
153\r
387653a4 154 # By default we do not do a transition to non-secure mode\r
155 gArmTokenSpaceGuid.PcdArmNonSecModeTransition|0x0|UINT32|0x0000003E\r
2425e1d4
OM
156\r
157 # The Linux ATAGs are expected to be under 0x4000 (16KB) from the beginning of the System Memory\r
158 gArmTokenSpaceGuid.PcdArmLinuxAtagMaxOffset|0x4000|UINT32|0x00000020\r
159\r
387653a4 160 # If the fixed FDT address is not available, then it should be loaded below the kernel.\r
161 # The recommendation from the Linux kernel is to have the FDT below 16KB.\r
162 # (see the kernel doc: Documentation/arm/Booting)\r
163 gArmTokenSpaceGuid.PcdArmLinuxFdtMaxOffset|0x4000|UINT32|0x00000023\r
164 # The FDT blob must be loaded at a 64bit aligned address.\r
165 gArmTokenSpaceGuid.PcdArmLinuxFdtAlignment|0x8|UINT32|0x00000026\r
25402f5d 166\r
d6dc67ba
OM
167 # Non Secure Access Control Register\r
168 # - BIT15 : NSASEDIS - Disable Non-secure Advanced SIMD functionality\r
169 # - BIT14 : NSD32DIS - Disable Non-secure use of D16-D31\r
170 # - BIT11 : cp11 - Non-secure access to coprocessor 11 enable\r
171 # - BIT10 : cp10 - Non-secure access to coprocessor 10 enable\r
172 # 0xC00 = cp10 | cp11\r
173 gArmTokenSpaceGuid.PcdArmNsacr|0xC00|UINT32|0x00000039\r
174\r
25402f5d 175[PcdsFixedAtBuild.AARCH64]\r
cc935544
OM
176 #\r
177 # AArch64 Security Extension\r
178 #\r
179\r
180 # Secure Configuration Register\r
181 # - BIT0 : NS - Non Secure bit\r
182 # - BIT1 : IRQ Handler\r
183 # - BIT2 : FIQ Handler\r
184 # - BIT3 : EA - External Abort\r
185 # - BIT4 : FW - F bit writable\r
186 # - BIT5 : AW - A bit writable\r
187 # - BIT6 : nET - Not Early Termination\r
188 # - BIT7 : SCD - Secure Monitor Call Disable\r
189 # - BIT8 : HCE - Hyp Call enable\r
190 # - BIT9 : SIF - Secure Instruction Fetch\r
191 # - BIT10: RW - Register width control for lower exception levels\r
192 # - BIT11: SIF - Enables Secure EL1 access to EL1 Architectural Timer\r
193 # - BIT12: TWI - Trap WFI\r
194 # - BIT13: TWE - Trap WFE\r
195 # 0x501 = NS | HCE | RW\r
196 gArmTokenSpaceGuid.PcdArmScr|0x501|UINT32|0x00000038\r
197\r
25402f5d
HL
198 # By default we do transition to EL2 non-secure mode with Stack for EL2.\r
199 # Mode Description Bits\r
c32aaba9
OM
200 # NS EL2 SP2 all interrupts disabled = 0x3c9\r
201 # NS EL1 SP1 all interrupts disabled = 0x3c5\r
25402f5d
HL
202 # Other modes include using SP0 or switching to Aarch32, but these are\r
203 # not currently supported.\r
204 gArmTokenSpaceGuid.PcdArmNonSecModeTransition|0x3c9|UINT32|0x0000003E\r
634bdd9f
HL
205 # If the fixed FDT address is not available, then it should be loaded above the kernel.\r
206 # The recommendation from the AArch64 Linux kernel is to have the FDT below 512MB.\r
207 # (see the kernel doc: Documentation/arm64/booting.txt)\r
208 gArmTokenSpaceGuid.PcdArmLinuxFdtMaxOffset|0x20000000|UINT32|0x00000023\r
209 # The FDT blob must be loaded at a 2MB aligned address.\r
210 gArmTokenSpaceGuid.PcdArmLinuxFdtAlignment|0x00200000|UINT32|0x00000026\r
e1e2e66c
AB
211\r
212\r
dc63be24 213#\r
523b5266
AB
214# These PCDs are also defined as 'PcdsDynamic' or 'PcdsPatchableInModule' to be\r
215# redefined when using UEFI in a context of virtual machine.\r
dc63be24 216#\r
523b5266
AB
217[PcdsFixedAtBuild.common, PcdsDynamic.common, PcdsPatchableInModule.common]\r
218\r
f8d7d6e1 219 # System Memory (DRAM): These PCDs define the region of in-built system memory\r
142fa386
AB
220 # Some platforms can get DRAM extensions, these additional regions may be\r
221 # declared to UEFI using separate resource descriptor HOBs\r
f8d7d6e1
AB
222 gArmTokenSpaceGuid.PcdSystemMemoryBase|0|UINT64|0x00000029\r
223 gArmTokenSpaceGuid.PcdSystemMemorySize|0|UINT64|0x0000002A\r
224\r
523b5266 225[PcdsFixedAtBuild.common, PcdsDynamic.common]\r
e1e2e66c
AB
226 #\r
227 # ARM Architectural Timer\r
228 #\r
229 gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|0|UINT32|0x00000034\r
230\r
231 # ARM Architectural Timer Interrupt(GIC PPI) numbers\r
232 gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum|29|UINT32|0x00000035\r
233 gArmTokenSpaceGuid.PcdArmArchTimerIntrNum|30|UINT32|0x00000036\r
234 gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum|26|UINT32|0x00000040\r
235 gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum|27|UINT32|0x00000041\r
dc63be24 236\r
0b4d97a0
RC
237 #\r
238 # ARM Generic Watchdog\r
239 #\r
240\r
7c609a14
A
241 gArmTokenSpaceGuid.PcdGenericWatchdogControlBase|0x2A440000|UINT64|0x00000007\r
242 gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase|0x2A450000|UINT64|0x00000008\r
0b4d97a0
RC
243 gArmTokenSpaceGuid.PcdGenericWatchdogEl2IntrNum|93|UINT32|0x00000009\r
244\r
dc63be24
AB
245 #\r
246 # ARM Generic Interrupt Controller\r
247 #\r
8a1f2378 248 gArmTokenSpaceGuid.PcdGicDistributorBase|0|UINT64|0x0000000C\r
919697ae 249 # Base address for the GIC Redistributor region that contains the boot CPU\r
8a1f2378
DC
250 gArmTokenSpaceGuid.PcdGicRedistributorsBase|0|UINT64|0x0000000E\r
251 gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0|UINT64|0x0000000D\r
dc63be24 252 gArmTokenSpaceGuid.PcdGicSgiIntId|0|UINT32|0x00000025\r
d7c06eb0
AB
253\r
254 #\r
255 # Bases, sizes and translation offsets of IO and MMIO spaces, respectively.\r
256 # Note that "IO" is just another MMIO range that simulates IO space; there\r
257 # are no special instructions to access it.\r
258 #\r
259 # The base addresses PcdPciIoBase, PcdPciMmio32Base and PcdPciMmio64Base are\r
260 # specific to their containing address spaces. In order to get the physical\r
261 # address for the CPU, for a given access, the respective translation value\r
262 # has to be added.\r
263 #\r
264 # The translations always have to be initialized like this, using UINT64:\r
265 #\r
266 # UINT64 IoCpuBase; // mapping target in 64-bit cpu-physical space\r
267 # UINT64 Mmio32CpuBase; // mapping target in 64-bit cpu-physical space\r
268 # UINT64 Mmio64CpuBase; // mapping target in 64-bit cpu-physical space\r
269 #\r
270 # PcdPciIoTranslation = IoCpuBase - PcdPciIoBase;\r
271 # PcdPciMmio32Translation = Mmio32CpuBase - (UINT64)PcdPciMmio32Base;\r
272 # PcdPciMmio64Translation = Mmio64CpuBase - PcdPciMmio64Base;\r
273 #\r
274 # because (a) the target address space (ie. the cpu-physical space) is\r
275 # 64-bit, and (b) the translation values are meant as offsets for *modular*\r
276 # arithmetic.\r
277 #\r
278 # Accordingly, the translation itself needs to be implemented as:\r
279 #\r
280 # UINT64 UntranslatedIoAddress; // input parameter\r
281 # UINT32 UntranslatedMmio32Address; // input parameter\r
282 # UINT64 UntranslatedMmio64Address; // input parameter\r
283 #\r
284 # UINT64 TranslatedIoAddress; // output parameter\r
285 # UINT64 TranslatedMmio32Address; // output parameter\r
286 # UINT64 TranslatedMmio64Address; // output parameter\r
287 #\r
288 # TranslatedIoAddress = UntranslatedIoAddress +\r
289 # PcdPciIoTranslation;\r
290 # TranslatedMmio32Address = (UINT64)UntranslatedMmio32Address +\r
291 # PcdPciMmio32Translation;\r
292 # TranslatedMmio64Address = UntranslatedMmio64Address +\r
293 # PcdPciMmio64Translation;\r
294 #\r
295 # The modular arithmetic performed in UINT64 ensures that the translation\r
296 # works correctly regardless of the relation between IoCpuBase and\r
297 # PcdPciIoBase, Mmio32CpuBase and PcdPciMmio32Base, and Mmio64CpuBase and\r
298 # PcdPciMmio64Base.\r
299 #\r
300 gArmTokenSpaceGuid.PcdPciIoBase|0x0|UINT64|0x00000050\r
301 gArmTokenSpaceGuid.PcdPciIoSize|0x0|UINT64|0x00000051\r
302 gArmTokenSpaceGuid.PcdPciIoTranslation|0x0|UINT64|0x00000052\r
303 gArmTokenSpaceGuid.PcdPciMmio32Base|0x0|UINT32|0x00000053\r
304 gArmTokenSpaceGuid.PcdPciMmio32Size|0x0|UINT32|0x00000054\r
305 gArmTokenSpaceGuid.PcdPciMmio32Translation|0x0|UINT64|0x00000055\r
306 gArmTokenSpaceGuid.PcdPciMmio64Base|0x0|UINT64|0x00000056\r
307 gArmTokenSpaceGuid.PcdPciMmio64Size|0x0|UINT64|0x00000057\r
308 gArmTokenSpaceGuid.PcdPciMmio64Translation|0x0|UINT64|0x00000058\r
309\r
310 #\r
311 # Inclusive range of allowed PCI buses.\r
312 #\r
313 gArmTokenSpaceGuid.PcdPciBusMin|0x0|UINT32|0x00000059\r
314 gArmTokenSpaceGuid.PcdPciBusMax|0x0|UINT32|0x0000005A\r