3 * Copyright (c) 2011, 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 #include <Library/ArmLib.h>
16 #include <Library/ArmPlatformLib.h>
18 #include <Ppi/ArmMpCoreInfo.h>
21 ARM_CORE_INFO mArmPlatformNullMpCoreInfoTable
[] = {
26 // MP Core MailBox Set/Get/Clear Addresses and Clear Value
27 (EFI_PHYSICAL_ADDRESS
)0,
28 (EFI_PHYSICAL_ADDRESS
)0,
29 (EFI_PHYSICAL_ADDRESS
)0,
36 // MP Core MailBox Set/Get/Clear Addresses and Clear Value
37 (EFI_PHYSICAL_ADDRESS
)0,
38 (EFI_PHYSICAL_ADDRESS
)0,
39 (EFI_PHYSICAL_ADDRESS
)0,
46 // MP Core MailBox Set/Get/Clear Addresses and Clear Value
47 (EFI_PHYSICAL_ADDRESS
)0,
48 (EFI_PHYSICAL_ADDRESS
)0,
49 (EFI_PHYSICAL_ADDRESS
)0,
56 // MP Core MailBox Set/Get/Clear Addresses and Clear Value
57 (EFI_PHYSICAL_ADDRESS
)0,
58 (EFI_PHYSICAL_ADDRESS
)0,
59 (EFI_PHYSICAL_ADDRESS
)0,
64 // This function should be better located into TimerLib implementation
75 Remap the memory at 0x0
77 Some platform requires or gives the ability to remap the memory at the address 0x0.
78 This function can do nothing if this feature is not relevant to your platform.
82 ArmPlatformBootRemapping (
86 // Disable memory remapping and return to normal mapping
90 Return the current Boot Mode
92 This function returns the boot reason on the platform
96 ArmPlatformGetBootMode (
100 return BOOT_WITH_FULL_CONFIGURATION
;
104 Initialize controllers that must setup in the normal world
106 This function is called by the ArmPlatformPkg/PrePi or ArmPlatformPkg/PlatformPei
111 ArmPlatformNormalInitialize (
119 Initialize the system (or sometimes called permanent) memory
121 This memory is generally represented by the DRAM.
125 ArmPlatformInitializeSystemMemory (
133 PrePeiCoreGetMpCoreInfo (
134 OUT UINTN
*CoreCount
,
135 OUT ARM_CORE_INFO
**ArmCoreTable
139 *CoreCount
= sizeof(mArmPlatformNullMpCoreInfoTable
) / sizeof(ARM_CORE_INFO
);
140 *ArmCoreTable
= mArmPlatformNullMpCoreInfoTable
;
143 return EFI_UNSUPPORTED
;
147 // Needs to be declared in the file. Otherwise gArmMpCoreInfoPpiGuid is undefined in the contect of PrePeiCore
148 EFI_GUID mArmMpCoreInfoPpiGuid
= ARM_MP_CORE_INFO_PPI_GUID
;
149 ARM_MP_CORE_INFO_PPI mMpCoreInfoPpi
= { PrePeiCoreGetMpCoreInfo
};
151 EFI_PEI_PPI_DESCRIPTOR gPlatformPpiTable
[] = {
153 EFI_PEI_PPI_DESCRIPTOR_PPI
,
154 &mArmMpCoreInfoPpiGuid
,
160 ArmPlatformGetPlatformPpiList (
161 OUT UINTN
*PpiListSize
,
162 OUT EFI_PEI_PPI_DESCRIPTOR
**PpiList
166 *PpiListSize
= sizeof(gPlatformPpiTable
);
167 *PpiList
= gPlatformPpiTable
;