TianoCore EDK2 master
Loading...
Searching...
No Matches
ArmPlatformLibNull.c
Go to the documentation of this file.
1
9#include <Library/ArmLib.h>
11
12#include <Ppi/ArmMpCoreInfo.h>
13
14ARM_CORE_INFO mArmPlatformNullMpCoreInfoTable[] = {
15 {
16 // Cluster 0, Core 0
17 0x0,
18
19 // MP Core MailBox Set/Get/Clear Addresses and Clear Value
23 (UINT64)0xFFFFFFFF
24 },
25 {
26 // Cluster 0, Core 1
27 0x1,
28
29 // MP Core MailBox Set/Get/Clear Addresses and Clear Value
33 (UINT64)0xFFFFFFFF
34 },
35 {
36 // Cluster 0, Core 2
37 0x2,
38
39 // MP Core MailBox Set/Get/Clear Addresses and Clear Value
43 (UINT64)0xFFFFFFFF
44 },
45 {
46 // Cluster 0, Core 3
47 0x3,
48
49 // MP Core MailBox Set/Get/Clear Addresses and Clear Value
53 (UINT64)0xFFFFFFFF
54 }
55};
56
57// This function should be better located into TimerLib implementation
58RETURN_STATUS
59EFIAPI
60TimerConstructor (
61 VOID
62 )
63{
64 return EFI_SUCCESS;
65}
66
75 VOID
76 )
77{
78 return BOOT_WITH_FULL_CONFIGURATION;
79}
80
88RETURN_STATUS
90 IN UINTN MpId
91 )
92{
93 // TODO: Implement me
94
95 return RETURN_SUCCESS;
96}
97
99PrePeiCoreGetMpCoreInfo (
100 OUT UINTN *CoreCount,
101 OUT ARM_CORE_INFO **ArmCoreTable
102 )
103{
104 if (ArmIsMpCore ()) {
105 *CoreCount = sizeof (mArmPlatformNullMpCoreInfoTable) / sizeof (ARM_CORE_INFO);
106 *ArmCoreTable = mArmPlatformNullMpCoreInfoTable;
107 return EFI_SUCCESS;
108 } else {
109 return EFI_UNSUPPORTED;
110 }
111}
112
113ARM_MP_CORE_INFO_PPI mMpCoreInfoPpi = { PrePeiCoreGetMpCoreInfo };
114
115EFI_PEI_PPI_DESCRIPTOR gPlatformPpiTable[] = {
116 {
117 EFI_PEI_PPI_DESCRIPTOR_PPI,
118 &gArmMpCoreInfoPpiGuid,
119 &mMpCoreInfoPpi
120 }
121};
122
123VOID
125 OUT UINTN *PpiListSize,
127 )
128{
129 if (ArmIsMpCore ()) {
130 *PpiListSize = sizeof (gPlatformPpiTable);
131 *PpiList = gPlatformPpiTable;
132 } else {
133 *PpiListSize = 0;
134 *PpiList = NULL;
135 }
136}
UINT64 UINTN
RETURN_STATUS ArmPlatformInitialize(IN UINTN MpId)
VOID ArmPlatformGetPlatformPpiList(OUT UINTN *PpiListSize, OUT EFI_PEI_PPI_DESCRIPTOR **PpiList)
EFI_BOOT_MODE ArmPlatformGetBootMode(VOID)
#define NULL
Definition: Base.h:319
#define RETURN_SUCCESS
Definition: Base.h:1066
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
UINT32 EFI_BOOT_MODE
Definition: PiBootMode.h:18
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:50
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
#define EFI_SUCCESS
Definition: UefiBaseType.h:112