Home | History | Annotate | Line # | Download | only in xxboot
xxboot.h revision 1.3
      1  1.3  isaki /*	$NetBSD: xxboot.h,v 1.3 2020/08/14 03:34:22 isaki Exp $	*/
      2  1.1  itohy 
      3  1.3  isaki /*
      4  1.3  isaki  * Copyright (C) 2020 Tetsuya Isaki. All rights reserved.
      5  1.1  itohy  *
      6  1.3  isaki  * Redistribution and use in source and binary forms, with or without
      7  1.3  isaki  * modification, are permitted provided that the following conditions
      8  1.3  isaki  * are met:
      9  1.3  isaki  * 1. Redistributions of source code must retain the above copyright
     10  1.3  isaki  *    notice, this list of conditions and the following disclaimer.
     11  1.3  isaki  * 2. Redistributions in binary form must reproduce the above copyright
     12  1.3  isaki  *    notice, this list of conditions and the following disclaimer in the
     13  1.3  isaki  *    documentation and/or other materials provided with the distribution.
     14  1.1  itohy  *
     15  1.3  isaki  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     16  1.3  isaki  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     17  1.3  isaki  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     18  1.3  isaki  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     19  1.3  isaki  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
     20  1.3  isaki  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
     21  1.3  isaki  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
     22  1.3  isaki  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
     23  1.3  isaki  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     24  1.3  isaki  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     25  1.3  isaki  * SUCH DAMAGE.
     26  1.1  itohy  */
     27  1.1  itohy 
     28  1.3  isaki #define BINF_ISFD(pbinf)	(*((uint8_t *)(pbinf) + 1) == 0)
     29  1.1  itohy 
     30  1.3  isaki /* boot.S */
     31  1.3  isaki extern void RAW_READ(void *, uint32_t, size_t);
     32  1.3  isaki extern int badbaddr(volatile void *);
     33  1.3  isaki extern unsigned int BOOT_INFO;	/* result of IOCS(__BOOTINF) */
     34  1.3  isaki extern unsigned int ID;		/* target SCSI ID */
     35  1.3  isaki extern struct {
     36  1.3  isaki 	struct fdfmt{
     37  1.3  isaki 		uint8_t	N;	/* sector length 0: 128, ..., 3: 1K */
     38  1.3  isaki 		uint8_t	C;	/* cylinder # */
     39  1.3  isaki 		uint8_t	H;	/* head # */
     40  1.3  isaki 		uint8_t	R;	/* sector # */
     41  1.1  itohy 	} minsec, maxsec;
     42  1.1  itohy } FDSECMINMAX;			/* FD format type of the first track */
     43  1.1  itohy 
     44  1.3  isaki /* xx.c */
     45  1.3  isaki extern int xxopen(struct open_file *, ...);
     46  1.3  isaki extern int xxclose(struct open_file *);
     47  1.3  isaki extern int xxstrategy(void *, int, daddr_t, size_t, void *, size_t *);
     48  1.3  isaki 
     49  1.3  isaki /* vers.c */
     50  1.3  isaki extern const char bootprog_name[];
     51  1.3  isaki extern const char bootprog_rev[];
     52