3 * Copyright (c) 2013-2014, 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/IoLib.h>
16 #include <Library/ArmPlatformLib.h>
17 #include <Library/DebugLib.h>
18 #include <Library/PcdLib.h>
20 #include <Ppi/ArmMpCoreInfo.h>
22 #include <ArmPlatform.h>
24 ARM_CORE_INFO mJunoInfoTable
[] = {
29 // MP Core MailBox Set/Get/Clear Addresses and Clear Value
30 (EFI_PHYSICAL_ADDRESS
)ARM_VE_SYS_FLAGS_REG
,
31 (EFI_PHYSICAL_ADDRESS
)ARM_VE_SYS_FLAGS_SET_REG
,
32 (EFI_PHYSICAL_ADDRESS
)ARM_VE_SYS_FLAGS_CLR_REG
,
39 // MP Core MailBox Set/Get/Clear Addresses and Clear Value
40 (EFI_PHYSICAL_ADDRESS
)ARM_VE_SYS_FLAGS_REG
,
41 (EFI_PHYSICAL_ADDRESS
)ARM_VE_SYS_FLAGS_SET_REG
,
42 (EFI_PHYSICAL_ADDRESS
)ARM_VE_SYS_FLAGS_CLR_REG
,
49 // MP Core MailBox Set/Get/Clear Addresses and Clear Value
50 (EFI_PHYSICAL_ADDRESS
)ARM_VE_SYS_FLAGS_REG
,
51 (EFI_PHYSICAL_ADDRESS
)ARM_VE_SYS_FLAGS_SET_REG
,
52 (EFI_PHYSICAL_ADDRESS
)ARM_VE_SYS_FLAGS_CLR_REG
,
59 // MP Core MailBox Set/Get/Clear Addresses and Clear Value
60 (EFI_PHYSICAL_ADDRESS
)ARM_VE_SYS_FLAGS_REG
,
61 (EFI_PHYSICAL_ADDRESS
)ARM_VE_SYS_FLAGS_SET_REG
,
62 (EFI_PHYSICAL_ADDRESS
)ARM_VE_SYS_FLAGS_CLR_REG
,
69 // MP Core MailBox Set/Get/Clear Addresses and Clear Value
70 (EFI_PHYSICAL_ADDRESS
)ARM_VE_SYS_FLAGS_REG
,
71 (EFI_PHYSICAL_ADDRESS
)ARM_VE_SYS_FLAGS_SET_REG
,
72 (EFI_PHYSICAL_ADDRESS
)ARM_VE_SYS_FLAGS_CLR_REG
,
79 // MP Core MailBox Set/Get/Clear Addresses and Clear Value
80 (EFI_PHYSICAL_ADDRESS
)ARM_VE_SYS_FLAGS_REG
,
81 (EFI_PHYSICAL_ADDRESS
)ARM_VE_SYS_FLAGS_SET_REG
,
82 (EFI_PHYSICAL_ADDRESS
)ARM_VE_SYS_FLAGS_CLR_REG
,
88 Return the current Boot Mode
90 This function returns the boot reason on the platform
92 @return Return the current Boot Mode of 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/Pei or ArmPlatformPkg/Pei/PlatformPeim
111 ArmPlatformInitialize (
115 return RETURN_SUCCESS
;
119 Initialize the system (or sometimes called permanent) memory
121 This memory is generally represented by the DRAM.
125 ArmPlatformInitializeSystemMemory (
132 PrePeiCoreGetMpCoreInfo (
133 OUT UINTN
*CoreCount
,
134 OUT ARM_CORE_INFO
**ArmCoreTable
137 // Only support one cluster
138 *CoreCount
= sizeof(mJunoInfoTable
) / sizeof(ARM_CORE_INFO
);
139 *ArmCoreTable
= mJunoInfoTable
;
143 ARM_MP_CORE_INFO_PPI mMpCoreInfoPpi
= { PrePeiCoreGetMpCoreInfo
};
145 EFI_PEI_PPI_DESCRIPTOR gPlatformPpiTable
[] = {
147 EFI_PEI_PPI_DESCRIPTOR_PPI
,
148 &gArmMpCoreInfoPpiGuid
,
154 ArmPlatformGetPlatformPpiList (
155 OUT UINTN
*PpiListSize
,
156 OUT EFI_PEI_PPI_DESCRIPTOR
**PpiList
159 *PpiListSize
= sizeof(gPlatformPpiTable
);
160 *PpiList
= gPlatformPpiTable
;