1 1.1.4.2 nathanw /* $NetBSD: boot_ufs.h,v 1.1.4.2 2002/04/01 07:43:43 nathanw Exp $ */ 2 1.1.4.2 nathanw 3 1.1.4.2 nathanw /*************************************************************** 4 1.1.4.2 nathanw * 5 1.1.4.2 nathanw * file: boot.h 6 1.1.4.2 nathanw * 7 1.1.4.2 nathanw * author: chapuni(GBA02750 (at) niftyserve.or.jp) 8 1.1.4.2 nathanw * 9 1.1.4.2 nathanw */ 10 1.1.4.2 nathanw 11 1.1.4.2 nathanw /* xxboot.S */ 12 1.1.4.2 nathanw __dead void BOOT_ERROR __P((const char *msg)) __attribute__((noreturn)); 13 1.1.4.2 nathanw int badbaddr __P((volatile void *adr)); 14 1.1.4.2 nathanw #ifdef SCSI_ADHOC_BOOTPART 15 1.1.4.2 nathanw void RAW_READ0 __P((void *buf, u_int32_t blkpos, size_t bytelen)); 16 1.1.4.2 nathanw #endif 17 1.1.4.2 nathanw unsigned B_KEYINP __P((void)); 18 1.1.4.2 nathanw void B_PUTC __P((unsigned int c)); 19 1.1.4.2 nathanw void B_PRINT __P((const unsigned char *p)); 20 1.1.4.2 nathanw unsigned B_COLOR __P((unsigned int w)); 21 1.1.4.2 nathanw 22 1.1.4.2 nathanw extern unsigned ID; /* target SCSI ID */ 23 1.1.4.2 nathanw extern unsigned BOOT_INFO; /* result of IOCS(__BOOTINF) */ 24 1.1.4.2 nathanw 25 1.1.4.2 nathanw /* check whether the bootinf is SCSI or floppy */ 26 1.1.4.2 nathanw #define BINF_ISFD(pbinf) (*((char *)(pbinf) + 1) == 0) 27 1.1.4.2 nathanw 28 1.1.4.2 nathanw extern unsigned FDMODE; /* Floppy access mode: PDA x 256 + MODE */ 29 1.1.4.2 nathanw extern struct { 30 1.1.4.2 nathanw struct fdfmt{ 31 1.1.4.2 nathanw unsigned char N; /* sector length 0: 128, ..., 3: 1K */ 32 1.1.4.2 nathanw unsigned char C; /* cylinder # */ 33 1.1.4.2 nathanw unsigned char H; /* head # */ 34 1.1.4.2 nathanw unsigned char R; /* sector # */ 35 1.1.4.2 nathanw } minsec, maxsec; 36 1.1.4.2 nathanw } FDSECMINMAX; /* FD format type of the first track */ 37 1.1.4.2 nathanw #ifdef SCSI_ADHOC_BOOTPART 38 1.1.4.2 nathanw extern u_int32_t SCSI_PARTTOP; /* top position of boot partition in sector */ 39 1.1.4.2 nathanw extern u_int32_t SCSI_BLKLEN; /* sector len 0: 256, 1: 512, 2: 1024 */ 40 1.1.4.2 nathanw #endif 41