3 * Copyright (c) 2011-2012, 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>
27 #include <Guid/MemoryTypeInformation.h>
29 #include <Library/ArmLib.h>
32 This structure is used to describe a region of the EFI memory map
34 Every EFI regions of the system memory described by their physical start address and their size
35 can have different attributes. Some regions can be tested and other untested.
39 EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute
;
40 EFI_PHYSICAL_ADDRESS PhysicalStart
;
42 } ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR
;
45 ArmPlatformGetCorePosition (
50 Return the current Boot Mode
52 This function returns the boot reason on the platform
54 @return Return the current Boot Mode of the platform
58 ArmPlatformGetBootMode (
63 Initialize controllers that must setup in the normal world
65 This function is called by the ArmPlatformPkg/PrePi or ArmPlatformPkg/PlatformPei
70 ArmPlatformInitialize (
75 Initialize the system (or sometimes called permanent) memory
77 This memory is generally represented by the DRAM.
81 ArmPlatformInitializeSystemMemory (
86 Return the Virtual Memory Map of your platform
88 This Virtual Memory Map is used by MemoryInitPei Module to initialize the MMU on your platform.
90 @param[out] VirtualMemoryMap Array of ARM_MEMORY_REGION_DESCRIPTOR describing a Physical-to-
91 Virtual Memory mapping. This array must be ended by a zero-filled
96 ArmPlatformGetVirtualMemoryMap (
97 OUT ARM_MEMORY_REGION_DESCRIPTOR
** VirtualMemoryMap
101 Return the EFI Memory Map of your platform
103 This EFI Memory Map of the System Memory is used by MemoryInitPei module to create the Resource
104 Descriptor HOBs used by DXE core.
106 @param[out] EfiMemoryMap Array of ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR describing an
107 EFI Memory region. This array must be ended by a zero-filled entry
111 ArmPlatformGetAdditionalSystemMemory (
112 OUT ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR
** EfiMemoryMap
116 Return the Platform specific PPIs
118 This function exposes the Platform Specific PPIs. They can be used by any PrePi modules or passed
119 to the PeiCore by PrePeiCore.
121 @param[out] PpiListSize Size in Bytes of the Platform PPI List
122 @param[out] PpiList Platform PPI List
126 ArmPlatformGetPlatformPpiList (
127 OUT UINTN
*PpiListSize
,
128 OUT EFI_PEI_PPI_DESCRIPTOR
**PpiList