diff options
author | Robin Getz <robin.getz@analog.com> | 2007-10-29 06:23:28 -0400 |
---|---|---|
committer | Bryan Wu <bryan.wu@analog.com> | 2007-10-29 06:23:28 -0400 |
commit | 9f336a53266f43ae1002f4aaad5373944589c828 (patch) | |
tree | 8de3512c947eb68d9b0bb2ed7de8cd6be37aecb1 /arch/blackfin/kernel/fixed_code.S | |
parent | 15b3ad6a4b348ea53ea1a45f9b166ac31c4b3f39 (diff) |
Blackfin arch: ensure that speculative loads of bad pointers don't cause us to do bad things.
Fix/change formatting of a few more things.
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'arch/blackfin/kernel/fixed_code.S')
-rw-r--r-- | arch/blackfin/kernel/fixed_code.S | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/blackfin/kernel/fixed_code.S b/arch/blackfin/kernel/fixed_code.S index d8b1ebc70996..90262691b11a 100644 --- a/arch/blackfin/kernel/fixed_code.S +++ b/arch/blackfin/kernel/fixed_code.S | |||
@@ -129,4 +129,18 @@ ENTRY(_atomic_xor32) | |||
129 | rts; | 129 | rts; |
130 | ENDPROC (_atomic_ior32) | 130 | ENDPROC (_atomic_ior32) |
131 | 131 | ||
132 | .align 16 | ||
133 | /* | ||
134 | * safe_user_instruction | ||
135 | * Four NOPS are enough to allow the pipeline to speculativily load | ||
136 | * execute anything it wants. After that, things have gone bad, and | ||
137 | * we are stuck - so panic. Since we might be in user space, we can't | ||
138 | * call panic, so just cause a unhandled exception, this should cause | ||
139 | * a dump of the trace buffer so we can tell were we are, and a reboot | ||
140 | */ | ||
141 | ENTRY(_safe_user_instruction) | ||
142 | NOP; NOP; NOP; NOP; | ||
143 | EXCPT 0x4; | ||
144 | ENDPROC(_safe_user_instruction) | ||
145 | |||
132 | ENTRY(_fixed_code_end) | 146 | ENTRY(_fixed_code_end) |