diff options
author | Michael Brown | 2006-05-13 13:43:07 +0200 |
---|---|---|
committer | Michael Brown | 2006-05-13 13:43:07 +0200 |
commit | d822b3d4cdd08ba26393fc8a3f0cb446087bc05c (patch) | |
tree | 820db35cfd916d3e6cecbc472b1af6bf6103dfb3 | |
parent | Add flag definitions. (diff) | |
download | ipxe-d822b3d4cdd08ba26393fc8a3f0cb446087bc05c.tar.gz ipxe-d822b3d4cdd08ba26393fc8a3f0cb446087bc05c.tar.xz ipxe-d822b3d4cdd08ba26393fc8a3f0cb446087bc05c.zip |
Define BIOS data segment in bios.h
-rw-r--r-- | src/arch/i386/firmware/pcbios/bios.c | 13 | ||||
-rw-r--r-- | src/arch/i386/include/bios.h | 3 |
2 files changed, 9 insertions, 7 deletions
diff --git a/src/arch/i386/firmware/pcbios/bios.c b/src/arch/i386/firmware/pcbios/bios.c index b367d04d..ebcbbc04 100644 --- a/src/arch/i386/firmware/pcbios/bios.c +++ b/src/arch/i386/firmware/pcbios/bios.c @@ -3,10 +3,9 @@ * Body of routines taken from old pcbios.S */ -#include "stdint.h" -#include "realmode.h" - -#define BIOS_DATA_SEG 0x0040 +#include <stdint.h> +#include <realmode.h> +#include <bios.h> #define CF ( 1 << 0 ) @@ -39,12 +38,12 @@ unsigned long currticks ( void ) { IN_CONSTRAINTS (), CLOBBER ( "eax" ) ); /* can't have an empty clobber list */ - get_real ( ticks, BIOS_DATA_SEG, 0x006c ); - get_real ( midnight, BIOS_DATA_SEG, 0x0070 ); + get_real ( ticks, BDA_SEG, 0x006c ); + get_real ( midnight, BDA_SEG, 0x0070 ); if ( midnight ) { midnight = 0; - put_real ( midnight, BIOS_DATA_SEG, 0x0070 ); + put_real ( midnight, BDA_SEG, 0x0070 ); days += 0x1800b0; } return ( days + ticks ); diff --git a/src/arch/i386/include/bios.h b/src/arch/i386/include/bios.h index 83bb18da..4b4b9d25 100644 --- a/src/arch/i386/include/bios.h +++ b/src/arch/i386/include/bios.h @@ -1,6 +1,9 @@ #ifndef BIOS_H #define BIOS_H +#define BDA_SEG 0x0040 +#define BDA_NUM_DRIVES 0x0075 + extern unsigned long currticks ( void ); extern void cpu_nap ( void ); |