Module Name:    src
Committed By:   isaki
Date:           Fri Aug 14 03:34:22 UTC 2020

Modified Files:
        src/sys/arch/x68k/stand/xxboot: bootmain.c xx.c
Added Files:
        src/sys/arch/x68k/stand/xxboot: xxboot.h

Log Message:
Add xxboot.h common header to share prototype definitions.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x68k/stand/xxboot/bootmain.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x68k/stand/xxboot/xx.c
cvs rdiff -u -r0 -r1.3 src/sys/arch/x68k/stand/xxboot/xxboot.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x68k/stand/xxboot/bootmain.c
diff -u src/sys/arch/x68k/stand/xxboot/bootmain.c:1.5 src/sys/arch/x68k/stand/xxboot/bootmain.c:1.6
--- src/sys/arch/x68k/stand/xxboot/bootmain.c:1.5	Fri Aug 14 02:51:48 2020
+++ src/sys/arch/x68k/stand/xxboot/bootmain.c	Fri Aug 14 03:34:22 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: bootmain.c,v 1.5 2020/08/14 02:51:48 isaki Exp $	*/
+/*	$NetBSD: bootmain.c,v 1.6 2020/08/14 03:34:22 isaki Exp $	*/
 
 /*-
  * Copyright (c) 1993, 1994 Takumi Nakamura.
@@ -39,25 +39,12 @@
 #include <lib/libsa/stand.h>
 #include <lib/libsa/loadfile.h>
 
+#include "xxboot.h"
 #include "libx68k.h"
 #include "iocs.h"
 #include "exec_image.h"
 
 #define EXSCSI_BDID	((void *)0x00ea0001)
-#define BINF_ISFD(pbinf)	(*((uint8_t *)(pbinf) + 1) == 0)
-
-/* boot.S */
-extern int badbaddr(volatile void *);
-extern unsigned int ID;		/* target SCSI ID */
-extern unsigned int BOOT_INFO;	/* result of IOCS(__BOOTINF) */
-extern struct {
-	struct fdfmt{
-		uint8_t	N;	/* sector length 0: 128, ..., 3: 1K */
-		uint8_t	C;	/* cylinder # */
-		uint8_t	H;	/* head # */
-		uint8_t	R;	/* sector # */
-	} minsec, maxsec;
-} FDSECMINMAX;			/* FD format type of the first track */
 
 /* for debug */
 unsigned int startregs[16];
@@ -107,8 +94,6 @@ get_scsi_host_adapter(char *devstr)
 	return ha;
 }
 
-extern const char bootprog_name[], bootprog_rev[];
-
 void
 bootmain(void)
 {

Index: src/sys/arch/x68k/stand/xxboot/xx.c
diff -u src/sys/arch/x68k/stand/xxboot/xx.c:1.2 src/sys/arch/x68k/stand/xxboot/xx.c:1.3
--- src/sys/arch/x68k/stand/xxboot/xx.c:1.2	Sat Nov 17 16:02:00 2012
+++ src/sys/arch/x68k/stand/xxboot/xx.c	Fri Aug 14 03:34:22 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: xx.c,v 1.2 2012/11/17 16:02:00 tsutsui Exp $	*/
+/*	$NetBSD: xx.c,v 1.3 2020/08/14 03:34:22 isaki Exp $	*/
 
 /*
  * Copyright (c) 2010 MINOURA Makoto.
@@ -28,7 +28,7 @@
 #include <sys/param.h>
 #include <lib/libsa/stand.h>
 
-extern void RAW_READ(void *buf, uint32_t blkpos, size_t bytelen);
+#include "xxboot.h"
 
 int
 xxopen(struct open_file *f, ...)

Added files:

Index: src/sys/arch/x68k/stand/xxboot/xxboot.h
diff -u /dev/null src/sys/arch/x68k/stand/xxboot/xxboot.h:1.3
--- /dev/null	Fri Aug 14 03:34:22 2020
+++ src/sys/arch/x68k/stand/xxboot/xxboot.h	Fri Aug 14 03:34:22 2020
@@ -0,0 +1,51 @@
+/*	$NetBSD: xxboot.h,v 1.3 2020/08/14 03:34:22 isaki Exp $	*/
+
+/*
+ * Copyright (C) 2020 Tetsuya Isaki. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#define BINF_ISFD(pbinf)	(*((uint8_t *)(pbinf) + 1) == 0)
+
+/* boot.S */
+extern void RAW_READ(void *, uint32_t, size_t);
+extern int badbaddr(volatile void *);
+extern unsigned int BOOT_INFO;	/* result of IOCS(__BOOTINF) */
+extern unsigned int ID;		/* target SCSI ID */
+extern struct {
+	struct fdfmt{
+		uint8_t	N;	/* sector length 0: 128, ..., 3: 1K */
+		uint8_t	C;	/* cylinder # */
+		uint8_t	H;	/* head # */
+		uint8_t	R;	/* sector # */
+	} minsec, maxsec;
+} FDSECMINMAX;			/* FD format type of the first track */
+
+/* xx.c */
+extern int xxopen(struct open_file *, ...);
+extern int xxclose(struct open_file *);
+extern int xxstrategy(void *, int, daddr_t, size_t, void *, size_t *);
+
+/* vers.c */
+extern const char bootprog_name[];
+extern const char bootprog_rev[];

Reply via email to