1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Use the per-cpu panic stack in the case of a fault with a bad kernel

stack.
This commit is contained in:
Jake Burkholder 2002-01-08 05:20:40 +00:00
parent 180ba71605
commit 91b9d75edc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=89048
2 changed files with 10 additions and 4 deletions

View File

@ -135,6 +135,10 @@
#define KSTACK_SLOP 1024
/*
* Sanity check the kernel stack and bail out if its wrong.
* XXX: doesn't handle being on the panic stack.
*/
#define KSTACK_CHECK \
dec 16, ASP_REG ; \
stx %g1, [ASP_REG + 0] ; \
@ -206,8 +210,7 @@ ENTRY(tl1_kstack_fault)
wrpr %g0, 0, %otherwin
wrpr %g0, WSTATE_KERNEL, %wstate
SET(panic_stack + PANIC_STACK_PAGES * PAGE_SIZE, %g2, %g1)
sub %g1, SPOFF + CCFSZ, %sp
sub ASP_REG, SPOFF + CCFSZ, %sp
clr %fp
rdpr %pil, %o1

View File

@ -135,6 +135,10 @@
#define KSTACK_SLOP 1024
/*
* Sanity check the kernel stack and bail out if its wrong.
* XXX: doesn't handle being on the panic stack.
*/
#define KSTACK_CHECK \
dec 16, ASP_REG ; \
stx %g1, [ASP_REG + 0] ; \
@ -206,8 +210,7 @@ ENTRY(tl1_kstack_fault)
wrpr %g0, 0, %otherwin
wrpr %g0, WSTATE_KERNEL, %wstate
SET(panic_stack + PANIC_STACK_PAGES * PAGE_SIZE, %g2, %g1)
sub %g1, SPOFF + CCFSZ, %sp
sub ASP_REG, SPOFF + CCFSZ, %sp
clr %fp
rdpr %pil, %o1