summaryrefslogtreecommitdiff
path: root/sys/arch/i386/include/biosvar.h
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2000-08-17 20:15:41 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2000-08-17 20:15:41 +0000
commit1e70b280d824eb2effad54d6a1674d9f5ee4c4bc (patch)
tree0af02e86aa98936a133bde55403cff3b7de0b326 /sys/arch/i386/include/biosvar.h
parent6a1696496f37d377d2cdfb30b4dc44eed02bba1b (diff)
pcibios0 at bios0 flags 0x0000
this is now a real device, which looks in flags for disabling address, interrupt or bus fixup. bios0's flags are to disable bios32 and pcibios probing. since boot_config support editing flags, it's posible to adjust pcibios functionality in the generic kernel upon boot time. man is coming.
Diffstat (limited to 'sys/arch/i386/include/biosvar.h')
-rw-r--r--sys/arch/i386/include/biosvar.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/sys/arch/i386/include/biosvar.h b/sys/arch/i386/include/biosvar.h
index a80bf2f4a2d..f2d2b5231e0 100644
--- a/sys/arch/i386/include/biosvar.h
+++ b/sys/arch/i386/include/biosvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: biosvar.h,v 1.35 2000/03/26 22:38:33 mickey Exp $ */
+/* $OpenBSD: biosvar.h,v 1.36 2000/08/17 20:15:39 mickey Exp $ */
/*
* Copyright (c) 1997-1999 Michael Shalayeff
@@ -39,6 +39,10 @@
#define BOOTARG_LEN (NBPG*1)
#define BOOTBIOS_ADDR (0x7c00)
+ /* BIOS configure flags */
+#define BIOSF_BIOS32 0x0001
+#define BIOSF_PCIBIOS 0x0002
+
/* BIOS media ID */
#define BIOSM_F320K 0xff /* floppy ds/sd 8 spt */
#define BIOSM_F160K 0xfe /* floppy ss/sd 8 spt */
@@ -64,6 +68,16 @@
* BIOS32
*/
typedef
+struct bios32_header {
+ u_int32_t signature; /* 00: signature "_32_" */
+ u_int32_t entry; /* 04: entry point */
+ u_int8_t rev; /* 08: revision */
+ u_int8_t length; /* 09: header length */
+ u_int8_t cksum; /* 0a: modulo 256 checksum */
+ u_int8_t reserved[5];
+} *bios32_header_t;
+
+typedef
struct bios32_entry_info {
paddr_t bei_base;
psize_t bei_size;
@@ -72,12 +86,18 @@ struct bios32_entry_info {
typedef
struct bios32_entry {
- caddr_t offset;
+ u_int32_t offset;
u_int16_t segment;
} __attribute__((__packed__)) *bios32_entry_t;
+#define BIOS32_START 0xe0000
+#define BIOS32_SIZE 0x20000
+#define BIOS32_END (BIOS32_START + BIOS32_SIZE - 0x10)
+
#define BIOS32_MAKESIG(a, b, c, d) \
((a) | ((b) << 8) | ((c) << 16) | ((d) << 24))
+#define BIOS32_SIGNATURE BIOS32_MAKESIG('_', '3', '2', '_')
+#define PCIBIOS_SIGNATURE BIOS32_MAKESIG('$', 'P', 'C', 'I')
/*
* CTL_BIOS definitions.
@@ -212,7 +232,6 @@ void bioscnpollc __P((dev_t, int));
void bios_getopt __P((void));
/* bios32.c */
-void bios32_init __P((void));
int bios32_service __P((u_int32_t, bios32_entry_t, bios32_entry_info_t));
extern u_int bootapiver;