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