diff options
author | Per Fogelstrom <pefo@cvs.openbsd.org> | 1997-05-18 13:45:26 +0000 |
---|---|---|
committer | Per Fogelstrom <pefo@cvs.openbsd.org> | 1997-05-18 13:45:26 +0000 |
commit | 5f197dfae3f5cfacdc581cb1fe7a85e1b2845060 (patch) | |
tree | 4b80cab22feb1654526671b8153442bf2c8e655b | |
parent | 682086e3b2a5dfa0f09c911f6e3651bcd5cb2aca (diff) |
RAMDISK additions
-rw-r--r-- | sys/arch/arc/TODO | 4 | ||||
-rw-r--r-- | sys/arch/arc/arc/autoconf.c | 7 | ||||
-rw-r--r-- | sys/arch/arc/arc/conf.c | 16 | ||||
-rw-r--r-- | sys/arch/arc/arc/machdep.c | 27 | ||||
-rw-r--r-- | sys/arch/arc/compile/.cvsignore | 2 | ||||
-rw-r--r-- | sys/arch/arc/conf/GENERIC | 20 | ||||
-rw-r--r-- | sys/arch/arc/conf/P4032 | 117 | ||||
-rw-r--r-- | sys/arch/arc/conf/RAMDISK | 148 | ||||
-rw-r--r-- | sys/arch/arc/conf/files.arc | 11 | ||||
-rw-r--r-- | sys/arch/arc/conf/ld.script | 2 |
10 files changed, 302 insertions, 52 deletions
diff --git a/sys/arch/arc/TODO b/sys/arch/arc/TODO index ce4530ec694..96aa0da08aa 100644 --- a/sys/arch/arc/TODO +++ b/sys/arch/arc/TODO @@ -9,8 +9,6 @@ InWork: Have a test version. The system hangs after a while. Not solved yet. o Boot. Standalone boot program instead of booting the kernel directly? - o Create boot package for distribution. - o sigsetjmp/siglongjmp missing.... o Add more videomodes to pccons driver. 50kHz and 64kHz monitors? @@ -19,8 +17,6 @@ InWork: This seems to be hard. Need more info on the chip. o Find out why bitmap load to S3-928 flashes screen. Know why (enable linear mode). Need S3 info. - o Would be nice to have Motif... - o Can we have 32 double registers? diff --git a/sys/arch/arc/arc/autoconf.c b/sys/arch/arc/arc/autoconf.c index 07a78650cd1..2ce1d6fe692 100644 --- a/sys/arch/arc/arc/autoconf.c +++ b/sys/arch/arc/arc/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.8 1997/04/19 17:19:39 pefo Exp $ */ +/* $OpenBSD: autoconf.c,v 1.9 1997/05/18 13:45:20 pefo Exp $ */ /* * Copyright (c) 1996 Per Fogelstrom * Copyright (c) 1995 Theo de Raadt @@ -41,7 +41,7 @@ * from: Utah Hdr: autoconf.c 1.31 91/01/21 * * from: @(#)autoconf.c 8.1 (Berkeley) 6/10/93 - * $Id: autoconf.c,v 1.8 1997/04/19 17:19:39 pefo Exp $ + * $Id: autoconf.c,v 1.9 1997/05/18 13:45:20 pefo Exp $ */ /* @@ -234,6 +234,9 @@ setroot() extern char *nfsbootdevname; #endif + if(boothowto & RB_DFLTROOT) + return; /* Boot compiled in */ + /* Lookup boot device from boot if not set by configuration */ if(bootdv == NULL) { bootdv = parsedisk(bootdev, strlen(bootdev), 0, &temp); diff --git a/sys/arch/arc/arc/conf.c b/sys/arch/arc/arc/conf.c index b3f21dc7e71..67f63776c33 100644 --- a/sys/arch/arc/arc/conf.c +++ b/sys/arch/arc/arc/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.15 1997/04/30 22:02:24 niklas Exp $ */ +/* $OpenBSD: conf.c,v 1.16 1997/05/18 13:45:21 pefo Exp $ */ /* * Copyright (c) 1992, 1993 @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: @(#)conf.c 8.2 (Berkeley) 11/14/93 - * $Id: conf.c,v 1.15 1997/04/30 22:02:24 niklas Exp $ + * $Id: conf.c,v 1.16 1997/05/18 13:45:21 pefo Exp $ */ #include <sys/param.h> @@ -67,6 +67,9 @@ bdev_decl(fd); bdev_decl(wd); #include "acd.h" bdev_decl(acd); +#include "ccd.h" +#include "rd.h" +bdev_decl(rd); struct bdevsw bdevsw[] = { @@ -76,9 +79,9 @@ struct bdevsw bdevsw[] = bdev_disk_init(NCD,cd), /* 3: SCSI CD-ROM */ bdev_disk_init(NWDC,wd), /* 4: ST506/ESDI/IDE disk */ bdev_disk_init(NACD,acd), /* 5: ATAPI CD-ROM */ - bdev_notdef(), /* 6: */ + bdev_disk_init(NCCD,ccd), /* 6: concatenated disk driver */ bdev_disk_init(NFDC,fd), /* 7: Floppy disk driver */ - bdev_notdef(), /* 8: */ + bdev_disk_init(NRD,rd), /* 8: RAM disk (for install) */ bdev_notdef(), /* 9: */ bdev_notdef(), /* 10: */ bdev_notdef(), /* 11: */ @@ -134,6 +137,7 @@ cdev_decl(st); #include "fdc.h" bdev_decl(fd); cdev_decl(vnd); +cdev_decl(rd); #include "bpfilter.h" cdev_decl(bpf); #include "com.h" @@ -183,7 +187,7 @@ struct cdevsw cdevsw[] = cdev_disk_init(NACD,acd), /* 19: ATAPI CD-ROM */ cdev_tty_init(NPTY,pts), /* 20: pseudo-tty slave */ cdev_ptc_init(NPTY,ptc), /* 21: pseudo-tty master */ - cdev_notdef(), /* 22: */ + cdev_disk_init(NRD,rd), /* 22: ramdisk device */ cdev_notdef(), /* 23: */ cdev_notdef(), /* 24: */ cdev_notdef(), /* 25: */ @@ -272,7 +276,7 @@ static int chrtoblktbl[MAXDEV] = { /* 19 */ 5, /* 20 */ NODEV, /* 21 */ NODEV, - /* 22 */ NODEV, + /* 22 */ 8, /* 23 */ NODEV, /* 24 */ NODEV, /* 25 */ NODEV, diff --git a/sys/arch/arc/arc/machdep.c b/sys/arch/arc/arc/machdep.c index 1ff572e4f37..b500f40273e 100644 --- a/sys/arch/arc/arc/machdep.c +++ b/sys/arch/arc/arc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.26 1997/05/01 15:15:29 pefo Exp $ */ +/* $OpenBSD: machdep.c,v 1.27 1997/05/18 13:45:21 pefo Exp $ */ /* * Copyright (c) 1988 University of Utah. * Copyright (c) 1992, 1993 @@ -38,7 +38,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 8.3 (Berkeley) 1/12/94 - * $Id: machdep.c,v 1.26 1997/05/01 15:15:29 pefo Exp $ + * $Id: machdep.c,v 1.27 1997/05/18 13:45:21 pefo Exp $ */ /* from: Utah Hdr: machdep.c 1.63 91/04/24 */ @@ -301,9 +301,14 @@ mips_init(argc, argv, envv) /* * Look at arguments passed to us and compute boothowto. - * Default to SINGLE and ASKNAME if no args. + * Default to SINGLE and ASKNAME if no args or + * SINGLE and DFLTROOT if this is a ramdisk kernel. */ +#ifdef RAMDISK_HOOKS + boothowto = RB_SINGLE | RB_DFLTROOT; +#else boothowto = RB_SINGLE | RB_ASKNAME; +#endif /* RAMDISK_HOOKS */ #ifdef KADB boothowto |= RB_KDB; #endif @@ -320,10 +325,6 @@ mips_init(argc, argv, envv) boothowto |= RB_DFLTROOT; break; - case 'm': /* mini root present in memory */ - boothowto |= RB_MINIROOT; - break; - case 'n': /* ask for names */ boothowto |= RB_ASKNAME; break; @@ -336,18 +337,6 @@ mips_init(argc, argv, envv) } } -#ifdef MFS - /* - * Check to see if a mini-root was loaded into memory. It resides - * at the start of the next page just after the end of BSS. - */ - if (boothowto & RB_MINIROOT) { - boothowto |= RB_DFLTROOT; - bios_load_miniroot(NULL, sysend); - sysend += mfs_initminiroot(sysend); - } -#endif - /* * Now its time to abandon the BIOS and be self supplying. * Start with cleaning out the TLB. Bye bye Microsoft.... diff --git a/sys/arch/arc/compile/.cvsignore b/sys/arch/arc/compile/.cvsignore index 0a04c375c06..4c3e9acdf39 100644 --- a/sys/arch/arc/compile/.cvsignore +++ b/sys/arch/arc/compile/.cvsignore @@ -1,3 +1,5 @@ ARCTIC GENERIC +P4032 PICA +RAMDISK diff --git a/sys/arch/arc/conf/GENERIC b/sys/arch/arc/conf/GENERIC index 6e476240b1b..b8b8481d13e 100644 --- a/sys/arch/arc/conf/GENERIC +++ b/sys/arch/arc/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.16 1997/04/29 08:13:40 niklas Exp $ +# $OpenBSD: GENERIC,v 1.17 1997/05/18 13:45:23 pefo Exp $ # # Generic configuration file for MIPS R4x00 ARC Systems # @@ -60,7 +60,6 @@ option IPFILTER # IP packet filter for security # Special options options MACHINE_NONCONTIG # Support noncontigous memory. -options PCIVERBOSE # Show as much info about pci as possible. # Specify storage configuration (its a joke..) config bsd swap generic @@ -74,9 +73,7 @@ cpu* at mainbus0 #### Main local buses pica* at mainbus0 # ACER Pica systems local bus. -algor* at mainbus0 # Algorithmics local bus. isabr* at mainbus0 # ISA Bus bridge (std ISA bus). -pbcpcibr* at mainbus0 # PCI Bus bridge. #### PICA bus devices @@ -94,21 +91,6 @@ fd* at fdc? drive ? asc0 at pica? scsibus* at asc? -#### Algor bus devices - -clock0 at algor? -com0 at algor? -com1 at algor? -lpt0 at algor? - -#### PCI Bus - -pci* at pbcpcibr? - -#ncr* at pci? dev ? function ? -#scsibus* at ncr? -de* at pci? dev ? function ? - #### ISA Bus. isa* at isabr? diff --git a/sys/arch/arc/conf/P4032 b/sys/arch/arc/conf/P4032 new file mode 100644 index 00000000000..453985dcd02 --- /dev/null +++ b/sys/arch/arc/conf/P4032 @@ -0,0 +1,117 @@ +# $OpenBSD: P4032,v 1.1 1997/05/18 13:45:23 pefo Exp $ +# +# Generic configuration file for Algorithmics P4032 board +# + +machine arc + +maxusers 32 + +# Need to set locally +options TIMEZONE=0 # minutes west of GMT (for) +options DST=0 # use daylight savings rules + +# Standard system options +options SWAPPAGER # swap pager (anonymous and swap space) +options DEVPAGER # device pager (mapped devices) + +options DIAGNOSTIC # extra kernel debugging checks +options KTRACE # system call tracing support +options DEBUG # extra kernel debugging support +options COMPAT_43 # compatibility with 4.3BSD binaries + +# System V options +options SYSVMSG # System V-like message queues +options SYSVSEM # System V-like semaphores +options SYSVSHM # System V-like memory sharing +options SHMMAXPGS=1024 # 1024 pages is the default +options NATIVE_ELF # Arc systems uses ELF as native format + +# Filesystem options +options CD9660 # ISO 9660 + Rock Ridge file system +options FDESC # user file descriptor filesystem (/dev/fd) +options FIFO # POSIX fifo support (in all filesystems) +options FFS,QUOTA # fast filesystem with user and group quotas +options KERNFS # kernel data-structure filesystem +#options LFS # Log-based filesystem (still experimental) +options MFS # memory-based filesystem +options MSDOSFS # Ability to read write MS-Dos filsystem +options NFSCLIENT # Sun NFS-compatible filesystem (client) +options NFSSERVER # Sun NFS-compatible filesystem (server) +options NULLFS # null layer filesystem +options PORTAL # portal filesystem (still experimental) +option PROCFS # /proc +options UMAPFS # uid/gid remapping filesystem +option UNION # union file system + + +# Networking options +#options GATEWAY # IP packet forwarding +options INET # Internet protocols +#option NS # XNS +#option IPX # IPX+SPX +#options ISO,TPIP # OSI networking +#options EON # OSI tunneling over IP +#option CCITT,LLC,HDLC # X.25 +option IPFILTER # IP packet filter for security + +#options TCP_COMPAT_42 # compatibility with 4.2BSD TCP/IP +#options MULTICAST # Multicast support +#options MROUTING # Multicast routing support + +# Special options +options MACHINE_NONCONTIG # Support noncontigous memory. + +# Specify storage configuration (its a joke..) +config bsd swap generic + +# +# Definition of system +# +mainbus0 at root +cpu* at mainbus0 + +#### Main local buses + +algor* at mainbus0 # Algorithmics local bus. +pbcpcibr* at mainbus0 # PCI Bus bridge. + +#### Algor bus devices + +clock0 at algor? +com0 at algor? +com1 at algor? +lpt0 at algor? + +#### PCI Bus + +pci* at pbcpcibr? + +#pcivga* at pci? dev ? function ? +ncr* at pci? dev ? function ? +scsibus* at ncr? +de* at pci? dev ? function ? + +#### SCSI Bus devices + +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 ? + +#### PSEUDO Devices + +pseudo-device loop 1 # network loopback +pseudo-device bpfilter 8 # packet filter ports +pseudo-device sl 2 # serial-line IP ports +pseudo-device ppp 2 # serial-line PPP ports +pseudo-device tun 2 # network tunneling over tty + +pseudo-device pty 64 # pseudo ptys +pseudo-device tb 1 # tablet line discipline +pseudo-device vnd 4 # paging to files +pseudo-device ccd 4 # concatenated disk devices +pseudo-device rd 4 # ram disk. + diff --git a/sys/arch/arc/conf/RAMDISK b/sys/arch/arc/conf/RAMDISK new file mode 100644 index 00000000000..f0ca6cfce6d --- /dev/null +++ b/sys/arch/arc/conf/RAMDISK @@ -0,0 +1,148 @@ +# $OpenBSD: RAMDISK,v 1.1 1997/05/18 13:45:24 pefo Exp $ +# +# Generic configuration file for MIPS R4x00 ARC Systems +# + +machine arc + +maxusers 4 + +# Need to set locally +options TIMEZONE=0 # minutes west of GMT (for) +options DST=0 # use daylight savings rules + +# Standard system options +options SWAPPAGER # swap pager (anonymous and swap space) +options DEVPAGER # device pager (mapped devices) + +options DIAGNOSTIC # extra kernel debugging checks +options KTRACE # system call tracing support +options DEBUG # extra kernel debugging support +options COMPAT_43 # compatibility with 4.3BSD binaries + +# System V options +options SYSVMSG # System V-like message queues +options SYSVSEM # System V-like semaphores +options SYSVSHM # System V-like memory sharing +options SHMMAXPGS=1024 # 1024 pages is the default +options NATIVE_ELF # Arc systems uses ELF as native format + +# Filesystem options +options CD9660 # ISO 9660 + Rock Ridge file system +#options FDESC # user file descriptor filesystem (/dev/fd) +options FIFO # POSIX fifo support (in all filesystems) +options FFS,QUOTA # fast filesystem with user and group quotas +options KERNFS # kernel data-structure filesystem +options MFS # memory-based filesystem +options MSDOSFS # Ability to read write MS-Dos filsystem +options NFSCLIENT # Sun NFS-compatible filesystem (client) +#options NFSSERVER # Sun NFS-compatible filesystem (server) +#options NULLFS # null layer filesystem +#options PORTAL # portal filesystem (still experimental) +#options PROCFS # /proc +#options UMAPFS # uid/gid remapping filesystem +#options UNION # union file system + + +# Networking options +#options GATEWAY # IP packet forwarding +options INET # Internet protocols +#option NS # XNS +#option IPX # IPX+SPX +#options ISO,TPIP # OSI networking +#options EON # OSI tunneling over IP +#option CCITT,LLC,HDLC # X.25 +#option IPFILTER # IP packet filter for security + +#options TCP_COMPAT_42 # compatibility with 4.2BSD TCP/IP +#options MULTICAST # Multicast support +#options MROUTING # Multicast routing support + +# Special options +options MACHINE_NONCONTIG # Support noncontigous memory. + +# Specify storage configuration using ramdisk +config bsd root on rd0a swap on rd0b + +# +# Definition of system +# +mainbus0 at root +cpu* at mainbus0 + +#### Main local buses + +pica* at mainbus0 # ACER Pica systems local bus. +isabr* at mainbus0 # ISA Bus bridge (std ISA bus). + +#### PICA bus devices + +clock0 at pica? +pc0 at pica? +pms0 at pica? +com0 at pica? +com1 at pica? +lpt0 at pica? +sn0 at pica? + +fdc0 at pica? +fd* at fdc? drive ? + +asc0 at pica? +scsibus* at asc? + +#### ISA Bus. + +isa* at isabr? + +clock0 at isa? port 0x70 irq 0 + +pc0 at isa? port 0x60 irq 1 # generic PC console device +com0 at isa? port 0x3f8 irq 4 +com1 at isa? port 0x2f8 irq 3 +com2 at isa? port 0x3e8 irq 4 +com3 at isa? port 0x2e8 irq 3 + +wdc0 at isa? port 0x1f0 irq 14 # ST506, ESDI, IDE controllers +#wdc1 at isa? port 0x170 irq 15 +wd* at wdc? drive ? + +atapibus* at wdc? +acd* at atapibus? drive? + +lpt0 at isa? port 0x378 irq 7 +ep0 at isa? port ? irq ? # 3C509 ethernet cards +ed0 at isa? port 0x280 iomem 0xd0000 irq 9 # WD/SMC, 3C503, NE[12]000 +ed1 at isa? port 0x250 iomem 0xd8000 irq 9 # ethernet cards +ed2 at isa? port 0x300 iomem 0xcc000 irq 10 # + +btl0 at isa? port 0x330 irq ? drq ? +scsibus* at btl? + +#### SCSI Bus devices + +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 ? + +#### PSEUDO Devices + +pseudo-device loop 1 # network loopback +#pseudo-device bpfilter 8 # packet filter ports +pseudo-device sl 2 # serial-line IP ports +pseudo-device ppp 2 # serial-line PPP ports +#pseudo-device tun 2 # network tunneling over tty + +#pseudo-device pty 64 # pseudo ptys +#pseudo-device tb 1 # tablet line discipline +#pseudo-device vnd 4 # paging to files +#pseudo-device ccd 4 # concatenated disk devices +pseudo-device rd 1 # Ram disk. + +# RAMDISK stuff +option MINIROOTSIZE=20000 +option RAMDISK_HOOKS + diff --git a/sys/arch/arc/conf/files.arc b/sys/arch/arc/conf/files.arc index fe6aaafa4fc..24ff1d26712 100644 --- a/sys/arch/arc/conf/files.arc +++ b/sys/arch/arc/conf/files.arc @@ -1,4 +1,4 @@ -# $OpenBSD: files.arc,v 1.14 1997/04/10 16:29:12 pefo Exp $ +# $OpenBSD: files.arc,v 1.15 1997/05/18 13:45:24 pefo Exp $ # # maxpartitions must be first item in files.${ARCH} # @@ -154,6 +154,15 @@ attach pcivga at pci file arch/arc/pci/pci_vga.c pcivga # +# Specials. +# +# RAM disk for boot tape +pseudo-device rd +file dev/ramdisk.c rd needs-flag +file arch/arc/dev/rd_root.c ramdisk_hooks +major {rd = 8} + +# # Common files # diff --git a/sys/arch/arc/conf/ld.script b/sys/arch/arc/conf/ld.script index 3c59f13f80b..46622030589 100644 --- a/sys/arch/arc/conf/ld.script +++ b/sys/arch/arc/conf/ld.script @@ -5,7 +5,7 @@ ENTRY(_start) SECTIONS { /* Read-only sections, merged into text segment: */ - . = 0x80100000 + SIZEOF_HEADERS; + . = 0x80800000 + SIZEOF_HEADERS; .text : { _ftext = . ; |