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