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 #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 Return the current Boot Mode
77 This function returns the boot reason on the platform
81 ArmPlatformGetBootMode (
85 return BOOT_WITH_FULL_CONFIGURATION
;
89 Initialize controllers that must setup in the normal world
91 This function is called by the ArmPlatformPkg/PrePi or ArmPlatformPkg/PlatformPei
96 ArmPlatformInitialize (
100 if (!ArmPlatformIsPrimaryCore (MpId
)) {
101 return RETURN_SUCCESS
;
106 return RETURN_SUCCESS
;
110 Initialize the system (or sometimes called permanent) memory
112 This memory is generally represented by the DRAM.
116 ArmPlatformInitializeSystemMemory (
124 PrePeiCoreGetMpCoreInfo (
125 OUT UINTN
*CoreCount
,
126 OUT ARM_CORE_INFO
**ArmCoreTable
130 *CoreCount
= sizeof(mArmPlatformNullMpCoreInfoTable
) / sizeof(ARM_CORE_INFO
);
131 *ArmCoreTable
= mArmPlatformNullMpCoreInfoTable
;
134 return EFI_UNSUPPORTED
;
138 ARM_MP_CORE_INFO_PPI mMpCoreInfoPpi
= { PrePeiCoreGetMpCoreInfo
};
140 EFI_PEI_PPI_DESCRIPTOR gPlatformPpiTable
[] = {
142 EFI_PEI_PPI_DESCRIPTOR_PPI
,
143 &gArmMpCoreInfoPpiGuid
,
149 ArmPlatformGetPlatformPpiList (
150 OUT UINTN
*PpiListSize
,
151 OUT EFI_PEI_PPI_DESCRIPTOR
**PpiList
155 *PpiListSize
= sizeof(gPlatformPpiTable
);
156 *PpiList
= gPlatformPpiTable
;