Return to bootsect.h CVS log | Up to [local] / sys / msdosfs |
File: [local] / sys / msdosfs / bootsect.h (download)
Revision 1.1.1.1 (vendor branch), Tue Mar 4 16:04:25 2008 UTC (16 years, 4 months ago) by nbrk
Import of OpenBSD 4.2 release kernel tree with initial code to support Jornada 720/728, StrongARM 1110-based handheld PC. At this point kernel roots on NFS and boots into vfs_mountroot() and traps. What is supported: - glass console, Jornada framebuffer (jfb) works in 16bpp direct color mode (needs some palette tweaks for non black/white/blue colors, i think) - saic, SA11x0 interrupt controller (needs cleanup) - sacom, SA11x0 UART (supported only as boot console for now) - SA11x0 GPIO controller fully supported (but can't handle multiple interrupt handlers on one gpio pin) - sassp, SSP port on SA11x0 that attaches spibus - Jornada microcontroller (jmcu) to control kbd, battery, etc throught the SPI bus (wskbd attaches on jmcu, but not tested) - tod functions seem work - initial code for SA-1111 (chip companion) : this is TODO Next important steps, i think: - gpio and intc on sa1111 - pcmcia support for sa11x0 (and sa1111 help logic) - REAL root on nfs when we have PCMCIA support (we may use any of supported pccard NICs) - root on wd0! (using already supported PCMCIA-ATA) |
/* $OpenBSD: bootsect.h,v 1.5 2006/12/15 03:04:24 krw Exp $ */ /* $NetBSD: bootsect.h,v 1.8 1997/10/17 11:23:29 ws Exp $ */ /* * Written by Paul Popelka (paulp@uts.amdahl.com) * * You can do anything you want with this software, just don't say you wrote * it, and don't remove this notice. * * This software is provided "as is". * * The author supplies this software to be publicly redistributed on the * understanding that the author is not responsible for the correct * functioning of this software in any circumstances and is not liable for * any damages caused by this software. * * October 1992 */ /* * Format of a boot sector. This is the first sector on a DOS floppy disk * or the fist sector of a partition on a hard disk. But, it is not the * first sector of a partitioned hard disk. */ struct bootsector33 { u_int8_t bsJump[3]; /* jump inst E9xxxx or EBxx90 */ int8_t bsOemName[8]; /* OEM name and version */ int8_t bsBPB[19]; /* BIOS parameter block */ int8_t bsDriveNumber; /* drive number (0x80) */ int8_t bsBootCode[479]; /* pad so struct is 512b */ u_int8_t bsBootSectSig0; u_int8_t bsBootSectSig1; #define BOOTSIG0 0x55 #define BOOTSIG1 0xaa }; struct extboot { int8_t exDriveNumber; /* drive number (0x80) */ int8_t exReserved1; /* reserved */ int8_t exBootSignature; /* ext. boot signature (0x29) */ #define EXBOOTSIG 0x29 int8_t exVolumeID[4]; /* volume ID number */ int8_t exVolumeLabel[11]; /* volume label */ int8_t exFileSysType[8]; /* fs type (FAT12 or FAT16) */ }; struct bootsector50 { u_int8_t bsJump[3]; /* jump inst E9xxxx or EBxx90 */ int8_t bsOemName[8]; /* OEM name and version */ int8_t bsBPB[25]; /* BIOS parameter block */ int8_t bsExt[26]; /* Bootsector Extension */ int8_t bsBootCode[448]; /* pad so structure is 512b */ u_int8_t bsBootSectSig0; u_int8_t bsBootSectSig1; #define BOOTSIG0 0x55 #define BOOTSIG1 0xaa }; struct bootsector710 { u_int8_t bsJump[3]; /* jump inst E9xxxx or EBxx90 */ int8_t bsOEMName[8]; /* OEM name and version */ int8_t bsPBP[53]; /* BIOS parameter block */ int8_t bsExt[26]; /* Bootsector Extension */ int8_t bsBootCode[418]; /* pad so structure is 512b */ u_int8_t bsBootSectSig2; /* 2 & 3 are only defined for FAT32? */ u_int8_t bsBootSectSig3; u_int8_t bsBootSectSig0; u_int8_t bsBootSectSig1; #define BOOTSIG0 0x55 #define BOOTSIG1 0xaa #define BOOTSIG2 0 #define BOOTSIG3 0 }; union bootsector { struct bootsector33 bs33; struct bootsector50 bs50; struct bootsector710 bs710; }; #if 0 /* * Shorthand for fields in the bpb. */ #define bsBytesPerSec bsBPB.bpbBytesPerSec #define bsSectPerClust bsBPB.bpbSectPerClust #define bsResSectors bsBPB.bpbResSectors #define bsFATS bsBPB.bpbFATS #define bsRootDirEnts bsBPB.bpbRootDirEnts #define bsSectors bsBPB.bpbSectors #define bsMedia bsBPB.bpbMedia #define bsFATsecs bsBPB.bpbFATsecs #define bsSectPerTrack bsBPB.bpbSectPerTrack #define bsHeads bsBPB.bpbHeads #define bsHiddenSecs bsBPB.bpbHiddenSecs #define bsHugeSectors bsBPB.bpbHugeSectors #endif