mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-06 13:24:23 +02:00
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:
parent
f92b93c9a3
commit
009f583fa0
@ -15,14 +15,10 @@
|
|||||||
#include <Base.h>
|
#include <Base.h>
|
||||||
#include <AutoGen.h>
|
#include <AutoGen.h>
|
||||||
|
|
||||||
#start of the code section
|
|
||||||
.text
|
.text
|
||||||
.align 5
|
.align 5
|
||||||
|
|
||||||
# IMPORT
|
|
||||||
GCC_ASM_IMPORT(SecCommonExceptionEntry)
|
GCC_ASM_IMPORT(SecCommonExceptionEntry)
|
||||||
|
|
||||||
# EXPORT
|
|
||||||
GCC_ASM_EXPORT(SecVectorTable)
|
GCC_ASM_EXPORT(SecVectorTable)
|
||||||
|
|
||||||
//============================================================
|
//============================================================
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/** @file
|
/** @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.
|
* Copyright (c) 2011, ARM Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -13,55 +13,21 @@
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include <Library/DebugLib.h>
|
|
||||||
#include <Library/DebugAgentLib.h>
|
#include <Library/DebugAgentLib.h>
|
||||||
#include <Library/PcdLib.h>
|
#include <Library/PcdLib.h>
|
||||||
#include <Library/PrintLib.h>
|
#include <Library/PrintLib.h>
|
||||||
#include <Library/BaseLib.h>
|
|
||||||
#include <Library/BaseMemoryLib.h>
|
#include <Library/BaseMemoryLib.h>
|
||||||
#include <Library/ArmLib.h>
|
#include <Library/ArmLib.h>
|
||||||
#include <Library/SerialPortLib.h>
|
#include <Library/SerialPortLib.h>
|
||||||
#include <Library/ArmPlatformLib.h>
|
#include <Library/ArmPlatformLib.h>
|
||||||
|
|
||||||
#include <Chipset/ArmV7.h>
|
|
||||||
#include <Library/ArmGicLib.h>
|
#include <Library/ArmGicLib.h>
|
||||||
|
|
||||||
|
#include "SecInternal.h"
|
||||||
|
|
||||||
#define SerialPrint(txt) SerialPortWrite ((UINT8*)txt, AsciiStrLen(txt)+1);
|
#define SerialPrint(txt) SerialPortWrite ((UINT8*)txt, AsciiStrLen(txt)+1);
|
||||||
|
|
||||||
extern VOID *monitor_vector_table;
|
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
|
VOID
|
||||||
CEntryPoint (
|
CEntryPoint (
|
||||||
IN UINTN MpId
|
IN UINTN MpId
|
||||||
@ -134,6 +100,10 @@ CEntryPoint (
|
|||||||
|
|
||||||
// Test if Trustzone is supported on this platform
|
// Test if Trustzone is supported on this platform
|
||||||
if (ArmPlatformTrustzoneSupported ()) {
|
if (ArmPlatformTrustzoneSupported ()) {
|
||||||
|
// Ensure the Monitor Stack Base & Size have been set
|
||||||
|
ASSERT(PcdGet32(PcdCPUCoresSecMonStackBase) != 0);
|
||||||
|
ASSERT(PcdGet32(PcdCPUCoreSecMonStackSize) != 0);
|
||||||
|
|
||||||
if (FixedPcdGet32(PcdMPCoreSupport)) {
|
if (FixedPcdGet32(PcdMPCoreSupport)) {
|
||||||
// Setup SMP in Non Secure world
|
// Setup SMP in Non Secure world
|
||||||
ArmSetupSmpNonSecure (GET_CORE_ID(MpId));
|
ArmSetupSmpNonSecure (GET_CORE_ID(MpId));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user