summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg/PrePeiCore
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2013-03-12 00:54:02 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2013-03-12 00:54:02 +0000
commita9d7090fc217dad23330ddc54cad4d4987cab65a (patch)
tree8d20f2d187e0b2322815ef0fafd6149490092239 /ArmPlatformPkg/PrePeiCore
parentc63626b7d31cb8c6ffee5870de742f4aa859fee8 (diff)
downloadedk2-a9d7090fc217dad23330ddc54cad4d4987cab65a.tar.gz
edk2-a9d7090fc217dad23330ddc54cad4d4987cab65a.tar.bz2
edk2-a9d7090fc217dad23330ddc54cad4d4987cab65a.zip
ArmPlatformPkg: Moved ARMv7 specific files to a 'Arm' subdirectory
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14182 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/PrePeiCore')
-rw-r--r--ArmPlatformPkg/PrePeiCore/Arm/ArchPrePeiCore.c62
-rw-r--r--ArmPlatformPkg/PrePeiCore/Arm/Exception.S (renamed from ArmPlatformPkg/PrePeiCore/Exception.S)0
-rw-r--r--ArmPlatformPkg/PrePeiCore/Arm/Exception.asm (renamed from ArmPlatformPkg/PrePeiCore/Exception.asm)0
-rw-r--r--ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.S (renamed from ArmPlatformPkg/PrePeiCore/PrePeiCoreEntryPoint.S)0
-rw-r--r--ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.asm (renamed from ArmPlatformPkg/PrePeiCore/PrePeiCoreEntryPoint.asm)0
-rw-r--r--ArmPlatformPkg/PrePeiCore/Arm/SwitchStack.S (renamed from ArmPlatformPkg/PrePeiCore/SwitchStack.S)0
-rw-r--r--ArmPlatformPkg/PrePeiCore/Arm/SwitchStack.asm (renamed from ArmPlatformPkg/PrePeiCore/SwitchStack.asm)0
-rw-r--r--ArmPlatformPkg/PrePeiCore/PrePeiCore.c55
-rw-r--r--ArmPlatformPkg/PrePeiCore/PrePeiCore.h6
-rw-r--r--ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf21
-rw-r--r--ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf17
11 files changed, 96 insertions, 65 deletions
diff --git a/ArmPlatformPkg/PrePeiCore/Arm/ArchPrePeiCore.c b/ArmPlatformPkg/PrePeiCore/Arm/ArchPrePeiCore.c
new file mode 100644
index 0000000000..b0594ae2cd
--- /dev/null
+++ b/ArmPlatformPkg/PrePeiCore/Arm/ArchPrePeiCore.c
@@ -0,0 +1,62 @@
+/** @file
+* Main file supporting the transition to PEI Core in Normal World for Versatile Express
+*
+* Copyright (c) 2012, ARM Limited. All rights reserved.
+*
+* This program and the accompanying materials
+* are licensed and made available under the terms and conditions of the BSD License
+* which accompanies this distribution. The full text of the license may be found at
+* http://opensource.org/licenses/bsd-license.php
+*
+* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+*
+**/
+
+#include <Library/PrintLib.h>
+#include <Library/SerialPortLib.h>
+
+#include "PrePeiCore.h"
+
+VOID
+PeiCommonExceptionEntry (
+ IN UINT32 Entry,
+ IN UINTN LR
+ )
+{
+ CHAR8 Buffer[100];
+ UINTN CharCount;
+
+ switch (Entry) {
+ case 0:
+ CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"Reset Exception at 0x%X\n\r",LR);
+ break;
+ case 1:
+ CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"Undefined Exception at 0x%X\n\r",LR);
+ break;
+ case 2:
+ CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"SWI Exception at 0x%X\n\r",LR);
+ break;
+ case 3:
+ CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"PrefetchAbort Exception at 0x%X\n\r",LR);
+ break;
+ case 4:
+ CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"DataAbort Exception at 0x%X\n\r",LR);
+ break;
+ case 5:
+ CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"Reserved Exception at 0x%X\n\r",LR);
+ break;
+ case 6:
+ CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"IRQ Exception at 0x%X\n\r",LR);
+ break;
+ case 7:
+ CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"FIQ Exception at 0x%X\n\r",LR);
+ break;
+ default:
+ CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"Unknown Exception at 0x%X\n\r",LR);
+ break;
+ }
+ SerialPortWrite ((UINT8 *) Buffer, CharCount);
+ while(1);
+}
+
diff --git a/ArmPlatformPkg/PrePeiCore/Exception.S b/ArmPlatformPkg/PrePeiCore/Arm/Exception.S
index abce21d0a5..abce21d0a5 100644
--- a/ArmPlatformPkg/PrePeiCore/Exception.S
+++ b/ArmPlatformPkg/PrePeiCore/Arm/Exception.S
diff --git a/ArmPlatformPkg/PrePeiCore/Exception.asm b/ArmPlatformPkg/PrePeiCore/Arm/Exception.asm
index 55bd4af1dd..55bd4af1dd 100644
--- a/ArmPlatformPkg/PrePeiCore/Exception.asm
+++ b/ArmPlatformPkg/PrePeiCore/Arm/Exception.asm
diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCoreEntryPoint.S b/ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.S
index f902a251c2..f902a251c2 100644
--- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreEntryPoint.S
+++ b/ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.S
diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCoreEntryPoint.asm b/ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.asm
index a3dd1fb2c6..a3dd1fb2c6 100644
--- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreEntryPoint.asm
+++ b/ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.asm
diff --git a/ArmPlatformPkg/PrePeiCore/SwitchStack.S b/ArmPlatformPkg/PrePeiCore/Arm/SwitchStack.S
index 2543f58414..2543f58414 100644
--- a/ArmPlatformPkg/PrePeiCore/SwitchStack.S
+++ b/ArmPlatformPkg/PrePeiCore/Arm/SwitchStack.S
diff --git a/ArmPlatformPkg/PrePeiCore/SwitchStack.asm b/ArmPlatformPkg/PrePeiCore/Arm/SwitchStack.asm
index 10da81d6ac..10da81d6ac 100644
--- a/ArmPlatformPkg/PrePeiCore/SwitchStack.asm
+++ b/ArmPlatformPkg/PrePeiCore/Arm/SwitchStack.asm
diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCore.c b/ArmPlatformPkg/PrePeiCore/PrePeiCore.c
index f1300e0e8c..fdd8697edf 100644
--- a/ArmPlatformPkg/PrePeiCore/PrePeiCore.c
+++ b/ArmPlatformPkg/PrePeiCore/PrePeiCore.c
@@ -1,7 +1,7 @@
/** @file
* Main file supporting the transition to PEI Core in Normal World for Versatile Express
*
-* Copyright (c) 2011, ARM Limited. All rights reserved.
+* Copyright (c) 2011-2012, ARM Limited. All rights reserved.
*
* This program and the accompanying materials
* are licensed and made available under the terms and conditions of the BSD License
@@ -15,9 +15,7 @@
#include <Library/BaseLib.h>
#include <Library/DebugAgentLib.h>
-#include <Library/PrintLib.h>
#include <Library/ArmLib.h>
-#include <Library/SerialPortLib.h>
#include <Ppi/ArmGlobalVariable.h>
@@ -74,10 +72,10 @@ CEntryPoint (
)
{
//Clean Data cache
- ArmCleanInvalidateDataCache();
+ ArmCleanInvalidateDataCache ();
//Invalidate instruction cache
- ArmInvalidateInstructionCache();
+ ArmInvalidateInstructionCache ();
// Enable Instruction & Data caches
ArmEnableDataCache ();
@@ -88,9 +86,9 @@ CEntryPoint (
// as Non-secure interface is already enabled in Secure world.
//
- // Write VBAR - The Vector table must be 32-byte aligned
- ASSERT(((UINT32)PeiVectorTable & ((1 << 5)-1)) == 0);
- ArmWriteVBar((UINT32)PeiVectorTable);
+ // Write VBAR - The Exception Vector table must be aligned to its requirement
+ ASSERT (((UINTN)PeiVectorTable & ARM_VECTOR_TABLE_ALIGNMENT) == 0);
+ ArmWriteVBar ((UINTN)PeiVectorTable);
//Note: The MMU will be enabled by MemoryPeim. Only the primary core will have the MMU on.
@@ -162,44 +160,3 @@ PrePeiCoreGetGlobalVariableMemory (
return EFI_SUCCESS;
}
-VOID
-PeiCommonExceptionEntry (
- IN UINT32 Entry,
- IN UINT32 LR
- )
-{
- CHAR8 Buffer[100];
- UINTN CharCount;
-
- switch (Entry) {
- case 0:
- CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"Reset Exception at 0x%X\n\r",LR);
- break;
- case 1:
- CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"Undefined Exception at 0x%X\n\r",LR);
- break;
- case 2:
- CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"SWI Exception at 0x%X\n\r",LR);
- break;
- case 3:
- CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"PrefetchAbort Exception at 0x%X\n\r",LR);
- break;
- case 4:
- CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"DataAbort Exception at 0x%X\n\r",LR);
- break;
- case 5:
- CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"Reserved Exception at 0x%X\n\r",LR);
- break;
- case 6:
- CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"IRQ Exception at 0x%X\n\r",LR);
- break;
- case 7:
- CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"FIQ Exception at 0x%X\n\r",LR);
- break;
- default:
- CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"Unknown Exception at 0x%X\n\r",LR);
- break;
- }
- SerialPortWrite ((UINT8 *) Buffer, CharCount);
- while(1);
-}
diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCore.h b/ArmPlatformPkg/PrePeiCore/PrePeiCore.h
index 9f7c9c3339..20684e2f90 100644
--- a/ArmPlatformPkg/PrePeiCore/PrePeiCore.h
+++ b/ArmPlatformPkg/PrePeiCore/PrePeiCore.h
@@ -74,4 +74,10 @@ SecondaryMain (
IN UINTN MpId
);
+VOID
+PeiCommonExceptionEntry (
+ IN UINT32 Entry,
+ IN UINTN LR
+ );
+
#endif
diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf b/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf
index efdc4b7544..91f9b3a784 100644
--- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf
+++ b/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf
@@ -20,16 +20,19 @@
MODULE_TYPE = SEC
VERSION_STRING = 1.0
-[Sources.ARM]
- PrePeiCoreEntryPoint.asm | RVCT
- PrePeiCoreEntryPoint.S | GCC
- PrePeiCore.c
+[Sources.common]
MainMPCore.c
- SwitchStack.asm | RVCT
- SwitchStack.S | GCC
- Exception.asm | RVCT
- Exception.S | GCC
-
+ PrePeiCore.c
+
+[Sources.ARM]
+ Arm/ArchPrePeiCore.c
+ Arm/PrePeiCoreEntryPoint.asm | RVCT
+ Arm/PrePeiCoreEntryPoint.S | GCC
+ Arm/SwitchStack.asm | RVCT
+ Arm/SwitchStack.S | GCC
+ Arm/Exception.asm | RVCT
+ Arm/Exception.S | GCC
+
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf b/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
index 90582d8922..bf590dbac0 100644
--- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
+++ b/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
@@ -20,15 +20,18 @@
MODULE_TYPE = SEC
VERSION_STRING = 1.0
-[Sources.ARM]
- PrePeiCoreEntryPoint.asm | RVCT
- PrePeiCoreEntryPoint.S | GCC
+[Sources.common]
PrePeiCore.c
MainUniCore.c
- SwitchStack.asm | RVCT
- SwitchStack.S | GCC
- Exception.asm | RVCT
- Exception.S | GCC
+
+[Sources.ARM]
+ Arm/ArchPrePeiCore.c
+ Arm/PrePeiCoreEntryPoint.asm | RVCT
+ Arm/PrePeiCoreEntryPoint.S | GCC
+ Arm/SwitchStack.asm | RVCT
+ Arm/SwitchStack.S | GCC
+ Arm/Exception.asm | RVCT
+ Arm/Exception.S | GCC
[Packages]
MdePkg/MdePkg.dec