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:
parent
180ba71605
commit
91b9d75edc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=89048
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user