summaryrefslogtreecommitdiff
path: root/sys/arch/hppa/stand/libsa/dev_hppa.h
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1998-09-29 07:31:00 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1998-09-29 07:31:00 +0000
commit3888db5b76ec0c80dae00e944842b3cef9d743f5 (patch)
tree39fdb040b0a37d61891e86dc656f6f50e2c10a0d /sys/arch/hppa/stand/libsa/dev_hppa.h
parent881d5adf35bf89f15ff9b00e08d0135373bc9668 (diff)
sync; fixes; cleanup
get rid of those obscuring commands use device finger/mapper, thus rewrite devopen
Diffstat (limited to 'sys/arch/hppa/stand/libsa/dev_hppa.h')
-rw-r--r--sys/arch/hppa/stand/libsa/dev_hppa.h59
1 files changed, 30 insertions, 29 deletions
diff --git a/sys/arch/hppa/stand/libsa/dev_hppa.h b/sys/arch/hppa/stand/libsa/dev_hppa.h
index d7dd2ec23dd..99e59722734 100644
--- a/sys/arch/hppa/stand/libsa/dev_hppa.h
+++ b/sys/arch/hppa/stand/libsa/dev_hppa.h
@@ -1,41 +1,42 @@
-/* $OpenBSD: dev_hppa.h,v 1.1 1998/06/23 18:46:42 mickey Exp $ */
+/* $OpenBSD: dev_hppa.h,v 1.2 1998/09/29 07:30:59 mickey Exp $ */
-struct hppa_dev {
- dev_t bootdev;
-
- struct disklabel label;
-};
-
-#define CN_HPA PAGE0->mem_cons.pz_hpa
-#define CN_SPA PAGE0->mem_cons.pz_spa
-#define CN_LAYER PAGE0->mem_cons.pz_layers
-#define CN_IODC PAGE0->mem_cons.pz_iodc_io
-#define CN_CLASS PAGE0->mem_cons.pz_class
-
-#define KY_HPA PAGE0->mem_kbd.pz_hpa
-#define KY_SPA PAGE0->mem_kbd.pz_spa
-#define KY_LAYER PAGE0->mem_kbd.pz_layers
-#define KY_IODC PAGE0->mem_kbd.pz_iodc_io
-#define KY_CLASS PAGE0->mem_kbd.pz_class
-
-#define BT_HPA PAGE0->mem_boot.pz_hpa
-#define BT_SPA PAGE0->mem_boot.pz_spa
-#define BT_LAYER PAGE0->mem_boot.pz_layers
-#define BT_IODC PAGE0->mem_boot.pz_iodc_io
-#define BT_CLASS PAGE0->mem_boot.pz_class
#define MINIOSIZ 64 /* minimum buffer size for IODC call */
#define MAXIOSIZ (64 * 1024) /* maximum buffer size for IODC call */
-#define BTIOSIZ (8 * 1024) /* size of boot device I/O buffer */
-
#define IONBPG (2 * 1024) /* page alignment for I/O buffers */
#define IOPGSHIFT 11 /* LOG2(IONBPG) */
#define IOPGOFSET (IONBPG-1) /* byte offset into I/O buffer */
+#define BTIOSIZ (8 * 1024) /* size of boot device I/O buffer */
-#define ANYSLOT (-1)
-#define NOSLOT (-2)
+struct disklabel;
+struct hppa_dev {
+ dev_t bootdev;
+ struct pz_device *pz_dev; /* device descriptor */
+ daddr_t last_blk; /* byte offset for last read blk */
+ size_t last_read; /* amount read last time */
+ char buf[BTIOSIZ+MINIOSIZ]; /* will be used for unaligned io */
+
+ struct disklabel *label;
+};
-extern char btbuf[];
+#ifdef PDCDEBUG
+#define DEVPATH_PRINT(dp) \
+ printf("%x, %d.%d.%d.%d.%d.%d, 0x%x, %x.%x.%x.%x.%x.%x\n", \
+ (dp)->dp_flags, (dp)->dp_bc[0], (dp)->dp_bc[1], (dp)->dp_bc[2], \
+ (dp)->dp_bc[3], (dp)->dp_bc[4], (dp)->dp_bc[5], (dp)->dp_mod, \
+ (dp)->dp_layers[0], (dp)->dp_layers[1], (dp)->dp_layers[2], \
+ (dp)->dp_layers[3], (dp)->dp_layers[4], (dp)->dp_layers[5]);
+#define PZDEV_PRINT(dp) \
+ printf("devpath={%x, %d.%d.%d.%d.%d.%d, 0x%x, %x.%x.%x.%x.%x.%x}," \
+ "\n\thpa=%p, spa=%p, io=%p, class=%u\n", \
+ (dp)->pz_flags, (dp)->pz_bc[0], (dp)->pz_bc[1], (dp)->pz_bc[2], \
+ (dp)->pz_bc[3], (dp)->pz_bc[4], (dp)->pz_bc[5], (dp)->pz_mod, \
+ (dp)->pz_layers[0], (dp)->pz_layers[1], (dp)->pz_layers[2], \
+ (dp)->pz_layers[3], (dp)->pz_layers[4], (dp)->pz_layers[5], \
+ (dp)->pz_hpa, (dp)->pz_spa, (dp)->pz_iodc_io, (dp)->pz_class);
+#endif
+
+extern pdcio_t pdc;
extern int pdcbuf[]; /* PDC returns, pdc.c */
extern struct pz_device ctdev; /* cartridge tape (boot) device path */