Populate the netwinder include directory.

This commit is contained in:
matt 2001-04-19 07:11:00 +00:00
parent 60f69773a0
commit 56260f7d2c
60 changed files with 1171 additions and 0 deletions

View File

@ -0,0 +1,25 @@
# $NetBSD: Makefile,v 1.1 2001/04/19 07:11:00 matt Exp $
KDIR= /sys/arch/netwinder/include
INCSDIR= /usr/include/arm/netwinder
INCS= ansi.h aout_machdep.h asm.h \
bootconfig.h bswap.h bus.h \
cdefs.h conf.h cpu.h cpufunc.h cpus.h \
db_machdep.h disklabel.h disklabel_acorn.h \
elf_machdep.h endian.h endian_machdep.h \
float.h fp.h frame.h \
ieee.h ieeefp.h int_const.h int_mwgwtypes.h int_types.h \
intr.h ipkdb.h irqhandler.h \
joystick.h \
katelib.h \
limits.h lock.h \
math.h \
param.h pcb.h pmap.h proc.h profile.h psl.h pte.h ptrace.h \
reg.h rtc.h \
setjmp.h signal.h stdarg.h sysarch.h \
trap.h types.h \
undefined.h \
varargs.h vmparam.h
.include <bsd.kinc.mk>

View File

@ -0,0 +1,3 @@
/* $NetBSD: ansi.h,v 1.1 2001/04/19 07:11:01 matt Exp $ */
#include <arm/ansi.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: aout_machdep.h,v 1.1 2001/04/19 07:11:01 matt Exp $ */
#include <arm/aout_machdep.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: asm.h,v 1.1 2001/04/19 07:11:01 matt Exp $ */
#include <arm/asm.h>

View File

@ -0,0 +1,76 @@
/* $NetBSD: bootconfig.h,v 1.1 2001/04/19 07:11:01 matt 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
*/
#include "opt_footbridge.h"
typedef struct _PhysMem {
u_int address;
u_int pages;
} PhysMem;
#define DRAM_BLOCKS 1
typedef struct _BootConfig {
PhysMem dram[DRAM_BLOCKS];
u_int dramblocks;
} BootConfig;
extern BootConfig bootconfig;
#define MAX_BOOT_STRING 255
#ifdef _KERNEL
#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 __P((char *string, char *option, int type, void *result));
extern char *boot_args;
extern char *boot_file;
#endif /* _KERNEL */
/* End of bootconfig.h */

View File

@ -0,0 +1,3 @@
/* $NetBSD: bswap.h,v 1.1 2001/04/19 07:11:01 matt Exp $ */
#include <arm/bswap.h>

View File

@ -0,0 +1,4 @@
/* $NetBSD: bus.h,v 1.1 2001/04/19 07:11:01 matt Exp $ */
#include <arm/arm32/bus.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: cdefs.h,v 1.1 2001/04/19 07:11:01 matt Exp $ */
#include <arm/cdefs.h>

View File

@ -0,0 +1,119 @@
/* $NetBSD: conf.h,v 1.1 2001/04/19 07:11:01 matt Exp $ */
/*
* Copyright (c) 1997 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 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
*
* conf.h
*
* Prototypes for device driver functions
*/
#include <sys/conf.h>
bdev_decl(wd);
cdev_decl(wd);
bdev_decl(sw);
cdev_decl(sw);
bdev_decl(fd);
cdev_decl(fd);
bdev_decl(md);
cdev_decl(md);
bdev_decl(raid);
cdev_decl(raid);
/* Character device declarations */
/* open, close, read, write, ioctl, tty, mmap -- XXX should be a tty */
#define cdev_physcon_init(c,n) cdev__ttym_init(c,n,0)
/* open, close, ioctl */
#define cdev_beep_init(c,n) cdev__oci_init(c,n)
/* open, close, read, ioctl */
#define cdev_kbd_init(c,n) cdev__ocri_init(c,n)
/* open, close, ioctl, mmap */
#define cdev_vidcvid_init(c,n) { \
dev_init(c,n,open), dev_init(c,n,close), dev_noimpl(read,enodev), \
dev_noimpl(write,enodev), dev_init(c,n,ioctl), \
dev_noimpl(stop,enodev), 0, seltrue, dev_init(c,n,mmap), 0 }
/* open, close, read, write, ioctl */
#define cdev_iic_init(c,n) cdev__ocrwi_init(c,n)
#define cdev_rtc_init(c,n) cdev__ocrwi_init(c,n)
/* open, close, read, ioctl */
#define cdev_prof_init(c,n) cdev__ocri_init(c,n)
#define mmread mmrw
#define mmwrite mmrw
cdev_decl(mm);
cdev_decl(physcon);
cdev_decl(vidcconsole);
cdev_decl(com);
cdev_decl(lpt);
cdev_decl(qms);
cdev_decl(pms);
cdev_decl(beep);
cdev_decl(kbd);
cdev_decl(iic);
cdev_decl(rtc);
cdev_decl(fcom);
cdev_decl(pc);
#ifdef OFW
cdev_decl(ofcons_);
cdev_decl(ofd);
cdev_decl(ofrtc);
#endif
cdev_decl(scr);
cdev_decl(prof);
#define ofromread ofromrw
#define ofromwrite ofromrw
cdev_decl(ofrom);
cdev_decl(joy);
cdev_decl(usb);
cdev_decl(uhid);
cdev_decl(ugen);
cdev_decl(ulpt);
cdev_decl(ucom);
cdev_decl(urio);
cdev_decl(uscanner);
cdev_decl(vc_nb_);
cdev_decl(wsdisplay);
cdev_decl(wskbd);
cdev_decl(wsmouse);
cdev_decl(wsmux);
cdev_decl(scsibus);
cdev_decl(openfirm);

View File

@ -0,0 +1,3 @@
/* $NetBSD: cpu.h,v 1.1 2001/04/19 07:11:01 matt Exp $ */
#include <arm/cpu.h>

View File

@ -0,0 +1,4 @@
/* $NetBSD: cpufunc.h,v 1.1 2001/04/19 07:11:01 matt Exp $ */
#include <arm/cpufunc.h>

View File

@ -0,0 +1,4 @@
/* $NetBSD: cpus.h,v 1.1 2001/04/19 07:11:01 matt Exp $ */
#include <arm/cpus.h>

View File

@ -0,0 +1,4 @@
/* $NetBSD: db_machdep.h,v 1.1 2001/04/19 07:11:01 matt Exp $ */
#include <arm/db_machdep.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: disklabel.h,v 1.1 2001/04/19 07:11:01 matt Exp $ */
#include <arm/disklabel.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: disklabel_acorn.h,v 1.1 2001/04/19 07:11:01 matt Exp $ */
#include <arm/disklabel_acorn.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: elf_machdep.h,v 1.1 2001/04/19 07:11:01 matt Exp $ */
#include <arm/elf_machdep.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: endian.h,v 1.1 2001/04/19 07:11:01 matt Exp $ */
#include <sys/endian.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: endian_machdep.h,v 1.1 2001/04/19 07:11:01 matt Exp $ */
#include <arm/endian_machdep.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: float.h,v 1.1 2001/04/19 07:11:02 matt Exp $ */
#include <arm/float.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: fp.h,v 1.1 2001/04/19 07:11:02 matt Exp $ */
#include <arm/fp.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: frame.h,v 1.1 2001/04/19 07:11:02 matt Exp $ */
#include <arm/arm32/frame.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: ieee.h,v 1.1 2001/04/19 07:11:02 matt Exp $ */
#include <arm/ieee.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: ieeefp.h,v 1.1 2001/04/19 07:11:02 matt Exp $ */
#include <arm/ieeefp.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: int_const.h,v 1.1 2001/04/19 07:11:02 matt Exp $ */
#include <arm/int_const.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: int_mwgwtypes.h,v 1.1 2001/04/19 07:11:02 matt Exp $ */
#include <arm/int_mwgwtypes.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: int_types.h,v 1.1 2001/04/19 07:11:02 matt Exp $ */
#include <arm/int_types.h>

View File

@ -0,0 +1,71 @@
/* $NetBSD: intr.h,v 1.1 2001/04/19 07:11:02 matt Exp $ */
/*
* Copyright (c) 1997 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 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.
*/
#ifndef _ARM32_INTR_H_
#define _ARM32_INTR_H_
/* Define the various Interrupt Priority Levels */
/* Hardware Interrupt Priority Levels are not mutually exclusive. */
#define IPL_BIO 0 /* block I/O */
#define IPL_NET 1 /* network */
#define IPL_TTY 2 /* terminal */
#define IPL_IMP 3 /* memory allocation */
#define IPL_AUDIO 4 /* audio */
#define IPL_CLOCK 5 /* clock */
#define IPL_HIGH 6 /* */
#define IPL_SERIAL 7 /* serial */
#define IPL_NONE 8
#define IPL_LEVELS 8
#define IST_UNUSABLE -1 /* interrupt cannot be used */
#define IST_NONE 0 /* none (dummy) */
#define IST_PULSE 1 /* pulsed */
#define IST_EDGE 2 /* edge-triggered */
#define IST_LEVEL 3 /* level-triggered */
/* Software interrupt priority levels */
#define SOFTIRQ_CLOCK 0
#define SOFTIRQ_NET 1
#define SOFTIRQ_SERIAL 2
#define SOFTIRQ_BIT(x) (1 << x)
#include <machine/irqhandler.h>
#endif /* _ARM32_INTR_H */

View File

@ -0,0 +1,4 @@
/* $NetBSD: ipkdb.h,v 1.1 2001/04/19 07:11:02 matt Exp $ */
#include <arm/ipkdb.h>

View File

@ -0,0 +1,292 @@
/* $NetBSD: irqhandler.h,v 1.1 2001/04/19 07:11:02 matt Exp $ */
/*
* Copyright (c) 1994-1996 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.
*
* IRQ related stuff (defines + structures)
*
* Created : 30/09/94
*/
#ifndef _ARM32_IRQHANDLER_H_
#define _ARM32_IRQHANDLER_H_
#if defined(_KERNEL) && !defined(_LKM)
#include "opt_cputypes.h"
#endif
#ifndef _LOCORE
#include <sys/types.h>
#endif /* _LOCORE */
/* Define the IRQ bits */
/*
* XXX this is really getting rather horrible.
* Shortly to be replaced with system specific interrupt tables and handling
*/
#if defined(RISCPC) || defined(CPU_ARM7500)
#ifdef CPU_ARM7500
/*#define IRQ_PRINTER 0x00*/
#define IRQ_RESERVED0 0x01
#define IRQ_BUTTON 0x02
#define IRQ_FLYBACK 0x03
#define IRQ_POR 0x04
#define IRQ_TIMER0 0x05
#define IRQ_TIMER1 0x06
#define IRQ_DREQ3 0x08
/*#define IRQ_HD1 0x09*/
/*#define IRQ_HD IRQ_HD1*/
#define IRQ_DREQ2 0x0A
/*#define IRQ_FLOPPY 0x0C*/
/*#define IRQ_SERIAL 0x0D*/
#define IRQ_KBDTX 0x0E
#define IRQ_KBDRX 0x0F
#define IRQ_IRQ3 0x10
#define IRQ_IRQ4 0x11
#define IRQ_IRQ5 0x12
#define IRQ_IRQ6 0x13
#define IRQ_IRQ7 0x14
#define IRQ_IRQ9 0x15
#define IRQ_IRQ10 0x16
#define IRQ_IRQ11 0x17
#define IRQ_MSDRX 0x18
#define IRQ_MSDTX 0x19
#define IRQ_ATOD 0x1A
#define IRQ_CLOCK 0x1B
#define IRQ_PANIC 0x1C
#define IRQ_RESERVED2 0x1D
#define IRQ_RESERVED3 0x1E
/*
* Note that Sound DMA IRQ is on the 31st vector.
* It's not part of the IRQD.
*/
#define IRQ_SDMA 0x1F
/* Several interrupts are different between the A7000 and RC7500 */
#ifdef RC7500
#define IRQ_FIQDOWN 0x07
#define IRQ_ETHERNET 0x0B
#define IRQ_HD2 IRQ_IRQ11
#else /* RC7500 */
#define IRQ_RESERVED1 0x07
#define IRQ_EXTENDED 0x0B
#define IRQ_PODULE 0x0D
#define IRQ_EXPCARD0 0x20
#define IRQ_EXPCARD1 0x21
#define IRQ_EXPCARD2 0x22
#define IRQ_EXPCARD3 0x23
#define IRQ_EXPCARD4 0x24
#define IRQ_EXPCARD5 0x25
#define IRQ_EXPCARD6 0x26
#define IRQ_EXPCARD7 0x27
#endif /* RC7500 */
#else /* CPU_ARM7500 */
#ifdef RISCPC
/*#define IRQ_PRINTER 0x00*/
#define IRQ_RESERVED0 0x01
/*#define IRQ_FLOPPYIDX 0x02*/
#define IRQ_FLYBACK 0x03
#define IRQ_POR 0x04
#define IRQ_TIMER0 0x05
#define IRQ_TIMER1 0x06
#define IRQ_RESERVED1 0x07
#define IRQ_RESERVED2 0x08
/*#define IRQ_HD 0x09*/
/*#define IRQ_SERIAL 0x0A*/
#define IRQ_EXTENDED 0x0B
/*#define IRQ_FLOPPY 0x0C*/
#define IRQ_PODULE 0x0D
#define IRQ_KBDTX 0x0E
#define IRQ_KBDRX 0x0F
#define IRQ_DMACH0 0x10
#define IRQ_DMACH1 0x11
#define IRQ_DMACH2 0x12
#define IRQ_DMACH3 0x13
#define IRQ_DMASCH0 0x14
#define IRQ_DMASCH1 0x15
#define IRQ_RESERVED3 0x16
#define IRQ_RESERVED4 0x17
#define IRQ_EXPCARD0 0x18
#define IRQ_EXPCARD1 0x19
#define IRQ_EXPCARD2 0x1A
#define IRQ_EXPCARD3 0x1B
#define IRQ_EXPCARD4 0x1C
#define IRQ_EXPCARD5 0x1D
#define IRQ_EXPCARD6 0x1E
#define IRQ_EXPCARD7 0x1F
#endif /* RISCPC */
#endif /* CPU_ARM7500 */
#endif /* RISPC || CPU_ARM7500 */
#ifdef OFWGENCFG
/* These are just made up for now! -JJK */
#define IRQ_TIMER0 0
#endif
/* XXX why is this in ARM7500? */
#ifdef SHARK
/*
* shark hardware requirements for IRQ's:
* IDE: 14 (hardwired)
* PCI: 5, 9, 10, 11, 15(mapped to UMIPCI inta, intb, intc, intd)
* UMIISA: 10, 11, 12
* SuperIO: 1, 3..12, 14, 15(all may be remapped. defaults as follows.)
* KBC: 1
* USI: 3 (UART with Slow Infrared support)
* UART: 4
* FLOPPY: 6 (not currently used on shark)
* PARALLEL: 7
* RTC: 8 (not used on shark: RTC in sequoia used)
* MOUSE: 12
* Sequoia: 8 (internal RTC hardwired to irq 8)
* Codec: 5, 7, 9, 10, 15 (irqe, connected to 15, has special status.)
* CS8900: 5, 10, 11, 12 (P.14 of datasheet sez only 1 used/time)
* FERR#: 13 (unconnected floating point error)
*
* total of 15 irqs:
* timer, ide, 2 umi = isa/pci, ethernet, 2 codec, kb, usi, uart, floppy,
* parallel, rtc, mouse, ferr (irq 13)
*
* eventually, need to read the OFW dev info tree, and allocate IRQs.
* hardcoded for now.
*/
#define IRQ_TIMER0 0x00 /* hardwired to 8254 counter 0 in sequoia */
#define IRQ_KEYBOARD 0x01
#define IRQ_CASCADE 0x02 /* hardwired IRQ for second 8259 = IRQ_SLAVE */
#define IRQ_USI 0x03
#define IRQ_UART 0x04
#define IRQ_ETHERNET 0x05
#define IRQ_FLOPPY 0x06
#define IRQ_PARALLEL 0x07
#define IRQ_RTC 0x08 /* hardwired to the sequoia RTC */
#define IRQ_CODEC1 0x09
#define IRQ_UMI1 0x0A /* isa or pci */
#define IRQ_UMI2 0x0B /* isa or pci */
#define IRQ_MOUSE 0x0C
#define IRQ_FERR 0x0D /* FERR# pin on sequoia needs to be connected */
#define IRQ_IDE 0x0E /* hardwired to the IDE connector */
#define IRQ_CODEC2 0x0F /* special interrupt on codec */
/* XXX should this go into isa_machdep.h. Somewhere else? */
/* 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 */
#endif /* SHARK */
#define IRQ_VSYNC IRQ_FLYBACK /* Aliased */
#define IRQ_NETSLOT IRQ_EXTENDED
#define IRQ_INSTRUCT -1
#define NIRQS 0x20
#include <machine/intr.h>
#ifndef _LOCORE
typedef struct irqhandler {
int (*ih_func) __P((void *arg));/* handler function */
void *ih_arg; /* Argument to handler */
int ih_level; /* Interrupt level */
int ih_num; /* Interrupt number (for accounting) */
const char *ih_name; /* Name of interrupt (for vmstat -i) */
u_int ih_flags; /* Interrupt flags */
u_int ih_maskaddr; /* mask address for expansion cards */
u_int ih_maskbits; /* interrupt bit for expansion cards */
struct irqhandler *ih_next; /* next handler */
} irqhandler_t;
#ifdef _KERNEL
extern u_int irqmasks[IPL_LEVELS];
extern irqhandler_t *irqhandlers[NIRQS];
void irq_init __P((void));
int irq_claim __P((int, irqhandler_t *));
int irq_release __P((int, irqhandler_t *));
void *intr_claim __P((int irq, int level, const char *name, int (*func) __P((void *)), void *arg));
int intr_release __P((void *ih));
void irq_setmasks __P((void));
void disable_irq __P((int));
void enable_irq __P((int));
#endif /* _KERNEL */
#endif /* _LOCORE */
#define IRQ_FLAG_ACTIVE 0x00000001 /* This is the active handler in list */
#ifndef _LOCORE
typedef struct fiqhandler {
void (*fh_func) __P((void));/* handler function */
u_int fh_size; /* Size of handler function */
u_int fh_mask; /* FIQ mask */
u_int fh_r8; /* FIQ mode r8 */
u_int fh_r9; /* FIQ mode r9 */
u_int fh_r10; /* FIQ mode r10 */
u_int fh_r11; /* FIQ mode r11 */
u_int fh_r12; /* FIQ mode r12 */
u_int fh_r13; /* FIQ mode r13 */
} fiqhandler_t;
#ifdef _KERNEL
int fiq_claim __P((fiqhandler_t *));
int fiq_release __P((fiqhandler_t *));
#endif /* _KERNEL */
#endif /* _LOCORE */
#endif /* _ARM32_IRQHANDLER_H_ */
/* End of irqhandler.h */

View File

@ -0,0 +1,3 @@
/* $NetBSD: isa_machdep.h,v 1.1 2001/04/19 07:11:02 matt Exp $ */
#include <arm/isa_machdep.h>

View File

@ -0,0 +1,4 @@
/* $NetBSD: isapnp_machdep.h,v 1.1 2001/04/19 07:11:02 matt Exp $ */
#include <arm/isapnp_machdep.h>

View File

@ -0,0 +1,23 @@
/* $NetBSD: joystick.h,v 1.1 2001/04/19 07:11:02 matt Exp $ */
#ifndef _JOY_IOCTL_H_
#define _JOY_IOCTL_H_
#include <sys/types.h>
#include <sys/ioctl.h>
struct joystick {
int x;
int y;
int b1;
int b2;
};
#define JOY_SETTIMEOUT _IOW('J', 1, int) /* set timeout */
#define JOY_GETTIMEOUT _IOR('J', 2, int) /* get timeout */
#define JOY_SET_X_OFFSET _IOW('J', 3, int) /* set offset on X-axis */
#define JOY_SET_Y_OFFSET _IOW('J', 4, int) /* set offset on X-axis */
#define JOY_GET_X_OFFSET _IOR('J', 5, int) /* get offset on X-axis */
#define JOY_GET_Y_OFFSET _IOR('J', 6, int) /* get offset on Y-axis */
#endif /* _JOY_IOCTL_H_ */

View File

@ -0,0 +1,4 @@
/* $NetBSD: katelib.h,v 1.1 2001/04/19 07:11:02 matt Exp $ */
#include <arm/arm32/katelib.h>

View File

@ -0,0 +1,132 @@
/* $NetBSD: kerndebug.h,v 1.1 2001/04/19 07:11:02 matt Exp $ */
/*
* Copyright 1997
* Digital Equipment Corporation. All rights reserved.
*
* This software is furnished under license and may be used and
* copied only in accordance with the following terms and conditions.
* Subject to these conditions, you may download, copy, install,
* use, modify and distribute this software in source and/or binary
* form. No title or ownership is transferred hereby.
*
* 1) Any source code used, modified or distributed must reproduce
* and retain this copyright notice and list of conditions as
* they appear in the source file.
*
* 2) No right is granted to use any trade name, trademark, or logo of
* Digital Equipment Corporation. Neither the "Digital Equipment
* Corporation" name nor any trademark or logo of Digital Equipment
* Corporation may be used to endorse or promote products derived
* from this software without the prior written permission of
* Digital Equipment Corporation.
*
* 3) This software is provided "AS-IS" and any express or implied
* warranties, including but not limited to, any implied warranties
* of merchantability, fitness for a particular purpose, or
* non-infringement are disclaimed. In no event shall DIGITAL be
* liable for any damages whatsoever, and in particular, DIGITAL
* shall not be liable for special, indirect, consequential, or
* incidental damages or damages for lost profits, loss of
* revenue or loss of use, whether such damages arise in contract,
* negligence, tort, under statute, in equity, at law or otherwise,
* even if advised of the possibility of such damage.
*/
/*
**++
** FACILITY:
**
** kerndebug.h
**
**
** ABSTRACT:
**
** This header provides generic debugging capabilities using printf.
** All debugging can be compiled out by not defining the
** KERNEL_DEBUG macro. In addition the amount of debug output is
** defined by individual variables controlled by each subsystem
** using this utility. Finally note that the two middle bytes of
** the kern debug flags (bits 16 to 23) are free for individual
** subsystems to use as they please (eg. define switches for
** individual functions etc).
**
** AUTHORS:
**
** John Court
**
** CREATION DATE: 2-Feb-1992
**
** MODIFICATION HISTORY:
**
**--
*/
#ifndef _KERNDEBUG_H_
#define _KERNDEBUG_H_
#define KERN_DEBUG_INFO 0x00000001
#define KERN_DEBUG_WARNING 0x00000002
#define KERN_DEBUG_ERROR 0x00000010
#define KERN_DEBUG_SMP 0x00000020
#define KERN_DEBUG_PANIC 0x40000000
#define KERN_REAL_PANIC 0x80000000
#define KERN_DEBUG_ALL KERN_DEBUG_INFO | KERN_DEBUG_WARNING | \
KERN_DEBUG_ERROR | KERN_DEBUG_PANIC
/*
** Define the type for debugging flag subsystem variables
*/
typedef unsigned int Kern_Debug_Flags;
/*
** Set up source line location macro for extra debugging and panics
*/
#ifdef __FILE__
#define KERN_DEBUG_LOC ":%s:%d:=\n\t",__FILE__,__LINE__
#else
#define KERN_DEBUG_LOC ":__FILE__ not supported :=\n\t"
#endif
/*
** This is real nasty in that it requires several printf's but is
** unavoidable due to the differences between
** preprocessors supporting standard ANSI C and others.
**
** NOTE: The format of calls to this macro must be
**
** KERN_DEBUG((Kern_Debug_Flags)CntrlVar, KERN_DEBUG_xxxx,
** (normal printf arguments));
**
** pay special attention to the extra set of () around the
** final arguement.
**
*/
#ifdef KERNEL_DEBUG
#define KERN_DEBUG(CntrlVar,Level,Output) \
{ \
if ( (CntrlVar) & (Level) ) \
{ \
if ( (CntrlVar) & (Level) & KERN_DEBUG_PANIC ) \
{ \
printf ("KERNEL:DEBUG PANIC"); \
printf (KERN_DEBUG_LOC); \
printf Output; \
panic("KERN_DEBUG Panicing"); \
} \
else \
{ \
printf Output; \
} \
} \
}
#else /* else KERNEL_DEBUG not defined */
#define KERN_DEBUG(CntrlVar,Level,Output)
#endif /* end else KERNEL_DEBUG not defined */
#endif /* _KERNDEBUG_H_ */

View File

@ -0,0 +1,3 @@
/* $NetBSD: limits.h,v 1.1 2001/04/19 07:11:02 matt Exp $ */
#include <arm/limits.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: lock.h,v 1.1 2001/04/19 07:11:03 matt Exp $ */
#include <arm/lock.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: math.h,v 1.1 2001/04/19 07:11:03 matt Exp $ */
#include <arm/math.h>

View File

@ -0,0 +1,20 @@
struct nwbootinfo {
union {
struct {
unsigned long bp_pagesize;
unsigned long bp_nrpages;
} u1_bp;
char filler1[256];
} bi_u1;
#define bi_pagesize bi_u1.u1_bp.bp_pagesize
#define bi_nrpages bi_u1.u1_bp.bp_nrpages
union {
char paths[8][128];
struct magic {
unsigned long magic;
char filler2[1024 - sizeof(unsigned long)];
} u2_d;
} bi_u2;
char bi_cmdline[256];
char bi_settings[2048];
};

View File

@ -0,0 +1,49 @@
/* $NetBSD: param.h,v 1.1 2001/04/19 07:11:03 matt 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 _NETWINDER_PARAM_H_
#define _NETWINDER_PARAM_H_
/*
* Machine dependent constants for ARM6+ processors
*/
#define _MACHINE netwinder
#define MACHINE "netwinder"
#define _MACHINE_ARCH arm32
#define MACHINE_ARCH "arm32"
#include <arm/arm32/param.h>
#endif /* _NETWINDER_PARAM_H_ */

View File

@ -0,0 +1,4 @@
/* $NetBSD: pcb.h,v 1.1 2001/04/19 07:11:03 matt Exp $ */
#include <arm/arm32/pcb.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: pci_machdep.h,v 1.1 2001/04/19 07:11:03 matt Exp $ */
#include <arm/pci_machdep.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: pio.h,v 1.1 2001/04/19 07:11:03 matt Exp $ */
#include <arm/pio.h>

View File

@ -0,0 +1,4 @@
/* $NetBSD: pmap.h,v 1.1 2001/04/19 07:11:03 matt Exp $ */
#include <arm/arm32/pmap.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: proc.h,v 1.1 2001/04/19 07:11:03 matt Exp $ */
#include <arm/proc.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: profile.h,v 1.1 2001/04/19 07:11:03 matt Exp $ */
#include <arm/profile.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: profileio.h,v 1.1 2001/04/19 07:11:03 matt Exp $ */
#include <arm/profileio.h>

View File

@ -0,0 +1,4 @@
/* $NetBSD: psl.h,v 1.1 2001/04/19 07:11:03 matt Exp $ */
#include <arm/arm32/psl.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: pte.h,v 1.1 2001/04/19 07:11:03 matt Exp $ */
#include <arm/pte.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: ptrace.h,v 1.1 2001/04/19 07:11:03 matt Exp $ */
#include <arm/ptrace.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: reg.h,v 1.1 2001/04/19 07:11:04 matt Exp $ */
#include <arm/reg.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: rtc.h,v 1.1 2001/04/19 07:11:04 matt Exp $ */
#include <arm/arm32/rtc.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: setjmp.h,v 1.1 2001/04/19 07:11:04 matt Exp $ */
#include <arm/setjmp.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: signal.h,v 1.1 2001/04/19 07:11:04 matt Exp $ */
#include <arm/signal.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: stdarg.h,v 1.1 2001/04/19 07:11:04 matt Exp $ */
#include <arm/stdarg.h>

View File

@ -0,0 +1,4 @@
/* $NetBSD: sysarch.h,v 1.1 2001/04/19 07:11:04 matt Exp $ */
#include <arm/arm32/sysarch.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: trap.h,v 1.1 2001/04/19 07:11:04 matt Exp $ */
#include <arm/trap.h>

View File

@ -0,0 +1,11 @@
/* $NetBSD: types.h,v 1.1 2001/04/19 07:11:04 matt Exp $ */
#ifndef _ARM32_TYPES_H_
#define _ARM32_TYPES_H_
#include <arm/types.h>
#define __HAVE_DEVICE_REGISTER
#define __HAVE_NWSCONS
#endif

View File

@ -0,0 +1,3 @@
/* $NetBSD: undefined.h,v 1.1 2001/04/19 07:11:04 matt Exp $ */
#include <arm/undefined.h>

View File

@ -0,0 +1,3 @@
/* $NetBSD: varargs.h,v 1.1 2001/04/19 07:11:05 matt Exp $ */
#include <arm/varargs.h>

View File

@ -0,0 +1,195 @@
/* $NetBSD: vmparam.h,v 1.1 2001/04/19 07:11:05 matt 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. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. 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_
/* for pt_entry_t definition */
#include <machine/pte.h>
#define USRTEXT VM_MIN_ADDRESS
#define USRSTACK VM_MAXUSER_ADDRESS
/*
* Note that MAXTSIZ mustn't be greater than 32M. Otherwise you'd have
* to change the compiler to not generate bl instructions
*/
#define MAXTSIZ (16*1024*1024) /* max text size */
#ifndef DFLDSIZ
#define DFLDSIZ (128*1024*1024) /* initial data size limit */
#endif
#ifndef MAXDSIZ
#define MAXDSIZ (512*1024*1024) /* max data size */
#endif
#ifndef DFLSSIZ
#define DFLSSIZ (2*1024*1024) /* initial stack size limit */
#endif
#ifndef MAXSSIZ
#define MAXSSIZ (8*1024*1024) /* max stack size */
#endif
/*
* Size of shared memory map
*/
#ifndef SHMMAXPGS
#define SHMMAXPGS 1024
#endif
/*
* The time for a process to be blocked before being very swappable.
* This is a number of seconds which the system takes as being a non-trivial
* amount of real time. You probably shouldn't change this;
* it is used in subtle ways (fractions and multiples of it are, that is, like
* half of a `long time'', almost a long time, etc.)
* It is related to human patience and other factors which don't really
* change over time.
*/
#define MAXSLP 20
/*
* Address space constants
*/
/*
* The line between user space and kernel space
* Mappings >= KERNEL_SPACE_START are constant across all processes
*/
#define KERNEL_SPACE_START 0xf0000000
/* total number of page table entries to map 4GB * size of each entry*/
#define PAGE_TABLE_SPACE ((1 << (32 - PGSHIFT)) * sizeof(pt_entry_t))
/* Address where the page tables are mapped */
#define PAGE_TABLE_SPACE_START (KERNEL_SPACE_START - PAGE_TABLE_SPACE)
/* Various constants used by the MD code*/
#define KERNEL_BASE 0xf0000000
#define KERNEL_TEXT_BASE (KERNEL_BASE + 0xc000)
#define ALT_PAGE_TBLS_BASE 0xf0c00000
#define KERNEL_VM_BASE 0xf1000000
/*
* The Kernel VM Size varies depending on the machine depending on how
* much space is needed (and where) for other mappings.
* In some cases the chosen value may not be the maximum in order that
* we don't waste memory with kernel pages tables as we can't currently
* grow the kernel page tables after booting.
* You only need to increase these values if you find that the number of
* buffers is being limited due to lack of VA space.
*/
/*
* The range 0xf1000000 - 0xfcffffff is available for kernel VM space
* Footbridge registers and I/O mappings occupy 0xfd000000 - 0xffffffff
*/
#define KERNEL_VM_SIZE 0x06000000
#define PROCESS_PAGE_TBLS_BASE PAGE_TABLE_SPACE_START
/*
* Override the default pager_map size, there's not enough KVA.
*/
#define PAGER_MAP_SIZE (4 * 1024 * 1024)
/*
* Mach derived constants
*/
#define VM_MIN_ADDRESS ((vm_offset_t)0x00001000)
#define VM_MAXUSER_ADDRESS ((vm_offset_t)(PAGE_TABLE_SPACE_START - UPAGES * NBPG))
#define VM_MAX_ADDRESS ((vm_offset_t)(PAGE_TABLE_SPACE_START + (KERNEL_SPACE_START >> PGSHIFT) * sizeof(pt_entry_t)))
#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)KERNEL_TEXT_BASE)
#define VM_MAXKERN_ADDRESS ((vm_offset_t)(KERNEL_VM_BASE + KERNEL_VM_SIZE))
#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0xffffffff)
/*
* Size of User Raw I/O map
*/
#define USRIOSIZE 300
/* XXX max. amount of KVM to be used by buffers. */
#ifndef VM_MAX_KERNEL_BUF
#define VM_MAX_KERNEL_BUF \
((VM_MAXKERN_ADDRESS - KERNEL_VM_BASE) * 4 / 10)
#endif
/* virtual sizes (bytes) for various kernel submaps */
#define VM_PHYS_SIZE (USRIOSIZE*NBPG)
/*
* max number of non-contig chunks of physical RAM you can have
*/
#define VM_PHYSSEG_MAX 32
/*
* when converting a physical address to a vm_page structure, we
* want to use a binary search on the chunks of physical memory
* to find our RAM
*/
#define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH
/*
* this indicates that we can't add RAM to the VM system after the
* vm system is init'd.
*/
#define VM_PHYSSEG_NOADD
/*
* we support 2 free lists:
*
* - DEFAULT for all systems
* - ISADMA for the ISA DMA range on Sharks only
*/
#define VM_NFREELIST 2
#define VM_FREELIST_DEFAULT 0
#define VM_FREELIST_ISADMA 1
/*
* define structure pmap_physseg: there is one of these structures
* for each chunk of noncontig RAM you have.
*/
struct pmap_physseg {
struct pv_entry *pvent; /* pv_entry array */
char *attrs; /* attrs array */
};
#endif /* _ARM32_VMPARAM_H_ */
/* End of vmparam.h */