summaryrefslogtreecommitdiff
path: root/sys/arch/sgi
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/sgi')
-rw-r--r--sys/arch/sgi/conf/GENERIC4
-rw-r--r--sys/arch/sgi/conf/RAMDISK4
-rw-r--r--sys/arch/sgi/include/autoconf.h14
-rw-r--r--sys/arch/sgi/include/dlfcn.h5
-rw-r--r--sys/arch/sgi/include/exec.h3
-rw-r--r--sys/arch/sgi/localbus/crimebus.h40
-rw-r--r--sys/arch/sgi/localbus/macebus.h12
-rw-r--r--sys/arch/sgi/sgi/locore.S13
-rw-r--r--sys/arch/sgi/sgi/machdep.c221
9 files changed, 149 insertions, 167 deletions
diff --git a/sys/arch/sgi/conf/GENERIC b/sys/arch/sgi/conf/GENERIC
index 61c5166da71..615907237b2 100644
--- a/sys/arch/sgi/conf/GENERIC
+++ b/sys/arch/sgi/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.2 2004/08/09 10:19:50 miod Exp $
+# $OpenBSD: GENERIC,v 1.3 2004/08/09 14:57:26 pefo Exp $
#
machine sgi mips64
@@ -13,7 +13,7 @@ makeoption ISALEV="-mips2 -D_MIPS_ISA=_MIPS_ISA_MIPS2"
makeoption ENDIAN="-EB"
# MD options
-option NATIVE_ELF # Systems uses ELF as native format
+option ARCBIOS # We use arcbios for FW comminication.
#option COMPAT_O32 # Mips o32 ABI compat
#option DB_ELFSIZE=32
diff --git a/sys/arch/sgi/conf/RAMDISK b/sys/arch/sgi/conf/RAMDISK
index 827b7784f86..bff460c258c 100644
--- a/sys/arch/sgi/conf/RAMDISK
+++ b/sys/arch/sgi/conf/RAMDISK
@@ -1,4 +1,4 @@
-# $OpenBSD: RAMDISK,v 1.2 2004/08/09 10:19:50 miod Exp $
+# $OpenBSD: RAMDISK,v 1.3 2004/08/09 14:57:26 pefo Exp $
#
machine sgi mips64
@@ -15,7 +15,7 @@ makeoption ENDIAN="-EB"
option SWAPPAGER # swap pager (anonymous and swap space)
option DEVPAGER # device pager (mapped devices)
-option NATIVE_ELF # Systems uses ELF as native format
+option ARCBIOS # Systems uses ARC firmware.
option DIAGNOSTIC # extra kernel debugging checks
#option DEBUG # extra kernel debugging support
diff --git a/sys/arch/sgi/include/autoconf.h b/sys/arch/sgi/include/autoconf.h
index 8761e9ac4da..046b369c77c 100644
--- a/sys/arch/sgi/include/autoconf.h
+++ b/sys/arch/sgi/include/autoconf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.h,v 1.1 2004/08/06 21:12:18 pefo Exp $ */
+/* $OpenBSD: autoconf.h,v 1.2 2004/08/09 14:57:26 pefo Exp $ */
/*
* Copyright (c) 2001-2003 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -43,20 +43,24 @@
/*
* Structure holding all misc config information.
*/
+#define MAX_CPUS 4
struct sys_rec {
int system_type;
struct {
- u_int32_t type;
- u_int32_t vers_maj;
- u_int32_t vers_min;
+ u_int16_t type;
+ u_int8_t vers_maj;
+ u_int8_t vers_min;
+ u_int16_t fptype;
+ u_int8_t fpvers_maj;
+ u_int8_t fpvers_min;
u_int32_t clock;
u_int32_t clock_bus;
u_int32_t tlbsize;
u_int32_t tlbwired;
u_int32_t cfg_reg;
u_int32_t stat_reg;
- } cpu;
+ } cpu[MAX_CPUS];
struct mips_bus_space local;
struct mips_bus_space isa_io;
struct mips_bus_space isa_mem;
diff --git a/sys/arch/sgi/include/dlfcn.h b/sys/arch/sgi/include/dlfcn.h
deleted file mode 100644
index 815cef633e1..00000000000
--- a/sys/arch/sgi/include/dlfcn.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/* $OpenBSD: dlfcn.h,v 1.1 2004/08/06 21:12:19 pefo Exp $ */
-
-/* Use Mips generic include file */
-
-#include <mips64/dlfcn.h>
diff --git a/sys/arch/sgi/include/exec.h b/sys/arch/sgi/include/exec.h
index 256af3ea9dd..75242789a88 100644
--- a/sys/arch/sgi/include/exec.h
+++ b/sys/arch/sgi/include/exec.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.h,v 1.1 2004/08/06 21:12:19 pefo Exp $ */
+/* $OpenBSD: exec.h,v 1.2 2004/08/09 14:57:26 pefo Exp $ */
/*
* Copyright (c) 1996-2003 Per Fogelstrom
@@ -56,7 +56,6 @@
#define _NLIST_DO_ELF
#define _NLIST_DO_ECOFF
-#define _KERN_DO_ECOFF /* XXX obsolete */
#define _KERN_DO_ELF
#if defined(_LP64)
#define _KERN_DO_ELF64
diff --git a/sys/arch/sgi/localbus/crimebus.h b/sys/arch/sgi/localbus/crimebus.h
index ca4fabd0167..23cb9894bab 100644
--- a/sys/arch/sgi/localbus/crimebus.h
+++ b/sys/arch/sgi/localbus/crimebus.h
@@ -48,6 +48,46 @@
#define CRIME_INT_SOFT 0x0020
#define CRIME_INT_HARD 0x0028
+/*
+ * CRIME_INT_STAT and CRIME_INT_MASK mapping.
+ */
+#define CRIME_INT_VIDEO_IN_1 0x00000001 /* Video in 1 */
+#define CRIME_INT_VIDEO_IN_2 0x00000002 /* Video in 2 */
+#define CRIME_INT_VIDEO_OUT 0x00000004 /* Video out */
+#define CRIME_INT_MACE_ETHER 0x00000008 /* Mace ethernet NIC */
+#define CRIME_INT_SUPER_IO 0x00000010 /* Super I/O sub interrupt */
+#define CRIME_INT_SUB_MISC 0x00000020 /* Misc ??? */
+#define CRIME_INT_SUB_AUDIO 0x00000040 /* Audio sub interrupt */
+#define CRIME_INT_PCI_BRIDGE 0x00000080 /* PCI bridge errors */
+#define CRIME_INT_PCI_SCSI_0 0x00000100 /* AIC SCSI controller 0 */
+#define CRIME_INT_PCI_SCSI_1 0x00000200 /* AIC SCSI controller 1 */
+#define CRIME_INT_PCI_SLOT_0 0x00000400 /* PCI expansion slot 0 */
+#define CRIME_INT_PCI_SLOT_1 0x00000800 /* PCI expansion slot 1 */
+#define CRIME_INT_PCI_SLOT_2 0x00001000 /* PCI expansion slot 2 */
+#define CRIME_INT_PCI_SHARE_0 0x00002000 /* PCI shared 0 */
+#define CRIME_INT_PCI_SHARE_1 0x00004000 /* PCI shared 1 */
+#define CRIME_INT_PCI_SHARE_2 0x00008000 /* PCI shared 2 */
+#define CRIME_INT_GBE_0 0x00010000 /* GBE0 (E) */
+#define CRIME_INT_GBE_1 0x00020000 /* GBE1 (E) */
+#define CRIME_INT_GBE_2 0x00040000 /* GBE2 (E) */
+#define CRIME_INT_GBE_3 0x00080000 /* GBE3 (E) */
+#define CRIME_INT_CPU_ERR 0x00100000 /* CPU Errors */
+#define CRIME_INT_MEM_ERR 0x00200000 /* MEMORY Errors */
+#define CRIME_INT_RE_EDGE_EMPTY 0x00400000 /* RE */
+#define CRIME_INT_RE_EDGE_FULL 0x00800000 /* RE */
+#define CRIME_INT_RE_EDGE_IDLE 0x01000000 /* RE */
+#define CRIME_INT_RE_LEVL_EMPTY 0x02000000 /* RE */
+#define CRIME_INT_RE_LEVL_FULL 0x04000000 /* RE */
+#define CRIME_INT_RE_LEVL_IDLE 0x08000000 /* RE */
+#define CRIME_INT_SOFT_0 0x10000000 /* ??? */
+#define CRIME_INT_SOFT_1 0x20000000 /* ??? */
+#define CRIME_INT_SOFT_2 0x40000000 /* ??? */
+#define CRIME_INT_VICE 0x80000000 /* ??? */
+
+
+/*
+ * Watchdog?
+ */
#define CRIME_KICK_DOG 0x0030
#define CRIME_TIMER 0x0038
diff --git a/sys/arch/sgi/localbus/macebus.h b/sys/arch/sgi/localbus/macebus.h
index d5a3438ebc3..e3675f3e11b 100644
--- a/sys/arch/sgi/localbus/macebus.h
+++ b/sys/arch/sgi/localbus/macebus.h
@@ -91,6 +91,18 @@
#define MACE_ISA_MISC_RLED_OFF 0x0010 /* Turns off RED LED */
#define MACE_ISA_MISC_GLED_OFF 0x0020 /* Turns off GREEN LED */
+/* MACE_ISA_INT_* definitions */
+#define MACE_ISA_INT_AUDIO 0x000000ff /* Audio ints */
+#define MACE_ISA_INT_RTC 0x00000100 /* RTC */
+#define MACE_ISA_INT_KBD 0x00000200 /* Keyboard */
+#define MACE_ISA_INT_KBD_POLL 0x00000400 /* Keyboard polled */
+#define MACE_ISA_INT_MOUSE 0x00000800 /* Mouse */
+#define MACE_ISA_INT_MOUSE_POLL 0x00001000 /* Mouse polled */
+#define MACE_ISA_INT_TIMER 0x0000e000 /* Timer/counter compare */
+#define MACE_ISA_INT_PARALLEL 0x000f0000 /* Parallel port */
+#define MACE_ISA_INT_SERIAL_1 0x03f00000 /* Serial port 1 */
+#define MACE_ISA_INT_SERIAL_2 0xfc000000 /* Serial port 2 */
+
/* ISA Periferials */
#define MACE_ISA_EPP_OFFS (MACE_ISAX_OFFS+0x00000000)
diff --git a/sys/arch/sgi/sgi/locore.S b/sys/arch/sgi/sgi/locore.S
index 913cae7148e..de33a8a78ad 100644
--- a/sys/arch/sgi/sgi/locore.S
+++ b/sys/arch/sgi/sgi/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.1 2004/08/06 21:12:19 pefo Exp $ */
+/* $OpenBSD: locore.S,v 1.2 2004/08/09 14:57:26 pefo Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -61,17 +61,6 @@ start:
sw zero, CF_RA_OFFS(sp) # Zero out old ra for debugger
move sp, v0 # switch to new stack
- li t0, SR_COP_1_BIT # Disable interrupts and
- mtc0 t0, COP_0_STATUS_REG # enable the fp coprocessor
- nop
- nop # wait for new status to
- nop
- nop
- nop # wait for new status to
- nop # to be effective
- nop
- cfc1 t1, FPC_ID # read FPU ID register
- sw t1, fpu_id # save FPU ID register
jal main # main(regs)
move a0, zero
PANIC("Startup failed!")
diff --git a/sys/arch/sgi/sgi/machdep.c b/sys/arch/sgi/sgi/machdep.c
index febbfe36895..4a680f2f5f7 100644
--- a/sys/arch/sgi/sgi/machdep.c
+++ b/sys/arch/sgi/sgi/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.1 2004/08/06 21:12:19 pefo Exp $ */
+/* $OpenBSD: machdep.c,v 1.2 2004/08/09 14:57:26 pefo Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -78,6 +78,7 @@
#include <dev/cons.h>
+#include <mips64/arcbios.h>
#include <mips64/archtype.h>
#include <machine/bus.h>
@@ -85,8 +86,8 @@
extern struct consdev *cn_tab;
extern char kernel_text[];
-extern void makebootdev __P((char *));
-extern void stacktrace __P((void));
+extern void makebootdev(char *);
+extern void stacktrace(void);
/* the following is used externally (sysctl_hw) */
char machine[] = MACHINE; /* machine "architecture" */
@@ -124,6 +125,7 @@ register_t tlbtrcptr;
int msgbufmapped; /* set when safe to use msgbuf */
int physmem; /* max supported memory, changes to actual */
+int rsvdmem; /* reserved memory not usable */
int ncpu = 1; /* At least one cpu in the system */
struct user *proc0paddr;
struct user *curprocpaddr;
@@ -139,16 +141,14 @@ caddr_t ssym;
caddr_t esym;
caddr_t ekern;
-struct mem_descriptor mem_layout[MAXMEMSEGS];
-vaddr_t avail_end; /* PA of last available physical page */
+struct phys_mem_desc mem_layout[MAXMEMSEGS];
-caddr_t mips_init __P((int, int32_t *, int32_t *));
+caddr_t mips_init(int, int32_t *);
void initcpu(void);
void dumpsys(void);
void dumpconf(void);
caddr_t allocsys(caddr_t);
-static char *getenv(char *env);
static void dobootopts(char *cp);
static void get_eth_hw_addr(char *, char *);
static int atoi(char *, int);
@@ -167,7 +167,7 @@ int my_endian = 0;
*/
caddr_t
-mips_init(int argc, int32_t *argv, int32_t *envv)
+mips_init(int argc, int32_t *argv)
{
char *cp;
char *arg0;
@@ -182,9 +182,14 @@ mips_init(int argc, int32_t *argv, int32_t *envv)
extern char exception[], e_exception[];
/*
+ * Clean up any mess.
+ */
+ Bios_FlushAllCaches();
+
+ /*
* Clear the compiled BSS segment in OpenBSD code
*/
- bzero(edata, (int)end - (int)edata);
+ bzero(edata, end-edata);
/*
* Reserve symol table space. If invalid pointers no table.
@@ -202,18 +207,15 @@ mips_init(int argc, int32_t *argv, int32_t *envv)
}
/*
- * Point environment for getenv() lookups.
+ * Initialize the system type and set up memory layout
*/
- environment = envv;
+ bios_ident();
/*
* Determine system type and set up configuration record data.
*/
- sys_config.system_type = -1;
- cp = getenv("systype");
-/*XXX*/ cp = "moosehead";
- if(cp && strncasecmp("moosehead", cp, 9) == 0) {
- sys_config.system_type = SGI_O2;
+ if (sys_config.system_type == SGI_O2) {
+ bios_putstring("Found SGI-IP32, setting up.\n");
strlcpy(cpu_model, "SGI O2", sizeof(cpu_model));
sys_config.cons_ioaddr[0] = 0x00390000; /*XXX*/
sys_config.cons_ioaddr[1] = 0x00398000; /*XXX*/
@@ -229,28 +231,13 @@ mips_init(int argc, int32_t *argv, int32_t *envv)
#endif
sys_config.pci_mem[0].bus_base_dma = 0x00000000;/*XXX*/
sys_config.pci_mem[0].bus_reverse = my_endian;
- sys_config.cpu.tlbwired = 3;
- }
-
- /*
- * Determine CPU clock frequency for timer and delay setup
- */
- if(getenv("cpuclock") != 0) {
- sys_config.cpu.clock = atoi(getenv("cpuclock"), 10);
- }
- else {
- sys_config.cpu.clock = 180000000; /* Reasonable default */
+ sys_config.cpu[0].tlbwired = 2;
+ sys_config.cpu[0].clock = 200000000; /* Reasonable default */
+ } else {
+ bios_putstring("Unsupported system!!!\n");
+ while(1);
}
- /*
- * Initialize virtual memory system.
- */
- if(getenv("memsize") != 0) {
- physmem = atop(atoi(getenv("memsize"), 10) * 1024 *1024);
- }
- else {
- physmem = atop(1024 * 1024 * 64); /* Reasonable default */
- }
#if 0
#if defined(DDB) || defined(DEBUG)
physmem = atop(1024 * 1024 * 256);
@@ -264,36 +251,45 @@ mips_init(int argc, int32_t *argv, int32_t *envv)
#endif
#endif
- /* Set pagesize to enable use of page macros and functions */
+ /*
+ * Use cpufrequency from bios to start with.
+ */
+ cp = Bios_GetEnvironmentVariable("cpufreq");
+ if (cp) {
+ i = atoi(cp, 10);
+ if (i > 100)
+ sys_config.cpu[0].clock = i * 1000000;
+ }
+
+ /*
+ * Set pagesize to enable use of page macros and functions.
+ * Commit available memory to UVM system
+ */
uvmexp.pagesize = 4096;
uvm_setpagesize();
- /* Build up memory description and commit to UVM system */
- mem_layout[0].mem_start = atop(0x20000); /* Skip int vectors */
- mem_layout[0].mem_size = atop(KSEG0_TO_PHYS(kernel_text));
- mem_layout[0].mem_size -= mem_layout[0].mem_start;
-
- mem_layout[1].mem_start = atop(round_page(KSEG0_TO_PHYS((long)ekern)));
- mem_layout[1].mem_size = physmem - mem_layout[1].mem_start;
+ for(i = 0; i < MAXMEMSEGS && mem_layout[i].mem_first_page != 0; i++) {
+ vaddr_t fp, lp;
+ u_int32_t lastkernpage = atop(ekern);
- avail_end = ptoa(physmem);
+ fp = mem_layout[i].mem_first_page;
+ lp = mem_layout[i].mem_last_page - 1;
- for(i = 1; i < MAXMEMSEGS && mem_layout[i].mem_size != 0; i++) {
- vaddr_t fp, lp;
+ /* Account for expansion from kernel symbol table */
+ if (fp < lastkernpage && lp >= lastkernpage)
+ fp = lastkernpage + 1;
- fp = mem_layout[i].mem_start;
- lp = mem_layout[i].mem_start + mem_layout[i].mem_size;
- uvm_page_physload(fp, lp, fp, lp, VM_FREELIST_DEFAULT);
+ if (fp <= lp)
+ uvm_page_physload(fp, lp, fp, lp, VM_FREELIST_DEFAULT);
}
/*
* Figure out where we was booted from.
*/
-argc = 0;
if(argc > 1)
arg0 = (char *)(long)argv[1];
else
- arg0 = getenv("bootdev");
+ arg0 = Bios_GetEnvironmentVariable("bootdev");
if(arg0 == 0)
arg0 = "unknown";
@@ -310,8 +306,8 @@ argc = 0;
boothowto = RB_SINGLE | RB_ASKNAME;
#endif /* RAMDISK_HOOKS */
- get_eth_hw_addr(getenv("ethaddr"), eth_hw_addr);
- dobootopts(getenv("osloadoptions"));
+ get_eth_hw_addr(Bios_GetEnvironmentVariable("ethaddr"), eth_hw_addr);
+ dobootopts(Bios_GetEnvironmentVariable("osloadoptions"));
/* Check any extra arguments which override. */
for(i = 2; i < argc; i++) {
@@ -321,62 +317,41 @@ argc = 0;
}
/* Check l3cache size and disable (hard) if non present. */
- if(getenv("l3cache") != 0) {
- i = atoi(getenv("l3cache"), 10);
+ if(Bios_GetEnvironmentVariable("l3cache") != 0) {
+ i = atoi(Bios_GetEnvironmentVariable("l3cache"), 10);
CpuTertiaryCacheSize = 1024 * 1024 * i;
} else {
CpuTertiaryCacheSize = 0;
}
- if(CpuTertiaryCacheSize == 0) {
- CpuExternalCacheOn = 0; /* No L3 detected */
- } else {
- CpuExternalCacheOn = 1;
- }
-
- cp = getenv("ecache_on");
- if(cp && (*cp == 0 || *cp == 'n' || *cp == 'N')) {
- CpuExternalCacheOn = 0; /* Override config setting */
- }
-
- cp = getenv("ocache_on");
- if(cp && (*cp == 0 || *cp == 'n' || *cp == 'N')) {
- CpuOnboardCacheOn = 0; /* Override HW setting */
- } else {
- CpuOnboardCacheOn = 1;
- }
- sys_config.cpu.cfg_reg = Mips_ConfigCache();
- sys_config.cpu.type = cpu_id.cpu.cp_imp;
- sys_config.cpu.vers_maj = cpu_id.cpu.cp_majrev;
- sys_config.cpu.vers_min = cpu_id.cpu.cp_minrev;
+ sys_config.cpu[0].cfg_reg = Mips_ConfigCache();
+ sys_config.cpu[0].type = (cp0_get_prid() >> 8) & 0xff;
+ sys_config.cpu[0].vers_maj = (cp0_get_prid() >> 4) & 0x0f;
+ sys_config.cpu[0].vers_min = cp0_get_prid() & 0x0f;
+ sys_config.cpu[0].fptype = (cp1_get_prid() >> 8) & 0xff;
+ sys_config.cpu[0].fpvers_maj = (cp1_get_prid() >> 4) & 0x0f;
+ sys_config.cpu[0].fpvers_min = cp1_get_prid() & 0x0f;
/*
* Configure TLB.
*/
- switch(sys_config.cpu.type) {
+ switch(sys_config.cpu[0].type) {
case MIPS_RM7000:
- if(sys_config.cpu.vers_maj < 2) {
- sys_config.cpu.tlbsize = 48;
+ if(sys_config.cpu[0].vers_maj < 2) {
+ sys_config.cpu[0].tlbsize = 48;
} else {
- sys_config.cpu.tlbsize = 64;
+ sys_config.cpu[0].tlbsize = 64;
}
break;
default:
- sys_config.cpu.tlbsize = 48;
+ sys_config.cpu[0].tlbsize = 48;
break;
}
- if(getenv("tlbwired")) {
- i = atoi(getenv("tlbwired"), 10);
- if((i < sys_config.cpu.tlbwired) || (i >= sys_config.cpu.tlbsize)) {
- } else {
- sys_config.cpu.tlbwired = i;
- }
- }
tlb_set_wired(0);
- tlb_flush(sys_config.cpu.tlbsize);
- tlb_set_wired(sys_config.cpu.tlbwired);
+ tlb_flush(sys_config.cpu[0].tlbsize);
+ tlb_set_wired(sys_config.cpu[0].tlbwired);
/*
* Set up some fixed mappings. These are so frequently
@@ -408,14 +383,9 @@ argc = 0;
/*
* Get a console, very early but after initial mapping setup.
*/
+ bios_putstring("Initial setup done, switching console.\n\n");
consinit();
- if (sys_config.system_type < 0) {
- printf("'systype' = '%s' not known!\n", cp ? cp : "NULL");
- panic("unidentified system");
- }
-
-
/*
* Allocate U page(s) for proc[0], pm_tlbpid 1.
*/
@@ -452,13 +422,7 @@ argc = 0;
}
bcopy(exception, (char *)CACHE_ERR_EXC_VEC, e_exception - exception);
-
- /*
- * Keep PMON2000 exceptions if requested.
- */
- if(!getenv("pmonexept")) {
- bcopy(exception, (char *)GEN_EXC_VEC, e_exception - exception);
- }
+ bcopy(exception, (char *)GEN_EXC_VEC, e_exception - exception);
#ifdef DDB
db_machine_init();
@@ -547,30 +511,6 @@ allocsys(caddr_t v)
/*
- * Return a pointer to the given environment variable.
- */
-static char *
-getenv(envname)
- char *envname;
-{
- int32_t *env = environment;
- char *envp;
- int i;
-
-return(NULL);
- i = strlen(envname);
-
- while(*env) {
- envp = (char *)(long)*env;
- if(strncasecmp(envname, envp, i) == 0 && envp[i] == '=') {
- return(&envp[i+1]);
- }
- env++;
- }
- return(NULL);
-}
-
-/*
* Decode boot options.
*/
static void
@@ -654,6 +594,7 @@ cpu_startup()
*/
printf(version);
printf("real mem = %d\n", ptoa(physmem));
+ printf("rsvd mem = %d\n", ptoa(rsvdmem));
/*
* Allocate virtual address space for file I/O buffers.
@@ -858,22 +799,24 @@ boot(howto)
(void) splhigh(); /* extreme priority */
if (howto & RB_HALT) {
- printf("System halted.\n");
- if(sys_config.system_type == ALGOR_P5064 && howto & RB_POWERDOWN) {
- printf("Shutting off!\n");
- *(int *)(0xffffffffbffa000c) = 1;
+ if (howto & RB_POWERDOWN) {
+ printf("System Power Down.\n");
+ delay(1000000);
+ Bios_PowerDown();
+ } else {
+ printf("System Halt.\n");
+ delay(1000000);
+ Bios_EnterInteractiveMode();
}
+ printf("Didn't want to die!!! Reset manually.\n");
while(1); /* Forever */
- }
- else {
+ } else {
if (howto & RB_DUMP)
dumpsys();
printf("System restart.\n");
-#if defined(LP64)
- __asm__(" li $2, 0xffffffff80010100; jr $2; nop\n");
-#else
- __asm__(" li $2, 0x80010100; jr $2; nop\n");
-#endif
+ delay(1000000);
+ Bios_Reboot();
+ printf("Restart failed!!! Reset manually.\n");
while(1); /* Forever */
}
/*NOTREACHED*/