]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPlatformPkg/Include/Library/ArmPlatformLib.h
ArmPlatformPkg: Introduced 'ArmPlatformSecLib'
[mirror_edk2.git] / ArmPlatformPkg / Include / Library / ArmPlatformLib.h
CommitLineData
1d5d0ae9 1/** @file
2*
0db25ccc 3* Copyright (c) 2011-2012, ARM Limited. All rights reserved.
1d5d0ae9 4*
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
9*
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.
12*
13**/
14
15#ifndef _ARMPLATFORMLIB_H_
16#define _ARMPLATFORMLIB_H_
17
18//
19// The package level header files this module uses
20//
21#include <PiPei.h>
22//
23// The protocols, PPI and GUID defintions for this module
24//
25#include <Ppi/MasterBootMode.h>
26#include <Ppi/BootInRecoveryMode.h>
27#include <Guid/MemoryTypeInformation.h>
28
29#include <Library/ArmLib.h>
1d5d0ae9 30
31/**
0db25ccc 32 This structure is used to describe a region of the EFI memory map
1d5d0ae9 33
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.
36
37**/
38typedef struct {
39 EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute;
40 EFI_PHYSICAL_ADDRESS PhysicalStart;
41 UINT64 NumberOfBytes;
42} ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR;
43
a534d714 44/**
45 Return the current Boot Mode
46
47 This function returns the boot reason on the platform
48
49 @return Return the current Boot Mode of the platform
50
51**/
52EFI_BOOT_MODE
53ArmPlatformGetBootMode (
54 VOID
55 );
56
aa01abaa 57/**
58 Initialize controllers that must setup in the normal world
59
5cc45b70 60 This function is called by the ArmPlatformPkg/PrePi or ArmPlatformPkg/PlatformPei
aa01abaa 61 in the PEI phase.
62
63**/
f437141a 64RETURN_STATUS
65ArmPlatformInitialize (
66 IN UINTN MpId
8e06b586 67 );
68
1d5d0ae9 69/**
70 Initialize the system (or sometimes called permanent) memory
71
72 This memory is generally represented by the DRAM.
73
74**/
aa01abaa 75VOID
76ArmPlatformInitializeSystemMemory (
77 VOID
78 );
1d5d0ae9 79
1d5d0ae9 80/**
81 Return the Virtual Memory Map of your platform
82
83 This Virtual Memory Map is used by MemoryInitPei Module to initialize the MMU on your platform.
84
85 @param[out] VirtualMemoryMap Array of ARM_MEMORY_REGION_DESCRIPTOR describing a Physical-to-
86 Virtual Memory mapping. This array must be ended by a zero-filled
87 entry
88
89**/
aa01abaa 90VOID
91ArmPlatformGetVirtualMemoryMap (
92 OUT ARM_MEMORY_REGION_DESCRIPTOR** VirtualMemoryMap
93 );
1d5d0ae9 94
95/**
96 Return the EFI Memory Map of your platform
97
98 This EFI Memory Map of the System Memory is used by MemoryInitPei module to create the Resource
99 Descriptor HOBs used by DXE core.
100
101 @param[out] EfiMemoryMap Array of ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR describing an
102 EFI Memory region. This array must be ended by a zero-filled entry
103
104**/
964680c1 105EFI_STATUS
106ArmPlatformGetAdditionalSystemMemory (
107 OUT ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR** EfiMemoryMap
108 );
1d5d0ae9 109
77de7e53 110/**
111 Return the Platform specific PPIs
112
113 This function exposes the Platform Specific PPIs. They can be used by any PrePi modules or passed
114 to the PeiCore by PrePeiCore.
115
116 @param[out] PpiListSize Size in Bytes of the Platform PPI List
117 @param[out] PpiList Platform PPI List
118
119**/
120VOID
121ArmPlatformGetPlatformPpiList (
122 OUT UINTN *PpiListSize,
123 OUT EFI_PEI_PPI_DESCRIPTOR **PpiList
124 );
125
1d5d0ae9 126#endif