// Not used when PrePi in run in XIP mode\r
UINTN mGlobalVariableBase = 0;\r
\r
-VOID\r
-PrePiCommonExceptionEntry (\r
- IN UINT32 Entry,\r
- IN UINT32 LR\r
- );\r
-\r
EFI_STATUS\r
EFIAPI\r
ExtractGuidedSectionLibConstructor (\r
{\r
UINT64 StartTimeStamp;\r
\r
+ ASSERT(!ArmIsMpCore() || (PcdGet32 (PcdCoreCount) > 1));\r
+\r
// Initialize the platform specific controllers\r
ArmPlatformInitialize (MpId);\r
\r
}\r
}\r
\r
- // Write VBAR - The Vector table must be 32-byte aligned\r
- ASSERT (((UINT32)PrePiVectorTable & ((1 << 5)-1)) == 0);\r
- ArmWriteVBar ((UINT32)PrePiVectorTable);\r
-\r
// If not primary Jump to Secondary Main\r
if (IS_PRIMARY_CORE(MpId)) {\r
// Goto primary Main.\r
ASSERT (FALSE);\r
}\r
\r
-VOID\r
-PrePiCommonExceptionEntry (\r
- IN UINT32 Entry,\r
- IN UINT32 LR\r
- )\r
-{\r
- CHAR8 Buffer[100];\r
- UINTN CharCount;\r
-\r
- switch (Entry) {\r
- case 0:\r
- CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"Reset Exception at 0x%X\n\r",LR);\r
- break;\r
- case 1:\r
- CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"Undefined Exception at 0x%X\n\r",LR);\r
- break;\r
- case 2:\r
- CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"SWI Exception at 0x%X\n\r",LR);\r
- break;\r
- case 3:\r
- CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"PrefetchAbort Exception at 0x%X\n\r",LR);\r
- break;\r
- case 4:\r
- CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"DataAbort Exception at 0x%X\n\r",LR);\r
- break;\r
- case 5:\r
- CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"Reserved Exception at 0x%X\n\r",LR);\r
- break;\r
- case 6:\r
- CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"IRQ Exception at 0x%X\n\r",LR);\r
- break;\r
- case 7:\r
- CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"FIQ Exception at 0x%X\n\r",LR);\r
- break;\r
- default:\r
- CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"Unknown Exception at 0x%X\n\r",LR);\r
- break;\r
- }\r
- SerialPortWrite ((UINT8 *) Buffer, CharCount);\r
- while(1);\r
-}\r