diff options
author | Hugh Graham <hugh@cvs.openbsd.org> | 2000-10-31 02:30:58 +0000 |
---|---|---|
committer | Hugh Graham <hugh@cvs.openbsd.org> | 2000-10-31 02:30:58 +0000 |
commit | 35dbe86c5be978e3d32f63f9eb6eaa584b9465f6 (patch) | |
tree | b9335407ce8beaae69f5d91e17dca01855229c4f /sys/arch | |
parent | b0a9f0bc62af3bfbacd85c62e90ee1d3cff1a01d (diff) |
ramdisk support for vax.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/vax/compile/.cvsignore | 1 | ||||
-rw-r--r-- | sys/arch/vax/conf/RAMDISK | 169 | ||||
-rw-r--r-- | sys/arch/vax/conf/files.vax | 6 | ||||
-rw-r--r-- | sys/arch/vax/vax/conf.c | 6 | ||||
-rw-r--r-- | sys/arch/vax/vax/rd_root.c | 77 |
5 files changed, 255 insertions, 4 deletions
diff --git a/sys/arch/vax/compile/.cvsignore b/sys/arch/vax/compile/.cvsignore index 6aac3b440c7..e96f081902c 100644 --- a/sys/arch/vax/compile/.cvsignore +++ b/sys/arch/vax/compile/.cvsignore @@ -1,3 +1,4 @@ GENERIC +RAMDISK NANCY VOX diff --git a/sys/arch/vax/conf/RAMDISK b/sys/arch/vax/conf/RAMDISK new file mode 100644 index 00000000000..3f1b631eefa --- /dev/null +++ b/sys/arch/vax/conf/RAMDISK @@ -0,0 +1,169 @@ +# $OpenBSD: RAMDISK,v 1.1 2000/10/31 02:30:56 hugh Exp $ + +machine vax # machine type + +#makeoptions COPTS="-Os" # untested +makeoptions COPTS="-O2" + +option RAMDISK_HOOKS +option MINIROOTSIZE=4352 # LESS THAN RELOC + +# Here are all different supported CPU types listed. +# One of these is required. +#option VAX8600 +#option VAX8200 +#option VAX780 # 11/780 +#option VAX750 # 11/750 +option VAX630 # MV II +option VAX650 # MV III, 3300, 3600, 3800, 3900 +option VAX670 # VAX 4000/300 +option VAX410 # VS 2000, 3100/{30,} +option VAX43 # VS 3100/76 +option VAX46 # VS 4000/60 +option VAX48 # VS 4000 VLC +option VAX49 # VS 4000/90 + +option UVM # VAX uses UVM; REQUIRED + +maxusers 8 # estimated number of users +option TIMEZONE=0 # time zone to adjust RTC time by +option DST=0 # daylight savings time used by RTC + +option SWAPPAGER # paging; REQUIRED +option DEVPAGER # mmap() of devices + +option FFS # UFS + +option NFSCLIENT # Network File System client +option CD9660 # ISO 9660 + Rock Ridge file system +option MSDOSFS # MS-DOS file system +option FIFO # FIFOs; RECOMMENDED +option KERNFS # /kern + +option INET # IP + ICMP + TCP + UDP + +option BOOT_CONFIG # boot-time kernel config + +config bsd root on rd0a swap on rd0b # and sd0b + +# WS console uses VT100 terminal emulation +option WSEMUL_VT100 +option WSDISPLAY_DEFAULTSCREENS=8 + +# Old compat stuff; needed to run 4.3BSD Reno programs. +# Note that if COMPAT_ULTRIX is set, you lose compatibility with +# 4.3BSD Reno programs and get Ultrix compatibility instead. +# (They cannot coexist). +option COMPAT_VAX1K # Must be present to run pre-1.4 binaries. +option COMPAT_12 +#option COMPAT_13 +#option COMPAT_14 +#option COMPAT_ULTRIX + +option INSN_EMULATE # CPU lacks some hardware instructions. + +mainbus0 at root + +# All buses; from the beginning attached to mainbus. +#abus0 at mainbus0 # Master bus on VAX 8600 +#sbi0 at mainbus0 # SBI, master bus on 11/780. +#cmi0 at mainbus0 # 11/750 internal bus. +#bi0 at mainbus0 # VAX 8200 +vsbus0 at mainbus0 # All VAXstations +ibus0 at mainbus0 # All Microvax +#nbi0 at mainbus0 # VAX 8800 +#xmi0 at mainbus0 # VAX 6000 + +# Vsbus, the virtual VAXstation bus, and possible devices. +le0 at vsbus0 csr 0x200e0000 # LANCE ethernet +ze0 at vsbus0 csr 0x20008000 # SGEC ethernet +dz0 at vsbus0 csr 0x200a0000 # DC-367 DZ-11 lookalike ctlr +dz0 at vsbus0 csr 0x25000000 # VS4000/90 serial line +#hdc0 at vsbus0 csr 0x200c0000 # HDC9224 MFM/floppy ctlr +ncr0 at vsbus0 csr 0x200c0080 # VS2000/3100 SCSI-ctlr +ncr1 at vsbus0 csr 0x200c0180 # VS2000/3100 SCSI-ctlr +asc0 at vsbus0 csr 0x200c0080 # VS4000/60 (or VLC) SCSI-ctlr +asc0 at vsbus0 csr 0x26000080 # VS4000/90 SCSI-ctlr +#smg0 at vsbus0 csr 0x200f0000 # Small monochrome display ctlr. +#clr0 at vsbus0 csr 0x30000000 # 4- or 8-bitplans color graphics + +#hd* at hdc0 drive? # RD5x disks +#ry* at hdc0 drive? # RX floppies + +# Ibus, the internal bus on most Microvaxen +uba0 at ibus0 # Qbus adapter +ze0 at ibus0 # SGEC on-board ethernet +#shac0 at ibus0 # DSSI controller +le0 at ibus0 # LANCE ethernet + +# Devices connected at VAXBI +#cpu* at bi? node? # KA820/KA825 cpu +#mem* at bi? node? # Memory subsystems +#uba* at bi? node? # DWBUA BI-Unibus adapter +#ni* at bi? node? # DEBNA/DEBNT ethernet adapter +#kdb* at bi? node? # KDB50 MSCP disk ctlr +#mscpbus* at kdb? + +# CMI (VAX 11/750) +#mem* at cmi? tr? # Memory subsystems +#uba* at cmi? tr? # Unibus adapters +#mba* at cmi? tr? # Massbus adapters + +# SBI (VAX 11/780, VAX 8600) +#sbi* at abus0 # VAX 8600 can have up to 4 SBI's. + +#mem* at sbi? tr? # Memory subsystems +#uba* at sbi? tr? # Unibus adapters +#mba* at sbi? tr? # Massbus adapters + +# Devices on Massbus adapters +#hp* at mba? drive? # RM/RP disk drives + +# Devices on Unibus/Qbus adapters +#uda0 at uba? csr 0172150 # UDA50/RQDX? +#uda1 at uba? csr 0160334 +mtc0 at uba? csr 0174500 # Tape MSCP ctlr +#ts0 at uba? csr 0172520 # TS11/TSV05 tape. +#qd0 at uba? csr 0177400 # 4- or 8-bitplans color graphics +#qv0 at uba? csr 0177400 # Monochrome graphics +#de0 at uba? csr 0174510 # DELUA/DEUNA +#qe0 at uba? csr 0174440 # DEQNA/DELQA +#dhu0 at uba? csr 0160440 # DHU-11 +#dz0 at uba? csr 0160100 # DZ-11 +#dl0 at uba? csr 0176500 # DL-11 + +# MSCP devices +#mscpbus* at uda? +mscpbus* at mtc? +#mscpbus* at kdb? + +#ra* at mscpbus? drive? # MSCP disk +rx* at mscpbus? drive? # MSCP floppy +mt* at mscpbus? drive? # MSCP tape + +# VS2000 builtin MFM controller (HDC9224) +#hdc0 at vsbus0 # The strange builtin MFM controller + +# SCSI devices +scsibus* at asc? +scsibus* at ncr? + +sd* at scsibus? target? lun? +st* at scsibus? target? lun? +cd* at scsibus? target? lun? +ch* at scsibus? target? lun? +ss* at scsibus? target? lun? +uk* at scsibus? target? lun? + +# Workstation console +#wscons* at smg? + +#wsdisplay0 at clr0 +#wsdisplay0 at qd0 +#wsdisplay0 at qv0 +#lkc0 at dz0 + +pseudo-device loop 1 # network loopback +pseudo-device bpfilter 1 # packet filter +pseudo-device rd 1 # ramdisk + diff --git a/sys/arch/vax/conf/files.vax b/sys/arch/vax/conf/files.vax index 3190b8f7b78..dc981126ce7 100644 --- a/sys/arch/vax/conf/files.vax +++ b/sys/arch/vax/conf/files.vax @@ -1,4 +1,4 @@ -# $OpenBSD: files.vax,v 1.15 2000/10/24 02:20:21 hugh Exp $ +# $OpenBSD: files.vax,v 1.16 2000/10/31 02:30:56 hugh Exp $ # $NetBSD: files.vax,v 1.60 1999/08/27 20:04:32 ragge Exp $ # # new style config file for vax architecture @@ -126,6 +126,10 @@ device ry: disk attach ry at hdc major {ry = 24} +# RAM Disk for install floppy +file arch/vax/vax/rd_root.c ramdisk_hooks +major {rd = 23} + # # Machine-independent SCSI driver. # diff --git a/sys/arch/vax/vax/conf.c b/sys/arch/vax/vax/conf.c index 01f1eeddf77..313c373d969 100644 --- a/sys/arch/vax/vax/conf.c +++ b/sys/arch/vax/vax/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.21 2000/10/09 23:11:57 bjc Exp $ */ +/* $OpenBSD: conf.c,v 1.22 2000/10/31 02:30:57 hugh Exp $ */ /* $NetBSD: conf.c,v 1.44 1999/10/27 16:38:54 ragge Exp $ */ /*- @@ -148,7 +148,7 @@ struct bdevsw bdevsw[] = bdev_notdef(), /* 16: was: KDB50/RA?? */ bdev_disk_init(NCCD,ccd), /* 17: concatenated disk driver */ bdev_disk_init(NVND,vnd), /* 18: vnode disk driver */ - bdev_disk_init(NHD,hd), /* 19: VS3100 ST506 disk */ + bdev_disk_init(NHD,hd), /* 19: VS3100 ST506 disk */ bdev_disk_init(NSD,sd), /* 20: SCSI disk */ bdev_tape_init(NST,st), /* 21: SCSI tape */ bdev_disk_init(NCD,cd), /* 22: SCSI CD-ROM */ @@ -498,7 +498,7 @@ struct cdevsw cdevsw[] = cdev_disk_init(NVND,vnd), /* 55: vnode disk driver */ cdev_bpftun_init(NBPFILTER,bpf),/* 56: berkeley packet filter */ cdev_bpftun_init(NTUN,tun), /* 57: tunnel filter */ - cdev_disk_init(NHD,hd), /* 58: HDC9224/RD?? */ + cdev_disk_init(NHD,hd), /* 58: HDC9224/RD?? */ cdev_disk_init(NSD,sd), /* 59: SCSI disk */ cdev_tape_init(NST,st), /* 60: SCSI tape */ cdev_disk_init(NCD,cd), /* 61: SCSI CD-ROM */ diff --git a/sys/arch/vax/vax/rd_root.c b/sys/arch/vax/vax/rd_root.c new file mode 100644 index 00000000000..5b90686b82c --- /dev/null +++ b/sys/arch/vax/vax/rd_root.c @@ -0,0 +1,77 @@ +/* $OpenBSD: rd_root.c,v 1.1 2000/10/31 02:30:57 hugh Exp $ */ +/* $NetBSD: rd_root.c,v 1.2 1996/03/27 16:38:33 perry Exp $ */ + +/* + * Copyright (c) 1995 Gordon W. Ross + * 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * 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. + */ + +#include <sys/param.h> +#include <sys/systm.h> +#include <sys/reboot.h> + +#include <dev/ramdisk.h> + +extern int boothowto; + +#ifndef MINIROOTSIZE +#define MINIROOTSIZE 4096 +#endif + +#define ROOTBYTES (MINIROOTSIZE << DEV_BSHIFT) + +/* + * This array will be patched to contain a file-system image. + * See the program: src/distrib/sun3/common/rdsetroot.c + */ +int rd_root_size = ROOTBYTES; +char rd_root_image[ROOTBYTES] = "|This is the root ramdisk!\n"; + +/* + * This is called during autoconfig. + */ +void +rd_attach_hook(unit, rd) + int unit; + struct rd_conf *rd; +{ + if (unit == 0) { + /* Setup root ramdisk */ + rd->rd_addr = (caddr_t) rd_root_image; + rd->rd_size = (size_t) rd_root_size; + rd->rd_type = RD_KMEM_FIXED; + printf("rd%d: fixed, %d blocks\n", unit, MINIROOTSIZE); + } +} + +/* + * This is called during open (i.e. mountroot) + */ +void +rd_open_hook(unit, rd) + int unit; + struct rd_conf *rd; +{ +} |