summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg/Sec
diff options
context:
space:
mode:
Diffstat (limited to 'ArmPlatformPkg/Sec')
-rw-r--r--ArmPlatformPkg/Sec/Helper.S13
-rw-r--r--ArmPlatformPkg/Sec/Helper.asm14
-rw-r--r--ArmPlatformPkg/Sec/Sec.c12
-rw-r--r--ArmPlatformPkg/Sec/Sec.inf3
4 files changed, 10 insertions, 32 deletions
diff --git a/ArmPlatformPkg/Sec/Helper.S b/ArmPlatformPkg/Sec/Helper.S
index 61491b5655..50cd733f97 100644
--- a/ArmPlatformPkg/Sec/Helper.S
+++ b/ArmPlatformPkg/Sec/Helper.S
@@ -1,5 +1,5 @@
#========================================================================================
-# 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,22 +15,11 @@
.text
.align 3
-GCC_ASM_EXPORT(monitor_vector_table)
GCC_ASM_EXPORT(return_from_exception)
GCC_ASM_EXPORT(enter_monitor_mode)
GCC_ASM_EXPORT(copy_cpsr_into_spsr)
GCC_ASM_EXPORT(set_non_secure_mode)
-ASM_PFX(monitor_vector_table):
- ldr pc, dead
- ldr pc, dead
- ldr pc, dead
- ldr pc, dead
- ldr pc, dead
- ldr pc, dead
- ldr pc, dead
- ldr pc, dead
-
# arg0: Secure Monitor mode stack
ASM_PFX(enter_monitor_mode):
mov r2, lr @ Save current lr
diff --git a/ArmPlatformPkg/Sec/Helper.asm b/ArmPlatformPkg/Sec/Helper.asm
index cd9603c7a0..1ba7b434e7 100644
--- a/ArmPlatformPkg/Sec/Helper.asm
+++ b/ArmPlatformPkg/Sec/Helper.asm
@@ -1,5 +1,5 @@
//
-// 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
@@ -11,7 +11,6 @@
//
//
- EXPORT monitor_vector_table
EXPORT return_from_exception
EXPORT enter_monitor_mode
EXPORT copy_cpsr_into_spsr
@@ -19,17 +18,6 @@
AREA Helper, CODE, READONLY
- ALIGN 32
-monitor_vector_table
- ldr pc, dead
- ldr pc, dead
- ldr pc, dead
- ldr pc, dead
- ldr pc, dead
- ldr pc, dead
- ldr pc, dead
- ldr pc, dead
-
// arg0: Secure Monitor mode stack
enter_monitor_mode
mov r2, lr // Save current lr
diff --git a/ArmPlatformPkg/Sec/Sec.c b/ArmPlatformPkg/Sec/Sec.c
index a32cd3857e..59012a1266 100644
--- a/ArmPlatformPkg/Sec/Sec.c
+++ b/ArmPlatformPkg/Sec/Sec.c
@@ -1,7 +1,7 @@
/** @file
* Main file supporting the SEC Phase on ARM Platforms
*
-* 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
@@ -13,6 +13,7 @@
*
**/
+#include <Library/ArmTrustedMonitorLib.h>
#include <Library/DebugAgentLib.h>
#include <Library/PrintLib.h>
#include <Library/BaseMemoryLib.h>
@@ -24,8 +25,6 @@
#define SerialPrint(txt) SerialPortWrite ((UINT8*)txt, AsciiStrLen(txt)+1);
-extern VOID *monitor_vector_table;
-
VOID
CEntryPoint (
IN UINTN MpId
@@ -114,10 +113,11 @@ CEntryPoint (
// Enter Monitor Mode
enter_monitor_mode ((VOID*)(PcdGet32(PcdCPUCoresSecMonStackBase) + (PcdGet32(PcdCPUCoreSecMonStackSize) * (GET_CORE_POS(MpId) + 1))));
- //Write the monitor mode vector table address
- ArmWriteVMBar((UINT32) &monitor_vector_table);
+ //-------------------- Monitor Mode ---------------------
+
+ // Set up Monitor World (Vector Table, etc)
+ ArmSecureMonitorWorldInitialize ();
- //-------------------- Monitor Mode ---------------------
// Setup the Trustzone Chipsets
if (IS_PRIMARY_CORE(MpId)) {
ArmPlatformTrustzoneInit ();
diff --git a/ArmPlatformPkg/Sec/Sec.inf b/ArmPlatformPkg/Sec/Sec.inf
index f80db4a630..7a7a61251e 100644
--- a/ArmPlatformPkg/Sec/Sec.inf
+++ b/ArmPlatformPkg/Sec/Sec.inf
@@ -1,7 +1,7 @@
#/** @file
# SEC - Reset vector code that jumps to C and loads DXE core
#
-# 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
@@ -39,6 +39,7 @@
ArmCpuLib
ArmLib
ArmPlatformLib
+ ArmTrustedMonitorLib
BaseLib
DebugLib
DebugAgentLib