summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg/PrePi
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2013-01-25 12:05:17 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2013-01-25 12:05:17 +0000
commit063ad84e20649d024ea9322b328d4ed2079903be (patch)
tree05e5073c55f274dc6714dddd4feb366b46261b31 /ArmPlatformPkg/PrePi
parentc3adcc9755d9e73a63786e741f076d4044f3e86b (diff)
downloadedk2-platforms-063ad84e20649d024ea9322b328d4ed2079903be.tar.xz
ArmPlatformPkg/PrePi: Removed magic values
Introduced CPSR (Coprocessor Status Register) definitions Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14097 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/PrePi')
-rwxr-xr-xArmPlatformPkg/PrePi/ModuleEntryPoint.S7
-rw-r--r--ArmPlatformPkg/PrePi/ModuleEntryPoint.asm7
2 files changed, 8 insertions, 6 deletions
diff --git a/ArmPlatformPkg/PrePi/ModuleEntryPoint.S b/ArmPlatformPkg/PrePi/ModuleEntryPoint.S
index 9215198d93..c0c20a9206 100755
--- a/ArmPlatformPkg/PrePi/ModuleEntryPoint.S
+++ b/ArmPlatformPkg/PrePi/ModuleEntryPoint.S
@@ -1,5 +1,5 @@
//
-// Copyright (c) 2011-2012, ARM Limited. All rights reserved.
+// Copyright (c) 2011-2013, 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
@@ -16,6 +16,8 @@
#include <Library/PcdLib.h>
#include <AutoGen.h>
+#include <Chipset/ArmV7.h>
+
.text
.align 3
@@ -35,8 +37,7 @@ ASM_PFX(_ModuleEntryPoint):
_SetSVCMode:
// Enter SVC mode, Disable FIQ and IRQ
- //TODO: remove hardcoded values
- mov r1, #0x13|0x80|0x40
+ mov r1, #(CPSR_MODE_SVC | CPSR_IRQ | CPSR_FIQ)
msr CPSR_c, r1
// Check if we can install the stack at the top of the System Memory or if we need
diff --git a/ArmPlatformPkg/PrePi/ModuleEntryPoint.asm b/ArmPlatformPkg/PrePi/ModuleEntryPoint.asm
index 0dea1c3271..5efdb532af 100644
--- a/ArmPlatformPkg/PrePi/ModuleEntryPoint.asm
+++ b/ArmPlatformPkg/PrePi/ModuleEntryPoint.asm
@@ -1,5 +1,5 @@
//
-// Copyright (c) 2011-2012, ARM Limited. All rights reserved.
+// Copyright (c) 2011-2013, 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
@@ -16,6 +16,8 @@
#include <Library/PcdLib.h>
#include <AutoGen.h>
+#include <Chipset/ArmV7.h>
+
INCLUDE AsmMacroIoLib.inc
IMPORT CEntryPoint
@@ -37,8 +39,7 @@ _ModuleEntryPoint
_SetSVCMode
// Enter SVC mode, Disable FIQ and IRQ
- //TODO: remove hardcoded values
- mov r1, #0x13 :OR: 0x80 :OR: 0x40
+ mov r1, #(CPSR_MODE_SVC :OR: CPSR_IRQ :OR: CPSR_FIQ)
msr CPSR_c, r1
// Check if we can install the stack at the top of the System Memory or if we need