aboutsummaryrefslogtreecommitdiff
path: root/include/bios.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-05-20 17:09:34 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2015-05-21 11:44:57 +0200
commiteaae11e17f022188755c67e4dd3436875e84110d (patch)
tree35625017b95776f3eb2470705cb3af2b44687548 /include/bios.h
parentedba90fb16ec7224da591ab8f83efe3673853a3f (diff)
downloadqboot-eaae11e17f022188755c67e4dd3436875e84110d.zip
qboot-eaae11e17f022188755c67e4dd3436875e84110d.tar.gz
qboot-eaae11e17f022188755c67e4dd3436875e84110d.tar.bz2
make a bootable BIOS
includes source from kvm-unit-tests Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/bios.h')
-rw-r--r--include/bios.h36
1 files changed, 8 insertions, 28 deletions
diff --git a/include/bios.h b/include/bios.h
index 153c887..22a912a 100644
--- a/include/bios.h
+++ b/include/bios.h
@@ -4,32 +4,6 @@
#include <inttypes.h>
/*
- * X86-32 Memory Map (typical)
- * start end
- * Real Mode Interrupt Vector Table 0x00000000 0x000003FF
- * BDA area 0x00000400 0x000004FF
- * Conventional Low Memory 0x00000500 0x0009FBFF
- * EBDA area 0x0009FC00 0x0009FFFF
- * VIDEO RAM 0x000A0000 0x000BFFFF
- * VIDEO ROM (BIOS) 0x000C0000 0x000C7FFF
- * ROMs & unus. space (mapped hw & misc)0x000C8000 0x000EFFFF 160 KiB (typically)
- * Motherboard BIOS 0x000F0000 0x000FFFFF
- * Extended Memory 0x00100000 0xFEBFFFFF
- * Reserved (configs, ACPI, PnP, etc) 0xFEC00000 0xFFFFFFFF
- */
-
-#define REAL_MODE_IVT_BEGIN 0x00000000
-#define REAL_MODE_IVT_END 0x000003ff
-
-#define BDA_START 0x00000400
-#define BDA_END 0x000004ff
-
-#define EBDA_START 0x0009fc00
-#define EBDA_END 0x0009ffff
-
-#define E820_MAP_START EBDA_START
-
-/*
* When interfacing with assembler code we need to be sure how
* arguments are passed in real mode.
*/
@@ -37,8 +11,6 @@
#ifndef __ASSEMBLER__
-#include <linux/types.h>
-
struct biosregs {
uint32_t eax;
uint32_t ebx;
@@ -59,6 +31,14 @@ extern bioscall void int10_handler(struct biosregs *regs);
extern bioscall void int15_handler(struct biosregs *regs);
extern bioscall void e820_query_map(struct biosregs *regs);
+extern struct e820map e820;
+
+static inline void __attribute__((noreturn)) panic(void)
+{
+ asm volatile("cli; hlt");
+ for(;;);
+}
+
#endif
#endif /* BIOS_H_ */