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