diff options
Diffstat (limited to 'sys/arch/vax')
-rw-r--r-- | sys/arch/vax/boot/Makefile | 4 | ||||
-rw-r--r-- | sys/arch/vax/boot/bootxx.c | 12 | ||||
-rw-r--r-- | sys/arch/vax/boot/start.s | 3 | ||||
-rw-r--r-- | sys/arch/vax/include/macros.h | 5 | ||||
-rw-r--r-- | sys/arch/vax/include/rpb.h | 4 | ||||
-rw-r--r-- | sys/arch/vax/mba/hpreg.h | 24 | ||||
-rw-r--r-- | sys/arch/vax/mba/mbareg.h | 27 | ||||
-rw-r--r-- | sys/arch/vax/stand/Makefile | 4 | ||||
-rw-r--r-- | sys/arch/vax/stand/bootxx.c | 12 | ||||
-rw-r--r-- | sys/arch/vax/stand/start.s | 3 | ||||
-rw-r--r-- | sys/arch/vax/vax/mscp.h | 3 |
11 files changed, 71 insertions, 30 deletions
diff --git a/sys/arch/vax/boot/Makefile b/sys/arch/vax/boot/Makefile index b54fa987f1f..dd0f6293780 100644 --- a/sys/arch/vax/boot/Makefile +++ b/sys/arch/vax/boot/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 1995/09/16 13:18:27 ragge Exp $ +# $NetBSD: Makefile,v 1.5 1995/10/20 13:35:44 ragge Exp $ # INCPATH=-I. -I../../.. -I../.. -I../../../lib/libsa @@ -16,7 +16,7 @@ DEVS= autoconf.o hp.o ra.o tmscp.o LIBKERN= ${KERNLIB} .include "$S/lib/libsa/Makefile.inc" -LIBSA= ${SA_LIB} +LIBSA= ${SALIB} all: xxboot boot copy edlabel diff --git a/sys/arch/vax/boot/bootxx.c b/sys/arch/vax/boot/bootxx.c index b2f01417c95..b60d7e7931c 100644 --- a/sys/arch/vax/boot/bootxx.c +++ b/sys/arch/vax/boot/bootxx.c @@ -1,4 +1,4 @@ -/* $NetBSD: bootxx.c,v 1.3 1995/09/16 13:01:06 ragge Exp $ */ +/* $NetBSD: bootxx.c,v 1.4 1995/10/20 13:35:43 ragge Exp $ */ /*- * Copyright (c) 1982, 1986 The Regents of the University of California. * All rights reserved. @@ -48,6 +48,7 @@ #include "../include/sid.h" #include "../include/mtpr.h" #include "../include/reg.h" +#include "../include/rpb.h" #define NRSP 0 /* Kludge */ #define NCMD 0 /* Kludge */ @@ -93,7 +94,7 @@ main() is_mvax = 1; cpu_sie = *((int *) 0x20040004) >> 24; cpu_type |= cpu_sie; - rpb = bootregs[11]; + rpb = (struct rpb *)bootregs[11]; bootdev = rpb->devtyp; break; @@ -275,7 +276,7 @@ devopen(f, fname, file) * but it doesn't hurt to always get it. */ if (!is_tmscp) { - msg = getdisklabel(LABELOFFSET + RELOC, &lp); + msg = getdisklabel((void *)LABELOFFSET + RELOC, &lp); if (msg) { printf("getdisklabel: %s\n", msg); } @@ -321,7 +322,7 @@ romstrategy(sc, func, dblk, size, buf, rsize) case 17: /* MSCP */ uda.uda_cmd.mscp_seq.seq_lbn = dblk; uda.uda_cmd.mscp_seq.seq_bytecount = size; - uda.uda_cmd.mscp_seq.seq_buffer = buf; + uda.uda_cmd.mscp_seq.seq_buffer = (int)buf; uda.uda_cmd.mscp_unit = rpb->unit; command(M_OP_READ, 0); break; @@ -340,7 +341,8 @@ romstrategy(sc, func, dblk, size, buf, rsize) for (i = 0 ; i < size/512 ; i++) { uda.uda_cmd.mscp_seq.seq_lbn = 1; uda.uda_cmd.mscp_seq.seq_bytecount = 512; - uda.uda_cmd.mscp_seq.seq_buffer = buf + i * 512; + uda.uda_cmd.mscp_seq.seq_buffer = + (int)buf + i * 512; uda.uda_cmd.mscp_unit = rpb->unit; command(M_OP_READ, 0); } diff --git a/sys/arch/vax/boot/start.s b/sys/arch/vax/boot/start.s index 45a9c56169d..80040a7c2d7 100644 --- a/sys/arch/vax/boot/start.s +++ b/sys/arch/vax/boot/start.s @@ -1,4 +1,4 @@ -/* $NetBSD: start.s,v 1.4 1995/09/16 16:20:21 ragge Exp $ */ +/* $NetBSD: start.s,v 1.5 1995/10/20 13:35:41 ragge Exp $ */ /* * Copyright (c) 1995 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -43,7 +43,6 @@ #define ASSEMBLER #include "../include/mtpr.h" #include "../include/asm.h" -#include "bootdefs.h" _start: .globl _start # this is the symbolic name for the start # of code to be relocated. We can use this diff --git a/sys/arch/vax/include/macros.h b/sys/arch/vax/include/macros.h index eb2dc2b9fd1..9b1bf44c026 100644 --- a/sys/arch/vax/include/macros.h +++ b/sys/arch/vax/include/macros.h @@ -1,4 +1,4 @@ -/* $NetBSD: macros.h,v 1.4 1995/07/05 08:22:21 ragge Exp $ */ +/* $NetBSD: macros.h,v 1.5 1995/10/20 12:55:06 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -32,7 +32,8 @@ /* All bugs are subject to removal without further notice */ -#if !defined(_VAX_MACROS_H_)&&!defined(ASSEMBLER)&&defined(_VAX_INLINE_) +#if !defined(_VAX_MACROS_H_) && (defined(STANDALONE) || \ + (!defined(ASSEMBLER) && defined(_VAX_INLINE_))) #define _VAX_MACROS_H_ /* Here general macros are supposed to be stored */ diff --git a/sys/arch/vax/include/rpb.h b/sys/arch/vax/include/rpb.h index de7aec72007..7e5e1f02080 100644 --- a/sys/arch/vax/include/rpb.h +++ b/sys/arch/vax/include/rpb.h @@ -1,4 +1,4 @@ -/* $NetBSD: rpb.h,v 1.1 1995/06/05 17:17:59 ragge Exp $ */ +/* $NetBSD: rpb.h,v 1.2 1995/10/20 13:47:27 ragge Exp $ */ /* * Copyright (c) 1995 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -97,4 +97,6 @@ struct rpb { /* size description */ long vmb_revision; /* 4 VMB revision label */ }; +#ifdef _KERNEL extern struct rpb rpb; +#endif diff --git a/sys/arch/vax/mba/hpreg.h b/sys/arch/vax/mba/hpreg.h index ddf2ed2eed3..3b367afdec1 100644 --- a/sys/arch/vax/mba/hpreg.h +++ b/sys/arch/vax/mba/hpreg.h @@ -1,4 +1,4 @@ -/* $NetBSD: hpreg.h,v 1.2 1995/06/16 15:20:11 ragge Exp $ */ +/* $NetBSD: hpreg.h,v 1.3 1995/10/20 13:43:43 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -55,10 +55,24 @@ struct hp_regs { #define hp_drv hp_regs -#define HPCS_PA 0x13 /* Pack acknowledge */ -#define HPCS_SEEK 0x5 -#define HPCS_READ 0x39 -#define HPCS_DVA 0x800 /* Drive avail, in dual-port config */ +#define HPCS_DVA 4000 /* Drive avail, in dual-port config */ +#define HPCS_WRITE 061 /* Write data */ +#define HPCS_WCHECK 051 /* Write check data */ +#define HPCS_WHEAD 063 /* Write header and data */ +#define HPCS_WCHEAD 053 /* Write check header and data */ +#define HPCS_READ 071 /* Read data */ +#define HPCS_RHEAD 073 /* Read header and data */ +#define HPCS_SEEK 005 /* Just seek */ +#define HPCS_RECAL 007 /* Recalibrate */ +#define HPCS_RTC 017 /* Return to centerline */ +#define HPCS_OFFSET 015 /* Offset */ +#define HPCS_SEARCH 031 /* Search */ +#define HPCS_UNLOAD 003 /* Unload pack (removable) */ +#define HPCS_RELEASE 013 /* Release massbuss port */ +#define HPCS_RPS 021 /* Read-in preset */ +#define HPCS_PA 023 /* Pack acknowledge */ +#define HPCS_DC 011 /* Drive clear */ + #define HPDS_VV 0x40 /* Volume valid, not changed */ #define HPDS_DRY 0x80 /* Drive ready to accept commands */ diff --git a/sys/arch/vax/mba/mbareg.h b/sys/arch/vax/mba/mbareg.h index 79e1acc4eba..77c00757c42 100644 --- a/sys/arch/vax/mba/mbareg.h +++ b/sys/arch/vax/mba/mbareg.h @@ -1,4 +1,4 @@ -/* $NetBSD: mbareg.h,v 1.1 1995/02/13 00:44:03 ragge Exp $ */ +/* $NetBSD: mbareg.h,v 1.2 1995/10/20 13:43:44 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden * All rights reserved. @@ -30,7 +30,14 @@ */ /* mbareg.h - 940320/ragge */ -#include "vax/mba/hpreg.h" + +struct mba_device { + u_int pad1; + u_int md_ds; /* unit status */ + u_int pad2[4]; + u_int md_dt; /* unit type */ + u_int pad3[25]; +}; struct mba_regs { u_int mba_csr; @@ -42,7 +49,7 @@ struct mba_regs { u_int mba_smr; u_int mba_car; u_int utrymme[248]; - struct hp_drv hp_drv[8]; + struct mba_device mba_md[8]; /* unit specific regs */ u_int mba_map[256]; }; @@ -78,3 +85,17 @@ struct mba_regs { #define MBASR_ERR_STAT 0x8 /* Error status */ #define MBASR_NRSTAT 0x2 /* No Response status */ +/* Definitions in mba_device md_ds */ +#define MBADS_DPR 0x100 /* Unit present */ + +/* Definitions in mba_device md_dt */ +#define MBADT_RP04 0x10 +#define MBADT_RP05 0x11 +#define MBADT_RP06 0x12 +#define MBADT_RP07 0x22 +#define MBADT_RM02 0x15 +#define MBADT_RM03 0x14 +#define MBADT_RM05 0x17 +#define MBADT_RM80 0x16 +#define MBADT_DRQ 0x800 /* Dual ported */ +#define MBADT_MOH 0x2000 /* Moving head device */ diff --git a/sys/arch/vax/stand/Makefile b/sys/arch/vax/stand/Makefile index b54fa987f1f..dd0f6293780 100644 --- a/sys/arch/vax/stand/Makefile +++ b/sys/arch/vax/stand/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 1995/09/16 13:18:27 ragge Exp $ +# $NetBSD: Makefile,v 1.5 1995/10/20 13:35:44 ragge Exp $ # INCPATH=-I. -I../../.. -I../.. -I../../../lib/libsa @@ -16,7 +16,7 @@ DEVS= autoconf.o hp.o ra.o tmscp.o LIBKERN= ${KERNLIB} .include "$S/lib/libsa/Makefile.inc" -LIBSA= ${SA_LIB} +LIBSA= ${SALIB} all: xxboot boot copy edlabel diff --git a/sys/arch/vax/stand/bootxx.c b/sys/arch/vax/stand/bootxx.c index b2f01417c95..b60d7e7931c 100644 --- a/sys/arch/vax/stand/bootxx.c +++ b/sys/arch/vax/stand/bootxx.c @@ -1,4 +1,4 @@ -/* $NetBSD: bootxx.c,v 1.3 1995/09/16 13:01:06 ragge Exp $ */ +/* $NetBSD: bootxx.c,v 1.4 1995/10/20 13:35:43 ragge Exp $ */ /*- * Copyright (c) 1982, 1986 The Regents of the University of California. * All rights reserved. @@ -48,6 +48,7 @@ #include "../include/sid.h" #include "../include/mtpr.h" #include "../include/reg.h" +#include "../include/rpb.h" #define NRSP 0 /* Kludge */ #define NCMD 0 /* Kludge */ @@ -93,7 +94,7 @@ main() is_mvax = 1; cpu_sie = *((int *) 0x20040004) >> 24; cpu_type |= cpu_sie; - rpb = bootregs[11]; + rpb = (struct rpb *)bootregs[11]; bootdev = rpb->devtyp; break; @@ -275,7 +276,7 @@ devopen(f, fname, file) * but it doesn't hurt to always get it. */ if (!is_tmscp) { - msg = getdisklabel(LABELOFFSET + RELOC, &lp); + msg = getdisklabel((void *)LABELOFFSET + RELOC, &lp); if (msg) { printf("getdisklabel: %s\n", msg); } @@ -321,7 +322,7 @@ romstrategy(sc, func, dblk, size, buf, rsize) case 17: /* MSCP */ uda.uda_cmd.mscp_seq.seq_lbn = dblk; uda.uda_cmd.mscp_seq.seq_bytecount = size; - uda.uda_cmd.mscp_seq.seq_buffer = buf; + uda.uda_cmd.mscp_seq.seq_buffer = (int)buf; uda.uda_cmd.mscp_unit = rpb->unit; command(M_OP_READ, 0); break; @@ -340,7 +341,8 @@ romstrategy(sc, func, dblk, size, buf, rsize) for (i = 0 ; i < size/512 ; i++) { uda.uda_cmd.mscp_seq.seq_lbn = 1; uda.uda_cmd.mscp_seq.seq_bytecount = 512; - uda.uda_cmd.mscp_seq.seq_buffer = buf + i * 512; + uda.uda_cmd.mscp_seq.seq_buffer = + (int)buf + i * 512; uda.uda_cmd.mscp_unit = rpb->unit; command(M_OP_READ, 0); } diff --git a/sys/arch/vax/stand/start.s b/sys/arch/vax/stand/start.s index 45a9c56169d..80040a7c2d7 100644 --- a/sys/arch/vax/stand/start.s +++ b/sys/arch/vax/stand/start.s @@ -1,4 +1,4 @@ -/* $NetBSD: start.s,v 1.4 1995/09/16 16:20:21 ragge Exp $ */ +/* $NetBSD: start.s,v 1.5 1995/10/20 13:35:41 ragge Exp $ */ /* * Copyright (c) 1995 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -43,7 +43,6 @@ #define ASSEMBLER #include "../include/mtpr.h" #include "../include/asm.h" -#include "bootdefs.h" _start: .globl _start # this is the symbolic name for the start # of code to be relocated. We can use this diff --git a/sys/arch/vax/vax/mscp.h b/sys/arch/vax/vax/mscp.h index 76817ce5984..1f538382277 100644 --- a/sys/arch/vax/vax/mscp.h +++ b/sys/arch/vax/vax/mscp.h @@ -1,4 +1,4 @@ -/* $NetBSD: mscp.h,v 1.2 1994/10/26 08:03:18 cgd Exp $ */ +/* $NetBSD: mscp.h,v 1.3 1995/10/20 13:51:56 ragge Exp $ */ /* * Copyright (c) 1988 Regents of the University of California. @@ -64,6 +64,7 @@ #define M_OP_COMPHD 0x20 /* Compare host data command */ #define M_OP_READ 0x21 /* Read command */ #define M_OP_WRITE 0x22 /* Write command */ +#define M_OP_POS 0x25 /* Positioning command */ #define M_OP_AVAILATTN 0x40 /* Available attention message */ #define M_OP_DUPUNIT 0x41 /* Duplicate unit number attention message */ #define M_OP_ACCPATH 0x42 /* Access path attention message */ |