From 40369d6aaf5319f0b1eb8e0d5b48ae6f33a3aeaf Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Fri, 14 Aug 2009 03:32:54 +0200 Subject: [PATCH 01/10] Initial Palm support --- Makefile.cross | 3 +- distrib/palm/Makefile | 5 + distrib/palm/ramdisk/Makefile | 104 +++ distrib/palm/ramdisk/Makefile.inc | 4 + distrib/palm/ramdisk/install.md | 137 ++++ distrib/palm/ramdisk/list | 87 ++ etc/etc.palm/MAKEDEV | 518 ++++++++++++ etc/etc.palm/MAKEDEV.md | 119 +++ etc/etc.palm/MAKEDEV.mtmp | 254 ++++++ etc/etc.palm/Makefile | 5 + etc/etc.palm/Makefile.inc | 18 + etc/etc.palm/disktab | 875 ++++++++++++++++++++ etc/etc.palm/fbtab | 3 + etc/etc.palm/sysctl.conf | 4 + etc/etc.palm/ttys | 16 + lib/libarch/arm/Makefile | 2 +- sys/Makefile | 2 +- sys/arch/palm/Makefile | 37 + sys/arch/palm/compile/.cvsignore | 2 + sys/arch/palm/conf/GENERIC | 220 +++++ sys/arch/palm/conf/Makefile.palm | 213 +++++ sys/arch/palm/conf/RAMDISK | 165 ++++ sys/arch/palm/conf/files.palm | 72 ++ sys/arch/palm/include/_types.h | 11 + sys/arch/palm/include/apmvar.h | 1 + sys/arch/palm/include/asm.h | 4 + sys/arch/palm/include/atomic.h | 10 + sys/arch/palm/include/bootconfig.h | 76 ++ sys/arch/palm/include/bus.h | 4 + sys/arch/palm/include/cdefs.h | 3 + sys/arch/palm/include/conf.h | 17 + sys/arch/palm/include/cpu.h | 4 + sys/arch/palm/include/db_machdep.h | 4 + sys/arch/palm/include/disklabel.h | 3 + sys/arch/palm/include/endian.h | 4 + sys/arch/palm/include/exec.h | 3 + sys/arch/palm/include/float.h | 4 + sys/arch/palm/include/fp.h | 4 + sys/arch/palm/include/frame.h | 4 + sys/arch/palm/include/ieee.h | 4 + sys/arch/palm/include/ieeefp.h | 4 + sys/arch/palm/include/internal_types.h | 7 + sys/arch/palm/include/intr.h | 104 +++ sys/arch/palm/include/limits.h | 4 + sys/arch/palm/include/loadfile_machdep.h | 52 ++ sys/arch/palm/include/lock.h | 4 + sys/arch/palm/include/machine_reg.h | 58 ++ sys/arch/palm/include/mutex.h | 3 + sys/arch/palm/include/palm_var.h | 52 ++ sys/arch/palm/include/param.h | 51 ++ sys/arch/palm/include/pcb.h | 4 + sys/arch/palm/include/pio.h | 4 + sys/arch/palm/include/pmap.h | 4 + sys/arch/palm/include/proc.h | 4 + sys/arch/palm/include/profile.h | 4 + sys/arch/palm/include/psl.h | 1 + sys/arch/palm/include/ptrace.h | 4 + sys/arch/palm/include/reg.h | 4 + sys/arch/palm/include/reloc.h | 2 + sys/arch/palm/include/setjmp.h | 4 + sys/arch/palm/include/signal.h | 4 + sys/arch/palm/include/spinlock.h | 7 + sys/arch/palm/include/stdarg.h | 4 + sys/arch/palm/include/sysarch.h | 4 + sys/arch/palm/include/trap.h | 4 + sys/arch/palm/include/vmparam.h | 86 ++ sys/arch/palm/palm/autoconf.c | 147 ++++ sys/arch/palm/palm/palm_lcd.c | 222 +++++ sys/arch/palm/palm/palm_machdep.c | 1298 ++++++++++++++++++++++++++++++ sys/arch/palm/palm/palm_start.S | 172 ++++ sys/dev/microcode/atmel/Makefile | 2 +- sys/dev/microcode/kue/Makefile | 2 +- sys/dev/microcode/rum/Makefile | 2 +- sys/dev/microcode/symbol/Makefile | 3 +- sys/dev/microcode/tusb3410/Makefile | 2 +- sys/dev/microcode/zydas/Makefile | 2 +- usr.sbin/hotplugd/Makefile | 2 +- usr.sbin/wsconscfg/Makefile | 2 +- usr.sbin/wsfontload/Makefile | 2 +- 79 files changed, 5354 insertions(+), 12 deletions(-) create mode 100644 distrib/palm/Makefile create mode 100644 distrib/palm/ramdisk/Makefile create mode 100644 distrib/palm/ramdisk/Makefile.inc create mode 100644 distrib/palm/ramdisk/install.md create mode 100644 distrib/palm/ramdisk/list create mode 100644 etc/etc.palm/MAKEDEV create mode 100644 etc/etc.palm/MAKEDEV.md create mode 100644 etc/etc.palm/MAKEDEV.mtmp create mode 100644 etc/etc.palm/Makefile create mode 100644 etc/etc.palm/Makefile.inc create mode 100644 etc/etc.palm/disktab create mode 100644 etc/etc.palm/fbtab create mode 100644 etc/etc.palm/sysctl.conf create mode 100644 etc/etc.palm/ttys create mode 100644 sys/arch/palm/Makefile create mode 100644 sys/arch/palm/compile/.cvsignore create mode 100644 sys/arch/palm/conf/GENERIC create mode 100644 sys/arch/palm/conf/Makefile.palm create mode 100644 sys/arch/palm/conf/RAMDISK create mode 100644 sys/arch/palm/conf/files.palm create mode 100644 sys/arch/palm/include/_types.h create mode 100644 sys/arch/palm/include/apmvar.h create mode 100644 sys/arch/palm/include/asm.h create mode 100644 sys/arch/palm/include/atomic.h create mode 100644 sys/arch/palm/include/bootconfig.h create mode 100644 sys/arch/palm/include/bus.h create mode 100644 sys/arch/palm/include/cdefs.h create mode 100644 sys/arch/palm/include/conf.h create mode 100644 sys/arch/palm/include/cpu.h create mode 100644 sys/arch/palm/include/db_machdep.h create mode 100644 sys/arch/palm/include/disklabel.h create mode 100644 sys/arch/palm/include/endian.h create mode 100644 sys/arch/palm/include/exec.h create mode 100644 sys/arch/palm/include/float.h create mode 100644 sys/arch/palm/include/fp.h create mode 100644 sys/arch/palm/include/frame.h create mode 100644 sys/arch/palm/include/ieee.h create mode 100644 sys/arch/palm/include/ieeefp.h create mode 100644 sys/arch/palm/include/internal_types.h create mode 100644 sys/arch/palm/include/intr.h create mode 100644 sys/arch/palm/include/limits.h create mode 100644 sys/arch/palm/include/loadfile_machdep.h create mode 100644 sys/arch/palm/include/lock.h create mode 100644 sys/arch/palm/include/machine_reg.h create mode 100644 sys/arch/palm/include/mutex.h create mode 100644 sys/arch/palm/include/palm_var.h create mode 100644 sys/arch/palm/include/param.h create mode 100644 sys/arch/palm/include/pcb.h create mode 100644 sys/arch/palm/include/pio.h create mode 100644 sys/arch/palm/include/pmap.h create mode 100644 sys/arch/palm/include/proc.h create mode 100644 sys/arch/palm/include/profile.h create mode 100644 sys/arch/palm/include/psl.h create mode 100644 sys/arch/palm/include/ptrace.h create mode 100644 sys/arch/palm/include/reg.h create mode 100644 sys/arch/palm/include/reloc.h create mode 100644 sys/arch/palm/include/setjmp.h create mode 100644 sys/arch/palm/include/signal.h create mode 100644 sys/arch/palm/include/spinlock.h create mode 100644 sys/arch/palm/include/stdarg.h create mode 100644 sys/arch/palm/include/sysarch.h create mode 100644 sys/arch/palm/include/trap.h create mode 100644 sys/arch/palm/include/vmparam.h create mode 100644 sys/arch/palm/palm/autoconf.c create mode 100644 sys/arch/palm/palm/palm_lcd.c create mode 100644 sys/arch/palm/palm/palm_machdep.c create mode 100644 sys/arch/palm/palm/palm_start.S diff --git a/Makefile.cross b/Makefile.cross index 24fa731..a1ab519 100644 --- a/Makefile.cross +++ b/Makefile.cross @@ -6,7 +6,8 @@ cross-distrib: cross-tools cross-bin cross-share cross-sys cross-etc-root-var # Have to compute TARGET_ARCH directly in the Makefile, for .if tests involving # this variable to work. -.if (${TARGET} == "armish" || ${TARGET} == "zaurus") +.if (${TARGET} == "armish" || ${TARGET} == "zaurus" || \ + ${TARGET} == "palm") TARGET_ARCH= arm .elif (${TARGET} == "hp300" || ${TARGET} == "mac68k" || \ ${TARGET} == "mvme68k") diff --git a/distrib/palm/Makefile b/distrib/palm/Makefile new file mode 100644 index 0000000..2460384 --- /dev/null +++ b/distrib/palm/Makefile @@ -0,0 +1,5 @@ +# $OpenBSD: Makefile,v 1.2 2005/03/18 20:26:28 deraadt Exp $ + +SUBDIR= ramdisk + +.include diff --git a/distrib/palm/ramdisk/Makefile b/distrib/palm/ramdisk/Makefile new file mode 100644 index 0000000..af3d716 --- /dev/null +++ b/distrib/palm/ramdisk/Makefile @@ -0,0 +1,104 @@ +# $OpenBSD: Makefile,v 1.6 2009/04/17 03:58:55 deraadt Exp $ + +REV= ${OSrev} + +TOP= ${.CURDIR}/.. + +BSD_RD= bsd.rd +IMAGE= mr.fs +CBIN?= instbin +CRUNCHCONF?= ${CBIN}.conf +CRUNCHCONFS?= ${.CURDIR}/../common/crunch.conf +LISTS= ${.CURDIR}/list +UTILS?= ${.CURDIR}/../../miniroot + +MOUNT_POINT= /mnt +MTREE= ${UTILS}/mtree.conf + +VND?= svnd0 +VND_DEV= /dev/${VND}a +VND_RDEV= /dev/r${VND}a +VND_CRDEV= /dev/r${VND}c +PID!= echo $$$$ + + +DISKTYPE= rdroot2.5M +NBLKS= 5120 +# minfree, opt, b/i trks, sects, cpg +NEWFSARGS= -m 0 -o space -i 4096 + +.ifndef DESTDIR +all ${IMAGE}: + @echo setenv DESTDIR before making a ramdisk! + @false +.else + +# mix config is not needed. +all: ${BSD_RD} + +${BSD_RD}: ${CBIN} ${IMAGE} bsd rdsetroot + cp bsd ${BSD_RD} + ${.OBJDIR}/rdsetroot ${BSD_RD} ${IMAGE} + +${IMAGE}: rd_setup do_files rd_teardown + +.endif + +bsd: + cd ${TOP}/../../sys/arch/palm/conf && config RAMDISK + cd ${TOP}/../../sys/arch/palm/compile/RAMDISK && \ + ${MAKE} clean && ${MAKE} depend && ${MAKE} + cp ${TOP}/../../sys/arch/palm/compile/RAMDISK/bsd bsd + +rd_setup: + dd if=/dev/zero of=${IMAGE} bs=512 count=${NBLKS} + vnconfig -v -c ${VND} ${IMAGE} + disklabel -w ${VND} ${DISKTYPE} + newfs ${NEWFSARGS} ${VND_RDEV} + fsck ${VND_RDEV} + mount ${VND_DEV} ${MOUNT_POINT} + +rd_teardown: + @df -i ${MOUNT_POINT} + -umount ${MOUNT_POINT} + -vnconfig -u ${VND} + +rdsetroot: ${TOP}/../common/elfrdsetroot.c + ${HOSTCC} -o rdsetroot ${TOP}/../common/elfrdsetroot.c + +unconfig: + -umount -f ${MOUNT_POINT} + -vnconfig -u ${VND} + +.PRECIOUS: ${IMAGE} + +${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF} + crunchgen -E -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC} + +${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c + ${MAKE} -f ${CBIN}.mk all + +${CRUNCHCONF}: ${LISTS} + awk -f ${UTILS}/makeconf.awk CBIN=${CBIN} ${LISTS} > ${CBIN}.conf + +do_files: + cat ${MTREE} | mtree -de -p ${MOUNT_POINT}/ -u + TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \ + REV=${REV} TARGDIR=${MOUNT_POINT} UTILS=${UTILS} \ + RELEASEDIR=${RELEASEDIR} sh ${UTILS}/runlist.sh ${LISTS} + rm ${MOUNT_POINT}/${CBIN} + +clean cleandir: + /bin/rm -f core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache \ + *.o *.lo *.c bsd ${BSD_RD} \ + rdsetroot + rm -f instbin.conf + rm -rf cd-dir + +.ifdef RELEASEDIR +install: + cp ${BSD_RD} ${RELEASEDIR} +.endif # RELEASEDIR + +.include +.include diff --git a/distrib/palm/ramdisk/Makefile.inc b/distrib/palm/ramdisk/Makefile.inc new file mode 100644 index 0000000..0e1255b --- /dev/null +++ b/distrib/palm/ramdisk/Makefile.inc @@ -0,0 +1,4 @@ +# $OpenBSD: Makefile.inc,v 1.1 2004/12/31 00:14:07 drahn Exp $ + +CRUNCHGENOPTS= -E + diff --git a/distrib/palm/ramdisk/install.md b/distrib/palm/ramdisk/install.md new file mode 100644 index 0000000..12a53ba --- /dev/null +++ b/distrib/palm/ramdisk/install.md @@ -0,0 +1,137 @@ +# $OpenBSD: install.md,v 1.24 2009/06/11 18:52:42 deraadt Exp $ +# +# +# Copyright (c) 1996 The NetBSD Foundation, Inc. +# All rights reserved. +# +# This code is derived from software contributed to The NetBSD Foundation +# by Jason R. Thorpe. +# +# 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS +# ``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 REGENTS OR CONTRIBUTORS 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. +# +# +# machine dependent section of installation/upgrade script. +# + +MDXDM=y + +md_installboot() { +} + +md_prep_fdisk() { + local _disk=$1 _q _d + + while :; do + _d=whole + if [[ -n $(fdisk $_disk | grep 'Signature: 0xAA55') ]]; then + fdisk $_disk + if [[ -n $(fdisk $_disk | grep '^..: A6 ') ]]; then + _q=", use the (O)penBSD area," + _d=OpenBSD + fi + else + echo "MBR has invalid signature; not showing it." + fi + ask "Use (W)hole disk$_q or (E)dit the MBR?" "$_d" + case $resp in + w*|W*) + echo -n "Setting OpenBSD MBR partition to whole $_disk..." + fdisk -e ${_disk} <<__EOT >/dev/null +reinit +update +write +quit +__EOT + echo "done." + return ;; + e*|E*) + # Manually configure the MBR. + cat <<__EOT + +You will now create a single MBR partition to contain your OpenBSD data. This +partition must have an id of 'A6'; must *NOT* overlap other partitions; and +must be marked as the only active partition. Inside the fdisk command, the +'manual' command describes all the fdisk commands in detail. + +$(fdisk ${_disk}) +__EOT + fdisk -e ${_disk} + [[ -n $(fdisk $_disk | grep ' A6 ') ]] && return + echo No OpenBSD partition in MBR, try again. ;; + o*|O*) return ;; + esac + done +} + +md_prep_disklabel() { + local _disk=$1 _f _op + + md_prep_fdisk $_disk + + disklabel -W $_disk >/dev/null 2>&1 + _f=/tmp/fstab.$_disk + if [[ $_disk == $ROOTDISK ]]; then + while :; do + echo "The auto-allocated layout for $_disk is:" + disklabel -h -A $_disk | egrep "^# |^ [a-p]:" + ask "Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout?" a + case $resp in + a*|A*) _op=-w ; AUTOROOT=y ;; + e*|E*) _op=-E ;; + c*|C*) break ;; + *) continue ;; + esac + disklabel -f $_f $_op -A $_disk + return + done + fi + + cat <<__EOT + +You will now create an OpenBSD disklabel inside the OpenBSD MBR +partition. The disklabel defines how OpenBSD splits up the MBR partition +into OpenBSD partitions in which filesystems and swap space are created. +You must provide each filesystem's mountpoint in this program. + +The offsets used in the disklabel are ABSOLUTE, i.e. relative to the +start of the disk, NOT the start of the OpenBSD MBR partition. + +__EOT + + disklabel -f $_f -E $_disk +} + +md_congrats() { +} + +md_consoleinfo() { + local _u _d=com + + for _u in $(scan_dmesg "/^$_d\([0-9]\) .*/s//\1/p"); do + if [[ $_d$_u == $CONSOLE || -z $CONSOLE ]]; then + CDEV=$_d$_u + CPROM=com$_u + CTTY=tty0$_u + return + fi + done +} diff --git a/distrib/palm/ramdisk/list b/distrib/palm/ramdisk/list new file mode 100644 index 0000000..3fe0a9d --- /dev/null +++ b/distrib/palm/ramdisk/list @@ -0,0 +1,87 @@ +# $OpenBSD: list,v 1.15 2009/06/02 06:17:47 todd Exp $ + +SRCDIRS distrib/special +SRCDIRS bin sbin usr.bin usr.sbin + +# copy the crunched binary, link to it, and kill it +COPY ${OBJDIR}/instbin instbin +LINK instbin bin/cat +LINK instbin bin/chmod bin/chgrp sbin/chown +LINK instbin bin/cp +LINK instbin bin/dd +LINK instbin bin/df +LINK instbin bin/ed +LINK instbin bin/expr +LINK instbin bin/hostname +LINK instbin bin/ksh bin/sh +ARGVLINK ksh -sh +LINK instbin bin/ln +LINK instbin bin/ls +LINK instbin bin/mkdir +LINK instbin bin/mt bin/eject +LINK instbin bin/mv +LINK instbin bin/pax bin/tar bin/cpio +LINK instbin bin/rm +LINK instbin bin/sha256 +LINK instbin bin/sleep +LINK instbin bin/stty +LINK instbin bin/sync +LINK instbin sbin/dhclient +LINK instbin sbin/disklabel +LINK instbin sbin/dmesg +LINK instbin sbin/fdisk +LINK instbin sbin/fsck +LINK instbin sbin/fsck_ext2fs +LINK instbin sbin/fsck_ffs +LINK instbin sbin/ifconfig +LINK instbin sbin/init +LINK instbin sbin/mknod +LINK instbin sbin/mount +LINK instbin sbin/mount_cd9660 +LINK instbin sbin/mount_ext2fs +LINK instbin sbin/mount_ffs +LINK instbin sbin/mount_msdos +LINK instbin sbin/mount_nfs +LINK instbin sbin/newfs +LINK instbin sbin/newfs_msdos +LINK instbin sbin/ping +LINK instbin sbin/ping6 +LINK instbin sbin/reboot sbin/halt +LINK instbin sbin/route +LINK instbin sbin/rtsol +LINK instbin sbin/umount +LINK instbin usr/bin/ftp +LINK instbin usr/bin/grep usr/bin/fgrep usr/bin/egrep +LINK instbin usr/bin/gzip usr/bin/gunzip usr/bin/gzcat +LINK instbin usr/bin/less usr/bin/more +LINK instbin usr/bin/sed +LINK instbin sbin/sysctl +LINK instbin sbin/bioctl + +# copy the MAKEDEV script and make some devices +SCRIPT ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV +SPECIAL cd dev; sh MAKEDEV ramdisk + +# various files that we need in /etc for the install +COPY ${DESTDIR}/etc/group etc/group +COPY ${DESTDIR}/etc/spwd.db etc/spwd.db +COPY ${CURDIR}/../../miniroot/protocols etc/protocols +COPY ${CURDIR}/../../miniroot/services etc/services +SYMLINK /tmp/fstab.shadow etc/fstab +SYMLINK /tmp/resolv.conf.shadow etc/resolv.conf +SYMLINK /tmp/hosts etc/hosts +TERMCAP vt100,vt220,dumb usr/share/misc/termcap + +# dhcp things +SCRIPT ${DESTDIR}/sbin/dhclient-script sbin/dhclient-script + +# and the installation tools +SCRIPT ${CURDIR}/../../miniroot/dot.profile .profile +SCRIPT ${CURDIR}/install.md install.md +SCRIPT ${CURDIR}/../../miniroot/upgrade.sh upgrade +SCRIPT ${CURDIR}/../../miniroot/install.sh install +SCRIPT ${CURDIR}/../../miniroot/install.sub install.sub +SPECIAL chmod 755 install upgrade sbin/dhclient-script + +HASH var/hash +TZ diff --git a/etc/etc.palm/MAKEDEV b/etc/etc.palm/MAKEDEV new file mode 100644 index 0000000..8f57635 --- /dev/null +++ b/etc/etc.palm/MAKEDEV @@ -0,0 +1,518 @@ +#!/bin/sh - +# +# THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. +# generated from: +# +# OpenBSD: etc.zaurus/MAKEDEV.md,v 1.20 2009/06/03 14:45:40 jj Exp +# OpenBSD: MAKEDEV.common,v 1.43 2009/06/03 14:45:39 jj Exp +# OpenBSD: MAKEDEV.mi,v 1.79 2009/01/25 17:30:48 miod Exp +# OpenBSD: MAKEDEV.sub,v 1.14 2005/02/07 06:14:18 david Exp +# +# +# Copyright (c) 2001-2004 Todd T. Fries +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# +# Device "make" file. Valid arguments: +# all makes all known devices, including local devices. +# Tries to make the ``standard'' number of each type. +# ramdisk Ramdisk kernel devices +# std Standard devices +# local Configuration specific devices +# Disks: +# ccd* Concatenated disk devices +# cd* ATAPI and SCSI CD-ROM drives +# ch* SCSI media changers +# raid* RAIDframe disk devices +# rd* "rd" pseudo-disks +# sd* SCSI disks, including flopticals +# vnd* "file" pseudo-disk devices +# wd* "winchester" disk drives (ST506, IDE, ESDI, RLL, ...) +# Tapes: +# st* SCSI tape drives +# Terminal ports: +# tty[0-7][0-9a-f] NS16x50 serial ports +# Pseudo terminals: +# ptm pty master device +# pty* Set of 62 master pseudo terminals +# tty* Set of 62 slave pseudo terminals +# Console ports: +# wscons Minimal wscons devices +# ttyC-J* wscons display devices +# wskbd* wscons keyboards +# wsmouse* wscons mice +# wsmux wscons keyboard/mouse mux devices +# USB devices: +# uall All USB devices +# ttyU* USB serial ports +# ugen* Generic USB devices +# uhid* Generic HID devices +# ulpt* Printer devices +# urio* Diamond Multimedia Rio 500 +# usb* Bus control devices used by usbd for attach/detach +# uscanner* Scanners +# Special purpose devices: +# apm Power management device +# audio* Audio devices +# hotplug devices hot plugging +# bio ioctl tunnel pseudo-device +# bktr* Video frame grabbers +# bpf* Berkeley Packet Filter +# crypto Hardware crypto access driver +# fd fd/* nodes +# lkm Loadable kernel modules interface +# music* MIDI sequencer +# pf* Packet Filter +# radio* FM tuner devices +# rmidi* Raw MIDI devices +# *random In-kernel random data source +# tun* Network tunnel driver +# uk* Unknown SCSI devices +# ss* SCSI scanners +# systrace* System call tracing device +# tuner* Tuner devices +# video* Video V4L2 devices +# nnpfs* NNPFS filesystem node +PATH=/sbin:/usr/sbin:/bin:/usr/bin +T=$0 + +# set this to echo for Echo-Only debugging +[ "$eo" ] || eo= + +hex() +{ + case $1 in + [0-9]) echo -n $1;; + 10) echo -n a;; + 11) echo -n b;; + 12) echo -n c;; + 13) echo -n d;; + 14) echo -n e;; + 15) echo -n f;; + esac +} + +alph2d() +{ + local t="$1" + local p="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" + local sub=${p%${t}*} + echo ${#sub} +} + +h2d() +{ + local s="$1" + local f=${s%*[0-9a-f]} n=${s#[0-9a-f]*} + + echo $(($(_h2d $f)*16+ $(_h2d $n) )) +} + +_h2d() +{ + case $1 in + [0-9]) echo -n $1;; + a) echo -n 10;; + b) echo -n 11;; + c) echo -n 12;; + d) echo -n 13;; + e) echo -n 14;; + f) echo -n 15;; + esac +} + +unt() +{ + # XXX pdksh can't seem to deal with locally scoped variables + # in ${foo#$bar} expansions + arg="$1" + tmp="${arg#[a-zA-Z]*}" + tmp="${tmp%*[a-zA-Z]}" + while [ "$tmp" != "$arg" ] + do + arg=$tmp + tmp="${arg#[a-zA-Z]*}" + tmp="${tmp%*[a-zA-Z]}" + done + echo $arg +} + +dodisk() +{ + [ "$DEBUG" ] && set -x + n=$(($((${5}*${7:-16}))+${6})) count=0 + [ 0$7 -ne 8 ] && l="i j k l m n o p" + for d in a b c d e f g h $l + do + M $1$2$d b $3 $(($n+$count)) 640 operator + M r$1$2$d c $4 $(($n+$count)) 640 operator + let count=count+1 + done +} + +dodisk2() +{ + n=$(($(($5*${7:-16}))+$6)) + M $1$2a b $3 $n 640 operator + M r$1$2a c $4 $n 640 operator + n=$(($n+2)) + M $1$2c b $3 $n 640 operator + M r$1$2c c $4 $n 640 operator +} + +# M name b/c major minor [mode] [group] +RMlist[0]="rm -f" + +mkl() { + mklist[${#mklist[*]}]=";mknod -m $1 $2 $3 $4 $5" +} + +M() { + RMlist[${#RMlist[*]}]=$1 + mkl ${5-666} $1 $2 $3 $4 + G=${6:-wheel} + [ "$7" ] && { + MKlist[${#MKlist[*]}]=";chown $7:$G $1" + } || { + case $G in + wheel) + [ ${#whlist[*]} = 0 ] && whlist[0]=";chgrp wheel" + whlist[${#whlist[*]}]="$1" + ;; + operator) + [ ${#oplist[*]} = 0 ] && oplist[0]=";chgrp operator" + oplist[${#oplist[*]}]="$1" + ;; + *) + MKlist[${#MKlist[*]}]=";chgrp $G $1"; + esac + } + return 0 +} + +R() { +[ "$DEBUG" ] && set -x +for i in "$@" +do +U=`unt $i` +[ "$U" ] || U=0 + +case $i in +ramdisk) + R std bpf0 wd0 wd1 sd0 tty00 rd0 wsmouse + R st0 ttyC0 wskbd0 apm bio + ;; + +std) + M console c 0 0 600 + M tty c 1 0 + M mem c 2 0 640 kmem + M kmem c 2 1 640 kmem + M null c 2 2 + M zero c 2 12 + M stdin c 7 0 + M stdout c 7 1 + M stderr c 7 2 + M ksyms c 8 0 640 kmem + M klog c 6 0 600 + ;; + +nnpfs*) + M nnpfs$U c 51 $U 600 + ;; + +video*) + M video$U c 38 $U + MKlist[${#MKlist[*]}]=";[ -e video ] || ln -s video$U video" + ;; + +tuner*) + M tuner$U c 75 $(($(($U*2))+16)) 644 + ;; + +systrace) + M systrace c 50 0 644 + ;; + +ss*) + M ss$U c 29 $(($U*16)) 640 operator + M nss$U c 29 $(($(($U*16))+1)) 640 operator + M enss$U c 29 $(($(($U*16))+3)) 640 operator + RMlist[${#RMlist[*]}]="scan$U" + MKlist[${#MKlist[*]}]=";umask 77;ln -s ss$U scan$U" + ;; + +uk*) + M uk$U c 28 $U 640 operator + ;; + +tun*) + M tun$U c 33 $U 600 + ;; + +*random) + n=0 + for pre in " " s u a + do + M ${pre}random c 40 $n 644 + n=$(($n+1)) + done + ;; + +rmidi*) + M rmidi$U c 57 $U 666 + ;; + +radio*) + M radio$U c 97 $U + MKlist[${#MKlist[*]}]=";[ -e radio ] || ln -s radio$U radio" + ;; + +pf*) + M pf c 46 0 600 + ;; + +music*) + M music$U c 58 $U + M sequencer$U c 58 $(($U+128)) + MKlist[${#MKlist[*]}]=";[ -e music ] || ln -s music$U music" + MKlist[${#MKlist[*]}]=";[ -e sequencer ] || ln -s sequencer$U sequencer" + ;; + +lkm) + M lkm c 35 0 640 _lkm + ;; + +fd) + RMlist[${#RMlist[*]}]=";mkdir -p fd;rm -f" n=0 + while [ $n -lt 64 ];do M fd/$n c 7 $n;n=$(($n+1));done + MKlist[${#MKlist[*]}]=";chmod 555 fd" + ;; + +crypto) + M crypto c 47 0 + ;; + +bpf*) + M bpf$U c 22 $U 600 + ;; + +bktr*) + M bktr$U c 75 $U 644 + ;; + +bio) + M bio c 52 0 600 + ;; + +hotplug) + M hotplug c 37 $U 400 + ;; + +audio*) + M sound$U c 36 $U + M mixer$U c 36 $(($U+16)) + M audio$U c 36 $(($U+128)) + M audioctl$U c 36 $(($U+192)) + MKlist[${#MKlist[*]}]=";[ -e audio ] || ln -s audio$U audio" + MKlist[${#MKlist[*]}]=";[ -e mixer ] || ln -s mixer$U mixer" + MKlist[${#MKlist[*]}]=";[ -e sound ] || ln -s sound$U sound" + MKlist[${#MKlist[*]}]=";[ -e audioctl ] || ln -s audioctl$U audioctl" + ;; + +apm*) + M apm c 34 0 644 + M apmctl c 34 8 644 + ;; + +uscanner*) + M uscanner$U c 69 $U 660 + ;; + +usb*) + [ "$i" = "usb" ] && u= || u=$U + M usb$u c 64 $U 660 + ;; + +urio*) + M urio$U c 67 $U 660 + ;; + +ulpt*) + M ulpt$U c 66 $U 660 + ;; + +uhid*) + M uhid$U c 65 $U 660 + ;; + +ugen*) + n=$(($U*16)) + for j in 0{0,1,2,3,4,5,6,7,8,9} 1{0,1,2,3,4,5} + do + M ugen$U.$j c 70 $(($n+10#$j)) 660 + done + ;; + +ttyU[0-9a-zA-Z]) + U=${i#ttyU*} + o=$(alph2d $U) + M ttyU$U c 68 $o 660 dialer uucp + M cuaU$U c 68 $(($o+128)) 660 dialer uucp + ;; + +uall) + R ttyU0 ttyU1 ttyU2 ttyU3 ugen0 ugen1 ulpt0 ulpt1 uhid0 uhid1 + R uhid2 uhid3 uscanner0 urio0 usb0 usb1 usb2 usb3 usb4 usb5 + ;; + +wsmux|wsmouse|wskbd) + M wsmouse c 63 0 600 + M wskbd c 63 1 600 + ;; + +wsmouse*) + M wsmouse$U c 62 $U 600 + ;; + +wskbd*) + M wskbd$U c 61 $U 600 + ;; + +tty[C-J]*) + U=${i##tty[C-J]} + case $i in + ttyC*) n=C m=0;; + ttyD*) n=D m=256;; + ttyE*) n=E m=512;; + ttyF*) n=F m=768;; + ttyG*) n=G m=1024;; + ttyH*) n=H m=1280;; + ttyI*) n=I m=1536;; + ttyJ*) n=J m=1792;; + esac + case $U in + [0-9a-f]) M tty$n$U c 60 $((16#$U+$m)) 600;; + cfg) M tty${n}cfg c 60 $((255+$m)) 600;; + *) echo bad unit $U for $i; exit 1;; + esac + ;; + +wscons) + R wsmouse0 wsmouse1 wsmouse2 wsmouse3 wskbd0 wskbd1 wskbd2 + R wskbd3 wsmux ttyCcfg ttyC0 ttyC1 ttyC2 ttyC3 ttyC4 ttyC5 + R ttyC6 ttyC7 ttyC8 ttyC9 ttyCa ttyCb + ;; + +pty*) + if [ $U -gt 15 ]; then + echo bad unit for pty in: $i + continue + fi + set -A letters p q r s t u v w x y z P Q R S T + set -A suffixes 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q \ + r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X \ + Y Z + + name=${letters[$U]} + n=0 + while [ $n -lt 62 ] + do + nam=$name${suffixes[$n]} + off=$(($U*62)) + M tty$nam c 4 $(($off+$n)) + M pty$nam c 5 $(($off+$n)) + n=$(($n+1)) + done + ;; + +ptm) + M ptm c 98 0 666 + ;; + +tty[0-7][0-9a-f]) + U=${i#tty*} + o=$(h2d $U) + M tty$U c 12 $o 660 dialer uucp + M cua$U c 12 $(($o+128)) 660 dialer uucp + ;; + +st*) + n=$(($U*16)) + for pre in " " n e en + do + M ${pre}st$U b 25 $n 660 operator + M ${pre}rst$U c 25 $n 660 operator + n=$(($n+1)) + done + ;; + +vnd*) + dodisk vnd $U 19 19 $U 0 + dodisk svnd $U 19 19 $U 2048 + ;; + +rd*) + dodisk2 rd $U 18 18 $U 0 + ;; + +ch*) + M ch$U c 27 $U 660 operator + ;; + +cd*) + dodisk2 cd $U 26 26 $U 0 + ;; + +local) + test -s $T.local && sh $T.local + ;; + +all) + R ccd0 ccd1 ccd2 ccd3 vnd0 vnd1 vnd2 vnd3 sd0 sd1 sd2 sd3 sd4 + R sd5 sd6 sd7 sd8 sd9 cd0 cd1 rd0 tun0 tun1 tun2 tun3 bpf0 + R bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 bpf8 bpf9 pty0 bio nnpfs0 + R ss0 ss1 ch0 hotplug ptm local wscons uall rmidi0 rmidi1 + R rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7 tuner0 radio0 + R music0 video0 audio0 audio1 audio2 uk0 random lkm tty00 + R tty01 tty02 tty03 apm crypto pf systrace wd0 wd1 wd2 wd3 + R raid0 raid1 raid2 raid3 std st0 st1 fd + ;; + +wd*|sd*|raid*|ccd*) + case $i in + wd*) dodisk wd $U 16 16 $U 0;; + sd*) dodisk sd $U 24 24 $U 0;; + raid*) dodisk raid $U 71 71 $U 0;; + ccd*) dodisk ccd $U 21 21 $U 0;; + esac + ;; + +*) + echo $i: unknown device + ;; +esac +done +} +R "$@" +{ +echo -n ${RMlist[*]} +echo -n ${mklist[*]} +echo -n ${MKlist[*]} +echo -n ${whlist[*]} +echo ${oplist[*]} +} | if [ "$eo" = "echo" ]; then + cat +else + sh +fi diff --git a/etc/etc.palm/MAKEDEV.md b/etc/etc.palm/MAKEDEV.md new file mode 100644 index 0000000..aba203e --- /dev/null +++ b/etc/etc.palm/MAKEDEV.md @@ -0,0 +1,119 @@ +define(MACHINE,palm)dnl +vers(__file__, + {-$OpenBSD: MAKEDEV.md,v 1.21 2009/07/22 17:43:16 ratchov Exp $-}, +etc.MACHINE)dnl +dnl +dnl Copyright (c) 2001-2004 Todd T. Fries +dnl All rights reserved. +dnl +dnl Redistribution and use in source and binary forms, with or without +dnl modification, are permitted provided that the following conditions +dnl are met: +dnl 1. Redistributions of source code must retain the above copyright +dnl notice, this list of conditions and the following disclaimer. +dnl 2. The name of the author may not be used to endorse or promote products +dnl derived from this software without specific prior written permission. +dnl +dnl THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +dnl INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY +dnl AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL +dnl THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +dnl EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +dnl PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +dnl OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +dnl WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +dnl OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +dnl ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +dnl +dnl +__devitem(apm, apm, Power management device)dnl +_TITLE(make) +_DEV(all) +_DEV(ramdisk) +_DEV(std) +_DEV(local) +_TITLE(dis) +_DEV(ccd, 21, 21) +_DEV(cd, 26, 26) +_DEV(ch, 27) +_DEV(raid, 71, 71) +_DEV(rd, 18, 18) +_DEV(sd, 24, 24) +_DEV(vnd, 19, 19) +_DEV(wd, 16, 16) +_TITLE(tap) +_DEV(st, 25, 25) +_TITLE(term) +dnl _DEV(com, 12) +dnl _DEV(fcom, 54) +_DEV(com, 12) +_TITLE(pty) +_DEV(ptm, 98) +_DEV(pty, 5) +_DEV(tty, 4) +_TITLE(cons) +_DEV(wscons) +_DEV(wsdisp, 60) +_DEV(wskbd, 61) +_DEV(wsmouse, 62) +_DEV(wsmux, 63) +_TITLE(usb) +_DEV(uall) +_DEV(ttyU, 68) +_DEV(ugen, 70) +_DEV(uhid, 65) +_DEV(ulpt, 66) +_DEV(urio, 67) +_DEV(usb, 64) +_DEV(uscan, 69) +_TITLE(spec) +_DEV(apm, 34) +_DEV(au, 36) +_DEV(hotplug, 37) +_DEV(bio, 52) +_DEV(bktr, 75) +_DEV(bpf, 22) +_DEV(cry, 47) +_DEV(fdesc, 7) +_DEV(lkm, 35) +_DEV(music, 58) +_DEV(pf, 46) +_DEV(radio, 97) +_DEV(rmidi, 57) +_DEV(rnd, 40) +_DEV(tun, 33) +_DEV(uk, 28) +_DEV(ss, 29) +_DEV(systrace, 50) +_DEV(tuner, 75) +_DEV(vi, 38) +_DEV(nnpfs, 51) +dnl +divert(__mddivert)dnl +dnl +ramdisk) + _recurse std bpf0 wd0 wd1 sd0 tty00 rd0 wsmouse + _recurse st0 ttyC0 wskbd0 apm bio + ;; + +_std(1, 2, 8, 6) + ;; +dnl +dnl *** palm specific targets +dnl +target(all, ch, 0)dnl +target(all, ss, 0, 1)dnl +target(all, nnpfs, 0)dnl +target(all, bio)dnl +twrget(all, flo, fd, 0, 0B, 0C, 0D, 0E, 0F, 0G, 0H)dnl +twrget(all, flo, fd, 1, 1B, 1C, 1D, 1E, 1F, 1G, 1H)dnl +target(all, pty, 0)dnl +target(all, bpf, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)dnl +target(all, tun, 0, 1, 2, 3)dnl +target(all, xy, 0, 1, 2, 3)dnl +target(all, rd, 0)dnl +target(all, cd, 0, 1)dnl +target(all, sd, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)dnl +target(all, vnd, 0, 1, 2, 3)dnl +target(all, ccd, 0, 1, 2, 3)dnl +target(all, ttyC, 0, 1)dnl diff --git a/etc/etc.palm/MAKEDEV.mtmp b/etc/etc.palm/MAKEDEV.mtmp new file mode 100644 index 0000000..260a14f --- /dev/null +++ b/etc/etc.palm/MAKEDEV.mtmp @@ -0,0 +1,254 @@ +.\" $OpenBSD$ +.\" +.\" THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. +.\" generated from: +.\" +.\" OpenBSD: etc.palm/MAKEDEV.md,v 1.21 2009/07/22 17:43:16 ratchov Exp +.\" OpenBSD: MAKEDEV.common,v 1.44 2009/07/22 17:43:16 ratchov Exp +.\" OpenBSD: MAKEDEV.man,v 1.7 2009/03/18 17:34:25 sobrado Exp +.\" OpenBSD: MAKEDEV.mansub,v 1.2 2004/02/20 19:13:01 miod Exp +.\" +.\" Copyright (c) 2004, Miodrag Vallat +.\" Copyright (c) 2001-2004 Todd T. Fries +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: March 18 2009 $ +.Dt MAKEDEV 8 palm +.Os +.Sh NAME +.Nm MAKEDEV +.Nd create system and device special files +.Sh SYNOPSIS +.Nm MAKEDEV +.Ar name ... +.Sh DESCRIPTION +The shell script +.Nm , +found in the +.Pa /dev +directory, is used to create various special files. +See +.Xr intro 4 +for a more complete discussion of special files. +.Pp +.Nm +takes any number of device names as arguments, where the names are +the common abbreviation for the device or group of devices. +.Pp +Where a device name is followed by a star +.Sq * , +the star must be replaced by a unit number. +If units are expected for a device but not provided, +.Nm +will supply the standard numbers in most cases. +.Pp +The palm supports the following devices: +.Pp +.Sy Special device names +.Bl -tag -width tenletters -compact +.It Ar all +Creates special files for all devices on palm. +.It Ar ramdisk +Ramdisk kernel devices. +.It Ar std +Creates the +.Sq standard +devices (console, klog, kmem, ksyms, mem, null, +stderr, stdin, stdout, tty, zero) +which are absolutely necessary for the system to function properly. +.It Ar local +Creates configuration-specific devices, by invoking the shell file +.Pa MAKEDEV.local . +.El +.Pp +.Sy Disks +.Bl -tag -width tenletters -compact +.It Ar ccd* +Concatenated disk devices, see +.Xr ccd 4 . +.It Ar cd* +ATAPI and SCSI CD-ROM drives, see +.Xr cd 4 . +.It Ar ch* +SCSI media changers, see +.Xr ch 4 . +.It Ar raid* +RAIDframe disk devices, see +.Xr raid 4 . +.It Ar rd* +.Dq rd +pseudo-disks, see +.Xr rd 4 . +.It Ar sd* +SCSI disks, including flopticals, see +.Xr sd 4 . +.It Ar vnd* +.Dq file +pseudo-disk devices, see +.Xr vnd 4 . +.It Ar wd* +.Dq winchester +disk drives (ST506, IDE, ESDI, RLL, ...), see +.Xr wd 4 . +.El +.Pp +.Sy Tapes +.Bl -tag -width tenletters -compact +.It Ar st* +SCSI tape drives, see +.Xr st 4 . +.El +.Pp +.Sy Terminal ports +.Bl -tag -width tenletters -compact +.It Ar tty[0-7][0-9a-f] +NS16x50 serial ports, see +.Xr com 4 . +.El +.Pp +.Sy Pseudo terminals +.Bl -tag -width tenletters -compact +.It Ar ptm +pty master device, see +.Xr ptm 4 . +.It Ar pty* +Set of 62 master pseudo terminals, see +.Xr pty 4 . +.It Ar tty* +Set of 62 slave pseudo terminals, see +.Xr tty 4 . +.El +.Pp +.Sy Console ports +.Bl -tag -width tenletters -compact +.It Ar wscons +Minimal wscons devices, see +.Xr wscons 4 . +.It Ar ttyC-J* +wscons display devices, see +.Xr wsdisplay 4 . +.It Ar wskbd* +wscons keyboards, see +.Xr wskbd 4 . +.It Ar wsmouse* +wscons mice, see +.Xr wsmouse 4 . +.It Ar wsmux +wscons keyboard/mouse mux devices, see +.Xr wsmux 4 . +.El +.Pp +.Sy USB devices +.Bl -tag -width tenletters -compact +.It Ar uall +All USB devices, see +.Xr usb 4 . +.It Ar ttyU* +USB serial ports, see +.Xr ucom 4 . +.It Ar ugen* +Generic USB devices, see +.Xr ugen 4 . +.It Ar uhid* +Generic HID devices, see +.Xr uhid 4 . +.It Ar ulpt* +Printer devices, see +.Xr ulpt 4 . +.It Ar urio* +Diamond Multimedia Rio 500, see +.Xr urio 4 . +.It Ar usb* +Bus control devices used by usbd for attach/detach, see +.Xr usb 4 . +.It Ar uscanner* +Scanners, see +.Xr uscanner 4 . +.El +.Pp +.Sy Special purpose devices +.Bl -tag -width tenletters -compact +.It Ar apm +Power management device, see +.Xr apm 4 . +.It Ar audio* +Audio devices, see +.Xr audio 4 . +.It Ar hotplug +devices hot plugging, see +.Xr hotplug 4 . +.It Ar bio +ioctl tunnel pseudo-device, see +.Xr bio 4 . +.It Ar bktr* +Video frame grabbers, see +.Xr bktr 4 . +.It Ar bpf* +Berkeley Packet Filter, see +.Xr bpf 4 . +.It Ar crypto +Hardware crypto access driver, see +.Xr crypto 4 . +.It Ar fd +fd/* nodes, see +.Xr fd 4 . +.It Ar lkm +Loadable kernel modules interface, see +.Xr lkm 4 . +.It Ar music* +MIDI sequencer, see +.Xr music 4 . +.It Ar pf* +Packet Filter, see +.Xr pf 4 . +.It Ar radio* +FM tuner devices, see +.Xr radio 4 . +.It Ar rmidi* +Raw MIDI devices, see +.Xr midi 4 . +.It Ar *random +In-kernel random data source, see +.Xr random 4 . +.It Ar tun* +Network tunnel driver, see +.Xr tun 4 . +.It Ar uk* +Unknown SCSI devices, see +.Xr uk 4 . +.It Ar ss* +SCSI scanners, see +.Xr ss 4 . +.It Ar systrace* +System call tracing device, see +.Xr systrace 4 . +.It Ar tuner* +Tuner devices, see +.Xr bktr 4 . +.It Ar video* +Video V4L2 devices, see +.Xr video 4 . +.It Ar nnpfs* +NNPFS filesystem node, see +.Xr mount_nnpfs 8 . +.El +.Sh FILES +.Bl -tag -width /dev -compact +.It Pa /dev +The special file directory. +.El +.Sh SEE ALSO +.Xr intro 4 , +.Xr config 8 , +.Xr mknod 8 diff --git a/etc/etc.palm/Makefile b/etc/etc.palm/Makefile new file mode 100644 index 0000000..324bc97 --- /dev/null +++ b/etc/etc.palm/Makefile @@ -0,0 +1,5 @@ +# $OpenBSD: Makefile,v 1.2 2008/06/15 01:51:56 todd Exp $ + +all: MAKEDEV + +.include diff --git a/etc/etc.palm/Makefile.inc b/etc/etc.palm/Makefile.inc new file mode 100644 index 0000000..3e644bf --- /dev/null +++ b/etc/etc.palm/Makefile.inc @@ -0,0 +1,18 @@ +# $OpenBSD: Makefile.inc,v 1.9 2009/06/26 03:57:11 deraadt Exp $ + +kernels: bsd bootblocks + cp ${.CURDIR}/../sys/arch/palm/compile/GENERIC/bsd \ + ${RELEASEDIR}/bsd + +bsd: + cd ${.CURDIR}/../sys/arch/palm/conf && config GENERIC + cd ${.CURDIR}/../sys/arch/palm/compile/GENERIC && \ + ${MAKE} clean && ${MAKE} depend && exec ${MAKE} + +bootblocks: + cp ${DESTDIR}/usr/mdec/zboot ${RELEASEDIR} + cp ${DESTDIR}/usr/mdec/zbsdmod.o ${RELEASEDIR} + +MDEXT= bsd bsd.rd Packages + +.PHONY: bsd bootblocks diff --git a/etc/etc.palm/disktab b/etc/etc.palm/disktab new file mode 100644 index 0000000..5475db8 --- /dev/null +++ b/etc/etc.palm/disktab @@ -0,0 +1,875 @@ +# $OpenBSD: disktab,v 1.2 2005/01/14 04:36:16 deraadt Exp $ +# +# @(#)disktab 5.5 (Berkeley) 2/27/91 +# +# Disk geometry and partition layout tables. +# Key: +# ty type of disk +# ns #sectors/track +# nt #tracks/cylinder +# nc #cylinders/disk +# rm rpm, 3600 default +# se sector size, 512 default +# sf supports bad144-style bad sector forwarding +# so partition offsets in sectors +# p[a-h] partition sizes in sectors +# b[a-h] partition block sizes in bytes +# f[a-h] partition fragment sizes in bytes +# + + +# Leave nc=16; adjust size using: ns +rdroot|ramdiskroot|RAM-disk root FS image:\ + :ty=simulated:se#512:nc#16:nt#2:ns#256:\ + :ta=4.2BSD:oa#0:pa#8192:fa#512:ba#4096:\ + :ob#0:pb#0:oc#0:pc#8192: + + +rdroot2.5M|ramdiskroot2.5M|RAM-disk root FS image:\ + :ty=simulated:se#512:nc#16:nt#2:ns#160:\ + :oa#0:pa#5120:ta=4.2BSD:fa#512:ba#4096:\ + :ob#0:pb#0:tb=swap:\ + :oc#0:pc#5120: + +# pseudo-geometry taken from rd794 +miniroot:\ + :ty=winchester:ns#16:nt#7:nc#968:\ + :pa#10240:ba#8192:fa#1024: + +floppy|floppy3|3in|3.5in High Density Floppy:\ + :ty=floppy:se#512:nt#2:rm#300:ns#18:nc#80:\ + :pa#2880:oa#0:ba#4096:fa#512:\ + :pb#2880:ob#0:\ + :pc#2880:oc#0: + +ASI-1.0GIBM:\ + :ty#winchester:ns#80:nt#15:nc#1632: + +Arte DEC DSP3160S:\ + :ty#winchester:ns#112:nt#16:nc#1744: + +CDC 9720-850:\ + :ty#XD7053:ns#66:nt#15:nc#1358: + +CDC EMD 9720:\ + :ty#XD7053:ns#48:nt#10:nc#1147: + +CDC EMD 9720-1230:\ + :ty#XD7053:ns#82:nt#15:nc#1633: + +CDC IPI 9720:\ + :ty#ISP-80:ns#82:nt#15:nc#1631:\ + :pa#33210:oa#0:ba#8192:\ + :pb#131610:ob#33210:\ + :pc#2006130:oc#0:\ + :pg#196800:og#164820:\ + :ph#1644510:oh#361620: + +CDC IPI 9722:\ + :ty#ISP-80:ns#156:nt#7:nc#1630:\ + :pa#33852:oa#0:ba#8192:\ + :pb#132132:ob#33852:\ + :pc#1779960:oc#0:\ + :pg#197652:og#165984:\ + :ph#1416324:oh#363636: + +CDC Wren IV 94171-344:\ + :ty#winchester:ns#46:nt#9:nc#1545: + +CONNER 30170E:\ + :ty#winchester:ns#46:nt#8:nc#897:\ + :pa#14720:oa#0:ba#8192:\ + :pb#40480:ob#14720:\ + :pc#330096:oc#0:\ + :pg#274896:og#55200: + +CONNER 30200:\ + :ty#winchester:ns#49:nt#4:nc#2121:\ + :pc#415716:oc#0: + +CONNER CFP4207S 4.28GB:\ + :ty#winchester:ns#125:nt#20:nc#3353:\ + :pc#8382500:oc#0: + +CONNER CP3500-540MB-3.5:\ + :ty#winchester:ns#50:nt#12:nc#1768:\ + :pc#1060800:oc#0: + +CP3100:\ + :ty#winchester:ns#49:nt#4:nc#1023:\ + :pc#204864:oc#0: + +Conner CFP1060:\ + :ty#winchester:ns#111:nt#8:nc#2329: + +Conner CP3540:\ + :ty#winchester:ns#49:nt#12:nc#1805: + +DEC DSP3107L:\ + :ty#winchester:ns#83:nt#8:nc#3147:\ + :pc#2089608:oc#0: + +DEC DSP3210 2 GB:\ + :ty#winchester:ns#86:nt#16:nc#3040:\ + :pc#4183040:oc#0: + +DEC DSP5200:\ + :ty#winchester:ns#71:nt#21:nc#2619:\ + :pa#32802:oa#0:ba#8192:\ + :pb#65604:ob#32802:\ + :pc#3904929:oc#0:\ + :pg#3806523:og#98406: + +DEC DSP5350:\ + :ty#winchester:ns#91:nt#25:nc#3053: + +DEC_RZ26:\ + :ty#winchester:ns#57:nt#14:nc#2568:\ + :pa#66234:oa#0:ba#8192:\ + :pb#132468:ob#66234:\ + :pc#2049264:oc#0:\ + :pg#1850562:og#198702: + +DEC_RZ28:\ + :ty#winchester:ns#84:nt#16:nc#3043:\ + :pa#64512:oa#0:ba#8192:\ + :pb#196224:ob#64512:\ + :pc#4089792:oc#0:\ + :pg#3827712:og#260736: + +DEC_RZ58:\ + :ty#winchester:ns#85:nt#15:nc#2112: + +DEC_RZ58_whole_disk:\ + :\ + :pc#2692800:oc#0: + +DEC_RZ74:\ + :ty#winchester:ns#91:nt#25:nc#3053:\ + :pa#65975:oa#0:ba#8192:\ + :pb#193375:ob#65975:\ + :pc#4192825:oc#0:\ + :pg#3931200:og#259350:\ + :ph#2752750:oh#4192825: + +Fujitsu M2243AS:\ + :ty#ACB4000:ns#17:nt#11:nc#752: + +Fujitsu M2246E:\ + :ty#winchester:ns#35:nt#6:nc#1196:\ + :pa#16170:oa#0:ba#8192:\ + :pb#28140:ob#16170:\ + :pc#251160:oc#0:\ + :pg#206850:og#44310: + +Fujitsu M2263SA:\ + :ty#winchester:ns#53:nt#15:nc#1652: + +Fujitsu M2266SA 1.2GB:\ + :ty#winchester:ns#85:nt#15:nc#1652: + +Fujitsu M2266SA 1GB:\ + :ty#winchester:ns#85:nt#15:nc#1642: + +Fujitsu M2344K:\ + :ty#XD7053:ns#64:nt#27:nc#622: + +Fujitsu M2511A:\ + :ty#winchester:ns#25:nt#1:nc#9950: + +Fujitsu M2512A small:\ + :ty#winchester:ns#25:nt#1:nc#9950:\ + :pc#248750:oc#0: + +Fujitsu M2512A v2:\ + :ty#winchester:ns#25:nt#1:nc#17840:\ + :pc#446000:oc#0: + +Fujitsu M2622SA:\ + :ty#winchester:ns#64:nt#7:nc#1429:\ + :pc#640192:oc#0: + +Fujitsu M2624FA:\ + :ty#winchester:ns#64:nt#11:nc#1440:\ + :pa#22528:oa#0:ba#8192:\ + :pb#67584:ob#22528:\ + :pc#1013760:oc#0:\ + :pg#450560:og#90112:\ + :ph#473088:oh#540672: + +Fujitsu M2652SA:\ + :ty#winchester:ns#88:nt#20:nc#1935: + +Fujitsu M2654SA:\ + :ty#winchester:ns#88:nt#21:nc#2174: + +Fujitsu M2684S:\ + :ty#SCSI:ns#74:nt#6:nc#2338: + +Fujitsu-M2284/M2322:\ + :ty#XY450:ns#32:nt#10:nc#821: + +Fujitsu-M2312K:\ + :ty#XY450:ns#32:nt#7:nc#587: + +Fujitsu-M2333:\ + :ty#XD7053:ns#67:nt#10:nc#821: + +Fujitsu-M2351 Eagle:\ + :ty#XD7053:ns#46:nt#20:nc#840: + +Fujitsu-M2361 Eagle:\ + :ty#XD7053:ns#67:nt#20:nc#840: + +Fujitsu-M2372K:\ + :ty#XD7053:ns#67:nt#27:nc#743: + +Fujitsu-M2382:\ + :ty#XD7053:ns#81:nt#27:nc#743:\ + :pa#80919:oa#0:ba#8192:\ + :pb#129033:ob#80919:\ + :pc#1624941:oc#0:\ + :pd#470205:od#209952:\ + :pe#944784:oe#680157:\ + :pf#209952:of#0:\ + :pg#1414989:og#209952:\ + :ph#1544022:oh#80919: + +Fujitsu-M2624S-512:\ + :ty#winchester:ns#64:nt#11:nc#1429: + +Fujitsu-M2651SA:\ + :ty#winchester:ns#88:nt#16:nc#1934:\ + :pc#2723072:oc#0: + +Fujitsu-M2694ESA:\ + :ty#winchester:ns#77:nt#15:nc#1830: + +HP 97549T:\ + :ty#winchester:ns#64:nt#16:nc#1909: + +HP 97556:\ + :ty#winchester:ns#72:nt#11:nc#1668: + +HP 97558:\ + :ty#winchester:ns#72:nt#15:nc#1933: + +HP 97560:\ + :ty#winchester:ns#72:nt#19:nc#1933: + +HP C2247 1.05GB:\ + :ty#winchester:ns#95:nt#13:nc#1661:\ + :pc#2051335:oc#0:\ + :pg#1640080:og#0:\ + :ph#411255:oh#1640080: + +HP C3010 / Cranel 2.0GB Fast SCSI2 H10:\ + :ty#winchester:ns#95:nt#19:nc#2165: + +HP97548SU 664MB:\ + :ty#winchester:ns#56:nt#16:nc#1445:\ + :pa#35840:oa#0:ba#8192:\ + :pb#71680:ob#35840:\ + :pc#1294720:oc#0:\ + :pg#197120:og#215040:\ + :ph#342720:oh#609280: + +Hewlett Packard C2490A:\ + :ty#winchester:ns#107:nt#18:nc#2159: + +Hewlett Packard C3323A:\ + :ty#winchester:ns#98:nt#7:nc#2995: + +Hewlett Packard C3725S:\ + :ty#winchester:ns#140:nt#9:nc#3362:\ + :pc#4236120:oc#0:\ + :ph#4193280:oh#1260: + +Hitachi DK315C-10:\ + :ty#winchester:ns#75:nt#11:nc#2467: + +Hitachi DK315C-11:\ + :ty#winchester:ns#58:nt#15:nc#2478: + +Hitachi DK315C-14:\ + :ty#winchester:ns#75:nt#15:nc#2462: + +Hitachi DK326C-10:\ + :ty#winchester:ns#87:nt#7:nc#3200: + +Hitachi DK326C-6:\ + :ty#winchester:ns#87:nt#4:nc#3200: + +Hitachi DK515C-78:\ + :ty#winchester:ns#69:nt#14:nc#1354: + +Hitachi DK516C-16:\ + :ty#winchester:ns#80:nt#15:nc#2170: + +Hitachi DK517C-37:\ + :ty#winchester:ns#81:nt#21:nc#3297: + +Hitachi DK815-10:\ + :ty#XD7053:ns#67:nt#15:nc#1735: + +IBM 0662-S12:\ + :ty#winchester:ns#114:nt#6:nc#3002: + +IBM 0662S12:\ + :ty#winchester:ns#108:nt#5:nc#3803: + +IBM 0663-E15:\ + :ty#winchester:ns#37:nt#20:nc#3182: + +IBM 0663L12:\ + :ty#winchester:ns#66:nt#15:nc#1979:\ + :pc#1959210:oc#0: + +IBM 0664-M1H/N1H:\ + :ty#winchester:ns#86:nt#16:nc#2856: + +IBM 0664CSH:\ + :ty#winchester:ns#125:nt#30:nc#2787: + +IBM 0664M1H:\ + :ty#winchester:ns#94:nt#15:nc#2787: + +IBM DFHSS1x:\ + :ty#winchester:ns#125:nt#4:nc#4383: + +IBM DFHSS2x:\ + :ty#winchester:ns#125:nt#8:nc#4388: + +IBM DFHSS4x:\ + :ty#winchester:ns#125:nt#16:nc#4390: + +IBM DPES-31080:\ + :ty#winchester:ns#108:nt#4:nc#4901:\ + :pc#2117232:oc#0: + +IBM DSAS-3270:\ + :ty#winchester:ns#108:nt#2:nc#2542: + +IBM DSAS-3360:\ + :ty#winchester:ns#108:nt#2:nc#3297: + +IBM DSAS-3540:\ + :ty#winchester:ns#108:nt#3:nc#3259: + +IBM DSAS-3720:\ + :ty#winchester:ns#108:nt#4:nc#3292: + +IBM OEM 0664M1H:\ + :ty#winchester:ns#94:nt#15:nc#2787: + +IBM OEM DFHSS2F:\ + :ty#winchester:ns#135:nt#8:nc#4076:\ + :pa#4100760:oa#0:ba#8192:\ + :pb#301320:ob#4100760: + +MAXOPTIX (NON-ISO, 1024b) DATA:\ + :ty#winchester:ns#66:nt#1:nc#15104: + +MAXOPTIX (NON-ISO, 1024b) SYSTEM:\ + :ty#winchester:ns#66:nt#1:nc#15104: + +MAXOPTIX (NON-ISO, 512b) DATA:\ + :ty#winchester:ns#60:nt#1:nc#15081: + +MAXOPTIX (NON-ISO, 512b) SYSTEM:\ + :ty#winchester:ns#60:nt#1:nc#15081: + +MICROP 4221-09MZ 10204:\ + :ty#winchester:ns#139:nt#9:nc#3198:\ + :pc#4000698:oc#0: + +MICROPOLIS 1991-27:\ + :ty#winchester:ns#149:nt#27:nc#4400: + +MICROPOLIS 3243-19:\ + :ty#winchester:ns#106:nt#19:nc#4139: + +MICROPOLIS 4110-09:\ + :ty#winchester:ns#95:nt#9:nc#2283: + +Maxtor 7213SR NB:\ + :ty#winchester:ns#65:nt#4:nc#1595:\ + :pc#414700:oc#0:\ + :pg#414700:og#0: + +Maxtor DXP3105S:\ + :ty#winchester:ns#57:nt#14:nc#2568: + +Maxtor LXT-200S:\ + :ty#winchester:ns#43:nt#7:nc#1117: + +Maxtor LXT-340SY:\ + :ty#winchester:ns#70:nt#7:nc#1355: + +Maxtor LXT535ST:\ + :ty#winchester:ns#61:nt#11:nc#1547:\ + :pc#1038037:oc#0: + +Maxtor MXT1240S:\ + :ty#winchester:ns#70:nt#15:nc#2306:\ + :pc#2421300:oc#0:\ + :pg#2421300:og#0: + +Maxtor P0-12S (1632):\ + :ty#winchester:ns#90:nt#15:nc#1478:\ + :pc#1995300:oc#0:\ + :pg#1995300:og#0: + +Maxtor P0-12S (1795):\ + :ty#winchester:ns#90:nt#15:nc#1510:\ + :pc#2038500:oc#0:\ + :pg#2038500:og#0: + +Maxtor P1-17S:\ + :ty#winchester:ns#83:nt#19:nc#1816:\ + :pa#78850:oa#0:ba#8192:\ + :pb#78850:ob#78850:\ + :pc#2863832:oc#0:\ + :pd#78850:od#157700:\ + :pg#2469582:og#236550:\ + :ph#78850:oh#2706132: + +Maxtor P1-17S NB:\ + :ty#winchester:ns#90:nt#19:nc#1711:\ + :pc#2925810:oc#0:\ + :pg#2925810:og#0: + +Maxtor XT-1050:\ + :ty#ACB4000:ns#17:nt#5:nc#1020: + +Maxtor XT-3280S:\ + :ty#winchester:ns#25:nt#15:nc#1222: + +Maxtor XT-4380S:\ + :ty#winchester:ns#36:nt#15:nc#1202: + +Maxtor XT-8380S:\ + :ty#winchester:ns#53:nt#8:nc#1626: + +Maxtor XT-8610E:\ + :ty#winchester:ns#52:nt#12:nc#1626: + +Maxtor XT-8760E:\ + :ty#winchester:ns#50:nt#15:nc#1616:\ + :pa#97500:oa#0:ba#8192:\ + :pb#63750:ob#658500:\ + :pc#1212000:oc#0:\ + :pd#280500:od#97500:\ + :pe#280500:oe#378000:\ + :pf#489750:of#722250:\ + :pg#561000:og#97500:\ + :ph#658500:oh#0: + +Maxtor XT-8760S:\ + :ty#winchester:ns#54:nt#15:nc#1614: + +Micropolis 1304:\ + :ty#ACB4000:ns#17:nt#6:nc#825: + +Micropolis 1325:\ + :ty#ACB4000:ns#17:nt#8:nc#1022: + +Micropolis 1355:\ + :ty#winchester:ns#34:nt#8:nc#1018: + +Micropolis 1528-15:\ + :ty#winchester:ns#83:nt#15:nc#2102:\ + :pa#32370:oa#0:ba#8192:\ + :pb#64740:ob#32370:\ + :pc#2616990:oc#0:\ + :pg#2519880:og#97110: + +Micropolis 1548-15:\ + :ty#winchester:ns#131:nt#15:nc#1701:\ + :pa#33405:oa#0:ba#8192:\ + :pb#66810:ob#33405:\ + :pc#3342465:oc#0:\ + :pg#3242250:og#100215: + +Micropolis 1558:\ + :ty#winchester:ns#35:nt#15:nc#1218: + +Micropolis 1578-15:\ + :ty#winchester:ns#35:nt#15:nc#1231:\ + :pa#32550:oa#0:ba#8192:\ + :pb#65100:ob#32550:\ + :pc#646275:oc#0:\ + :pg#548625:og#97650: + +Micropolis 1588-15:\ + :ty#winchester:ns#53:nt#15:nc#1637:\ + :pa#32595:oa#0:ba#8192:\ + :pb#65190:ob#32595:\ + :pc#1301415:oc#0:\ + :pg#1203630:og#97785: + +Micropolis 1598-15:\ + :ty#winchester:ns#70:nt#15:nc#1931:\ + :pa#32550:oa#0:ba#8192:\ + :pb#65100:ob#32550:\ + :pc#2027550:oc#0:\ + :pg#1929900:og#97650: + +Micropolis 1624-7:\ + :ty#winchester:ns#114:nt#7:nc#1647:\ + :pa#32718:oa#0:ba#8192:\ + :pb#65436:ob#32718:\ + :pc#1314306:oc#0:\ + :pg#1216152:og#98154: + +Micropolis 1674-7:\ + :ty#winchester:ns#35:nt#7:nc#1255:\ + :pa#16415:oa#0:ba#8192:\ + :pb#32830:ob#16415:\ + :pc#307475:oc#0:\ + :pg#258230:og#49245: + +Micropolis 1684-7:\ + :ty#winchester:ns#53:nt#7:nc#1785:\ + :pa#32648:oa#0:ba#8192:\ + :pb#65296:ob#32648:\ + :pc#662235:oc#0:\ + :pg#564291:og#97944: + +Micropolis 1908-15:\ + :ty#winchester:ns#95:nt#15:nc#1890:\ + :pa#32775:oa#0:ba#8192:\ + :pb#65550:ob#32775:\ + :pc#2693250:oc#0:\ + :pg#2594925:og#98325: + +Micropolis 1924-21:\ + :ty#winchester:ns#94:nt#21:nc#2072:\ + :pa#33558:oa#0:ba#8192:\ + :pb#67116:ob#33558:\ + :pc#4090128:oc#0:\ + :pg#3989454:og#100674: + +Micropolis 1926-15:\ + :ty#winchester:ns#101:nt#15:nc#2769:\ + :pa#33330:oa#0:ba#8192:\ + :pb#66660:ob#33330:\ + :pc#4195035:oc#0:\ + :pg#4095045:og#99990: + +Micropolis 1936-21:\ + :ty#winchester:ns#101:nt#21:nc#2772:\ + :pa#33936:oa#0:ba#8192:\ + :pb#67872:ob#33936:\ + :pc#5879412:oc#0:\ + :pg#2846382:og#101808:\ + :ph#2931222:oh#2948190: + +Micropolis 2105-8:\ + :ty#winchester:ns#94:nt#8:nc#1448:\ + :pa#32336:oa#0:ba#8192:\ + :pb#64672:ob#32336:\ + :pc#1088896:oc#0:\ + :pg#991888:og#97008: + +Micropolis 2108-10:\ + :ty#winchester:ns#94:nt#10:nc#1450:\ + :pa#31960:oa#0:ba#8192:\ + :pb#63920:ob#31960:\ + :pc#1363000:oc#0:\ + :pg#1267120:og#95880: + +Micropolis 2112-15:\ + :ty#winchester:ns#94:nt#15:nc#1452:\ + :pa#33840:oa#0:ba#8192:\ + :pb#67680:ob#33840:\ + :pc#2047320:oc#0:\ + :pg#1945800:og#101520: + +Micropolis 2205-05:\ + :ty#winchester:ns#109:nt#5:nc#2088:\ + :pa#32700:oa#0:ba#8192:\ + :pb#65400:ob#32700:\ + :pc#1137960:oc#0:\ + :pg#1039860:og#98100: + +Micropolis 2210-09:\ + :ty#winchester:ns#109:nt#9:nc#2099:\ + :pa#33354:oa#0:ba#8192:\ + :pb#66708:ob#33354:\ + :pc#2059119:oc#0:\ + :pg#1959057:og#100062: + +Micropolis 2217-15:\ + :ty#winchester:ns#109:nt#15:nc#2105:\ + :pa#32700:oa#0:ba#8192:\ + :pb#65400:ob#32700:\ + :pc#3441675:oc#0:\ + :pg#3343575:og#98100: + +Micropolis 4110:\ + :ty#winchester:ns#114:nt#9:nc#1998: + +Micropolis 4221:\ + :ty#winchester:ns#109:nt#9:nc#4079:\ + :pa#4001499:oa#0:ba#8192:\ + :pc#4001499:oc#0: + +NEC D2363:\ + :ty#XD7053:ns#67:nt#27:nc#964: + +NEC-D2352:\ + :ty#XD7053:ns#57:nt#19:nc#758: + +QUANTUM EMPIRE_2100S:\ + :ty#winchester:ns#137:nt#12:nc#2497:\ + :pc#4105068:oc#0: + +QUANTUM LPS540S:\ + :ty#winchester:ns#125:nt#4:nc#2113: + +QUANTUM PD1050iS:\ + :ty#winchester:ns#92:nt#12:nc#1859:\ + :pc#2052336:oc#0: + +QUANTUM XP34301:\ + :ty#winchester:ns#118:nt#20:nc#3561: + +Quantum ELS 127S:\ + :ty#winchester:ns#54:nt#3:nc#1541: + +Quantum ELS 170S:\ + :ty#winchester:ns#54:nt#4:nc#1542: + +Quantum ELS 85S:\ + :ty#winchester:ns#54:nt#2:nc#1535: + +Quantum Empire 1080S:\ + :ty#winchester:ns#92:nt#16:nc#1431: + +Quantum Empire 540S:\ + :ty#winchester:ns#92:nt#8:nc#1431: + +Quantum GoDrive 120S:\ + :ty#winchester:ns#56:nt#4:nc#1067: + +Quantum GoDrive 160S:\ + :ty#winchester:ns#58:nt#4:nc#1413: + +Quantum LPS 105S:\ + :ty#winchester:ns#42:nt#4:nc#1221: + +Quantum LPS 120S:\ + :ty#winchester:ns#60:nt#2:nc#1987: + +Quantum LPS 240S:\ + :ty#winchester:ns#60:nt#4:nc#1995: + +Quantum LPS 270S:\ + :ty#winchester:ns#76:nt#7:nc#992: + +Quantum LPS 525S:\ + :ty#winchester:ns#70:nt#6:nc#2444: + +Quantum Lightning 730S:\ + :ty#winchester:ns#63:nt#16:nc#1415:\ + :pa#161280:oa#0:ba#8192:\ + :pb#96768:ob#161280:\ + :pc#1426320:oc#0:\ + :pg#1168272:og#258048: + +Quantum PD 1050S:\ + :ty#winchester:ns#70:nt#12:nc#2444: + +Quantum PD 120S:\ + :ty#winchester:ns#42:nt#5:nc#1114: + +Quantum PD 1225S:\ + :ty#winchester:ns#70:nt#14:nc#2442: + +Quantum PD 170S:\ + :ty#winchester:ns#42:nt#7:nc#1117: + +Quantum PD 210S:\ + :ty#winchester:ns#49:nt#7:nc#1189: + +Quantum PD 425S:\ + :ty#winchester:ns#60:nt#9:nc#1540: + +Quantum PD 700S:\ + :ty#winchester:ns#70:nt#8:nc#2441: + +Quantum ProDrive 80S:\ + :ty#winchester:ns#34:nt#6:nc#832: + +Quantum XP32150:\ + :ty#winchester:ns#109:nt#10:nc#3850: + +RICOH RO-5031E:\ + :ty#winchester:ns#54:nt#15:nc#710:\ + :pc#575100:oc#0: + +RZ24:\ + :ty#winchester:ns#38:nt#8:nc#1344:\ + :pc#409792:oc#0: + +RZ55:\ + :ty#winchester:ns#35:nt#15:nc#1218:\ + :pa#32025:oa#0:ba#8192:\ + :pb#59850:ob#32025:\ + :pc#639450:oc#0:\ + :pg#547575:og#91875: + +SEAGATE ST11950N:\ + :ty#winchester:ns#81:nt#15:nc#2715:\ + :pc#3298725:oc#0: + +SEAGATE ST15230N:\ + :ty#winchester:ns#111:nt#19:nc#3974: + +SEAGATE ST31200N:\ + :ty#winchester:ns#85:nt#9:nc#2692: + +SEAGATE ST31230N:\ + :ty#winchester:ns#104:nt#5:nc#3978:\ + :pc#2068560:oc#0: + +SEAGATE ST32550N:\ + :ty#winchester:ns#109:nt#11:nc#3495:\ + :pc#4190505:oc#0: + +SEAGATE ST3600N:\ + :ty#winchester:ns#79:nt#7:nc#1853:\ + :pc#1024709:oc#0: + +ST83220K:\ + :ty#"ISP-80":ns#102:nt#19:nc#2652: + +SUN0104:\ + :ty#winchester:ns#35:nt#6:nc#974: + +SUN0121:\ + :ty#winchester:ns#39:nt#4:nc#1520: + +SUN0207:\ + :ty#winchester:ns#36:nt#9:nc#1254: + +SUN0327:\ + :ty#winchester:ns#46:nt#9:nc#1545: + +SUN0424:\ + :ty#winchester:ns#80:nt#9:nc#1151: + +SUN0535:\ + :ty#winchester:ns#80:nt#7:nc#1866: + +SUN0669:\ + :ty#winchester:ns#54:nt#15:nc#1614: + +SUN1.3G:\ + :ty#winchester:ns#80:nt#17:nc#1965: + +SUN2.1G:\ + :ty#winchester:ns#80:nt#19:nc#2733: + +Sabre ST82500J:\ + :ty#XD7053:ns#82:nt#19:nc#2609: + +Seagate (CDC) Wren V 94181-702:\ + :ty#winchester:ns#48:nt#15:nc#1543: + +Seagate (CDC) Wren VI 94191-766:\ + :ty#winchester:ns#52:nt#15:nc#1659: + +Seagate (CDC) Wren VII 94601-1.2G SunOS 4.1.1:\ + :ty#winchester:ns#70:nt#15:nc#1925: + +Seagate (CDC) Wren VII 94601-15:\ + :ty#winchester:ns#71:nt#15:nc#1905: + +Seagate (CDC) Wren VIII ST41650N:\ + :ty#winchester:ns#89:nt#15:nc#2070: + +Seagate Elite ST43400N-3.5G:\ + :ty#winchester:ns#99:nt#21:nc#2736:\ + :pa#2843360:oa#0:ba#8192:\ + :pb#2843360:ob#2841993: + +Seagate IPI ZBR Elite:\ + :ty#"ISP-80":ns#78:nt#17:nc#1893:\ + :pa#34476:oa#0:ba#8192:\ + :pb#132600:ob#34476:\ + :pc#2510118:oc#0:\ + :pg#663000:og#167076:\ + :ph#1680042:oh#830076: + +Seagate ST11200N:\ + :ty#winchester:ns#80:nt#15:nc#1714:\ + :pa#2056800:oa#0:ba#8192:\ + :pc#2056800:oc#0: + +Seagate ST11900N:\ + :ty#winchester:ns#83:nt#15:nc#2619:\ + :pb#498000:ob#0:\ + :pc#3260655:oc#0:\ + :ph#2761410:oh#498000: + +Seagate ST1239N SWIFT:\ + :ty#winchester:ns#35:nt#9:nc#1264: + +Seagate ST12400N 2.4GB:\ + :ty#winchester:ns#82:nt#19:nc#2668:\ + :pa#32718:oa#0:ba#8192:\ + :pb#65436:ob#32718:\ + :pc#4156744:oc#0:\ + :pg#4058590:og#98154: + +Seagate ST12550N:\ + :ty#winchester:ns#80:nt#19:nc#2747: + +Seagate ST1480N:\ + :ty#winchester:ns#64:nt#9:nc#1456: + +Seagate ST15150N:\ + :ty#winchester:ns#78:nt#21:nc#5119:\ + :pc#8384922:oc#0: + +Seagate ST410800N Elite 9:\ + :ty#winchester:ns#108:nt#27:nc#6087:\ + :pc#17749692:oc#0: + +Seagate ST42100N - Wren 9:\ + :ty#winchester:ns#96:nt#15:nc#2574:\ + :pc#3706560:oc#0: + +Seagate ST42400N Elite 2:\ + :ty#winchester:ns#84:nt#19:nc#2604:\ + :pc#4155984:oc#0: + +Seagate Sabre-5 ST81236J:\ + :ty#XD7053:ns#82:nt#15:nc#1633:\ + :pa#99630:oa#0:ba#8192:\ + :pb#261990:ob#99630:\ + :pc#2008590:oc#0:\ + :pd#548580:od#361620:\ + :pe#1098390:oe#910200:\ + :pf#361620:of#0:\ + :pg#1646970:og#361620:\ + :ph#1908960:oh#99630: + +SeagateST3283N:\ + :ty#winchester:ns#57:nt#5:nc#1689: + +Sun1.0G:\ + :ty#winchester:ns#80:nt#15:nc#1703: + +SyQuest SQ555:\ + :ty#winchester:ns#34:nt#2:nc#1273:\ + :pc#86564:oc#0: + +Toshiba MK 156F:\ + :ty#winchester:ns#34:nt#10:nc#815: + +Vertex V185:\ + :ty#ACB4000:ns#17:nt#7:nc#1163: + diff --git a/etc/etc.palm/fbtab b/etc/etc.palm/fbtab new file mode 100644 index 0000000..97f474b --- /dev/null +++ b/etc/etc.palm/fbtab @@ -0,0 +1,3 @@ +/dev/tty00 0600 /dev/console +/dev/ttyC0 0600 /dev/console:/dev/wskbd:/dev/wskbd0:/dev/wsmouse:/dev/wsmouse0:/dev/ttyCcfg +/dev/X0 0600 /dev/wsmouse:/dev/wsmouse0:/dev/wskbd:/dev/wskbd0:/dev/ttyC0 diff --git a/etc/etc.palm/sysctl.conf b/etc/etc.palm/sysctl.conf new file mode 100644 index 0000000..04d5e3b --- /dev/null +++ b/etc/etc.palm/sysctl.conf @@ -0,0 +1,4 @@ +#machdep.kbdreset=1 # permit zkbd(4) power key to do a nice halt +#machdep.maxspeed=520 # set change maximum processor speed +#machdep.lidsuspend=1 # closing the lid will suspend machine +#hw.setperf=0 # 0=slowest speed, 100=fastest speed diff --git a/etc/etc.palm/ttys b/etc/etc.palm/ttys new file mode 100644 index 0000000..d06bc20 --- /dev/null +++ b/etc/etc.palm/ttys @@ -0,0 +1,16 @@ +# +# $OpenBSD: ttys,v 1.4 2008/01/09 17:39:42 miod Exp $ +# +# name getty type status comments +# +console "/usr/libexec/getty std.9600" vt220 off secure +ttyC0 "/usr/libexec/getty std.9600" vt220 on secure +ttyC1 "/usr/libexec/getty std.9600" vt220 off secure +tty00 "/usr/libexec/getty std.9600" unknown off secure +tty01 "/usr/libexec/getty std.9600" unknown off secure +tty02 "/usr/libexec/getty std.9600" unknown off +tty03 "/usr/libexec/getty std.9600" unknown off +tty04 "/usr/libexec/getty std.9600" unknown off +tty05 "/usr/libexec/getty std.9600" unknown off +tty06 "/usr/libexec/getty std.9600" unknown off +tty07 "/usr/libexec/getty std.9600" unknown off diff --git a/lib/libarch/arm/Makefile b/lib/libarch/arm/Makefile index b35cc25..3efa8c1 100644 --- a/lib/libarch/arm/Makefile +++ b/lib/libarch/arm/Makefile @@ -3,7 +3,7 @@ MAN+= arm_sync_icache.2 arm_drain_writebuf.2 MANSUBDIR=armish zaurus -.if ${MACHINE} == "armish" || ${MACHINE} == "zaurus" +.if ${MACHINE} == "armish" || ${MACHINE} == "zaurus" || ${MACHINE} == "palm" NOPIC= SRCS+= arm_sync_icache.c arm_drain_writebuf.c .include diff --git a/sys/Makefile b/sys/Makefile index 086d636..78ab981 100644 --- a/sys/Makefile +++ b/sys/Makefile @@ -5,7 +5,7 @@ SUBDIR= dev/microcode \ arch/alpha arch/amd64 arch/armish arch/aviion arch/hp300 \ arch/hppa arch/hppa64 arch/i386 arch/landisk arch/luna88k \ arch/m68k arch/mac68k arch/macppc arch/mvme68k \ - arch/mvme88k arch/mvmeppc arch/sgi arch/socppc \ + arch/mvme88k arch/mvmeppc arch/palm arch/sgi arch/socppc \ arch/solbourne arch/sparc arch/sparc64 arch/vax arch/zaurus .include diff --git a/sys/arch/palm/Makefile b/sys/arch/palm/Makefile new file mode 100644 index 0000000..019557f --- /dev/null +++ b/sys/arch/palm/Makefile @@ -0,0 +1,37 @@ +# $OpenBSD: Makefile,v 1.3 2005/05/06 02:20:24 uwe Exp $ +# $NetBSD: Makefile,v 1.1 2001/06/12 08:32:46 chris Exp $ + +# Makefile for palm tags file and boot blocks + +S=${.CURDIR}/../.. +.include "$S/kern/Make.tags.inc" + +NOPROG= noprog +NOMAN= noman + +TPALM= $S/arch/palm/tags + +SPALM= $S/arch/palm/include/*.h \ + $S/arch/palm/palm/*.[ch] $S/arch/arm/arm/*.[ch] \ + $S/arch/arm/include/*.h $S/arch/arm/mainbus/*.[ch] \ + $S/arch/arm/sa11x0/*.[ch] $S/arch/arm/xscale/*.[ch] +APALM= $S/arch/palm/palm/*.S $S/arch/arm/arm/*.S \ + $S/arch/arm/mainbus/*.S $S/arch/arm/xscale/*.S + +# Directories in which to place tags links +DPALM= include palm + +tags: + -ctags -wdtf ${TPALM} ${SPALM} ${COMM} + egrep "^ENTRY(.*)|^ALTENTRY(.*)" ${APALM} | \ + sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \ + >> ${TPALM} + sort -o ${TPALM} ${TPALM} + +links: + -for i in ${DPALM}; do \ + (cd $$i && { rm -f tags; ln -s ${TPALM} tags; }) done + +obj: _SUBDIRUSE + +.include diff --git a/sys/arch/palm/compile/.cvsignore b/sys/arch/palm/compile/.cvsignore new file mode 100644 index 0000000..b72af30 --- /dev/null +++ b/sys/arch/palm/compile/.cvsignore @@ -0,0 +1,2 @@ +GENERIC +RAMDISK diff --git a/sys/arch/palm/conf/GENERIC b/sys/arch/palm/conf/GENERIC new file mode 100644 index 0000000..4905274 --- /dev/null +++ b/sys/arch/palm/conf/GENERIC @@ -0,0 +1,220 @@ +# $OpenBSD: GENERIC,v 1.74 2009/06/01 15:53:46 jsg Exp $ +# +# For further information on compiling OpenBSD kernels, see the config(8) +# man page. +# +# For further information on hardware support for this architecture, see +# the intro(4) man page. For further information about kernel options +# for this architecture, see the options(4) man page. For an explanation +# of each device driver in this file see the section 4 man page for the +# device. + +machine palm arm +include "../../../conf/GENERIC" +maxusers 32 # estimated number of users + +options ARM32 +options PXAGPIO_HAS_GPION_INTRS + +options CACHE_CLEAN_BLOCK_INTR + +makeoptions KERNEL_BASE_PHYS="0xa0200000" +makeoptions KERNEL_BASE_VIRT="0xc0200000" +makeoptions BOARDTYPE="palm" + +# CPU options +options CPU_XSCALE_PXA2X0 # Support the XScale core +#options XSCALE_CACHE_WRITE_THROUGH +options XSCALE_CACHE_WRITE_BACK +makeoptions CPUFLAGS="-mcpu=xscale" + +option WSDISPLAY_COMPAT_USL # VT handling +option WSDISPLAY_COMPAT_RAWKBD # provide raw scancodes; needed for X11 +option WSDISPLAY_DEFAULTSCREENS=2 # initial number of text consoles +option WSDISPLAY_COMPAT_PCVT # emulate some ioctls; needed for X11 + +option USBVERBOSE + +config bsd swap generic +#config bsd root on wd0a + +# The main bus device +mainbus0 at root +cpu0 at mainbus? +pxaip0 at mainbus? + +pxaintc0 at pxaip? # interrupt controller +pxagpio0 at pxaip? # GPIO controller +pxadmac0 at pxaip? # DMA controller +pxaost0 at pxaip? addr 0x40a00000 size 0x20 + +# USB controllers +pxaudc0 at pxaip? # USB Device Controller +ohci0 at pxaip? # Open Host Controller + +# USB function support +usbf* at pxaudc? # USB logical device +cdcef* at usbf? # CDC ethernet function + +# USB bus support +usb* at ohci? +uhub* at usb? # USB Root Hub +uhub* at uhub? # USB Hub + +# USB devices +umodem* at uhub? # USB Modems/Serial +ucom* at umodem? +uvisor* at uhub? # Handspring Visor +ucom* at uvisor? +uvscom* at uhub? # SUNTAC Slipper U VS-10U serial +ucom* at uvscom? +ubsa* at uhub? # Belkin serial adapter +ucom* at ubsa? +uftdi* at uhub? # FTDI FT8U100AX serial adapter +ucom* at uftdi? +uplcom* at uhub? # I/O DATA USB-RSAQ2 serial adapter +ucom* at uplcom? +umct* at uhub? # MCT USB-RS232 serial adapter +ucom* at umct? +uslcom* at uhub? # Silicon Laboratories CP210x serial +ucom* at uslcom? +uark* at uhub? # Arkmicro ARK3116 serial +ucom* at uark? +uipaq* at uhub? # iPAQ serial adapter +ucom* at uipaq? +uchcom* at uhub? # WinChipHead CH341/340 serial +ucom* at uchcom? +uaudio* at uhub? # USB Audio +audio* at uaudio? +umidi* at uhub? # USB MIDI +midi* at umidi? +ulpt* at uhub? # USB Printers +umass* at uhub? # USB Mass Storage devices +scsibus* at umass? +atapiscsi* at umass? +uhidev* at uhub? # Human Interface Devices +ums* at uhidev? # USB mouse +wsmouse* at ums? mux 0 +ukbd* at uhidev? # USB keyboard +wskbd* at ukbd? mux 1 +ucycom* at uhidev? # Cypress serial +ucom* at ucycom? +uhid* at uhidev? # USB generic HID support +aue* at uhub? # ADMtek AN986 Pegasus Ethernet +atu* at uhub? # Atmel AT76C50x based 802.11b +axe* at uhub? # ASIX Electronics AX88172 USB Ethernet +cue* at uhub? # CATC USB-EL1201A based Ethernet +kue* at uhub? # Kawasaki KL5KUSB101B based Ethernet +cdce* at uhub? # CDC Ethernet +upl* at uhub? # Prolific PL2301/PL2302 host-to-host +udav* at uhub? # Davicom DM9601 based Ethernet +ural* at uhub? # Ralink RT2500USB +rum* at uhub? # Ralink RT2501USB/RT2601USB +run* at uhub? # Ralink RT2700U/RT2800U/RT3000U +zyd* at uhub? # Zydas ZD1211 +url* at uhub? # Realtek RTL8150L based adapters +wi* at uhub? # WaveLAN IEEE 802.11DS +urio* at uhub? # Diamond Multimedia Rio 500 +uscanner* at uhub? # USB Scanners +usscanner* at uhub? # USB SCSI scanners, e.g., HP5300 +scsibus* at usscanner? +#uyap* at uhub? # Y@P firmware loader +udsbr* at uhub? # D-Link DSB-R100 radio +radio* at udsbr? # USB radio +ugen* at uhub? # USB Generic driver +udcf* at uhub? # Gude Expert mouseCLOCK +umbg* at uhub? # Meinberg Funkuhren USB5131 +uow* at uhub? # Maxim/Dallas DS2490 1-Wire adapter +onewire* at uow? + +sd* at scsibus? # SCSI disk drives +#st* at scsibus? # SCSI tape drives +cd* at scsibus? # SCSI CD-ROM drives +#ch* at scsibus? # SCSI autochangers +#ss* at scsibus? # SCSI scanners +#uk* at scsibus? # unknown SCSI + +# integrated 16550 UARTs +options COM_PXA2X0 +com0 at pxaip? addr 0x40100000 intr 22 # Full Function UART +com1 at pxaip? addr 0x40200000 intr 21 # BlueTooth UART +com2 at pxaip? addr 0x40700000 intr 20 # Standard UART (for IrDA) + +# integrated PCMCIA/CF controller +pxapcic0 at pxaip? + +# PCMCIA bus support +pcmcia* at pxapcic? + +# PCMCIA (CF) devices +com* at pcmcia? # PCMCIA modems/serial ports +wi* at pcmcia? # WaveLAN IEEE 802.11DS +malo* at pcmcia? # Marvell 88W8385 +ne* at pcmcia? # PCMCIA based NE2000 ethernet +wdc* at pcmcia? # hard disk controller +#cfxga* at pcmcia? # VoyagerVGA frame buffer +#wsdisplay* at cfxga? + +# IDE hard drives +wd* at wdc? flags 0x0000 + +# Media Independent Interface (mii) drivers +exphy* at mii? # 3Com internal PHYs +inphy* at mii? # Intel 82555 PHYs +iophy* at mii? # Intel 82553 PHYs +icsphy* at mii? # ICS 1890 PHYs +lxtphy* at mii? # Level1 LXT970 PHYs +nsphy* at mii? # NS and compatible PHYs +nsphyter* at mii? # NS and compatible PHYs +qsphy* at mii? # Quality Semi QS6612 PHYs +sqphy* at mii? # Seeq 8x220 PHYs +rlphy* at mii? # RealTek 8139 internal PHYs +mtdphy* at mii? # Myson MTD972 PHYs +#dcphy* at mii? # Digital Clone PHYs +acphy* at mii? # Altima AC101 PHYs +amphy* at mii? # AMD 79C873 PHYs +tqphy* at mii? # TDK 78Q212x PHYs +bmtphy* at mii? # Broadcom 10/100 PHYs +#brgphy* at mii? # Broadcom Gigabit PHYs +eephy* at mii? # Marvell 88E1000 series PHY +#xmphy* at mii? # XaQti XMAC-II PHYs +nsgphy* at mii? # NS gigabit PHYs +urlphy* at mii? # Realtek RTL8150L internal PHY +#rgephy* at mii? # Realtek 8169S/8110S PHY +#ciphy* at mii? # Cicada CS8201 10/100/1000 copper PHY +ukphy* at mii? # "unknown" PHYs + +lcd0 at pxaip? # LCD +wsdisplay* at lcd? console ? + +pxammc0 at pxaip? # MMC/SD/SDIO controller +sdmmc* at pxammc? # SD/MMC bus +scsibus* at sdmmc? # SCSI emulation + +# Bluetooth controllers +sbt* at sdmmc? # SDIO Bluetooth +bthub* at sbt? +ubt* at uhub? # USB Bluetooth +bthub* at ubt? + +# USB Video +uvideo* at uhub? +video* at uvideo? + +bthidev* at bthub? # Bluetooth HID support +btkbd* at bthidev? +btms* at bthidev? +wskbd* at btkbd? mux 1 +wsmouse* at btms? mux 0 +btsco* at bthub? # Bluetooth audio support +audio* at btsco? + +# 1-Wire devices +option ONEWIREVERBOSE +owid* at onewire? # ID +owsbm* at onewire? # Smart Battery Monitor +owtemp* at onewire? # Temperature + +# Pseudo-Devices +pseudo-device wsmux 2 # mouse & keyboard multiplexor +pseudo-device hotplug 1 # devices hot plugging diff --git a/sys/arch/palm/conf/Makefile.palm b/sys/arch/palm/conf/Makefile.palm new file mode 100644 index 0000000..6dc720e --- /dev/null +++ b/sys/arch/palm/conf/Makefile.palm @@ -0,0 +1,213 @@ +# $OpenBSD: Makefile.zaurus,v 1.13 2009/01/11 21:02:03 pirofti Exp $ +# $NetBSD: Makefile.i386,v 1.67 1996/05/11 16:12:11 mycroft Exp $ + +# Makefile for OpenBSD +# +# This makefile is constructed from a machine description: +# config machineid +# Most changes should be made in the machine description +# /sys/arch/palm/conf/``machineid'' +# after which you should do +# config machineid +# Machine generic makefile changes should be made in +# /sys/arch/palm/conf/Makefile.palm +# after which config should be rerun for all machines of that type. +# +# N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE VISIBLE TO MAKEFILE +# IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING +# +# -DTRACE compile in kernel tracing hooks +# -DQUOTA compile in file system quotas + +# DEBUG is set to -g if debugging. +# PROF is set to -pg if profiling. + +.include + +MKDEP?= mkdep +SIZE?= size +STRIP?= strip + +# source tree is located via $S relative to the compilation directory +.ifndef S +S!= cd ../../../..; pwd +.endif +THISARM= $S/arch/palm +ARM= $S/arch/arm + +INCLUDES= -nostdinc -I. -I$S -I$S/arch +CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D__palm__ +CDIAGFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \ + -Wno-uninitialized -Wno-format -Wno-main \ + -Wstack-larger-than-2047 -Wvariable-decl + +CMACHFLAGS= -ffreestanding +#CMACHFLAGS= -march=armv4 -mtune=strongarm -ffreestanding +.if ${IDENT:M-DNO_PROPOLICE} +CMACHFLAGS+= -fno-stack-protector +.endif +CMACHFLAGS+= -msoft-float -fno-builtin-printf -fno-builtin-log + +COPTS?= -O2 +CFLAGS= ${DEBUG} ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE} +AFLAGS= -x assembler-with-cpp -D_LOCORE ${CMACHFLAGS} +#LINKFLAGS= -Ttext 0xF0000020 -e start --warn-common +#LINKFLAGS= -T ${THISARM}/conf/kern.ldscript +LINKFLAGS= -T ldscript +LINKFLAGS+= --warn-common +STRIPFLAGS= -g -X -x + +HOSTCC= ${CC} +HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//} +HOSTED_CFLAGS= ${CFLAGS} + +# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP} +# where TYPE is NORMAL, DRIVER, or PROFILE; SUFFIX is the file suffix, +# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file +# is marked as config-dependent. + +NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $< +NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $< +NORMAL_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $< + +DRIVER_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $< +DRIVER_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $< + +NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $< +NORMAL_S_C= ${CC} ${AFLAGS} ${CPPFLAGS} ${PARAM} -c $< + +HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $< + +%OBJS + +%CFILES + +%SFILES + +# load lines for config "xxx" will be emitted as: +# xxx: ${SYSTEM_DEP} swapxxx.o +# ${SYSTEM_LD_HEAD} +# ${SYSTEM_LD} swapxxx.o +# ${SYSTEM_LD_TAIL} +SYSTEM_OBJ= ${BOARDTYPE}_start.o locore.o param.o ioconf.o ${OBJS} +SYSTEM_DEP= Makefile ${SYSTEM_OBJ} +SYSTEM_LD_HEAD= rm -f $@ +SYSTEM_LD_HEAD+=; \ + cat ${ARM}/conf/ldscript.head ${ARM}/conf/ldscript.tail | \ + sed -e 's/@KERNEL_BASE_PHYS@/${KERNEL_BASE_PHYS}/' \ + -e 's/@KERNEL_BASE_VIRT@/${KERNEL_BASE_VIRT}/' \ + > ldscript + +SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \ + ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} vers.o +SYSTEM_LD_TAIL= @${SIZE} $@; chmod 755 $@ + +DEBUG?= +.if ${DEBUG} == "-g" +LINKFLAGS+= -X +SYSTEM_LD_TAIL+=; \ + echo mv $@ $@.gdb; rm -f $@.gdb; mv $@ $@.gdb; \ + echo ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb; \ + ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb +.else +LINKFLAGS+= -x +.endif + +%LOAD + +assym.h: $S/kern/genassym.sh ${ARM}/arm/genassym.cf Makefile + cat ${ARM}/arm/genassym.cf | \ + sh $S/kern/genassym.sh ${CC} ${CFLAGS} \ + ${CPPFLAGS} ${PARAM} > assym.h.tmp && \ + mv -f assym.h.tmp assym.h + +param.c: $S/conf/param.c + rm -f param.c + cp $S/conf/param.c . + +param.o: param.c Makefile + ${NORMAL_C_C} + +mcount.o: $S/lib/libkern/mcount.c Makefile + ${NORMAL_C_NOP} + +ioconf.o: ioconf.c + ${NORMAL_C} + +newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP} + sh $S/conf/newvers.sh + ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c + + +clean:: + rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \ + [Ee]rrs linterrs makelinks assym.h + +lint: + @lint -hbxncez -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \ + ${CFILES} ioconf.c param.c | \ + grep -v 'static function .* unused' + +tags: + @echo "see $S/kern/Makefile for tags" + +links: + egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ + sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink + echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ + sort -u | comm -23 - dontlink | \ + sed 's,.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks + sh makelinks && rm -f dontlink makelinks + +SRCS= ${ARM}/arm/locore.S \ + param.c ioconf.c ${CFILES} ${SFILES} +depend:: .depend +.depend: ${SRCS} assym.h param.c ${APMINC} + ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${ARM}/arm/locore.S + ${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES} +.if ${SFILES} != "" + ${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES} +.endif + cat ${ARM}/arm/genassym.cf | \ + sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \ + ${CPPFLAGS} + @sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \ + < assym.dep >> .depend + @rm -f assym.dep + + +# depend on root or device configuration +autoconf.o conf.o: Makefile + +# depend on network or filesystem configuration +uipc_domain.o uipc_proto.o vfs_conf.o: Makefile +if.o if_tun.o if_loop.o if_ethersubr.o: Makefile +if_arp.o if_ether.o: Makefile +ip_input.o ip_output.o in_pcb.o in_proto.o: Makefile +tcp_subr.o tcp_timer.o tcp_output.o: Makefile + +# depend on maxusers +machdep.o: Makefile + +# depend on CPU configuration +locore.o machdep.o: Makefile + +${BOARDTYPE}_start.o: ${THISARM}/palm/${BOARDTYPE}_start.S assym.h + ${NORMAL_S} + +locore.o: ${ARM}/arm/locore.S assym.h + ${NORMAL_S} + +# The install target can be redefined by putting a +# install-kernel-${MACHINE_NAME} target into /etc/mk.conf +MACHINE_NAME!= uname -n +install: install-kernel-${MACHINE_NAME} +.if !target(install-kernel-${MACHINE_NAME}}) +install-kernel-${MACHINE_NAME}: + rm -f /obsd + ln /bsd /obsd + cp bsd /nbsd + mv /nbsd /bsd +.endif + +%RULES diff --git a/sys/arch/palm/conf/RAMDISK b/sys/arch/palm/conf/RAMDISK new file mode 100644 index 0000000..1b63e50 --- /dev/null +++ b/sys/arch/palm/conf/RAMDISK @@ -0,0 +1,165 @@ +# $OpenBSD: RAMDISK,v 1.39 2009/06/02 06:33:24 todd Exp $ + +machine palm arm + +options TIMEZONE=0 # time zone to adjust RTC time by +options DST=0 # daylight saving time used by RTC +options FFS # UFS +options CD9660 # ISO 9660 + Rock Ridge file system +options MSDOSFS # MS-DOS file system +options INET # IP + ICMP + TCP + UDP +options INET6 # IPv6 (needs INET) +options DDB # kernel debugger +options EXT2FS # Second Extended Filesystem +options CRYPTO # Cryptographic framework + +options ARM32 +options PXAGPIO_HAS_GPION_INTRS + +options CACHE_CLEAN_BLOCK_INTR + +makeoptions KERNEL_BASE_PHYS="0xa0200000" +makeoptions KERNEL_BASE_VIRT="0xc0200000" +makeoptions BOARDTYPE="palm" + +# estimated number of users + +maxusers 32 + +# CPU options +options CPU_XSCALE_PXA2X0 # Support the XScale core +#options XSCALE_CACHE_WRITE_THROUGH +options XSCALE_CACHE_WRITE_BACK +makeoptions CPUFLAGS="-mcpu=xscale" + +#option WSDISPLAY_COMPAT_USL # VT handling +#option WSDISPLAY_COMPAT_RAWKBD # provide raw scancodes; needed for X11 +#option WSDISPLAY_DEFAULTSCREENS=2 # initial number of text consoles +#option WSDISPLAY_COMPAT_PCVT # emulate some ioctls; needed for X11 + +config bsd root on rd0a swap on rd0b + +# The main bus device +mainbus0 at root +cpu0 at mainbus? +pxaip0 at mainbus? + +pxaintc0 at pxaip? # interrupt controller +pxagpio0 at pxaip? # GPIO +pxaost0 at pxaip? addr 0x40a00000 size 0x20 + +# USB controllers +#pxaudc0 at pxaip? # USB Device Controller +#ohci0 at pxaip? # Open Host Controller + +# USB function support +#usbf* at pxaudc? # USB logical device +#cdcef* at usbf? # CDC ethernet function + +# USB bus support +#usb* at ohci? +#uhub* at usb? # USB Root Hub +#uhub* at uhub? # USB Hubs + +# USB devices +#uhidev* at uhub? +#uhid* at uhidev? # USB Generic HID devices +#ukbd* at uhidev? # USB HID Keyboard devices +#wskbd* at ukbd? mux 1 +#ums* at uhub? # USB Mice +#wsmouse* at ums? mux 0 +#ulpt* at uhub? # USB Printer +#atu* at uhub? # Atmel AT76C50x based 802.11b +#aue* at uhub? # ADMtek AN986 Pegasus Ethernet +#axe* at uhub? # ASIX Electronics AX88172 USB Ethernet +#cdce* at uhub? # CDC Ethernet +#cue* at uhub? # CATC USB-EL1201A based Ethernet +#kue* at uhub? # Kawasaki KL5KUSB101B based Ethernet +#udav* at uhub? # Davicom DM9601 based Ethernet +#ural* at uhub? # Ralink RT2500 +#url* at uhub? # Realtek RTL8150L based adapters +#wi* at uhub? # WaveLAN IEEE 802.11DS +#upl* at uhub? # Prolific PL2301/PL2302 host-to-host +#uscanner* at uhub? # USB Scanner driver +#usscanner* at uhub? # USB SCSI scanners +#scsibus* at usscanner? +#uyap* at uhub? # Y@P firmware loader +#ugen* at uhub? # USB Generic driver +#umass* at uhub? # USB Mass Storage devices +#scsibus* at umass? + +# SD/MMC support +#pxammc0 at pxaip? # MMC/SD/SDIO controller +#sdmmc* at pxammc? # SD/MMC bus +#scsibus* at sdmmc? # SCSI emulation +softraid0 at root # Software RAID +scsibus* at softraid? + +sd* at scsibus? +#st* at scsibus? +cd* at scsibus? +#ch* at scsibus? +#ss* at scsibus? +#uk* at scsibus? + +# integrated 16550 UARTs +options COM_PXA2X0 +com0 at pxaip? addr 0x40100000 intr 22 # Full Function UART +com1 at pxaip? addr 0x40200000 intr 21 # BlueTooth UART +com2 at pxaip? addr 0x40700000 intr 20 # Standard UART (for IrDA) + +#aupxa0 at pxaip? # AC97 interface + +# CF (pcmcia) support +#pxapcic0 at pxaip? +#pcmcia* at pxapcic? +#wi* at pcmcia? +#ne* at pcmcia? +#wdc* at pcmcia? + +# IDE hard drives +#wd* at wdc? flags 0x0000 + +# PHY +#exphy* at mii? # 3Com internal PHYs +#inphy* at mii? # Intel 82555 PHYs +#iophy* at mii? # Intel 82553 PHYs +#icsphy* at mii? # ICS 1890 PHYs +#lxtphy* at mii? # Level1 LXT970 PHYs +#nsphy* at mii? # NS and compatible PHYs +#nsphyter* at mii? # NS and compatible PHYs +#qsphy* at mii? # Quality Semi QS6612 PHYs +#sqphy* at mii? # Seeq 8x220 PHYs +#rlphy* at mii? # RealTek 8139 internal PHYs +#mtdphy* at mii? # Myson MTD972 PHYs +#dcphy* at mii? # Digital Clone PHYs +#acphy* at mii? # Altima AC101 PHYs +#amphy* at mii? # AMD 79C873 PHYs +#tqphy* at mii? # TDK 78Q212x PHYs +#bmtphy* at mii? # Broadcom 10/100 PHYs +#brgphy* at mii? # Broadcom Gigabit PHYs +#eephy* at mii? # Marvell 88E1000 series PHY +#xmphy* at mii? # XaQti XMAC-II PHYs +#nsgphy* at mii? # NS gigabit PHYs +#urlphy* at mii? # Realtek RTL8150L internal PHY +#rgephy* at mii? # Realtek 8169S/8110S PHY +#ciphy* at mii? # Cicada CS8201 10/100/1000 copper PHY +#ukphy* at mii? # "unknown" PHYs + +# LCD +lcd0 at pxaip? +wsdisplay* at lcd? console ? + +# Pseudo-Devices +pseudo-device wsmux 2 # mouse & keyboard multiplexor +#pseudo-device crypto 1 +pseudo-device loop 1 # network loopback +pseudo-device bpfilter 1 # packet filter +pseudo-device rd 1 # ram disk +pseudo-device bio 1 # ioctl multiplexing device + +options BOOT_CONFIG # boot-time kernel config + +# RAMDISK stuff +options MINIROOTSIZE=5120 +options RAMDISK_HOOKS diff --git a/sys/arch/palm/conf/files.palm b/sys/arch/palm/conf/files.palm new file mode 100644 index 0000000..33910cb --- /dev/null +++ b/sys/arch/palm/conf/files.palm @@ -0,0 +1,72 @@ +# $OpenBSD: files.zaurus,v 1.25 2007/06/08 22:57:43 jasper Exp $ +# +# First try for arm-specific configuration info +# + +maxpartitions 16 +maxusers 2 8 64 + +major {wd = 16} +major {sd = 24} +major {cd = 26} +major {rd = 18} + +file arch/arm/arm/conf.c + +file arch/palm/palm/palm_machdep.c + +# +# Machine-independent SCSI drivers +# +include "../../../scsi/files.scsi" +include "../../../dev/atapiscsi/files.atapiscsi" + +# CPU support and integrated peripherals +include "arch/arm/xscale/files.pxa2x0" + +# LCD frame buffer +attach lcd at pxaip with lcd_pxaip +file arch/palm/palm/palm_lcd.c lcd_pxaip + +# +# Machine-independent ATA drivers +# +include "dev/ata/files.ata" + +# Generic MD files +file arch/palm/palm/autoconf.c + +file arch/arm/arm/disksubr.c disk + +# ARM FPE +file arch/arm/fpe-arm/armfpe_glue.S armfpe +file arch/arm/fpe-arm/armfpe_init.c armfpe +file arch/arm/fpe-arm/armfpe.s armfpe + +# Machine-independent I2O drivers. +include "dev/i2o/files.i2o" + +# Include WSCONS stuff +include "dev/wscons/files.wscons" +include "dev/rasops/files.rasops" +include "dev/wsfont/files.wsfont" +include "dev/pckbc/files.pckbc" + +# Include USB stuff +include "dev/usb/files.usb" + +# Bluetooth +include "dev/bluetooth/files.bluetooth" + +# Media Independent Interface (mii) +include "dev/mii/files.mii" + +# +# Machine-independent SD/MMC drivers +# +include "dev/sdmmc/files.sdmmc" + +# +# Machine-independent 1-Wire drivers +# +include "dev/onewire/files.onewire" diff --git a/sys/arch/palm/include/_types.h b/sys/arch/palm/include/_types.h new file mode 100644 index 0000000..7bc4af1 --- /dev/null +++ b/sys/arch/palm/include/_types.h @@ -0,0 +1,11 @@ +/* $OpenBSD: _types.h,v 1.4 2008/01/03 17:59:32 kettenis Exp $ */ + +#ifndef _PALM__TYPES_H_ +#define _PALM__TYPES_H_ + +#include + +#define __HAVE_GENERIC_SOFT_INTERRUPTS +#define __HAVE_TIMECOUNTER + +#endif diff --git a/sys/arch/palm/include/apmvar.h b/sys/arch/palm/include/apmvar.h new file mode 100644 index 0000000..dfce83e --- /dev/null +++ b/sys/arch/palm/include/apmvar.h @@ -0,0 +1 @@ +#include diff --git a/sys/arch/palm/include/asm.h b/sys/arch/palm/include/asm.h new file mode 100644 index 0000000..f903110 --- /dev/null +++ b/sys/arch/palm/include/asm.h @@ -0,0 +1,4 @@ +/* $OpenBSD: asm.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */ +/* $NetBSD: asm.h,v 1.3 2001/11/25 15:55:54 thorpej Exp $ */ + +#include diff --git a/sys/arch/palm/include/atomic.h b/sys/arch/palm/include/atomic.h new file mode 100644 index 0000000..7ca3e68 --- /dev/null +++ b/sys/arch/palm/include/atomic.h @@ -0,0 +1,10 @@ +/* $OpenBSD: atomic.h,v 1.4 2007/02/19 17:18:43 deraadt Exp $ */ + +/* Public Domain */ + +#ifndef __PALM_ATOMIC_H__ +#define __PALM_ATOMIC_H__ + +#include + +#endif /* __PALM_ATOMIC_H__ */ diff --git a/sys/arch/palm/include/bootconfig.h b/sys/arch/palm/include/bootconfig.h new file mode 100644 index 0000000..559ab2d --- /dev/null +++ b/sys/arch/palm/include/bootconfig.h @@ -0,0 +1,76 @@ +/* $OpenBSD: bootconfig.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */ +/* $NetBSD: bootconfig.h,v 1.2 2001/06/21 22:08:28 chris Exp $ */ + +/* + * Copyright (c) 1994 Mark Brinicombe. + * Copyright (c) 1994 Brini. + * All rights reserved. + * + * This code is derived from software written for Brini by Mark Brinicombe + * + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Mark Brinicombe + * for the NetBSD Project. + * 4. The name of the company nor the name of the author may 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 OR CONTRIBUTORS 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. + * + * boot configuration structures + * + * Created : 12/09/94 + * + * Based on kate/boot/bootconfig.h + */ + +typedef struct _PhysMem { + u_int address; + u_int pages; +} PhysMem; + +#if defined(_KERNEL) + +#define DRAM_BLOCKS 1 + +typedef struct _BootConfig { + PhysMem dram[DRAM_BLOCKS]; + u_int dramblocks; +} BootConfig; + +extern BootConfig bootconfig; +#define MAX_BOOT_STRING 255 + +#define BOOTOPT_TYPE_BOOLEAN 0 +#define BOOTOPT_TYPE_STRING 1 +#define BOOTOPT_TYPE_INT 2 +#define BOOTOPT_TYPE_BININT 3 +#define BOOTOPT_TYPE_HEXINT 4 +#define BOOTOPT_TYPE_MASK 7 + +int get_bootconf_option (char *string, char *option, int type, void *result); + +extern char *boot_args; +extern char *boot_file; +#endif /* _KERNEL */ + +/* End of bootconfig.h */ diff --git a/sys/arch/palm/include/bus.h b/sys/arch/palm/include/bus.h new file mode 100644 index 0000000..9f40a4c --- /dev/null +++ b/sys/arch/palm/include/bus.h @@ -0,0 +1,4 @@ +/* $OpenBSD: bus.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */ +/* $NetBSD: bus.h,v 1.3 2001/11/25 15:55:55 thorpej Exp $ */ + +#include diff --git a/sys/arch/palm/include/cdefs.h b/sys/arch/palm/include/cdefs.h new file mode 100644 index 0000000..6b8c945 --- /dev/null +++ b/sys/arch/palm/include/cdefs.h @@ -0,0 +1,3 @@ +/* $OpenBSD: cdefs.h,v 1.2 2005/11/24 20:46:49 deraadt Exp $ */ + +#include diff --git a/sys/arch/palm/include/conf.h b/sys/arch/palm/include/conf.h new file mode 100644 index 0000000..f29b7fb --- /dev/null +++ b/sys/arch/palm/include/conf.h @@ -0,0 +1,17 @@ +/* $OpenBSD: conf.h,v 1.6 2005/01/22 04:04:32 uwe Exp $ */ +/* $NetBSD: conf.h,v 1.8 2002/02/10 12:26:03 chris Exp $ */ + +#ifndef _PALM_CONF_H +#define _PALM_CONF_H + +#include + +/* + * PALM specific device includes go in here + */ + +#define CONF_HAVE_WSCONS + +#include + +#endif /* _PALM_CONF_H */ diff --git a/sys/arch/palm/include/cpu.h b/sys/arch/palm/include/cpu.h new file mode 100644 index 0000000..b5b491a --- /dev/null +++ b/sys/arch/palm/include/cpu.h @@ -0,0 +1,4 @@ +/* $OpenBSD: cpu.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */ +/* $NetBSD: cpu.h,v 1.3 2001/11/25 15:55:55 thorpej Exp $ */ + +#include diff --git a/sys/arch/palm/include/db_machdep.h b/sys/arch/palm/include/db_machdep.h new file mode 100644 index 0000000..4532456 --- /dev/null +++ b/sys/arch/palm/include/db_machdep.h @@ -0,0 +1,4 @@ +/* $OpenBSD: db_machdep.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */ +/* $NetBSD: db_machdep.h,v 1.3 2001/11/25 15:55:55 thorpej Exp $ */ + +#include diff --git a/sys/arch/palm/include/disklabel.h b/sys/arch/palm/include/disklabel.h new file mode 100644 index 0000000..0c0642c --- /dev/null +++ b/sys/arch/palm/include/disklabel.h @@ -0,0 +1,3 @@ +/* $OpenBSD: disklabel.h,v 1.2 2007/06/17 00:27:28 deraadt Exp $ */ + +#include diff --git a/sys/arch/palm/include/endian.h b/sys/arch/palm/include/endian.h new file mode 100644 index 0000000..81a63fd --- /dev/null +++ b/sys/arch/palm/include/endian.h @@ -0,0 +1,4 @@ +/* $OpenBSD: endian.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */ +/* $NetBSD: endian.h,v 1.3 2001/11/25 15:55:56 thorpej Exp $ */ + +#include diff --git a/sys/arch/palm/include/exec.h b/sys/arch/palm/include/exec.h new file mode 100644 index 0000000..d0fc20e --- /dev/null +++ b/sys/arch/palm/include/exec.h @@ -0,0 +1,3 @@ +/* $OpenBSD: exec.h,v 1.2 2006/10/02 17:45:33 miod Exp $ */ +/* public domain */ +#include diff --git a/sys/arch/palm/include/float.h b/sys/arch/palm/include/float.h new file mode 100644 index 0000000..1b6ce4f --- /dev/null +++ b/sys/arch/palm/include/float.h @@ -0,0 +1,4 @@ +/* $OpenBSD: float.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */ +/* $NetBSD: float.h,v 1.3 2001/11/25 15:55:56 thorpej Exp $ */ + +#include diff --git a/sys/arch/palm/include/fp.h b/sys/arch/palm/include/fp.h new file mode 100644 index 0000000..2a8d6cc --- /dev/null +++ b/sys/arch/palm/include/fp.h @@ -0,0 +1,4 @@ +/* $OpenBSD: fp.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */ +/* $NetBSD: fp.h,v 1.3 2001/11/25 15:55:56 thorpej Exp $ */ + +#include diff --git a/sys/arch/palm/include/frame.h b/sys/arch/palm/include/frame.h new file mode 100644 index 0000000..d96c196 --- /dev/null +++ b/sys/arch/palm/include/frame.h @@ -0,0 +1,4 @@ +/* $OpenBSD: frame.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */ +/* $NetBSD: frame.h,v 1.1 2001/06/08 22:23:00 chris Exp $ */ + +#include diff --git a/sys/arch/palm/include/ieee.h b/sys/arch/palm/include/ieee.h new file mode 100644 index 0000000..ed711e4 --- /dev/null +++ b/sys/arch/palm/include/ieee.h @@ -0,0 +1,4 @@ +/* $OpenBSD: ieee.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */ +/* $NetBSD: ieee.h,v 1.3 2001/11/25 15:55:56 thorpej Exp $ */ + +#include diff --git a/sys/arch/palm/include/ieeefp.h b/sys/arch/palm/include/ieeefp.h new file mode 100644 index 0000000..3b0165d --- /dev/null +++ b/sys/arch/palm/include/ieeefp.h @@ -0,0 +1,4 @@ +/* $OpenBSD: ieeefp.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */ +/* $NetBSD: ieeefp.h,v 1.3 2001/11/25 15:55:56 thorpej Exp $ */ + +#include diff --git a/sys/arch/palm/include/internal_types.h b/sys/arch/palm/include/internal_types.h new file mode 100644 index 0000000..03f5d7c --- /dev/null +++ b/sys/arch/palm/include/internal_types.h @@ -0,0 +1,7 @@ +/* $OpenBSD: internal_types.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */ +/* Public domain */ +#ifndef _MACHINE_INTERNAL_TYPES_H_ +#define _MACHINE_INTERNAL_TYPES_H_ + +#include "arm/internal_types.h" +#endif diff --git a/sys/arch/palm/include/intr.h b/sys/arch/palm/include/intr.h new file mode 100644 index 0000000..2545a62 --- /dev/null +++ b/sys/arch/palm/include/intr.h @@ -0,0 +1,104 @@ +/* $OpenBSD: intr.h,v 1.8 2009/04/08 21:19:31 kettenis Exp $ */ +/* $NetBSD: intr.h,v 1.12 2003/06/16 20:00:59 thorpej Exp $ */ + +/* + * Copyright (c) 2001, 2003 Wasabi Systems, Inc. + * All rights reserved. + * + * Written by Jason R. Thorpe for Wasabi Systems, Inc. + * + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed for the NetBSD Project by + * Wasabi Systems, Inc. + * 4. The name of Wasabi Systems, Inc. may not be used to endorse + * or promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``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 WASABI SYSTEMS, INC + * 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. + */ + +#ifndef _EVBARM_INTR_H_ +#define _EVBARM_INTR_H_ + +#ifdef _KERNEL + + +/* Interrupt priority "levels". */ +#define IPL_NONE 0 /* nothing */ +#define IPL_SOFT 1 /* generic software interrupts */ +#define IPL_SOFTCLOCK 2 /* software clock interrupt */ +#define IPL_SOFTNET 3 /* software network interrupt */ +#define IPL_BIO 4 /* block I/O */ +#define IPL_NET 5 /* network */ +#define IPL_SOFTTTY 6 /* software serial interrupt */ +#define IPL_TTY 7 /* terminals */ +#define IPL_VM 8 /* memory allocation */ +#define IPL_AUDIO 9 /* audio device */ +#define IPL_CLOCK 10 /* clock interrupt */ +#define IPL_STATCLOCK 11 /* statistics clock interrupt */ +#define IPL_HIGH 12 /* everything */ + +#define NIPL 13 + +/* Interrupt sharing types. */ +#define IST_NONE 0 /* none */ +#define IST_PULSE 1 /* pulsed */ +#define IST_EDGE 2 /* edge-triggered */ +#define IST_LEVEL 3 /* level-triggered */ + +#define IST_LEVEL_LOW IST_LEVEL +#define IST_LEVEL_HIGH 4 +#define IST_EDGE_FALLING IST_EDGE +#define IST_EDGE_RISING 5 +#define IST_EDGE_BOTH 6 + +#ifndef _LOCORE + +#include +#include + +#define splhigh() _splraise(IPL_HIGH) +#define splsoft() _splraise(IPL_SOFT) +#define splsoftclock() _splraise(IPL_SOFTCLOCK) +#define splsoftnet() _splraise(IPL_SOFTNET) +#define splbio() _splraise(IPL_BIO) +#define splnet() _splraise(IPL_NET) +#define spltty() _splraise(IPL_TTY) +#define splvm() _splraise(IPL_VM) +#define splaudio() _splraise(IPL_AUDIO) +#define splclock() _splraise(IPL_CLOCK) +#define splstatclock() _splraise(IPL_STATCLOCK) +#define splserial() _splraise(IPL_SERIAL) + +#define spl0() _spllower(IPL_NONE) + +#define splsched() splhigh() +#define spllock() splhigh() + +#endif /* ! _LOCORE */ + +#include + +#endif /* _KERNEL */ + +#endif /* _EVBARM_INTR_H_ */ + diff --git a/sys/arch/palm/include/limits.h b/sys/arch/palm/include/limits.h new file mode 100644 index 0000000..c3a60db --- /dev/null +++ b/sys/arch/palm/include/limits.h @@ -0,0 +1,4 @@ +/* $OpenBSD: limits.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */ +/* $NetBSD: limits.h,v 1.3 2001/11/25 15:55:57 thorpej Exp $ */ + +#include diff --git a/sys/arch/palm/include/loadfile_machdep.h b/sys/arch/palm/include/loadfile_machdep.h new file mode 100644 index 0000000..82a3e48 --- /dev/null +++ b/sys/arch/palm/include/loadfile_machdep.h @@ -0,0 +1,52 @@ +/* $OpenBSD: loadfile_machdep.h,v 1.2 2008/06/26 05:42:14 ray Exp $ */ +/* $NetBSD: loadfile_machdep.h,v 1.1 1999/04/29 03:17:12 tsubai Exp $ */ + +/*- + * Copyright (c) 1999 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``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 FOUNDATION OR CONTRIBUTORS + * 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 BOOT_ELF +#define ELFSIZE 32 + +#define LOAD_KERNEL (LOAD_ALL & ~LOAD_TEXTA) +#define COUNT_KERNEL (COUNT_ALL & ~COUNT_TEXTA) + +#define LOADADDR(a) ((((u_long)(a)) + offset)&0xfffffff) +#define ALIGNENTRY(a) ((u_long)(a)) +#define READ(f, b, c) read((f), (void *)LOADADDR(b), (c)) +#define BCOPY(s, d, c) memcpy((void *)LOADADDR(d), (void *)(s), (c)) +#define BZERO(d, c) memset((void *)LOADADDR(d), 0, (c)) +#define WARN(a) (void)(printf a, \ + printf((errno ? ": %s\n" : "\n"), \ + strerror(errno))) +#define PROGRESS(a) (void) printf a +#define ALLOC(a) alloc(a) +#define FREE(a, b) free(a, b) +#define OKMAGIC(a) ((a) == OMAGIC) + +void run_loadfile(u_long *, int); diff --git a/sys/arch/palm/include/lock.h b/sys/arch/palm/include/lock.h new file mode 100644 index 0000000..8d51954 --- /dev/null +++ b/sys/arch/palm/include/lock.h @@ -0,0 +1,4 @@ +/* $OpenBSD: lock.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */ +/* $NetBSD: lock.h,v 1.3 2001/11/25 15:55:57 thorpej Exp $ */ + +#include diff --git a/sys/arch/palm/include/machine_reg.h b/sys/arch/palm/include/machine_reg.h new file mode 100644 index 0000000..8809dc5 --- /dev/null +++ b/sys/arch/palm/include/machine_reg.h @@ -0,0 +1,58 @@ +/* $OpenBSD: machine_reg.h,v 1.1 2008/11/25 14:55:44 drahn Exp $ */ +/* $NetBSD: lubbock_reg.h,v 1.1 2003/06/18 10:51:15 bsh Exp $ */ + +/* + * Copyright (c) 2002, 2003 Genetec Corporation. All rights reserved. + * Written by Hiroyuki Bessho for Genetec Corporation. + * + * 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 Genetec Corporation may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY GENETEC CORPORATION ``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 GENETEC CORPORATION + * 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. + */ + +#ifndef _PALM_REG_H +#define _PALM_REG_H + +#include + +/* + * Logical mapping for onboard/integrated peripherals + */ +#define PALM_IO_AREA_VBASE 0xfd000000 +#define PALM_GPIO_VBASE 0xfd000000 +#define PALM_CLKMAN_VBASE 0xfd100000 +#define PALM_INTCTL_VBASE 0xfd200000 +#define PALM_VBASE_FREE 0xfd300000 +/* FFUART, BTUART and/or STUART are mapped to this area when + used for console or kgdb port */ + +#define ioreg_read(a) (*(volatile unsigned *)(a)) +#define ioreg_write(a,v) (*(volatile unsigned *)(a)=(v)) + +#define ioreg16_read(a) (*(volatile uint16_t *)(a)) +#define ioreg16_write(a,v) (*(volatile uint16_t *)(a)=(v)) + +#define ioreg8_read(a) (*(volatile uint8_t *)(a)) +#define ioreg8_write(a,v) (*(volatile uint8_t *)(a)=(v)) + +#endif /* _PALM_REG_H */ diff --git a/sys/arch/palm/include/mutex.h b/sys/arch/palm/include/mutex.h new file mode 100644 index 0000000..8f734b0 --- /dev/null +++ b/sys/arch/palm/include/mutex.h @@ -0,0 +1,3 @@ +/* $OpenBSD: mutex.h,v 1.2 2007/12/05 16:08:06 deraadt Exp $ */ +/* public domain */ +#include diff --git a/sys/arch/palm/include/palm_var.h b/sys/arch/palm/include/palm_var.h new file mode 100644 index 0000000..a0adc90 --- /dev/null +++ b/sys/arch/palm/include/palm_var.h @@ -0,0 +1,52 @@ +/* $OpenBSD: zaurus_var.h,v 1.5 2008/11/25 14:55:44 drahn Exp $ */ +/* $NetBSD: lubbock_var.h,v 1.1 2003/06/18 10:51:15 bsh Exp $ */ + +/* + * Copyright (c) 2002, 2003 Genetec Corporation. All rights reserved. + * Written by Hiroyuki Bessho for Genetec Corporation. + * + * 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 Genetec Corporation may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY GENETEC CORPORATION ``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 GENETEC CORPORATION + * 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. + */ + +#ifndef _EVBARM_PALM_VAR_H +#define _EVBARM_PALM_VAR_H + +#ifndef __ASSEMBLER__ +#include +#include + +#include +#include +#endif + +#ifdef _KERNEL + +#define SDRAM_START 0xa0000000 +#define SDRAM_SIZE_MB 32 +#define SDRAM_SIZE (SDRAM_SIZE_MB * 1024 * 1024) + +#endif + +#endif /* _EVBARM_PALM_VAR_H */ diff --git a/sys/arch/palm/include/param.h b/sys/arch/palm/include/param.h new file mode 100644 index 0000000..4544703 --- /dev/null +++ b/sys/arch/palm/include/param.h @@ -0,0 +1,51 @@ +/* $OpenBSD: param.h,v 1.4 2004/12/31 14:58:53 drahn Exp $ */ +/* $NetBSD: param.h,v 1.4 2002/02/12 06:58:19 thorpej Exp $ */ + +/* + * Copyright (c) 1994,1995 Mark Brinicombe. + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the RiscBSD team. + * 4. The name "RiscBSD" nor the name of the author may be used to + * endorse or promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY RISCBSD ``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 RISCBSD OR CONTRIBUTORS 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. + */ + +#ifndef _PALM_PARAM_H_ +#define _PALM_PARAM_H_ + +/* + * 1 page should be enough + */ +#ifndef MSGBUFSIZE +#define MSGBUFSIZE (1*NBPG) +#endif + +#include + +#define _MACHINE palm +#define MACHINE "palm" + +#endif /* _PALM_PARAM_H_ */ diff --git a/sys/arch/palm/include/pcb.h b/sys/arch/palm/include/pcb.h new file mode 100644 index 0000000..6345576 --- /dev/null +++ b/sys/arch/palm/include/pcb.h @@ -0,0 +1,4 @@ +/* $OpenBSD: pcb.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */ +/* $NetBSD: pcb.h,v 1.3 2001/11/25 15:55:57 thorpej Exp $ */ + +#include diff --git a/sys/arch/palm/include/pio.h b/sys/arch/palm/include/pio.h new file mode 100644 index 0000000..e34d5fe --- /dev/null +++ b/sys/arch/palm/include/pio.h @@ -0,0 +1,4 @@ +/* $OpenBSD: pio.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */ +/* $NetBSD: pio.h,v 1.3 2001/12/07 23:09:33 chris Exp $ */ + +#include diff --git a/sys/arch/palm/include/pmap.h b/sys/arch/palm/include/pmap.h new file mode 100644 index 0000000..fd34a3f --- /dev/null +++ b/sys/arch/palm/include/pmap.h @@ -0,0 +1,4 @@ +/* $OpenBSD: pmap.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */ +/* $NetBSD: pmap.h,v 1.2 2001/11/23 17:29:01 thorpej Exp $ */ + +#include diff --git a/sys/arch/palm/include/proc.h b/sys/arch/palm/include/proc.h new file mode 100644 index 0000000..e9eea6e --- /dev/null +++ b/sys/arch/palm/include/proc.h @@ -0,0 +1,4 @@ +/* $OpenBSD: proc.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */ +/* $NetBSD: proc.h,v 1.3 2001/11/25 15:55:57 thorpej Exp $ */ + +#include diff --git a/sys/arch/palm/include/profile.h b/sys/arch/palm/include/profile.h new file mode 100644 index 0000000..00ae54f --- /dev/null +++ b/sys/arch/palm/include/profile.h @@ -0,0 +1,4 @@ +/* $OpenBSD: profile.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */ +/* $NetBSD: profile.h,v 1.3 2001/11/25 15:55:57 thorpej Exp $ */ + +#include diff --git a/sys/arch/palm/include/psl.h b/sys/arch/palm/include/psl.h new file mode 100644 index 0000000..b56f54b --- /dev/null +++ b/sys/arch/palm/include/psl.h @@ -0,0 +1 @@ +/* $OpenBSD: psl.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */ diff --git a/sys/arch/palm/include/ptrace.h b/sys/arch/palm/include/ptrace.h new file mode 100644 index 0000000..3bfe754 --- /dev/null +++ b/sys/arch/palm/include/ptrace.h @@ -0,0 +1,4 @@ +/* $OpenBSD: ptrace.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */ +/* $NetBSD: ptrace.h,v 1.3 2001/11/25 15:55:58 thorpej Exp $ */ + +#include diff --git a/sys/arch/palm/include/reg.h b/sys/arch/palm/include/reg.h new file mode 100644 index 0000000..fc06d65 --- /dev/null +++ b/sys/arch/palm/include/reg.h @@ -0,0 +1,4 @@ +/* $OpenBSD: reg.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */ +/* $NetBSD: reg.h,v 1.3 2001/11/25 15:55:58 thorpej Exp $ */ + +#include diff --git a/sys/arch/palm/include/reloc.h b/sys/arch/palm/include/reloc.h new file mode 100644 index 0000000..3443c31 --- /dev/null +++ b/sys/arch/palm/include/reloc.h @@ -0,0 +1,2 @@ +/* $OpenBSD: reloc.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */ +#include diff --git a/sys/arch/palm/include/setjmp.h b/sys/arch/palm/include/setjmp.h new file mode 100644 index 0000000..2dc2a0d --- /dev/null +++ b/sys/arch/palm/include/setjmp.h @@ -0,0 +1,4 @@ +/* $OpenBSD: setjmp.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */ +/* $NetBSD: setjmp.h,v 1.3 2001/11/25 15:55:58 thorpej Exp $ */ + +#include diff --git a/sys/arch/palm/include/signal.h b/sys/arch/palm/include/signal.h new file mode 100644 index 0000000..eb777b9 --- /dev/null +++ b/sys/arch/palm/include/signal.h @@ -0,0 +1,4 @@ +/* $OpenBSD: signal.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */ +/* $NetBSD: signal.h,v 1.3 2001/11/25 15:55:58 thorpej Exp $ */ + +#include diff --git a/sys/arch/palm/include/spinlock.h b/sys/arch/palm/include/spinlock.h new file mode 100644 index 0000000..0384735 --- /dev/null +++ b/sys/arch/palm/include/spinlock.h @@ -0,0 +1,7 @@ + +/* $OpenBSD: spinlock.h,v 1.3 2005/12/01 22:09:59 deraadt Exp $ */ +#ifndef _PALM_SPINLOCK_H_ +#define _PALM_SPINLOCK_H_ +#include +#endif /* _PALM_SPINLOCK_H_ */ + diff --git a/sys/arch/palm/include/stdarg.h b/sys/arch/palm/include/stdarg.h new file mode 100644 index 0000000..c7626e1 --- /dev/null +++ b/sys/arch/palm/include/stdarg.h @@ -0,0 +1,4 @@ +/* $OpenBSD: stdarg.h,v 1.2 2005/01/02 19:43:07 drahn Exp $ */ +/* $NetBSD: stdarg.h,v 1.3 2001/11/25 15:55:58 thorpej Exp $ */ + +#include diff --git a/sys/arch/palm/include/sysarch.h b/sys/arch/palm/include/sysarch.h new file mode 100644 index 0000000..3fcdaf8 --- /dev/null +++ b/sys/arch/palm/include/sysarch.h @@ -0,0 +1,4 @@ +/* $OpenBSD: sysarch.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */ +/* $NetBSD: sysarch.h,v 1.3 2001/11/25 15:55:58 thorpej Exp $ */ + +#include diff --git a/sys/arch/palm/include/trap.h b/sys/arch/palm/include/trap.h new file mode 100644 index 0000000..bbcaa1b --- /dev/null +++ b/sys/arch/palm/include/trap.h @@ -0,0 +1,4 @@ +/* $OpenBSD: trap.h,v 1.1 2004/12/31 00:04:35 drahn Exp $ */ +/* $NetBSD: trap.h,v 1.3 2001/11/25 15:55:58 thorpej Exp $ */ + +#include diff --git a/sys/arch/palm/include/vmparam.h b/sys/arch/palm/include/vmparam.h new file mode 100644 index 0000000..ef976fe --- /dev/null +++ b/sys/arch/palm/include/vmparam.h @@ -0,0 +1,86 @@ +/* $OpenBSD: vmparam.h,v 1.4 2006/06/04 17:21:24 miod Exp $ */ +/* $NetBSD: vmparam.h,v 1.23 2003/05/22 05:47:07 thorpej Exp $ */ + +/* + * Copyright (c) 1988 The Regents of the University of California. + * 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. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. + */ + +#ifndef _ARM32_VMPARAM_H_ +#define _ARM32_VMPARAM_H_ + +#define ARM_KERNEL_BASE 0xc0000000 + +#include + +#ifdef _KERNEL +/* + * Address space constants + */ + +/* + * The line between user space and kernel space + * Mappings >= KERNEL_BASE are constant across all processes + */ +#define KERNEL_BASE ARM_KERNEL_BASE + +/* + * Override the default pager_map size, there's not enough KVA. + */ +#define PAGER_MAP_SIZE (4 * 1024 * 1024) + +/* + * Size of User Raw I/O map + */ + +#define USRIOSIZE 300 + +/* virtual sizes (bytes) for various kernel submaps */ + +#define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE) + +/* + * max number of non-contig chunks of physical RAM you can have + */ + +#define VM_PHYSSEG_MAX 1 +#define VM_PHYSSEG_STRAT VM_PSTRAT_RANDOM + +/* + * this indicates that we can't add RAM to the VM system after the + * vm system is init'd. + */ + +#define VM_PHYSSEG_NOADD + +#endif /* _KERNEL */ + +#define VM_NFREELIST 1 +#define VM_FREELIST_DEFAULT 0 + + +#endif /* _ARM32_VMPARAM_H_ */ diff --git a/sys/arch/palm/palm/autoconf.c b/sys/arch/palm/palm/autoconf.c new file mode 100644 index 0000000..fcca7bd --- /dev/null +++ b/sys/arch/palm/palm/autoconf.c @@ -0,0 +1,147 @@ +/* $OpenBSD: autoconf.c,v 1.13 2008/07/21 04:35:54 todd Exp $ */ +/* $NetBSD: autoconf.c,v 1.2 2001/09/05 16:17:36 matt Exp $ */ + +/* + * Copyright (c) 1994-1998 Mark Brinicombe. + * Copyright (c) 1994 Brini. + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Mark Brinicombe for + * the NetBSD project. + * 4. The name of the company nor the name of the author may 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 OR CONTRIBUTORS 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. + * + * RiscBSD kernel project + * + * autoconf.c + * + * Autoconfiguration functions + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +int booted_partition; +struct device *bootdv = NULL; +extern char *boot_file; + +void dumpconf(void); + +/* + * Now that we are fully operational, we can checksum the + * disks, and using some heuristics, hopefully are able to + * always determine the correct root disk. + */ +void +diskconf() +{ + dev_t tmpdev; + +#if 0 + /* + * Configure root, swap, and dump area. This is + * currently done by running the same checksum + * algorithm over all known disks, as was done in + * /boot. Then we basically fixup the *dev vars + * from the info we gleaned from this. + */ + dkcsumattach(); +#endif + + /* + * XXX + * palm bootblocks currently pass in "bsd" instead of + * "device:bsd", or any such thing, making this a real pain. + */ + if (bootdv == NULL) + bootdv = parsedisk("sd0a", strlen("sd0a"), 0, &tmpdev); + if (bootdv == NULL) + printf("boot device: lookup '%s' failed.\n", boot_file); + else + printf("boot device: %s\n", bootdv->dv_xname); + + setroot(bootdv, 0, RB_USERREQ); + dumpconf(); +} + +void +device_register(struct device *dev, void *aux) +{ +} + +/* + * void cpu_configure() + * + * Configure all the root devices + * The root devices are expected to configure their own children + */ +void +cpu_configure(void) +{ + softintr_init(); + + /* + * Since various PCI interrupts could be routed via the ICU + * (for PCI devices in the bridge) we need to set up the ICU + * now so that these interrupts can be established correctly + * i.e. This is a hack. + */ + + config_rootfound("mainbus", NULL); + + /* + * We can not know which is our root disk, defer + * until we can checksum blocks to figure it out. + */ + cold = 0; + + /* Time to start taking interrupts so lets open the flood gates .... */ + (void)spl0(); + +} + +struct nam2blk nam2blk[] = { + { "wd", 16 }, + { "sd", 24 }, + { "cd", 26 }, + { "rd", 18 }, + { "raid", 71 }, + { "vnd", 19 }, + { NULL, -1 } +}; diff --git a/sys/arch/palm/palm/palm_lcd.c b/sys/arch/palm/palm/palm_lcd.c new file mode 100644 index 0000000..9391671 --- /dev/null +++ b/sys/arch/palm/palm/palm_lcd.c @@ -0,0 +1,222 @@ +/* $OpenBSD: zaurus_lcd.c,v 1.21 2006/11/29 12:13:54 miod Exp $ */ +/* $NetBSD: lubbock_lcd.c,v 1.1 2003/08/09 19:38:53 bsh Exp $ */ + +/* + * Copyright (c) 2002, 2003 Genetec Corporation. All rights reserved. + * Written by Hiroyuki Bessho for Genetec Corporation. + * + * 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 Genetec Corporation may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY GENETEC CORPORATION ``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 GENETEC CORPORATION + * 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. + */ + +/* + * LCD driver for Sharp Palm (based on the Intel Lubbock driver). + * + * Controlling LCD is almost completely done through PXA2X0's + * integrated LCD controller. Codes for it is arm/xscale/pxa2x0_lcd.c. + * + * Codes in this file provide platform specific things including: + * LCD on/off switch and backlight brightness + * LCD panel geometry + */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +void lcd_attach(struct device *, struct device *, void *); +int lcd_match(struct device *, void *, void *); +int lcd_cnattach(void (*)(u_int, int)); + +/* + * wsdisplay glue + */ +struct pxa2x0_wsscreen_descr +lcd_bpp16_screen = { + { + "std" + }, + 16, /* bits per pixel */ + 0, /* no rotation */ +}; + +static const struct wsscreen_descr *lcd_scr_descr[] = { + &lcd_bpp16_screen.c +}; + +const struct wsscreen_list lcd_screen_list = { + sizeof lcd_scr_descr / sizeof lcd_scr_descr[0], lcd_scr_descr +}; + +int lcd_ioctl(void *, u_long, caddr_t, int, struct proc *); +void lcd_burner(void *, u_int, u_int); +int lcd_show_screen(void *, void *, int, + void (*)(void *, int, int), void *); + +int lcd_param(struct pxa2x0_lcd_softc *, u_long, + struct wsdisplay_param *); + +const struct wsdisplay_accessops lcd_accessops = { + lcd_ioctl, + pxa2x0_lcd_mmap, + pxa2x0_lcd_alloc_screen, + pxa2x0_lcd_free_screen, + lcd_show_screen, + NULL, /* load_font */ + NULL, /* scrollback */ + NULL, /* getchar */ + NULL +}; + +struct cfattach lcd_pxaip_ca = { + sizeof (struct pxa2x0_lcd_softc), lcd_match, lcd_attach +}; + +struct cfdriver lcd_cd = { + NULL, "lcd", DV_DULL +}; + +#define CURRENT_DISPLAY &palm_lcd + +const struct lcd_panel_geometry palm_lcd = +{ + 324, /* Width */ + 484, /* Height */ + 0, /* No extra lines */ + + LCDPANEL_ACTIVE | LCDPANEL_VSP | LCDPANEL_HSP, + 2, /* clock divider */ + 0, /* AC bias pin freq */ + + 0x03, /* horizontal sync pulse width */ + 0x1e, /* BLW */ + 0x03, /* ELW */ + + 0x00, /* vertical sync pulse width */ + 0x05, /* BFW */ + 0x08, /* EFW */ +}; + +int +lcd_match(struct device *parent, void *cf, void *aux) +{ + return 1; +} + +void +lcd_attach(struct device *parent, struct device *self, void *aux) +{ + struct pxa2x0_lcd_softc *sc = (struct pxa2x0_lcd_softc *)self; + struct wsemuldisplaydev_attach_args aa; + extern int glass_console; + + printf("\n"); + + pxa2x0_lcd_attach_sub(sc, aux, &lcd_bpp16_screen, CURRENT_DISPLAY, + glass_console); + + aa.console = glass_console; + aa.scrdata = &lcd_screen_list; + aa.accessops = &lcd_accessops; + aa.accesscookie = sc; + aa.defaultscreens = 0; + + (void)config_found(self, &aa, wsemuldisplaydevprint); +} + +int +lcd_cnattach(void (*clkman)(u_int, int)) +{ + return + (pxa2x0_lcd_cnattach(&lcd_bpp16_screen, CURRENT_DISPLAY, clkman)); +} + +/* + * wsdisplay accessops overrides + */ + +int +lcd_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *p) +{ + struct pxa2x0_lcd_softc *sc = v; + int res = EINVAL; + + switch (cmd) { + case WSDISPLAYIO_GETPARAM: + case WSDISPLAYIO_SETPARAM: + res = lcd_param(sc, cmd, (struct wsdisplay_param *)data); + break; + } + + if (res == EINVAL) + res = pxa2x0_lcd_ioctl(v, cmd, data, flag, p); + + return res; +} + +int +lcd_show_screen(void *v, void *cookie, int waitok, + void (*cb)(void *, int, int), void *cbarg) +{ + int rc; + + if ((rc = pxa2x0_lcd_show_screen(v, cookie, waitok, cb, cbarg)) != 0) + return (rc); + + return (0); +} + +/* + * wsdisplay I/O controls + */ + +int +lcd_param(struct pxa2x0_lcd_softc *sc, u_long cmd, + struct wsdisplay_param *dp) +{ + int res = EINVAL; + + switch (dp->param) { + case WSDISPLAYIO_PARAM_CONTRAST: + /* unsupported */ + res = ENOTTY; + break; + } + + return res; +} diff --git a/sys/arch/palm/palm/palm_machdep.c b/sys/arch/palm/palm/palm_machdep.c new file mode 100644 index 0000000..d0b3260 --- /dev/null +++ b/sys/arch/palm/palm/palm_machdep.c @@ -0,0 +1,1298 @@ +/* $OpenBSD: zaurus_machdep.c,v 1.32 2009/07/26 18:48:55 miod Exp $ */ +/* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */ + +/* + * Copyright (c) 2002, 2003 Genetec Corporation. All rights reserved. + * Written by Hiroyuki Bessho for Genetec Corporation. + * + * 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 Genetec Corporation may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY GENETEC CORPORATION ``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 GENETEC CORPORATION + * 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. + * + * Machine dependant functions for kernel setup for + * Intel DBPXA250 evaluation board (a.k.a. Lubbock). + * Based on iq80310_machhdep.c + */ +/* + * Copyright (c) 2001 Wasabi Systems, Inc. + * All rights reserved. + * + * Written by Jason R. Thorpe for Wasabi Systems, Inc. + * + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed for the NetBSD Project by + * Wasabi Systems, Inc. + * 4. The name of Wasabi Systems, Inc. may not be used to endorse + * or promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``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 WASABI SYSTEMS, INC + * 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. + */ + +/* + * Copyright (c) 1997,1998 Mark Brinicombe. + * Copyright (c) 1997,1998 Causality Limited. + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Mark Brinicombe + * for the NetBSD Project. + * 4. The name of the company nor the name of the author may 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 OR CONTRIBUTORS 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. + * + * Machine dependant functions for kernel setup for Intel IQ80310 evaluation + * boards using RedBoot firmware. + */ + +/* + * DIP switches: + * + * S19: no-dot: set RB_KDB. enter kgdb session. + * S20: no-dot: set RB_SINGLE. don't go multi user mode. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include +#include +#include +#ifdef KGDB +#include +#endif + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "wsdisplay.h" + +/* Kernel text starts 2MB in from the bottom of the kernel address space. */ +#define KERNEL_TEXT_BASE (KERNEL_BASE + 0x00200000) +#define KERNEL_VM_BASE (KERNEL_BASE + SDRAM_SIZE) + +/* + * The range 0xc1000000 - 0xccffffff is available for kernel VM space + * Core-logic registers and I/O mappings occupy 0xfd000000 - 0xffffffff + */ +/* +#define KERNEL_VM_SIZE 0x0C000000 +*/ +#define KERNEL_VM_SIZE 0x10000000 + + +/* + * Address to call from cpu_reset() to reset the machine. + * This is machine architecture dependant as it varies depending + * on where the ROM appears when you turn the MMU off. + */ + +u_int cpu_reset_address = 0; + +/* Define various stack sizes in pages */ +#define IRQ_STACK_SIZE 1 +#define ABT_STACK_SIZE 1 +#ifdef IPKDB +#define UND_STACK_SIZE 2 +#else +#define UND_STACK_SIZE 1 +#endif + +BootConfig bootconfig; /* Boot config storage */ +char *boot_args = NULL; +char *boot_file = NULL; + +paddr_t physical_start; +paddr_t physical_freestart; +paddr_t physical_freeend; +paddr_t physical_end; +u_int free_pages; +int physmem = 0; + +/*int debug_flags;*/ +#ifndef PMAP_STATIC_L1S +int max_processes = 64; /* Default number */ +#endif /* !PMAP_STATIC_L1S */ + +/* Physical and virtual addresses for some global pages */ +pv_addr_t systempage; +pv_addr_t irqstack; +pv_addr_t undstack; +pv_addr_t abtstack; +extern pv_addr_t kernelstack; +pv_addr_t minidataclean; + +paddr_t msgbufphys; + +extern u_int data_abort_handler_address; +extern u_int prefetch_abort_handler_address; +extern u_int undefined_handler_address; + +#ifdef PMAP_DEBUG +extern int pmap_debug_level; +#endif + +#define KERNEL_PT_SYS 0 /* Page table for mapping proc0 zero page */ +#define KERNEL_PT_KERNEL 1 /* Page table for mapping kernel */ +#define KERNEL_PT_KERNEL_NUM 32 +#define KERNEL_PT_VMDATA (KERNEL_PT_KERNEL+KERNEL_PT_KERNEL_NUM) + /* Page tables for mapping kernel VM */ +#define KERNEL_PT_VMDATA_NUM 8 /* start with 32MB of KVM */ +#define NUM_KERNEL_PTS (KERNEL_PT_VMDATA + KERNEL_PT_VMDATA_NUM) + +pv_addr_t kernel_pt_table[NUM_KERNEL_PTS]; + +extern struct user *proc0paddr; + +/* Prototypes */ + +#define BOOT_STRING_MAGIC 0x4f425344 + +char bootargs[MAX_BOOT_STRING]; +void process_kernel_args(char *); + +void consinit(void); +void early_clkman(u_int, int); +void kgdb_port_init(void); +void change_clock(uint32_t v); + +bs_protos(bs_notimpl); + +#include "com.h" +#if NCOM > 0 +#include +#include +#endif + +#ifndef CONSPEED +#define CONSPEED B9600 /* What RedBoot uses */ +#endif +#ifndef CONMODE +#define CONMODE ((TTYDEF_CFLAG & ~(CSIZE | CSTOPB | PARENB)) | CS8) /* 8N1 */ +#endif + +int comcnspeed = CONSPEED; +int comcnmode = CONMODE; + + +/* + * void boot(int howto) + * + * Reboots the system + * + * Deal with any syncing, unmounting, dumping and shutdown hooks, + * then reset the CPU. + */ +void +boot(int howto) +{ + if (cold) { + /* + * If the system is cold, just halt, unless the user + * explicitely asked for reboot. + */ + if ((howto & RB_USERREQ) == 0) + howto |= RB_HALT; + goto haltsys; + } + + /* + * If RB_NOSYNC was not specified sync the discs. + * Note: Unless cold is set to 1 here, syslogd will die during the + * unmount. It looks like syslogd is getting woken up only to find + * that it cannot page part of the binary in as the filesystem has + * been unmounted. + */ + if (!(howto & RB_NOSYNC)) + bootsync(howto); + + /* Say NO to interrupts */ + splhigh(); + + /* Do a dump if requested. */ + if ((howto & (RB_DUMP | RB_HALT)) == RB_DUMP) + dumpsys(); + +haltsys: + doshutdownhooks(); + + /* Make sure IRQ's are disabled */ + IRQdisable; + + if (howto & RB_HALT) { +#if NAPM > 0 + if (howto & RB_POWERDOWN) { + + printf("\nAttempting to power down...\n"); + delay(6000000); + zapm_poweroff(); + } +#endif + + printf("The operating system has halted.\n"); + printf("Please press any key to reboot.\n\n"); + cnpollc(1); + cngetc(); + cnpollc(0); + } + + printf("rebooting...\n"); + delay(6000000); +#if NAPM > 0 + zapm_restart(); +#endif + printf("reboot failed; spinning\n"); + while(1); + /*NOTREACHED*/ +} + +static __inline +pd_entry_t * +read_ttb(void) +{ + long ttb; + + __asm __volatile("mrc p15, 0, %0, c2, c0, 0" : "=r" (ttb)); + + + return (pd_entry_t *)(ttb & ~((1<<14)-1)); +} + +/* + * Mapping table for core kernel memory. These areas are mapped in + * init time at fixed virtual address with section mappings. + */ +struct l1_sec_map { + vaddr_t va; + vaddr_t pa; + vsize_t size; + int flags; +} l1_sec_table[] = { + { + PALM_GPIO_VBASE, + PXA2X0_GPIO_BASE, + PXA2X0_GPIO_SIZE, + PTE_NOCACHE, + }, + { + PALM_CLKMAN_VBASE, + PXA2X0_CLKMAN_BASE, + PXA2X0_CLKMAN_SIZE, + PTE_NOCACHE, + }, + { + PALM_INTCTL_VBASE, + PXA2X0_INTCTL_BASE, + PXA2X0_INTCTL_SIZE, + PTE_NOCACHE, + }, + {0, 0, 0, 0,} +}; + +static void +map_io_area(paddr_t pagedir) +{ + int loop; + + /* + * Map devices we can map w/ section mappings. + */ + loop = 0; + while (l1_sec_table[loop].size) { + vsize_t sz; + +#define VERBOSE_INIT_ARM +#ifdef VERBOSE_INIT_ARM + printf("%08lx -> %08lx @ %08lx\n", l1_sec_table[loop].pa, + l1_sec_table[loop].pa + l1_sec_table[loop].size - 1, + l1_sec_table[loop].va); +#endif + for (sz = 0; sz < l1_sec_table[loop].size; sz += L1_S_SIZE) + pmap_map_section(pagedir, l1_sec_table[loop].va + sz, + l1_sec_table[loop].pa + sz, + VM_PROT_READ|VM_PROT_WRITE, + l1_sec_table[loop].flags); + ++loop; + } +} + +/* + * simple memory mapping function used in early bootstrap stage + * before pmap is initialized. + * size and cacheability are ignored and map one section with nocache. + */ +static vaddr_t section_free = PALM_VBASE_FREE; + +static int +bootstrap_bs_map(void *t, bus_addr_t bpa, bus_size_t size, + int flags, bus_space_handle_t *bshp) +{ + u_long startpa; + vaddr_t va; + pd_entry_t *pagedir = read_ttb(); + /* This assumes PA==VA for page directory */ + + va = section_free; + section_free += L1_S_SIZE; + + startpa = trunc_page(bpa); + pmap_map_section((vaddr_t)pagedir, va, startpa, + VM_PROT_READ | VM_PROT_WRITE, PTE_NOCACHE); + cpu_tlb_flushD(); + + *bshp = (bus_space_handle_t)(va + (bpa - startpa)); + + return(0); +} + +static void +copy_io_area_map(pd_entry_t *new_pd) +{ + pd_entry_t *cur_pd = read_ttb(); + vaddr_t va; + + for (va = PALM_IO_AREA_VBASE; + (cur_pd[va>>L1_S_SHIFT] & L1_TYPE_MASK) == L1_TYPE_S; + va += L1_S_SIZE) { + + new_pd[va>>L1_S_SHIFT] = cur_pd[va>>L1_S_SHIFT]; + if (va == (0 - L1_S_SIZE)) + break; /* STUPID */ + + } +} + +#if 0 +void sysprobe(void); +void +sysprobe(void) +{ + u_int32_t *p; + + p = (void *)0x48000014; /* MECR */ + printf("MECR %x\n", *p); + + p = (void *)0x48000028; /* MCMEM0 */ + printf("MCMEM0 %x\n", *p); + p = (void *)0x4800002C; /* MCMEM1 */ + printf("MCMEM1 %x\n", *p); + + p = (void *)0x48000030; /* MCATTx */ + printf("MCATT0 %x\n", *p); + p = (void *)0x48000034; /* MCATTx */ + printf("MCATT1 %x\n", *p); + + p = (void *)0x48000038; /* MCIOx */ + printf("MCIO0 %x\n", *p); + p = (void *)0x4800003C; /* MCIOx */ + printf("MCIO1 %x\n", *p); +} +#endif + +/* + * u_int initarm(...) + * + * Initial entry point on startup. This gets called before main() is + * entered. + * It should be responsible for setting up everything that must be + * in place when main is called. + * This includes + * Taking a copy of the boot configuration structure. + * Initialising the physical console so characters can be printed. + * Setting up page tables for the kernel + * Relocating the kernel to the bottom of physical memory + */ +u_int +initarm(void *arg) +{ + extern vaddr_t xscale_cache_clean_addr; + extern cpu_kcore_hdr_t cpu_kcore_hdr; + int loop; + int loop1; + u_int l1pagetable; + pv_addr_t kernel_l1pt; + paddr_t memstart; + psize_t memsize; + extern u_int32_t esym; /* &_end if no symbols are loaded */ + +#if 0 + int led_data = 0; +#endif +#ifdef DIAGNOSTIC + extern vsize_t xscale_minidata_clean_size; /* used in KASSERT */ +#endif + /* early bus_space_map support */ + struct bus_space tmp_bs_tag; + int (*map_func_save)(void *, bus_addr_t, bus_size_t, int, + bus_space_handle_t *); + + +#if 0 + /* XXX */ + /* start 32.768KHz OSC */ + ioreg_write(PXA2X0_CLKMAN_BASE + 0x08, 2); +#endif + + /* + * Heads up ... Setup the CPU / MMU / TLB functions + */ + if (set_cpufuncs()) + panic("cpu not recognized!"); + + /* Get ready for splfoo() */ + pxa2x0_intr_bootstrap(PXA2X0_INTCTL_BASE); + +#if 0 + /* Calibrate the delay loop. */ +#endif + + /* + * Okay, RedBoot has provided us with the following memory map: + * + * Physical Address Range Description + * ----------------------- ---------------------------------- + * 0x00000000 - 0x01ffffff flash Memory (32MB) + * 0x04000000 - 0x05ffffff Application flash Memory (32MB) + * 0x08000000 - 0x080000ff I/O baseboard registers + * 0x0a000000 - 0x0a0fffff SRAM (1MB) + * 0x0c000000 - 0x0c0fffff Ethernet Controller + * 0x0e000000 - 0x0e0fffff Ethernet Controller (Attribute) + * 0x10000000 - 0x103fffff SA-1111 Companion Chip + * 0x14000000 - 0x17ffffff Expansion Card (64MB) + * 0x40000000 - 0x480fffff Processor Registers + * 0xa0000000 - 0xa3ffffff SDRAM Bank 0 (64MB) + * + * + * Virtual Address Range X C B Description + * ----------------------- - - - ---------------------------------- + * 0x00000000 - 0x00003fff N Y Y SDRAM + * 0x00004000 - 0x000fffff N Y N Boot ROM + * 0x00100000 - 0x01ffffff N N N Application Flash + * 0x04000000 - 0x05ffffff N N N Exp Application Flash + * 0x08000000 - 0x080fffff N N N I/O baseboard registers + * 0x0a000000 - 0x0a0fffff N N N SRAM + * 0x40000000 - 0x480fffff N N N Processor Registers + * 0xa0000000 - 0xa000ffff N Y N RedBoot SDRAM + * 0xa0017000 - 0xa3ffffff Y Y Y SDRAM + * 0xc0000000 - 0xcfffffff Y Y Y Cache Flush Region + * (done by this routine) + * 0xfd000000 - 0xfd0000ff N N N I/O baseboard registers + * 0xfd100000 - 0xfd2fffff N N N Processor Registers. + * 0xfd200000 - 0xfd2fffff N N N 0x10800000 registers + * + * The first level page table is at 0xa0004000. There are also + * 2 second-level tables at 0xa0008000 and 0xa0008400. + * + */ + + { + /* + * Tweak RedBoot's pagetable so that we can access to + * some registers at same VA before and after installing + * our page table. + */ + paddr_t ttb = (paddr_t)read_ttb(); + + map_io_area(ttb); + cpu_tlb_flushD(); + } + + /* + * Examine the boot args string for options we need to know about + * now. + */ + /* XXX should really be done after setting up the console, but we + * XXX need to parse the console selection flags right now. */ +// process_kernel_args((char *)0xa0200000 - MAX_BOOT_STRING - 1); + + /* + * This test will work for now but has to be revised when support + * for other models is added. + */ +/* if ((cputype & ~CPU_ID_XSCALE_COREREV_MASK) == CPU_ID_PXA27X) + palmmod = PALM_C3000; + else + palmmod = PALM_C860; +*/ + /* setup GPIO for BTUART, in case bootloader doesn't take care of it */ + pxa2x0_gpio_bootstrap(PALM_GPIO_VBASE); +#if 0 + pxa2x0_gpio_set_function(42, GPIO_ALT_FN_1_IN); + pxa2x0_gpio_set_function(43, GPIO_ALT_FN_2_OUT); + pxa2x0_gpio_set_function(44, GPIO_ALT_FN_1_IN); + pxa2x0_gpio_set_function(45, GPIO_ALT_FN_2_OUT); + + /* FFUART */ + pxa2x0_gpio_set_function(34, GPIO_ALT_FN_1_IN); + pxa2x0_gpio_set_function(39, GPIO_ALT_FN_2_OUT); + pxa2x0_gpio_set_function(35, GPIO_ALT_FN_1_IN); + pxa2x0_gpio_set_function(40, GPIO_ALT_FN_2_OUT); + pxa2x0_gpio_set_function(41, GPIO_ALT_FN_2_OUT); + + /* STUART */ + pxa2x0_gpio_set_function(46, GPIO_ALT_FN_2_IN); + pxa2x0_gpio_set_function(47, GPIO_ALT_FN_1_OUT); +#endif +#ifdef COM_PXA2X0 + /* tell com to drive STUART in slow infrared mode */ + comsiraddr = (bus_addr_t)PXA2X0_STUART_BASE; +#endif +#if 1 + /* turn on clock to UART block. + XXX this should not be necessary, consinit() will do it */ + early_clkman(CKEN_FFUART | CKEN_BTUART | CKEN_STUART, 1); +#endif + + /* + * Temporarily replace bus_space_map() functions so that + * console devices can get mapped. + * + * Note that this relies upon the fact that both regular + * and a4x bus_space tags use the same map function. + */ + tmp_bs_tag = pxa2x0_bs_tag; + tmp_bs_tag.bs_map = bootstrap_bs_map; + map_func_save = pxa2x0_bs_tag.bs_map; +#ifdef COM_PXA2X0 + pxa2x0_a4x_bs_tag.bs_map = pxa2x0_bs_tag.bs_map = bootstrap_bs_map; +#endif + /* setup a serial console for very early boot */ + consinit(); +#ifdef KGDB + kgdb_port_init(); +#endif + + + /* Talk to the user */ + printf("\nOpenBSD/Palm booting ...\n"); + + { + /* XXX - all Palm have this for now, fix memory sizing */ + memstart = SDRAM_START; + memsize = SDRAM_SIZE; + } + +#if 0 + { + volatile int *p; + char *membase; + char *memmax; + int chunksize = 0x02000000; + printf("probing memory"); + + membase = (char *)0xa0000000; + memmax = (char *)0xc0000000; + for (p = (int *)membase; + p < (int *)memmax; + p = (int *) (((char *)p) + chunksize)) { + printf ("cbase %p\n", p); + p[0] = 0x12345678; + p[1] = 0x12345678; + if ((p[0] != 0x12345678) || (p[1] != 0x12345678)) + break; + } + memsize = ((char *)p) - membase; + + printf("probing memory done found memsize %d\n", memsize); + } +#else +#endif + +#define DEBUG +#ifdef DEBUG + printf("initarm: Configuring system ...\n"); +#endif + + /* Fake bootconfig structure for the benefit of pmap.c */ + /* XXX must make the memory description h/w independant */ + bootconfig.dramblocks = 1; + bootconfig.dram[0].address = memstart; + bootconfig.dram[0].pages = memsize / PAGE_SIZE; + + /* + * Set up the variables that define the availablilty of + * physical memory. For now, we're going to set + * physical_freestart to 0xa0200000 (where the kernel + * was loaded), and allocate the memory we need downwards. + * If we get too close to the page tables that RedBoot + * set up, we will panic. We will update physical_freestart + * and physical_freeend later to reflect what pmap_bootstrap() + * wants to see. + * + * XXX pmap_bootstrap() needs an enema. + */ + physical_start = bootconfig.dram[0].address; + physical_end = physical_start + (bootconfig.dram[0].pages * PAGE_SIZE); + + physical_freestart = 0xa0009000UL; + physical_freeend = 0xa0200000UL; + + physmem = (physical_end - physical_start) / PAGE_SIZE; + +#ifdef DEBUG + /* Tell the user about the memory */ + printf("physmemory: %d pages at 0x%08lx -> 0x%08lx\n", physmem, + physical_start, physical_end - 1); +#endif + + /* + * Okay, the kernel starts 2MB in from the bottom of physical + * memory. We are going to allocate our bootstrap pages downwards + * from there. + * + * We need to allocate some fixed page tables to get the kernel + * going. We allocate one page directory and a number of page + * tables and store the physical addresses in the kernel_pt_table + * array. + * + * The kernel page directory must be on a 16K boundary. The page + * tables must be on 4K bounaries. What we do is allocate the + * page directory on the first 16K boundary that we encounter, and + * the page tables on 4K boundaries otherwise. Since we allocate + * at least 3 L2 page tables, we are guaranteed to encounter at + * least one 16K aligned region. + */ + +#ifdef VERBOSE_INIT_ARM + printf("Allocating page tables\n"); +#endif + + free_pages = (physical_freeend - physical_freestart) / PAGE_SIZE; + +#ifdef VERBOSE_INIT_ARM + printf("freestart = 0x%08lx, free_pages = %d (0x%08x)\n", + physical_freestart, free_pages, free_pages); +#endif + + /* Define a macro to simplify memory allocation */ +#define valloc_pages(var, np) \ + alloc_pages((var).pv_pa, (np)); \ + (var).pv_va = KERNEL_BASE + (var).pv_pa - physical_start; + +#define alloc_pages(var, np) \ + physical_freeend -= ((np) * PAGE_SIZE); \ + if (physical_freeend < physical_freestart) \ + panic("initarm: out of memory"); \ + (var) = physical_freeend; \ + free_pages -= (np); \ + memset((char *)(var), 0, ((np) * PAGE_SIZE)); + + loop1 = 0; + kernel_l1pt.pv_pa = 0; + for (loop = 0; loop <= NUM_KERNEL_PTS; ++loop) { + /* Are we 16KB aligned for an L1 ? */ + if (((physical_freeend - L1_TABLE_SIZE) & (L1_TABLE_SIZE - 1)) == 0 + && kernel_l1pt.pv_pa == 0) { + valloc_pages(kernel_l1pt, L1_TABLE_SIZE / PAGE_SIZE); + } else { + valloc_pages(kernel_pt_table[loop1], + L2_TABLE_SIZE / PAGE_SIZE); + ++loop1; + } + } + + /* This should never be able to happen but better confirm that. */ + if (!kernel_l1pt.pv_pa || (kernel_l1pt.pv_pa & (L1_TABLE_SIZE-1)) != 0) + panic("initarm: Failed to align the kernel page directory"); + + /* + * Allocate a page for the system page mapped to V0x00000000 + * This page will just contain the system vectors and can be + * shared by all processes. + */ + alloc_pages(systempage.pv_pa, 1); + + /* Allocate stacks for all modes */ + valloc_pages(irqstack, IRQ_STACK_SIZE); + valloc_pages(abtstack, ABT_STACK_SIZE); + valloc_pages(undstack, UND_STACK_SIZE); + valloc_pages(kernelstack, UPAGES); + + /* Allocate enough pages for cleaning the Mini-Data cache. */ + KASSERT(xscale_minidata_clean_size <= PAGE_SIZE); + valloc_pages(minidataclean, 1); + +#ifdef VERBOSE_INIT_ARM + printf("IRQ stack: p0x%08lx v0x%08lx\n", irqstack.pv_pa, + irqstack.pv_va); + printf("ABT stack: p0x%08lx v0x%08lx\n", abtstack.pv_pa, + abtstack.pv_va); + printf("UND stack: p0x%08lx v0x%08lx\n", undstack.pv_pa, + undstack.pv_va); + printf("SVC stack: p0x%08lx v0x%08lx\n", kernelstack.pv_pa, + kernelstack.pv_va); +#endif + + /* + * XXX Defer this to later so that we can reclaim the memory + * XXX used by the RedBoot page tables. + */ + alloc_pages(msgbufphys, round_page(MSGBUFSIZE) / PAGE_SIZE); + + /* + * Ok we have allocated physical pages for the primary kernel + * page tables + */ + +#ifdef VERBOSE_INIT_ARM + printf("Creating L1 page table at 0x%08lx\n", kernel_l1pt.pv_pa); +#endif + + /* + * Now we start construction of the L1 page table + * We start by mapping the L2 page tables into the L1. + * This means that we can replace L1 mappings later on if necessary + */ + l1pagetable = kernel_l1pt.pv_pa; + + /* Map the L2 pages tables in the L1 page table */ + pmap_link_l2pt(l1pagetable, 0x00000000, + &kernel_pt_table[KERNEL_PT_SYS]); + + for (loop = 0; loop < KERNEL_PT_KERNEL_NUM; loop++) + pmap_link_l2pt(l1pagetable, KERNEL_BASE + loop * 0x00400000, + &kernel_pt_table[KERNEL_PT_KERNEL + loop]); + + for (loop = 0; loop < KERNEL_PT_VMDATA_NUM; loop++) + pmap_link_l2pt(l1pagetable, KERNEL_VM_BASE + loop * 0x00400000, + &kernel_pt_table[KERNEL_PT_VMDATA + loop]); + + /* update the top of the kernel VM */ + pmap_curmaxkvaddr = + KERNEL_VM_BASE + (KERNEL_PT_VMDATA_NUM * 0x00400000); + +#ifdef VERBOSE_INIT_ARM + printf("Mapping kernel\n"); +#endif + + /* Now we fill in the L2 pagetable for the kernel static code/data + * and the symbol table. */ + { + extern char etext[]; + size_t textsize = (u_int32_t) etext - KERNEL_TEXT_BASE; + size_t totalsize = esym - KERNEL_TEXT_BASE; + u_int logical; + + textsize = (textsize + PGOFSET) & ~PGOFSET; + totalsize = (totalsize + PGOFSET) & ~PGOFSET; + + logical = 0x00200000; /* offset of kernel in RAM */ + + /* Update dump information */ + cpu_kcore_hdr.kernelbase = KERNEL_BASE; + cpu_kcore_hdr.kerneloffs = logical; + cpu_kcore_hdr.staticsize = totalsize; + + logical += pmap_map_chunk(l1pagetable, KERNEL_BASE + logical, + physical_start + logical, textsize, + VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); + pmap_map_chunk(l1pagetable, KERNEL_BASE + logical, + physical_start + logical, totalsize - textsize, + VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); + } + +#ifdef VERBOSE_INIT_ARM + printf("Constructing L2 page tables\n"); +#endif + + /* Map the stack pages */ + pmap_map_chunk(l1pagetable, irqstack.pv_va, irqstack.pv_pa, + IRQ_STACK_SIZE * PAGE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); + pmap_map_chunk(l1pagetable, abtstack.pv_va, abtstack.pv_pa, + ABT_STACK_SIZE * PAGE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); + pmap_map_chunk(l1pagetable, undstack.pv_va, undstack.pv_pa, + UND_STACK_SIZE * PAGE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); + pmap_map_chunk(l1pagetable, kernelstack.pv_va, kernelstack.pv_pa, + UPAGES * PAGE_SIZE, VM_PROT_READ | VM_PROT_WRITE, PTE_CACHE); + + pmap_map_chunk(l1pagetable, kernel_l1pt.pv_va, kernel_l1pt.pv_pa, + L1_TABLE_SIZE, VM_PROT_READ | VM_PROT_WRITE, PTE_PAGETABLE); + + for (loop = 0; loop < NUM_KERNEL_PTS; ++loop) { + pmap_map_chunk(l1pagetable, kernel_pt_table[loop].pv_va, + kernel_pt_table[loop].pv_pa, L2_TABLE_SIZE, + VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE); + } + + /* Map the Mini-Data cache clean area. */ + xscale_setup_minidata(l1pagetable, minidataclean.pv_va, + minidataclean.pv_pa); + + /* Map the vector page. */ +#if 1 + /* MULTI-ICE requires that page 0 is NC/NB so that it can download the + * cache-clean code there. */ + pmap_map_entry(l1pagetable, vector_page, systempage.pv_pa, + VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE); +#else + pmap_map_entry(l1pagetable, vector_page, systempage.pv_pa, + VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); +#endif + + /* + * map integrated peripherals at same address in l1pagetable + * so that we can continue to use console. + */ + copy_io_area_map((pd_entry_t *)l1pagetable); + + /* + * Give the XScale global cache clean code an appropriately + * sized chunk of unmapped VA space starting at 0xff000000 + * (our device mappings end before this address). + */ + xscale_cache_clean_addr = 0xff000000U; + + /* + * Now we have the real page tables in place so we can switch to them. + * Once this is done we will be running with the REAL kernel page + * tables. + */ + + /* + * Update the physical_freestart/physical_freeend/free_pages + * variables. + */ + { + physical_freestart = physical_start + + (((esym + PGOFSET) & ~PGOFSET) - KERNEL_BASE); + physical_freeend = physical_end; + free_pages = + (physical_freeend - physical_freestart) / PAGE_SIZE; + } + + /* be a client to all domains */ + cpu_domains(0x55555555); + /* Switch tables */ +#ifdef VERBOSE_INIT_ARM + printf("freestart = 0x%08lx, free_pages = %d (0x%x)\n", + physical_freestart, free_pages, free_pages); + printf("switching to new L1 page table @%#lx...", kernel_l1pt.pv_pa); +#endif + + /* set new intc register address so that splfoo() doesn't + touch illegal address. */ + pxa2x0_intr_bootstrap(PALM_INTCTL_VBASE); + + cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT); + setttb(kernel_l1pt.pv_pa); + cpu_tlb_flushID(); + cpu_domains(DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)); + + /* + * Moved from cpu_startup() as data_abort_handler() references + * this during uvm init + */ + proc0paddr = (struct user *)kernelstack.pv_va; + proc0.p_addr = proc0paddr; + +#ifdef VERBOSE_INIT_ARM + printf("bootstrap done.\n"); +#endif + + arm32_vector_init(ARM_VECTORS_LOW, ARM_VEC_ALL); + + /* + * Pages were allocated during the secondary bootstrap for the + * stacks for different CPU modes. + * We must now set the r13 registers in the different CPU modes to + * point to these stacks. + * Since the ARM stacks use STMFD etc. we must set r13 to the top end + * of the stack memory. + */ +#ifdef VERBOSE_INIT_ARM + printf("init subsystems: stacks "); +#endif + + set_stackptr(PSR_IRQ32_MODE, + irqstack.pv_va + IRQ_STACK_SIZE * PAGE_SIZE); + set_stackptr(PSR_ABT32_MODE, + abtstack.pv_va + ABT_STACK_SIZE * PAGE_SIZE); + set_stackptr(PSR_UND32_MODE, + undstack.pv_va + UND_STACK_SIZE * PAGE_SIZE); + + /* + * Well we should set a data abort handler. + * Once things get going this will change as we will need a proper + * handler. + * Until then we will use a handler that just panics but tells us + * why. + * Initialisation of the vectors will just panic on a data abort. + * This just fills in a slightly better one. + */ +#ifdef VERBOSE_INIT_ARM + printf("vectors "); +#endif + data_abort_handler_address = (u_int)data_abort_handler; + prefetch_abort_handler_address = (u_int)prefetch_abort_handler; + undefined_handler_address = (u_int)undefinedinstruction_bounce; + + /* Initialise the undefined instruction handlers */ +#ifdef VERBOSE_INIT_ARM + printf("undefined "); +#endif + undefined_init(); + + /* Load memory into UVM. */ +#ifdef VERBOSE_INIT_ARM + printf("page "); +#endif + uvm_setpagesize(); /* initialize PAGE_SIZE-dependent variables */ + uvm_page_physload(atop(physical_freestart), atop(physical_freeend), + atop(physical_freestart), atop(physical_freeend), + VM_FREELIST_DEFAULT); + + /* Boot strap pmap telling it where the kernel page table is */ +#ifdef VERBOSE_INIT_ARM + printf("pmap "); +#endif + pmap_bootstrap((pd_entry_t *)kernel_l1pt.pv_va, KERNEL_VM_BASE, + KERNEL_VM_BASE + KERNEL_VM_SIZE); + + /* Update dump information */ + cpu_kcore_hdr.pmap_kernel_l1 = (u_int32_t)pmap_kernel()->pm_l1; + cpu_kcore_hdr.pmap_kernel_l2 = (u_int32_t)&(pmap_kernel()->pm_l2); + +#ifdef __HAVE_MEMORY_DISK__ + md_root_setconf(memory_disk, sizeof memory_disk); +#endif + +#ifdef IPKDB + /* Initialise ipkdb */ + ipkdb_init(); + if (boothowto & RB_KDB) + ipkdb_connect(0); +#endif + +#ifdef KGDB + if (boothowto & RB_KDB) { + kgdb_debug_init = 1; + kgdb_connect(1); + } +#endif + + /* + * Restore proper bus_space operation, now that pmap is initialized. + */ +#ifdef COM_PXA2X0 + pxa2x0_a4x_bs_tag.bs_map = pxa2x0_bs_tag.bs_map = map_func_save; +#endif + +#ifdef DDB + db_machine_init(); + + /* Firmware doesn't load symbols. */ + ddb_init(); + + if (boothowto & RB_KDB) + Debugger(); +#endif + + /* We return the new stack pointer address */ + return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); +} + +const char *console = "glass"; + +void +process_kernel_args(char *args) +{ + char *cp = args; + + if (cp == NULL || *(int *)cp != BOOT_STRING_MAGIC) { + boothowto = RB_AUTOBOOT; + return; + } + + /* Eat the cookie */ + *(int *)cp = 0; + cp += sizeof(int); + + boothowto = 0; + + /* Make a local copy of the bootargs */ + strncpy(bootargs, cp, MAX_BOOT_STRING - sizeof(int)); + + cp = bootargs; + boot_file = bootargs; + + /* Skip the kernel image filename */ + while (*cp != ' ' && *cp != 0) + ++cp; + + if (*cp != 0) + *cp++ = 0; + + while (*cp == ' ') + ++cp; + + boot_args = cp; + + printf("bootfile: %s\n", boot_file); + printf("bootargs: %s\n", boot_args); + + /* Setup pointer to boot flags */ + while (*cp != '-') + if (*cp++ == '\0') + return; + + for (;*++cp;) { + int fl; + + fl = 0; + switch(*cp) { + case 'a': + fl |= RB_ASKNAME; + break; + case 'c': + fl |= RB_CONFIG; + break; + case 'd': + fl |= RB_KDB; + break; + case 's': + fl |= RB_SINGLE; + break; + /* XXX undocumented console switching flags */ + case '0': + console = "ffuart"; + break; + case '1': + console = "btuart"; + break; + case '2': + console = "stuart"; + break; + default: + printf("unknown option `%c'\n", *cp); + break; + } + boothowto |= fl; + } +} + +#ifdef KGDB +#ifndef KGDB_DEVNAME +#define KGDB_DEVNAME "ffuart" +#endif +const char kgdb_devname[] = KGDB_DEVNAME; + +#if (NCOM > 0) +#ifndef KGDB_DEVMODE +#define KGDB_DEVMODE ((TTYDEF_CFLAG & ~(CSIZE | CSTOPB | PARENB)) | CS8) /* 8N1 */ +#endif +int comkgdbmode = KGDB_DEVMODE; +#endif /* NCOM */ + +#endif /* KGDB */ + +void +consinit(void) +{ +#if (NCOM > 0) && defined(COM_PXA2X0) + static int consinit_called = 0; + paddr_t paddr; + u_int cken = 0; + + if (consinit_called != 0) + return; + + consinit_called = 1; + +#ifdef KGDB + if (strcmp(kgdb_devname, console) == 0) { + /* port is reserved for kgdb */ + } else +#endif + if (strcmp(console, "ffuart") == 0) { + paddr = PXA2X0_FFUART_BASE; + cken = CKEN_FFUART; + } else if (strcmp(console, "btuart") == 0) { + paddr = PXA2X0_BTUART_BASE; + cken = CKEN_BTUART; + } else if (strcmp(console, "stuart") == 0) { + paddr = PXA2X0_STUART_BASE; + cken = CKEN_STUART; + } + if (cken != 0 && comcnattach(&pxa2x0_a4x_bs_tag, paddr, comcnspeed, + PXA2X0_COM_FREQ, comcnmode) == 0) { + early_clkman(cken, 1); + } +#endif /* NCOM */ +} + +#ifdef KGDB +void +kgdb_port_init(void) +{ +#if (NCOM > 0) && defined(COM_PXA2X0) + paddr_t paddr; + u_int cken; + + if (strcmp(kgdb_devname, "ffuart") == 0) { + paddr = PXA2X0_FFUART_BASE; + cken = CKEN_FFUART; + } else if (strcmp(kgdb_devname, "btuart") == 0) { + paddr = PXA2X0_BTUART_BASE; + cken = CKEN_BTUART; + } else if (strcmp(kgdb_devname, "stuart") == 0) { + paddr = PXA2X0_STUART_BASE; + cken = CKEN_STUART; + irda_on(0); + } else + return; + + if (com_kgdb_attach_pxa2x0(&pxa2x0_a4x_bs_tag, paddr, + kgdb_rate, PXA2X0_COM_FREQ, COM_TYPE_PXA2x0, comkgdbmode) == 0) { + early_clkman(cken, 1); + } +#endif +} +#endif + +/* same as pxa2x0_clkman, but before autoconf */ +void +early_clkman(u_int clk, int enable) +{ + u_int32_t rv; + + rv = ioreg_read(PALM_CLKMAN_VBASE + CLKMAN_CKEN); + if (enable) + rv |= clk; + else + rv &= ~clk; + ioreg_write(PALM_CLKMAN_VBASE + CLKMAN_CKEN, rv); +} + +int glass_console = 0; + +void +board_startup(void) +{ + extern int lcd_cnattach(void (*)(u_int, int)); +#ifdef COM_PXA2X0 + extern bus_addr_t comconsaddr; +#endif + +#if NWSDISPLAY > 0 + /* + * Try to attach the display console now that VM services + * are available. + */ + +// if ((cputype & ~CPU_ID_XSCALE_COREREV_MASK) == CPU_ID_PXA27X) { + if (strcmp(console, "glass") == 0) { + printf("attempting to switch console to lcd screen\n"); + glass_console = 1; + } + if (glass_console == 1 && lcd_cnattach(early_clkman) == 0) { + /* + * Kill the existing serial console. + * XXX need to bus_space_unmap resources and disable + * clocks... + */ + comconsaddr = 0; + + /* + * Display the copyright notice again on the new console + */ + extern const char copyright[]; + printf("%s\n", copyright); + } +// } +#endif + + if (boothowto & RB_CONFIG) { +#ifdef BOOT_CONFIG + user_config(); +#else + printf("kernel does not support -c; continuing..\n"); +#endif + } +} diff --git a/sys/arch/palm/palm/palm_start.S b/sys/arch/palm/palm/palm_start.S new file mode 100644 index 0000000..1fb98fc --- /dev/null +++ b/sys/arch/palm/palm/palm_start.S @@ -0,0 +1,172 @@ +/* $OpenBSD: zaurus_start.S,v 1.2 2005/01/02 19:43:07 drahn Exp $ */ +/* $NetBSD: lubbock_start.S,v 1.1 2003/06/18 10:51:15 bsh Exp $ */ + +/* + * Copyright (c) 2002, 2003 Genetec Corporation. All rights reserved. + * Written by Hiroyuki Bessho for Genetec Corporation. + * + * 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 Genetec Corporation may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY GENETEC CORPORATION ``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 GENETEC CORPORATION + * 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 +#include +#include +#include /* for PMAP_DOMAIN_KERNEL */ +#include + +/* + * CPWAIT -- Canonical method to wait for CP15 update. + * NOTE: Clobbers the specified temp reg. + * copied from arm/arm/cpufunc_asm_xscale.S + * XXX: better be in a common header file. + */ +#define CPWAIT_BRANCH \ + sub pc, pc, #4 + +#define CPWAIT(tmp) \ + mrc p15, 0, tmp, c2, c0, 0 /* arbitrary read of CP15 */ ;\ + mov tmp, tmp /* wait for it to complete */ ;\ + CPWAIT_BRANCH /* branch to next insn */ + +/* + * Kernel start routine for DBPXA250 (Lubbock) + * this code is excuted at the very first after the kernel is loaded + * by RedBoot. + */ + .text + + .global _C_LABEL(palm_start) +_C_LABEL(palm_start): + /* Are we running on ROM ? */ + cmp pc, #0x06000000 + bhi palm_start_ram + + /* move me to RAM + * XXX: we can use memcpy if it is PIC + */ + ldr r1, Lcopy_size + adr r0, _C_LABEL(palm_start) + add r1, r1, #3 + mov r1, r1, LSR #2 + mov r2, #SDRAM_START + add r2, r2, #0x00200000 + mov r4, r2 + +5: ldr r3,[r0],#4 + str r3,[r2],#4 + subs r1,r1,#1 + bhi 5b + + cmp pc, r5 + /* Jump to RAM */ + ldr r0, Lstart_off + + blo 1f + /* if we were running out of virtual mapped space, disable mmu */ + mov r2, #0 + mov r1, #(CPU_CONTROL_32BP_ENABLE | CPU_CONTROL_32BD_ENABLE) + mcr 15, 0, r1, c1, c0, 0 + mcrne 15, 0, r2, c8, c7, 0 /* nail I+D TLB on ARMv4 and greater */ + +1: + add pc, r4, r0 + +Lcopy_size: .word _edata-_C_LABEL(palm_start) +Lstart_off: .word palm_start_ram-_C_LABEL(palm_start) + +palm_start_ram: + /* + * Kernel is loaded in SDRAM (0xa0200000..), and is expected to run + * in VA 0xc0200000.. + */ + + mrc p15, 0, r0, c2, c0, 0 /* get ttb prepared by redboot */ + adr r4, mmu_init_table2 + +#define BUILD_STARTUP_PAGETABLE +#ifdef BUILD_STARTUP_PAGETABLE + mrc p15, 0, r2, c1, c0, 0 + mov r2, #0 + tst r2, #CPU_CONTROL_MMU_ENABLE /* we already have a page table? */ + bne 3f + + /* build page table from scratch */ + ldr r0, Lstartup_pagetable + adr r4, mmu_init_table + b 3f + +2: + str r3, [r0, r2] + add r2, r2, #4 + add r3, r3, #(L1_S_SIZE) + adds r1, r1, #-1 + bhi 2b +3: + ldmia r4!, {r1,r2,r3} /* # of sections, PA|attr, VA */ + cmp r1, #0 + bne 2b +#endif + + mcr p15, 0, r0, c2, c0, 0 /* Set TTB */ + mcr p15, 0, r0, c8, c7, 0 /* Flush TLB */ + + /* Set the Domain Access register. Very important! */ + mov r0, #((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT) + mcr p15, 0, r0, c3, c0, 0 + + /* Enable MMU */ + mrc p15, 0, r0, c1, c0, 0 + orr r0, r0, #CPU_CONTROL_MMU_ENABLE + mcr p15, 0, r0, c1, c0, 0 + CPWAIT(r0) + + /* Jump to kernel code in TRUE VA */ + adr r0, Lstart + ldr pc, [r0] + +Lstart: + .word start + +#define MMU_INIT(va,pa,n_sec,attr) \ + .word n_sec ; \ + .word 4*((va)>>L1_S_SHIFT) ; \ + .word (pa)|(attr) ; + +#ifdef BUILD_STARTUP_PAGETABLE +#ifndef STARTUP_PAGETABLE_ADDR +#define STARTUP_PAGETABLE_ADDR 0xa0004000 +#endif +Lstartup_pagetable: .word STARTUP_PAGETABLE_ADDR +mmu_init_table: + /* fill all table VA==PA */ + MMU_INIT(0x00000000, 0x00000000, 1<<(32-L1_S_SHIFT), L1_TYPE_S|L1_S_AP(AP_KRW)) + /* map SDRAM VA==PA, WT cacheable */ + MMU_INIT(SDRAM_START, SDRAM_START, SDRAM_SIZE_MB, L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) +#endif +mmu_init_table2: + /* map VA 0xc0000000..0xc3ffffff to PA 0xa0000000..0xa3ffffff */ + MMU_INIT(0xc0000000, SDRAM_START, SDRAM_SIZE_MB, L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) + + .word 0 /* end of table */ diff --git a/sys/dev/microcode/atmel/Makefile b/sys/dev/microcode/atmel/Makefile index fe9de8e..72fe57b 100644 --- a/sys/dev/microcode/atmel/Makefile +++ b/sys/dev/microcode/atmel/Makefile @@ -10,7 +10,7 @@ CC=${HOSTCC} (${MACHINE} == "hppa") || (${MACHINE} == "hppa64") || \ (${MACHINE} == "i386") || (${MACHINE} == "sgi") || \ (${MACHINE} == "sparc64") || (${MACHINE} == "zaurus") || \ - (${MACHINE} == "landisk") + (${MACHINE} == "landisk") || (${MACHINE} == "palm") FIRM= atu-intersil-int atu-intersil-ext \ atu-rfmd-int atu-rfmd-ext \ diff --git a/sys/dev/microcode/kue/Makefile b/sys/dev/microcode/kue/Makefile index 6334649..b3d411e 100644 --- a/sys/dev/microcode/kue/Makefile +++ b/sys/dev/microcode/kue/Makefile @@ -10,7 +10,7 @@ CC=${HOSTCC} (${MACHINE} == "hppa") || (${MACHINE} == "hppa64") || \ (${MACHINE} == "i386") || (${MACHINE} == "sgi") || \ (${MACHINE} == "sparc64") || (${MACHINE} == "zaurus") || \ - (${MACHINE} == "landisk") + (${MACHINE} == "landisk") || (${MACHINE} == "palm") FIRM= kue diff --git a/sys/dev/microcode/rum/Makefile b/sys/dev/microcode/rum/Makefile index c3b7e26..3e94d81 100644 --- a/sys/dev/microcode/rum/Makefile +++ b/sys/dev/microcode/rum/Makefile @@ -10,7 +10,7 @@ CC=${HOSTCC} (${MACHINE} == "hppa") || (${MACHINE} == "hppa64") || \ (${MACHINE} == "i386") || (${MACHINE} == "sgi") || \ (${MACHINE} == "sparc64") || (${MACHINE} == "zaurus") || \ - (${MACHINE} == "landisk") + (${MACHINE} == "landisk") || (${MACHINE} == "palm") FIRM= rum-rt2573 run-rt2870 run-rt3071 diff --git a/sys/dev/microcode/symbol/Makefile b/sys/dev/microcode/symbol/Makefile index aa1c875..78397bc 100644 --- a/sys/dev/microcode/symbol/Makefile +++ b/sys/dev/microcode/symbol/Makefile @@ -8,7 +8,8 @@ CC=${HOSTCC} .if (${MACHINE} == "i386") || (${MACHINE} == "macppc") || \ (${MACHINE} == "sparc") || (${MACHINE} == "sparc64") || \ (${MACHINE} == "hppa") || (${MACHINE} == "hppa64") || \ - (${MACHINE} == "sgi") || (${MACHINE} == "zaurus") + (${MACHINE} == "sgi") || (${MACHINE} == "zaurus") || \ + (${MACHINE} == "palm") afterinstall: ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \ diff --git a/sys/dev/microcode/tusb3410/Makefile b/sys/dev/microcode/tusb3410/Makefile index dd849f0..6a4798c 100644 --- a/sys/dev/microcode/tusb3410/Makefile +++ b/sys/dev/microcode/tusb3410/Makefile @@ -10,7 +10,7 @@ CC=${HOSTCC} (${MACHINE_ARCH} == "powerpc") || (${MACHINE} == "hppa") || \ (${MACHINE} == "hppa64") || (${MACHINE} == "sgi") || \ (${MACHINE} == "landisk") || (${MACHINE} == "armish") || \ - (${MACHINE} == "zaurus") + (${MACHINE} == "zaurus") || (${MACHINE} == "palm") FIRM= tusb3410 diff --git a/sys/dev/microcode/zydas/Makefile b/sys/dev/microcode/zydas/Makefile index 10ab105..ba4d819 100644 --- a/sys/dev/microcode/zydas/Makefile +++ b/sys/dev/microcode/zydas/Makefile @@ -10,7 +10,7 @@ CC=${HOSTCC} (${MACHINE} == "hppa") || (${MACHINE} == "hppa64") || \ (${MACHINE} == "i386") || (${MACHINE} == "sgi") || \ (${MACHINE} == "sparc64") || (${MACHINE} == "zaurus") || \ - (${MACHINE} == "landisk") + (${MACHINE} == "landisk") || (${MACHINE} == "palm") FIRM= zd1211 zd1211b diff --git a/usr.sbin/hotplugd/Makefile b/usr.sbin/hotplugd/Makefile index 580b9ac..d788f34 100644 --- a/usr.sbin/hotplugd/Makefile +++ b/usr.sbin/hotplugd/Makefile @@ -5,7 +5,7 @@ ${MACHINE} == "hppa" || ${MACHINE} == "landisk" || \ ${MACHINE} == "macppc" || ${MACHINE} == "sgi" || \ ${MACHINE} == "socppc" || ${MACHINE} == "sparc64" || \ - ${MACHINE} == "zaurus" + ${MACHINE} == "zaurus" || ${MACHINE} == "palm" PROG= hotplugd SRCS= hotplugd.c diff --git a/usr.sbin/wsconscfg/Makefile b/usr.sbin/wsconscfg/Makefile index 62975b8..3f11138 100644 --- a/usr.sbin/wsconscfg/Makefile +++ b/usr.sbin/wsconscfg/Makefile @@ -7,7 +7,7 @@ ${MACHINE} == "sgi" || ${MACHINE} == "sparc" || \ ${MACHINE} == "sparc64" || ${MACHINE} == "vax" || \ ${MACHINE} == "zaurus" || ${MACHINE} == "landisk" || \ - ${MACHINE} == "socppc" + ${MACHINE} == "socppc" || ${MACHINE} == "palm" PROG= wsconscfg SRCS= wsconscfg.c diff --git a/usr.sbin/wsfontload/Makefile b/usr.sbin/wsfontload/Makefile index ec55a72..f42cc23 100644 --- a/usr.sbin/wsfontload/Makefile +++ b/usr.sbin/wsfontload/Makefile @@ -2,7 +2,7 @@ .if ${MACHINE} == "i386" || ${MACHINE} == "amd64" || \ ${MACHINE} == "alpha" || ${MACHINE} == "hppa" || \ - ${MACHINE} == "zaurus" + ${MACHINE} == "zaurus" || ${MACHINE} == "palm" PROG= wsfontload SRCS= wsfontload.c -- 1.6.3.4