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
This commit is contained in:
oliviermartin 2013-03-12 00:54:02 +00:00
parent c63626b7d3
commit a9d7090fc2
29 changed files with 123 additions and 83 deletions

View File

@ -33,8 +33,8 @@
ArmPlatformLibNullSec.c ArmPlatformLibNullSec.c
[Sources.ARM] [Sources.ARM]
ArmPlatformLibNullBoot.asm | RVCT Arm/ArmPlatformLibNullBoot.asm | RVCT
ArmPlatformLibNullBoot.S | GCC Arm/ArmPlatformLibNullBoot.S | GCC
[FixedPcd] [FixedPcd]
gArmTokenSpaceGuid.PcdFvBaseAddress gArmTokenSpaceGuid.PcdFvBaseAddress

View File

@ -26,9 +26,9 @@
ArmPkg/ArmPkg.dec ArmPkg/ArmPkg.dec
ArmPlatformPkg/ArmPlatformPkg.dec ArmPlatformPkg/ArmPlatformPkg.dec
[Sources.common] [Sources.ARM]
ArmPlatformStackLib.asm | RVCT Arm/ArmPlatformStackLib.asm | RVCT
ArmPlatformStackLib.S | GCC Arm/ArmPlatformStackLib.S | GCC
[FixedPcd] [FixedPcd]
gArmPlatformTokenSpaceGuid.PcdCoreCount gArmPlatformTokenSpaceGuid.PcdCoreCount

View File

@ -30,8 +30,9 @@ ArmSecureMonitorWorldInitialize (
) )
{ {
// Ensure the Monitor Table is 32bit aligned // Ensure the Monitor Table is 32bit aligned
ASSERT (IS_ALIGNED(MonitorVectorTable, BIT5)); ASSERT (((UINTN)&MonitorVectorTable & ARM_VECTOR_TABLE_ALIGNMENT) == 0);
// Write the Monitor Mode Vector Table Address // Write the Monitor Mode Vector Table Address
ArmWriteMVBar ((UINTN) &MonitorVectorTable); ArmWriteMVBar ((UINTN) &MonitorVectorTable);
} }

View File

@ -29,9 +29,11 @@
[Sources.common] [Sources.common]
EblCmdLib.c EblCmdLib.c
EblCmdMmu.c
EblCmdFdt.c EblCmdFdt.c
[Sources.ARM]
Arm/EblCmdMmu.c
[Packages] [Packages]
MdePkg/MdePkg.dec MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec MdeModulePkg/MdeModulePkg.dec

View File

@ -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);
}

View File

@ -1,7 +1,7 @@
/** @file /** @file
* Main file supporting the transition to PEI Core in Normal World for Versatile Express * 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 * This program and the accompanying materials
* are licensed and made available under the terms and conditions of the BSD License * are licensed and made available under the terms and conditions of the BSD License
@ -15,9 +15,7 @@
#include <Library/BaseLib.h> #include <Library/BaseLib.h>
#include <Library/DebugAgentLib.h> #include <Library/DebugAgentLib.h>
#include <Library/PrintLib.h>
#include <Library/ArmLib.h> #include <Library/ArmLib.h>
#include <Library/SerialPortLib.h>
#include <Ppi/ArmGlobalVariable.h> #include <Ppi/ArmGlobalVariable.h>
@ -74,10 +72,10 @@ CEntryPoint (
) )
{ {
//Clean Data cache //Clean Data cache
ArmCleanInvalidateDataCache(); ArmCleanInvalidateDataCache ();
//Invalidate instruction cache //Invalidate instruction cache
ArmInvalidateInstructionCache(); ArmInvalidateInstructionCache ();
// Enable Instruction & Data caches // Enable Instruction & Data caches
ArmEnableDataCache (); ArmEnableDataCache ();
@ -88,9 +86,9 @@ CEntryPoint (
// as Non-secure interface is already enabled in Secure world. // as Non-secure interface is already enabled in Secure world.
// //
// Write VBAR - The Vector table must be 32-byte aligned // Write VBAR - The Exception Vector table must be aligned to its requirement
ASSERT(((UINT32)PeiVectorTable & ((1 << 5)-1)) == 0); ASSERT (((UINTN)PeiVectorTable & ARM_VECTOR_TABLE_ALIGNMENT) == 0);
ArmWriteVBar((UINT32)PeiVectorTable); ArmWriteVBar ((UINTN)PeiVectorTable);
//Note: The MMU will be enabled by MemoryPeim. Only the primary core will have the MMU on. //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; 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);
}

View File

@ -74,4 +74,10 @@ SecondaryMain (
IN UINTN MpId IN UINTN MpId
); );
VOID
PeiCommonExceptionEntry (
IN UINT32 Entry,
IN UINTN LR
);
#endif #endif

View File

@ -20,15 +20,18 @@
MODULE_TYPE = SEC MODULE_TYPE = SEC
VERSION_STRING = 1.0 VERSION_STRING = 1.0
[Sources.ARM] [Sources.common]
PrePeiCoreEntryPoint.asm | RVCT
PrePeiCoreEntryPoint.S | GCC
PrePeiCore.c
MainMPCore.c MainMPCore.c
SwitchStack.asm | RVCT PrePeiCore.c
SwitchStack.S | GCC
Exception.asm | RVCT [Sources.ARM]
Exception.S | GCC 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] [Packages]
MdePkg/MdePkg.dec MdePkg/MdePkg.dec

View File

@ -20,15 +20,18 @@
MODULE_TYPE = SEC MODULE_TYPE = SEC
VERSION_STRING = 1.0 VERSION_STRING = 1.0
[Sources.ARM] [Sources.common]
PrePeiCoreEntryPoint.asm | RVCT
PrePeiCoreEntryPoint.S | GCC
PrePeiCore.c PrePeiCore.c
MainUniCore.c MainUniCore.c
SwitchStack.asm | RVCT
SwitchStack.S | GCC [Sources.ARM]
Exception.asm | RVCT Arm/ArchPrePeiCore.c
Exception.S | GCC 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] [Packages]
MdePkg/MdePkg.dec MdePkg/MdePkg.dec

View File

@ -19,12 +19,14 @@
MODULE_TYPE = SEC MODULE_TYPE = SEC
VERSION_STRING = 1.0 VERSION_STRING = 1.0
[Sources.ARM] [Sources]
PrePi.c PrePi.c
ModuleEntryPoint.S | GCC
ModuleEntryPoint.asm | RVCT
MainMPCore.c MainMPCore.c
[Sources.ARM]
Arm/ModuleEntryPoint.S | GCC
Arm/ModuleEntryPoint.asm | RVCT
[Packages] [Packages]
MdePkg/MdePkg.dec MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec MdeModulePkg/MdeModulePkg.dec

View File

@ -19,12 +19,14 @@
MODULE_TYPE = SEC MODULE_TYPE = SEC
VERSION_STRING = 1.0 VERSION_STRING = 1.0
[Sources.ARM] [Sources]
PrePi.c PrePi.c
ModuleEntryPoint.S | GCC
ModuleEntryPoint.asm | RVCT
MainUniCore.c MainUniCore.c
[Sources.ARM]
Arm/ModuleEntryPoint.S | GCC
Arm/ModuleEntryPoint.asm | RVCT
[Packages] [Packages]
MdePkg/MdePkg.dec MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec MdeModulePkg/MdeModulePkg.dec

View File

@ -20,12 +20,14 @@
MODULE_TYPE = SEC MODULE_TYPE = SEC
VERSION_STRING = 1.0 VERSION_STRING = 1.0
[Sources.ARM] [Sources]
Helper.asm | RVCT
Helper.S | GCC
Sec.c Sec.c
SecEntryPoint.S | GCC
SecEntryPoint.asm | RVCT [Sources.ARM]
Arm/Helper.asm | RVCT
Arm/Helper.S | GCC
Arm/SecEntryPoint.S | GCC
Arm/SecEntryPoint.asm | RVCT
[Packages] [Packages]
MdePkg/MdePkg.dec MdePkg/MdePkg.dec