home *** CD-ROM | disk | FTP | other *** search
- /*
- ** pbb.h
- ** Partition Boot Block
- ** This block holds both the unix boot code and the disk geometry
- ** for SV/AT 286 version 2.3 and beyond.
- **
- ** $Header: pbb.h,v 1.2 87/09/16 02:12:51 root Exp $
- **
- ** The layout of the PBB is:
- **
- ** +--------------------+
- ** 0x000 | Unix Boot Code |
- ** | ... |
- ** | ... |
- ** | ... |
- ** .. -1 | 0x90 |
- ** BOOTDRTBLOFF | ROM-type diskinfo | 16 bytes long ( see romtable.h )
- ** 0x1FD | 0x00 |
- ** 0x1FE | 0xAA55 |
- ** +--------------------+
- */
-
- #ifndef PBB_H
- #define PBB_H
-
- #include "romtable.h"
-
- typedef char pbb_t[512];
-
- /* the BOOT record DRiveTaBLeOFFset into the partition boot block */
- #define BOOTDRTBLOFF 0x1ee
-
- #define ROMTABLE( pbbp ) ((romtable *)((pbbp)+BOOTDRTBLOFF))
-
- #define VALID_PBB( pbbp ) (*((int *) (pbbp)+0x1FE) == 0xAA55 && \
- *((pbbp)+0x1FD) == 0 || \
- *((pbbp)+(BOOTDRTBLOFF-1)) == 0x90)
-
- #define VALIDATE_PBB( pbbp ) { \
- *((int *) &pbbp[0x1FE]) = 0xAA55; /* ... and magic PBB sig */ \
- pbbp[0x1FD] = 0; /* .. more sig info */ \
- pbbp[BOOTDRTBLOFF-1] = 0x90; /* ... */ \
- }
-
-
- #endif /* PBB_H */
-