xxboot.h revision 1.1 1 1.1 itohy /* $NetBSD: xxboot.h,v 1.1 1998/09/01 20:02:35 itohy Exp $ */
2 1.1 itohy
3 1.1 itohy /***************************************************************
4 1.1 itohy *
5 1.1 itohy * file: boot.h
6 1.1 itohy *
7 1.1 itohy * author: chapuni(GBA02750 (at) niftyserve.or.jp)
8 1.1 itohy *
9 1.1 itohy */
10 1.1 itohy
11 1.1 itohy /* xxboot.S */
12 1.1 itohy __dead void BOOT_ERROR __P((const char *msg)) __attribute__((noreturn));
13 1.1 itohy int badbaddr __P((volatile void *adr));
14 1.1 itohy int RAW_READ __P((void *buf, u_int32_t blkpos, size_t bytelen));
15 1.1 itohy #ifdef SCSI_ADHOC_BOOTPART
16 1.1 itohy int RAW_READ0 __P((void *buf, u_int32_t blkpos, size_t bytelen));
17 1.1 itohy #endif
18 1.1 itohy unsigned B_KEYINP __P((void));
19 1.1 itohy void B_CLR_ST __P((unsigned x));
20 1.1 itohy void B_PUTC __P((unsigned c));
21 1.1 itohy void B_PRINT __P((const unsigned char *p));
22 1.1 itohy unsigned B_COLOR __P((unsigned w));
23 1.1 itohy unsigned B_LOCATE __P((int x, int y));
24 1.1 itohy #if 0
25 1.1 itohy unsigned JISSFT __P((unsigned c));
26 1.1 itohy #endif
27 1.1 itohy unsigned short B_SFTSNS __P((void));
28 1.1 itohy void printtitle __P((void));
29 1.1 itohy #if 0
30 1.1 itohy int SYS_STAT __P((int flags));
31 1.1 itohy int getcpu __P((void));
32 1.1 itohy #endif
33 1.1 itohy
34 1.1 itohy extern unsigned ID; /* target SCSI ID */
35 1.1 itohy extern unsigned BOOT_INFO; /* result of IOCS(__BOOTINF) */
36 1.1 itohy
37 1.1 itohy /* check whether the bootinf is SCSI or floppy */
38 1.1 itohy #define BINF_ISFD(pbinf) (*((char *)(pbinf) + 1) == 0)
39 1.1 itohy
40 1.1 itohy extern unsigned FDMODE; /* Floppy access mode: PDA x 256 + MODE */
41 1.1 itohy extern struct fdfmt{
42 1.1 itohy struct {
43 1.1 itohy unsigned char N; /* sector length 0: 128, ..., 3: 1K */
44 1.1 itohy unsigned char C; /* cylinder # */
45 1.1 itohy unsigned char H; /* head # */
46 1.1 itohy unsigned char R; /* sector # */
47 1.1 itohy } minsec, maxsec;
48 1.1 itohy } FDSECMINMAX; /* FD format type of the first track */
49 1.1 itohy #ifdef SCSI_ADHOC_BOOTPART
50 1.1 itohy extern u_int32_t SCSI_PARTTOP; /* top position of boot partition in sector */
51 1.1 itohy extern u_int32_t SCSI_BLKLEN; /* sector len 0: 256, 1: 512, 2: 1024 */
52 1.1 itohy #endif
53 1.1 itohy
54 1.1 itohy /* bootufs.c */
55 1.1 itohy int raw_read_queue __P((void *buf, u_int32_t blkpos, size_t len));
56 1.1 itohy void get_superblk __P((void));
57 1.1 itohy int get_inode __P((ino_t ino, struct dinode *pino));
58 1.1 itohy int read_indirect __P((ufs_daddr_t blkno, int level, void **buf, int count));
59 1.1 itohy void read_blocks __P((struct dinode *dp, void *buf, int count));
60 1.1 itohy ino_t search_file __P((ino_t dirino, const char *filename));
61 1.1 itohy unsigned load_ino __P((void *buf, ino_t ino, const char *filename));
62 1.1 itohy unsigned load_name __P((void *buf, ino_t dirino, const char *filename));
63 1.1 itohy void print_hex __P((unsigned x, int l));
64 1.1 itohy void pickup_list __P((ino_t dirino));
65 1.1 itohy void print_list __P((int n, int active, unsigned boothowto));
66 1.1 itohy volatile void bootufs __P((void));
67 1.1 itohy
68 1.1 itohy /* eof */
69