3 * Copyright (c) 2011-2013, ARM Limited. All rights reserved.
5 * This program and the accompanying materials
6 * are licensed and made available under the terms and conditions of the BSD License
7 * which accompanies this distribution. The full text of the license may be found at
8 * http://opensource.org/licenses/bsd-license.php
10 * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef _ARMPLATFORMLIB_H_
16 #define _ARMPLATFORMLIB_H_
19 // The package level header files this module uses
23 // The protocols, PPI and GUID defintions for this module
25 #include <Ppi/MasterBootMode.h>
26 #include <Ppi/BootInRecoveryMode.h>
28 #include <Library/ArmLib.h>
31 This structure is used to describe a region of the EFI memory map
33 Every EFI regions of the system memory described by their physical start address and their size
34 can have different attributes. Some regions can be tested and other untested.
38 EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute
;
39 EFI_PHYSICAL_ADDRESS PhysicalStart
;
41 } ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR
;
44 Return the core position from the value of its MpId register
46 This function returns the core position from the position 0 in the processor.
47 This function might be called from assembler before any stack is set.
49 @return Return the core position
53 ArmPlatformGetCorePosition (
58 Return a non-zero value if the callee is the primary core
60 This function returns a non-zero value if the callee is the primary core.
61 The primary core is the core responsible to initialize the hardware and run UEFI.
62 This function might be called from assembler before any stack is set.
64 @return Return a non-zero value if the callee is the primary core.
68 ArmPlatformIsPrimaryCore (
73 Return the current Boot Mode
75 This function returns the boot reason on the platform
77 @return Return the current Boot Mode of the platform
81 ArmPlatformGetBootMode (
86 Initialize controllers that must setup in the normal world
88 This function is called by the ArmPlatformPkg/PrePi or ArmPlatformPkg/PlatformPei
93 ArmPlatformInitialize (
98 Initialize the system (or sometimes called permanent) memory
100 This memory is generally represented by the DRAM.
104 ArmPlatformInitializeSystemMemory (
109 Return the Virtual Memory Map of your platform
111 This Virtual Memory Map is used by MemoryInitPei Module to initialize the MMU on your platform.
113 @param[out] VirtualMemoryMap Array of ARM_MEMORY_REGION_DESCRIPTOR describing a Physical-to-
114 Virtual Memory mapping. This array must be ended by a zero-filled
119 ArmPlatformGetVirtualMemoryMap (
120 OUT ARM_MEMORY_REGION_DESCRIPTOR
** VirtualMemoryMap
124 Return the Platform specific PPIs
126 This function exposes the Platform Specific PPIs. They can be used by any PrePi modules or passed
127 to the PeiCore by PrePeiCore.
129 @param[out] PpiListSize Size in Bytes of the Platform PPI List
130 @param[out] PpiList Platform PPI List
134 ArmPlatformGetPlatformPpiList (
135 OUT UINTN
*PpiListSize
,
136 OUT EFI_PEI_PPI_DESCRIPTOR
**PpiList