diff options
-rw-r--r-- | sys/arch/i386/include/biosvar.h | 7 | ||||
-rw-r--r-- | sys/arch/i386/stand/libsa/exec_i386.c | 13 | ||||
-rw-r--r-- | sys/arch/i386/stand/libsa/libsa.h | 3 | ||||
-rw-r--r-- | sys/arch/i386/stand/libsa/memprobe.c | 11 |
4 files changed, 13 insertions, 21 deletions
diff --git a/sys/arch/i386/include/biosvar.h b/sys/arch/i386/include/biosvar.h index 7f0660f7569..c75b0d8b8cc 100644 --- a/sys/arch/i386/include/biosvar.h +++ b/sys/arch/i386/include/biosvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: biosvar.h,v 1.10 1997/09/04 19:58:12 mickey Exp $ */ +/* $OpenBSD: biosvar.h,v 1.11 1997/09/17 17:56:09 mickey Exp $ */ /* * Copyright (c) 1997 Michael Shalayeff @@ -203,9 +203,6 @@ extern struct BIOS_vars { int bios_dev; int bios_geometry; - u_int bios_extmem; - u_int bios_cnvmem; - u_int apm_detail; u_int apm_code32_base; u_int apm_code16_base; @@ -214,8 +211,6 @@ extern struct BIOS_vars { u_int apm_data_len; u_int apm_entry; - dev_t boot_consdev; - } BIOS_vars; extern struct BIOS_regs { diff --git a/sys/arch/i386/stand/libsa/exec_i386.c b/sys/arch/i386/stand/libsa/exec_i386.c index 97d5966079c..e87da91c7d8 100644 --- a/sys/arch/i386/stand/libsa/exec_i386.c +++ b/sys/arch/i386/stand/libsa/exec_i386.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_i386.c,v 1.15 1997/09/04 20:44:36 mickey Exp $ */ +/* $OpenBSD: exec_i386.c,v 1.16 1997/09/17 17:56:10 mickey Exp $ */ /* * Copyright (c) 1997 Michael Shalayeff @@ -60,21 +60,16 @@ machdep_start(startaddr, howto, loadaddr, ssym, esym) printf("/bsd(%x,%x,%x,%x,%x,%x,%x)\n", howto, bootdev, BOOT_APIVER, round_to_size(esym), - BIOS_vars.bios_extmem, BIOS_vars.bios_cnvmem, - (int)&BIOS_vars); + extmem, cnvmem, (int)&BIOS_vars, sizeof(BIOS_vars)); getchar(); #endif - if (cn_tab != NULL) - BIOS_vars.boot_consdev = cn_tab->cn_dev; - (int)startaddr &= 0xffffff; printf("entry point at 0x%x\n", (int)startaddr); /* stack and the gung is ok at this point, so, no need for asm setup */ - (*(int __attribute__((noreturn))(*)(int,int,int,int,int,int,int)) + (*(int __attribute__((noreturn))(*)(int,int,int,int,int,int,int,int)) startaddr)(howto, bootdev, BOOT_APIVER, round_to_size(esym), - BIOS_vars.bios_extmem, BIOS_vars.bios_cnvmem, - (int)&BIOS_vars); + extmem, cnvmem, (int)&BIOS_vars, sizeof(BIOS_vars)); /* not reached */ } diff --git a/sys/arch/i386/stand/libsa/libsa.h b/sys/arch/i386/stand/libsa/libsa.h index c6574f6c14a..911a59e9cb8 100644 --- a/sys/arch/i386/stand/libsa/libsa.h +++ b/sys/arch/i386/stand/libsa/libsa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: libsa.h,v 1.16 1997/09/02 20:58:16 mickey Exp $ */ +/* $OpenBSD: libsa.h,v 1.17 1997/09/17 17:56:10 mickey Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -44,5 +44,6 @@ void time_print __P((void)); extern const char bdevs[][4]; extern const int nbdevs; extern int bootdev; /* XXX pass through the global to exec_i386 */ +extern u_int cnvmem, extmem; /* XXX global pass memprobe()->machdep_start() */ #define MACHINE_CMD cmd_machine /* we have i386 specific sommands */ diff --git a/sys/arch/i386/stand/libsa/memprobe.c b/sys/arch/i386/stand/libsa/memprobe.c index 4ba974db828..4a882a60de7 100644 --- a/sys/arch/i386/stand/libsa/memprobe.c +++ b/sys/arch/i386/stand/libsa/memprobe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: memprobe.c,v 1.11 1997/09/02 17:00:42 mickey Exp $ */ +/* $OpenBSD: memprobe.c,v 1.12 1997/09/17 17:56:10 mickey Exp $ */ /* * Copyright (c) 1997 Tobias Weingartner @@ -37,17 +37,18 @@ #include "libsa.h" static int addrprobe __P((int)); +u_int cnvmem, extmem; void memprobe() { int ram; - __asm __volatile(DOINT(0x12) : "=a" (BIOS_vars.bios_cnvmem) + __asm __volatile(DOINT(0x12) : "=a" (cnvmem) :: "%ecx", "%edx", "cc"); - BIOS_vars.bios_cnvmem &= 0xffff; + cnvmem &= 0xffff; - printf("%d Kb conventional memory.\n", BIOS_vars.bios_cnvmem); + printf("%d Kb conventional memory.\n", cnvmem); /* probe extended memory * @@ -63,7 +64,7 @@ memprobe() } printf("%d Kb extended memory.\n", ram-1024); - BIOS_vars.bios_extmem = ram - 1024; + extmem = ram - 1024; } /* addrprobe(kloc): Probe memory at address kloc * 1024. |