diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1997-09-21 04:28:01 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1997-09-21 04:28:01 +0000 |
commit | 2b8c7888cf060cc6c33d738b2aed5bd76b9ec749 (patch) | |
tree | edef0ae33d1c627061199a5b3fff9eb09e2baafd /sys/arch/i386/include | |
parent | daac31c7d27c4b339b96b96f2089613d7c2ae443 (diff) |
support new boots
add to your config:
bios0 at mainbus0
apm0 at mainbus0 # (if you are using APM)
Diffstat (limited to 'sys/arch/i386/include')
-rw-r--r-- | sys/arch/i386/include/apmvar.h | 29 | ||||
-rw-r--r-- | sys/arch/i386/include/conf.h | 9 | ||||
-rw-r--r-- | sys/arch/i386/include/cpu.h | 10 |
3 files changed, 20 insertions, 28 deletions
diff --git a/sys/arch/i386/include/apmvar.h b/sys/arch/i386/include/apmvar.h index 05ae5cbb721..b960bb3ad5e 100644 --- a/sys/arch/i386/include/apmvar.h +++ b/sys/arch/i386/include/apmvar.h @@ -1,4 +1,5 @@ /* $NetBSD$ */ + /* * Copyright (c) 1995 John T. Kohl * All rights reserved. @@ -157,7 +158,7 @@ #define APM_OEM 0x80 -#ifdef _LOCORE +#ifndef _LOCORE /* * LP (Laptop Package) * @@ -173,32 +174,6 @@ * Sep., 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) */ -/* Error code of APM initializer */ -#define APMINI_CANTFIND 0xffffffff -#define APMINI_NOT32BIT 0xfffffffe -#define APMINI_CONNECTERR 0xfffffffd - -#define SIZEOF_GDTE 8 -#define BOOTSTRAP_GDT_NUM 9 /* see i386/boot/table.c */ - -#define APM_INIT_CS_INDEX (BOOTSTRAP_GDT_NUM - 3) -#define APM_INIT_DS_INDEX (BOOTSTRAP_GDT_NUM - 2) -#define APM_INIT_CS16_INDEX (BOOTSTRAP_GDT_NUM - 1) -#define APM_INIT_CS_SEL (APM_INIT_CS_INDEX << 3) -#define APM_INIT_DS_SEL (APM_INIT_DS_INDEX << 3) -#define APM_INIT_CS16_SEL (APM_INIT_CS16_INDEX << 3) - -#define CS32_ATTRIB 0xCF9e -#define CS16_ATTRIB 0x0F9e -#define DS32_ATTRIB 0xCF92 - -#define BOOTSTRAP_DS_SEL 0x10 -/* APM initializer physical address */ -#define APM_OURADDR 0x00080000 -#define APM_RELOC(x) ((x) - _apm_init_image) - -#else /* !_LOCORE */ - /* filled in by apmcall */ struct apmregs { u_short ax; diff --git a/sys/arch/i386/include/conf.h b/sys/arch/i386/include/conf.h index 34d1559c9a6..5c791b14abf 100644 --- a/sys/arch/i386/include/conf.h +++ b/sys/arch/i386/include/conf.h @@ -62,3 +62,12 @@ cdev_decl(lms); cdev_decl(pms); cdev_decl(joy); + +/* open, close, ioctl, mmap */ +#define cdev_bios_init(c,n) { \ + dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \ + (dev_type_write((*))) enodev, dev_init(c,n,ioctl), \ + (dev_type_stop((*))) enodev, \ + 0, seltrue, (dev_type_mmap((*))) enodev } + +cdev_decl(bios); diff --git a/sys/arch/i386/include/cpu.h b/sys/arch/i386/include/cpu.h index 02ab0b02ca9..cbe03dbb86d 100644 --- a/sys/arch/i386/include/cpu.h +++ b/sys/arch/i386/include/cpu.h @@ -206,11 +206,19 @@ void setconf __P((void)); * CTL_MACHDEP definitions. */ #define CPU_CONSDEV 1 /* dev_t: console terminal device */ -#define CPU_MAXID 2 /* number of valid machdep ids */ +#define CPU_BIOSDEV 2 /* int: BIOS boot device */ +#define CPU_BIOSGEOMETRY 3 /* int: BIOS boot device geometry */ +#define CPU_CNVMEM 4 /* int: amount of conventional memory */ +#define CPU_EXTMEM 5 /* int: amount of extended memory */ +#define CPU_MAXID 6 /* number of valid machdep ids */ #define CTL_MACHDEP_NAMES { \ { 0, 0 }, \ { "console_device", CTLTYPE_STRUCT }, \ + { "biosdev", CTLTYPE_INT }, \ + { "biosgeo", CTLTYPE_INT }, \ + { "cnvmem", CTLTYPE_INT }, \ + { "extmem", CTLTYPE_INT }, \ } #endif /* !_I386_CPU_H_ */ |