diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-12-07 18:51:27 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-12-07 18:51:27 +0000 |
commit | 540d0528b4e6ce271320bf2b4ee2462a3950b970 (patch) | |
tree | d74006f4b364937beb449fb1119fc77a764f2a7e /sys/arch/sgi | |
parent | 2b409ca024cf9f7a5fcbc9918777409b10403ba1 (diff) |
When trying to return to ARCBios on a 32 bit ARCBios machine (such as the O2),
disable interrupts and unconditionnaly use proc0 u area as the stack, so that
once ARCBios loses the upper 32 bits of the stack pointer, accessing the
stack does not fault (proc0 u area is allocated in CKSEG0 for this reason).
Diffstat (limited to 'sys/arch/sgi')
-rw-r--r-- | sys/arch/sgi/sgi/machdep.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/arch/sgi/sgi/machdep.c b/sys/arch/sgi/sgi/machdep.c index 769e6804d61..7ec8a85cace 100644 --- a/sys/arch/sgi/sgi/machdep.c +++ b/sys/arch/sgi/sgi/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.91 2009/12/03 06:02:38 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.92 2009/12/07 18:51:26 miod Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -897,6 +897,15 @@ haltsys: void arcbios_halt(int howto) { + uint32_t sr; + + sr = disableintr(); + +#if 0 + /* restore ARCBios page size... */ + tlb_set_page_mask(PG_SIZE_4K); +#endif + if (howto & RB_HALT) { if (howto & RB_POWERDOWN) Bios_PowerDown(); @@ -904,6 +913,8 @@ arcbios_halt(int howto) Bios_EnterInteractiveMode(); } else Bios_Reboot(); + + setsr(sr); } u_long dumpmag = 0x8fca0101; /* Magic number for savecore. */ |