ArmPlatformPkg/Sec: Clean and Move all declaration into 'SecInternal.h'

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12417 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
oliviermartin 2011-09-22 23:07:06 +00:00
parent f92b93c9a3
commit 009f583fa0
2 changed files with 17 additions and 51 deletions

View File

@ -15,14 +15,10 @@
#include <Base.h>
#include <AutoGen.h>
#start of the code section
.text
.align 5
# IMPORT
GCC_ASM_IMPORT(SecCommonExceptionEntry)
# EXPORT
GCC_ASM_EXPORT(SecVectorTable)
//============================================================

View File

@ -1,5 +1,5 @@
/** @file
* Main file supporting the SEC Phase for Versatile Express
* Main file supporting the SEC Phase on ARM Platforms
*
* Copyright (c) 2011, ARM Limited. All rights reserved.
*
@ -13,55 +13,21 @@
*
**/
#include <Library/DebugLib.h>
#include <Library/DebugAgentLib.h>
#include <Library/PcdLib.h>
#include <Library/PrintLib.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/ArmLib.h>
#include <Library/SerialPortLib.h>
#include <Library/ArmPlatformLib.h>
#include <Chipset/ArmV7.h>
#include <Library/ArmGicLib.h>
#include "SecInternal.h"
#define SerialPrint(txt) SerialPortWrite ((UINT8*)txt, AsciiStrLen(txt)+1);
extern VOID *monitor_vector_table;
VOID
ArmSetupGicNonSecure (
IN INTN GicDistributorBase,
IN INTN GicInterruptInterfaceBase
);
// Vector Table for Sec Phase
VOID
SecVectorTable (
VOID
);
VOID
NonSecureWaitForFirmware (
VOID
);
VOID
enter_monitor_mode(
IN VOID* Stack
);
VOID
return_from_exception (
IN UINTN NonSecureBase
);
VOID
copy_cpsr_into_spsr (
VOID
);
VOID
CEntryPoint (
IN UINTN MpId
@ -134,6 +100,10 @@ CEntryPoint (
// Test if Trustzone is supported on this platform
if (ArmPlatformTrustzoneSupported ()) {
// Ensure the Monitor Stack Base & Size have been set
ASSERT(PcdGet32(PcdCPUCoresSecMonStackBase) != 0);
ASSERT(PcdGet32(PcdCPUCoreSecMonStackSize) != 0);
if (FixedPcdGet32(PcdMPCoreSupport)) {
// Setup SMP in Non Secure world
ArmSetupSmpNonSecure (GET_CORE_ID(MpId));