• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Porting UEFI to a ARM platform :
2--------------------------------
31. Create the new platform directory under ArmPlatformPkg
4
52. Create its DSC and FDF files into this new directory. These files can be copied from ArmVExpress-CTA9x4.dsc and ArmVExpress-CTA9x4.fdf; and adapted following the requirement of your platform.
6
73. Set up the PCDs required by ArmPlatformPkg in your FDF or DSC files
8
94. Implement 'ArmPlatformLib' for your platform following the interface defined by ArmPlatformPkg\Include\Library\ArmPlatformLib.h.
10
11
12PCDs	Description :
13-------------------
14
15# Firmware Device / Volume
16gArmTokenSpaceGuid.PcdSecureFdBaseAddress       : Base address of your Secure Firmware Device
17gArmTokenSpaceGuid.PcdSecureFdSize              : Size in byte of your Secure Firmware Device.
18gArmTokenSpaceGuid.PcdFdBaseAddress       : Base Address of your Non-Secure/Normal World Firmware Device.
19gArmTokenSpaceGuid.PcdFdSize              : Size in bytes of your Non-Secure/Normal World Firmware Device
20
21# Stacks
22gArmPlatformTokenSpaceGuid.PcdCPUCoresSecStackBase             : Base of Secure Stack for Secure World
23gArmPlatformTokenSpaceGuid.PcdCPUCoreSecPrimaryStackSize       : Size of the stack for the Primary Core in Secure World
24gArmPlatformTokenSpaceGuid.PcdCPUCoreSecSecondaryStackSize     : Size of the stack for the Secondary Cores in Secure World
25gArmPlatformTokenSpaceGuid.PcdCPUCoresSecMonStackBase          : Base of Stack for Monitor World
26gArmPlatformTokenSpaceGuid.PcdCPUCoreSecMonStackSize           : Size of the stack for each cores
27gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase                : Base of SEC Stack for Normal World
28gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize          : Size of the stack for the Primary Core
29gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize        : Size of the stack for the Secondary Core
30
31# CPU / Architectural controllers
32gArmTokenSpaceGuid.PcdGicDistributorBase        : Base address of the Distributor of your General Interrupt Controller
33gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase : Base address of the Interface of your General Interrupt Controller
34
35# Memory Regions
36gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize  : Size of the region reserve for PI & UEFI
37gArmTokenSpaceGuid.PcdSystemMemoryBase                    : Base Address of the System Memory (DRAM)
38gArmTokenSpaceGuid.PcdSystemMemorySize                    : Size of the System Memory (DRAM)
39
40# Features
41gArmPlatformTokenSpaceGuid.PcdSystemMemoryInitializeInSec : TRUE if System Memory initialized by the SEC phase
42gArmPlatformTokenSpaceGuid.PcdSendSgiToBringUpSecondaryCores : TRUE if the PrePi or PrePeiCore modules have to send an SGI to resume the excution of the secondary cores
43
44# Boot Manager
45gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription      : Description of the Default Boot Entry
46gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath       : DevicePath of the Default Boot Entry
47gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument         : Argument for the Default Boot Entry
48gArmPlatformTokenSpaceGuid.PcdDefaultBootType             : Define the binary type of the Default Boot Entry (0=EFI application, 1=Linux kernel with ATAG support, 2=Linux Kernel with FDT support)
49gArmPlatformTokenSpaceGuid.PcdPlatformBootTimeOut         : Timeout before booting on the Device Boot entry (by default the auto boot is skipped)
50gArmPlatformTokenSpaceGuid.PcdDefaultConInPaths           : List of Device Path use for the Console Input
51gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths          : List of Device Path use for the Console Output
52
53
54FAQ :
55-----
56# When to use PrePi or PrePeiCore ?
57- PrePi: when the memory has already been initialized by the first stage boot loader
58    Boot sequence: PlatformFirmware/PrePi/Dxe/Bds
59    Example: Beagle Board
60
61- PrePeiCore: when the firmware is started from XIP memory and in Secure world. The PeiCore shadows the firmware itself in System Memory (DRAM)
62    Boot sequence: Sec/PrePiCore/PeiCore/Dxe/Bds
63    Example: ARM Versatile Express
64
65See:
66- ArmPlatformPkg/Documentation/ARM-EDK2-Overview.png
67- ArmPlatformPkg/Documentation/ArmPlatformLib-Full-Boot.png
68- ArmPlatformPkg/Documentation/ArmPlatformLib-2nd-Stage.png
69
70# What is the PcdStandalone
71gArmPlatformTokenSpaceGuid.PcdStandalone=FALSE is used on ARM Development Platforms during the development stage.
72To avoid to reflash the NOR Flash after each build, the SEC (in NOR Flash) intializes thd DRAM and wait until the Normal World firmware is copied into the DRAM.
73Copying the firmware in DRAM is much faster than reflashing the NOR Flash. It is also more convenient to debug the firmware form DRAM than NOR Flash (eg: use of software breakpoint)
74
75