Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/arm32 Make sure SPSR[23:8] is set to a known va...
details: https://anonhg.NetBSD.org/src/rev/5da098c43fbb
branches: trunk
changeset: 781756:5da098c43fbb
user: matt <matt%NetBSD.org@localhost>
date: Thu Sep 27 21:28:13 2012 +0000
description:
Make sure SPSR[23:8] is set to a known valid value (taken from CPSR).
diffstat:
sys/arch/arm/arm32/locore.S | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r df88e7e4491c -r 5da098c43fbb sys/arch/arm/arm32/locore.S
--- a/sys/arch/arm/arm32/locore.S Thu Sep 27 20:43:15 2012 +0000
+++ b/sys/arch/arm/arm32/locore.S Thu Sep 27 21:28:13 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.S,v 1.28 2012/09/03 22:49:54 matt Exp $ */
+/* $NetBSD: locore.S,v 1.29 2012/09/27 21:28:13 matt Exp $ */
/*
* Copyright (C) 1994-1997 Mark Brinicombe
@@ -42,7 +42,7 @@
/* What size should this really be ? It is only used by init_arm() */
#define INIT_ARM_STACK_SIZE 2048
- RCSID("$NetBSD: locore.S,v 1.28 2012/09/03 22:49:54 matt Exp $")
+ RCSID("$NetBSD: locore.S,v 1.29 2012/09/27 21:28:13 matt Exp $")
/*
* This is for kvm_mkdb, and should be the address of the beginning
@@ -55,6 +55,9 @@
ENTRY_NP(kernel_text)
ASENTRY_NP(start)
+ mrs r1, cpsr /* fetch CPSR value */
+ msr spsr_sx, r1 /* set SPSR[23:8] to known value */
+
adr r1, .Lstart
ldmia r1, {r1, r2, r8, sp} /* Set initial stack and */
sub r2, r2, r1 /* get zero init data and cpu_info_store */
Home |
Main Index |
Thread Index |
Old Index