segoff.h revision 1b8adde7ba7d5e04395c141c5400dc2cffd7d809
/*
* Segment:offset types and macros
*
* Initially written by Michael Brown (mcb30).
*/
#ifndef SEGOFF_H
#define SEGOFF_H
#include <stdint.h>
#include <io.h>
/* Segment:offset structure. Note that the order within the structure
* is offset:segment.
*/
typedef struct {
} segoff_t;
/* For PXE stuff */
typedef segoff_t SEGOFF16_t;
/* Macros for converting from virtual to segment:offset addresses,
* when we don't actually care which of the many isomorphic results we
* get.
*/
#ifdef DEBUG_SEGMENT
if ( phys > 0xfffff ) {
printf ( "FATAL ERROR: segment address out of range\n" );
}
return phys >> 4;
}
#else
#endif
#endif /* SEGOFF_H */