diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2001-09-01 15:49:07 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2001-09-01 15:49:07 +0000 |
commit | 65997b0cdeb6b9e16cdbbb314ede217802895ade (patch) | |
tree | bc94445005d87ce5bb877ac490e9dde833e03342 /sys/arch/powerpc/include | |
parent | b0437314cc10bd43e476454d2df24ec3d953247f (diff) |
The "powerpc" port which has supported the newer Apple Macintosh powerpc based
is being renamed to macppc. This is to allow sharing of common code
between different powerpc base platforms.
Most of the work involved in the renaming process was performed by miod@
Files moved from powerpc/include to macppc/include
Some files were not "moved" but wrapper files were created which include
the powerpc/include version.
Several of the powerpc/include files where changed to reflect that they
are POWERPC_* not MACHINE_*.
Diffstat (limited to 'sys/arch/powerpc/include')
36 files changed, 106 insertions, 1654 deletions
diff --git a/sys/arch/powerpc/include/adbsys.h b/sys/arch/powerpc/include/adbsys.h deleted file mode 100644 index 16ebcf83fb5..00000000000 --- a/sys/arch/powerpc/include/adbsys.h +++ /dev/null @@ -1,182 +0,0 @@ -/* $OpenBSD: adbsys.h,v 1.5 2001/07/01 04:31:23 drahn Exp $ */ -/* $NetBSD: adbsys.h,v 1.4 2000/12/19 02:59:24 tsubai Exp $ */ - -/*- - * Copyright (C) 1993, 1994 Allen K. Briggs, Chris P. Caputo, - * Michael L. Finch, Bradley A. Grantham, and - * Lawrence A. Kesteloot - * 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 Alice Group. - * 4. The names of the Alice Group or any of its members may not be used - * to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE ALICE GROUP ``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 ALICE GROUP 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 _ADBSYS_MACHINE_ -#define _ADBSYS_MACHINE_ - -#include <sys/time.h> /* timeval stuff */ -#include <sys/ioctl.h> /* ioctls */ - - -/* Handy visual constants */ -#define ADB_MAX_HANDLERS 256 -#define ADB_MAX_DEVS 16 - - -/* Different ADB system types */ -enum adb_system_e { - MacIIADB, - MacIIsiADB, - MacPBADB -}; -extern enum adb_system_e adb_system_type; - - -/* an ADB event */ -typedef struct adb_event_s { - int addr; /* device address */ - int hand_id; /* handler id */ - int def_addr; /* default address */ - int byte_count; /* number of bytes */ - unsigned char bytes[8]; /* bytes from register 0 */ - struct timeval timestamp; /* time event was acquired */ - union { - struct adb_keydata_s{ - int key; /* ADB key code */ - } k; - struct adb_mousedata_s{ - int dx; /* mouse delta x */ - int dy; /* mouse delta y */ - int buttons; /* buttons (down << (buttonnum)) */ - } m; - } u; /* courtesy interpretation */ -} adb_event_t; - - -/* a device on the ADB */ -typedef struct adb_dev_s{ - int addr; /* current address */ - int default_addr; /* startup address */ - int handler_id; /* handler ID */ -} adb_dev_t; - - - /* Interesting default addresses */ -#define ADBADDR_SECURE 1 /* Security dongles */ -#define ADBADDR_MAP 2 /* Mapped devices (keyboards/pads) */ -#define ADBADDR_REL 3 /* Relative positioning devices - (mice, trackballs/pads) */ -#define ADBADDR_ABS 4 /* Absolute positioning devices - (graphics tablets) */ -#define ADBADDR_DATATX 5 -#define ADBADDR_RSRVD 6 /* Reserved by Apple */ -#define ADBADDR_MISC 7 /* Miscellaneous appliances */ -#define ADBADDR_DONGLE ADBADDR_SECURE -#define ADBADDR_KBD ADBADDR_MAP -#define ADBADDR_MS ADBADDR_REL -#define ADBADDR_TABLET ADBADDR_ABS -#define ADBADDR_MODEM ADBADDR_DATATX - - - /* Interesting keyboard handler IDs */ -#define ADB_STDKBD 1 -#define ADB_EXTKBD 2 -#define ADB_ISOKBD 4 -#define ADB_EXTISOKBD 5 -#define ADB_KBDII 8 -#define ADB_ISOKBDII 9 -#define ADB_PBKBD 12 -#define ADB_PBISOKBD 13 -#define ADB_ADJKPD 14 -#define ADB_ADJKBD 16 -#define ADB_ADJISOKBD 17 -#define ADB_ADJJAPKBD 18 -#define ADB_PBEXTISOKBD 20 -#define ADB_PBEXTJAPKBD 21 -#define ADB_JPKBDII 22 -#define ADB_PBEXTKBD 24 -#define ADB_DESIGNKBD 27 /* XXX Needs to be verified XXX */ -#define ADB_PBJPKBD 30 -#define ADB_PBG4KBD 195 -#define ADB_IBITISOKBD 196 -#define ADB_PBG3JPKBD 201 - - /* Interesting mouse handler IDs */ -#define ADBMS_100DPI 1 -#define ADBMS_200DPI 2 -#define ADBMS_MSA3 3 /* Mouse Systems A3 Mouse */ -#define ADBMS_EXTENDED 4 /* Extended mouse protocol */ -#define ADBMS_USPEED 0x2f /* MicroSpeed mouse */ -#define ADBMS_UCONTOUR 0x66 /* Contour mouse */ -#define ADBMS_TURBO 50 /* Kensington Turbo Mouse */ - - /* Interesting tablet handler ID */ -#define ADB_ARTPAD 58 /* WACOM ArtPad II tablet */ - - /* Interesting miscellaneous handler ID */ -#define ADB_POWERKEY 34 /* Sophisticated Circuits PowerKey */ - /* (intelligent power tap) */ - - /* Get device info from ADB system */ -typedef struct adb_devinfo_s{ - adb_dev_t dev[ADB_MAX_DEVS]; - /* [addr].addr == -1 if none */ -} adb_devinfo_t; -#define ADBIOCDEVSINFO _IOR('A', 128, adb_devinfo_t) - - - /* Event auto-repeat */ -typedef struct adb_rptinfo_s{ - int delay_ticks; /* ticks before repeat */ - int interval_ticks; /* ticks between repeats */ -} adb_rptinfo_t; -#define ADBIOCGETREPEAT _IOR('A', 130, adb_rptinfo_t) -#define ADBIOCSETREPEAT _IOW('A', 131, adb_rptinfo_t) - - - /* Reset and reinitialize */ -#define ADBIOCRESET _IO('A', 132) - - -typedef struct adb_listencmd_s{ - int address; /* device address */ - int reg; /* register to which to send bytes */ - int bytecnt; /* number of bytes */ - u_char bytes[8]; /* bytes */ -} adb_listencmd_t; -#define ADBIOCLISTENCMD _IOW('A', 133, adb_listencmd_t) - -void adb_init __P((void)); - -#ifdef _KERNEL -int adb_poweroff __P((void)); -void adb_restart __P((void)); -int CountADBs __P((void)); -void ADBReInit __P((void)); -int adb_read_date_time __P((unsigned long *)); -#endif - -#endif /* _ADBSYS_MACHINE_ */ diff --git a/sys/arch/powerpc/include/asm.h b/sys/arch/powerpc/include/asm.h index 9f0b64d108a..d77fb2a2e19 100644 --- a/sys/arch/powerpc/include/asm.h +++ b/sys/arch/powerpc/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.4 1999/03/12 04:56:44 rahnds Exp $ */ +/* $OpenBSD: asm.h,v 1.5 2001/09/01 15:49:05 drahn Exp $ */ /* $NetBSD: asm.h,v 1.1 1996/09/30 16:34:20 ws Exp $ */ /* @@ -32,8 +32,8 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _PPC_ASM_H_ -#define _PPC_ASM_H_ +#ifndef _POWERPC_ASM_H_ +#define _POWERPC_ASM_H_ /* XXX */ #define TARGET_ELF @@ -103,4 +103,4 @@ _TMP_LABEL(y):; \ #define RCSID(x) .text; .asciz x -#endif /* !_PPC_ASM_H_ */ +#endif /* !_POWERPC_ASM_H_ */ diff --git a/sys/arch/powerpc/include/autoconf.h b/sys/arch/powerpc/include/autoconf.h deleted file mode 100644 index d98451caec8..00000000000 --- a/sys/arch/powerpc/include/autoconf.h +++ /dev/null @@ -1,114 +0,0 @@ -/* $OpenBSD: autoconf.h,v 1.10 2001/07/09 02:14:05 mickey Exp $ */ - -/* - * Copyright (c) 1997 Per Fogelstrom - * - * 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 under OpenBSD for RTMX inc - * by Per Fogelstrom, Opsycon AB. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - */ -/* - * Machine-dependent structures of autoconfiguration - */ - -#ifndef _MACHINE_AUTOCONF_H_ -#define _MACHINE_AUTOCONF_H_ - -#include <machine/bus.h> - -/* - * System types. - */ -#define OFWMACH 0 /* Openfirmware drivers */ -#define POWER4e 1 /* V.I Power.4e board */ -#define PWRSTK 2 /* Motorola Powerstack series */ -#define APPL 3 /* Apple PowerMac machines (OFW?) */ - -extern int system_type; - -/**/ -struct confargs; - -typedef int (*intr_handler_t) __P((void *)); - -typedef struct bushook { - struct device *bh_dv; - int bh_type; - void (*bh_intr_establish) - __P((struct confargs *, intr_handler_t, void *)); - void (*bh_intr_disestablish) - __P((struct confargs *)); - int (*bh_matchname) - __P((struct confargs *, char *)); -} bushook_t; - -#define BUS_MAIN 1 /* mainbus */ -#define BUS_ISABR 2 /* ISA Bridge Bus */ -#define BUS_PCIBR 3 /* PCI bridge */ -#define BUS_VMEBR 4 /* VME bridge */ - -#define BUS_INTR_ESTABLISH(ca, handler, val) \ - (*(ca)->ca_bus->bh_intr_establish)((ca), (handler), (val)) -#define BUS_INTR_DISESTABLISH(ca) \ - (*(ca)->ca_bus->bh_intr_establish)(ca) -#define BUS_CVTADDR(ca) \ - (*(ca)->ca_bus->bh_cvtaddr)(ca) -#define BUS_MATCHNAME(ca, name) \ - (*(ca)->ca_bus->bh_matchname)((ca), (name)) - -struct confargs { - char *ca_name; /* Device name. */ - bushook_t *ca_bus; /* bus device resides on. */ - /* macobio hooks ?? */ - bus_space_tag_t ca_iot; - bus_space_tag_t ca_memt; /* XXX */ - u_int32_t ca_node; - int ca_nreg; - u_int32_t *ca_reg; - int ca_nintr; - int32_t *ca_intr; - u_int ca_baseaddr; - -}; - -void set_clockintr __P((void (*)(struct clockframe *))); -void set_iointr __P((void (*)(void *, int))); -int badaddr __P((void *, u_int32_t)); -void calc_delayconst(void); -void ofrootfound(void); - -typedef int mac_intr_handle_t; -typedef void *(intr_establish_t) __P((void *, mac_intr_handle_t, - int, int, int (*func)(void *), void *, char *)); -typedef void (intr_disestablish_t) __P((void *, void *)); - -intr_establish_t mac_intr_establish; -intr_disestablish_t mac_intr_disestablish; -extern intr_establish_t *intr_establish_func; -extern intr_disestablish_t *intr_disestablish_func; - -#endif /* _MACHINE_AUTOCONF_H_ */ diff --git a/sys/arch/powerpc/include/bat.h b/sys/arch/powerpc/include/bat.h index ef1d8cf446f..0979388d76b 100644 --- a/sys/arch/powerpc/include/bat.h +++ b/sys/arch/powerpc/include/bat.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bat.h,v 1.3 1997/10/13 10:53:41 pefo Exp $ */ +/* $OpenBSD: bat.h,v 1.4 2001/09/01 15:49:05 drahn Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -31,8 +31,8 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _MACHINE_BAT_H_ -#define _MACHINE_BAT_H_ +#ifndef _POWERPC_BAT_H_ +#define _POWERPC_BAT_H_ struct bat { u_int32_t batu; @@ -51,4 +51,4 @@ struct bat { extern struct bat battable[16]; #endif -#endif /* _MACHINE_BAT_H_ */ +#endif /* _POWERPC_BAT_H_ */ diff --git a/sys/arch/powerpc/include/bus.h b/sys/arch/powerpc/include/bus.h deleted file mode 100644 index 1f60b398f6f..00000000000 --- a/sys/arch/powerpc/include/bus.h +++ /dev/null @@ -1,531 +0,0 @@ -/* $OpenBSD: bus.h,v 1.18 2001/08/01 23:53:09 pvalchev Exp $ */ - -/* - * Copyright (c) 1997 Per Fogelstrom. All rights reserved. - * Copyright (c) 1996 Niklas Hallqvist. 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 Christopher G. Demetriou - * for the NetBSD Project. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _MACHINE_BUS_H_ -#define _MACHINE_BUS_H_ - -#include <machine/pio.h> - -#ifdef __STDC__ -#define CAT(a,b) a##b -#define CAT3(a,b,c) a##b##c -#else -#define CAT(a,b) a/**/b -#define CAT3(a,b,c) a/**/b/**/c -#endif - -/* - * Bus access types. - */ -typedef u_long bus_addr_t; -typedef u_int32_t bus_size_t; -typedef u_int32_t bus_space_handle_t; -typedef struct ppc_bus_space *bus_space_tag_t; - -struct ppc_bus_space { - u_int32_t bus_base; - u_int32_t bus_size; - u_int8_t bus_reverse; /* Reverse bytes */ -}; -#define POWERPC_BUS_TAG_BASE(x) ((x)->bus_base) - -extern struct ppc_bus_space ppc_isa_io, ppc_isa_mem; - -/* - * Access methods for bus resources - */ -int bus_space_map __P((bus_space_tag_t t, bus_addr_t addr, - bus_size_t size, int cacheable, bus_space_handle_t *bshp)); -void bus_space_unmap __P((bus_space_tag_t t, bus_space_handle_t bsh, - bus_size_t size)); -int bus_space_subregion __P((bus_space_tag_t t, bus_space_handle_t bsh, - bus_size_t offset, bus_size_t size, bus_space_handle_t *nbshp)); -int bus_space_alloc __P((bus_space_tag_t tag, bus_addr_t rstart, - bus_addr_t rend, bus_size_t size, bus_size_t alignment, - bus_size_t boundary, int cacheable, bus_addr_t *addrp, - bus_space_handle_t *handlep)); -void bus_space_free __P((bus_space_tag_t tag, bus_space_handle_t handle, - bus_size_t size)); - -#define bus_space_read(n,m) \ -static __inline CAT3(u_int,m,_t) \ -CAT(bus_space_read_,n)(bus_space_tag_t bst, bus_space_handle_t bsh, \ - bus_addr_t ba) \ -{ \ - if(bst->bus_reverse) \ - return CAT3(in,m,rb)((volatile CAT3(u_int,m,_t) *)(bsh + (ba))); \ - else \ - return CAT(in,m)((volatile CAT3(u_int,m,_t) *)(bsh + (ba))); \ -} - -bus_space_read(1,8) -bus_space_read(2,16) -bus_space_read(4,32) - -#define bus_space_read_8 !!! bus_space_read_8 unimplemented !!! - -#define bus_space_write(n,m) \ -static __inline void \ -CAT(bus_space_write_,n)(bus_space_tag_t bst, bus_space_handle_t bsh, \ - bus_addr_t ba, CAT3(u_int,m,_t) x) \ -{ \ - if(bst->bus_reverse) \ - CAT3(out,m,rb)((volatile CAT3(u_int,m,_t) *)(bsh + (ba)), x); \ - else \ - CAT(out,m)((volatile CAT3(u_int,m,_t) *)(bsh + (ba)), x); \ -} - -bus_space_write(1,8) -bus_space_write(2,16) -bus_space_write(4,32) - -#define bus_space_write_8 !!! bus_space_write_8 unimplemented !!! - -#define bus_space_read_multi(n, m) \ -static __inline void \ -CAT(bus_space_read_multi_,n)(bus_space_tag_t bst, bus_space_handle_t bsh, \ - bus_size_t ba, CAT3(u_int,m,_t) *buf, bus_size_t cnt) \ -{ \ - while (cnt--) \ - *buf++ = CAT(bus_space_read_,n)(bst, bsh, ba); \ -} - -bus_space_read_multi(1,8) -bus_space_read_multi(2,16) -bus_space_read_multi(4,32) - -#define bus_space_read_multi_8 !!! bus_space_read_multi_8 not implemented !!! - - -#define bus_space_write_multi_8 !!! bus_space_write_multi_8 not implemented !!! - -#define bus_space_write_multi(n, m) \ -static __inline void \ -CAT(bus_space_write_multi_,n)(bus_space_tag_t bst, bus_space_handle_t bsh, \ - bus_size_t ba, const CAT3(u_int,m,_t) *buf, bus_size_t cnt) \ -{ \ - while (cnt--) \ - CAT(bus_space_write_,n)(bst, bsh, ba, *buf++); \ -} - -bus_space_write_multi(1,8) -bus_space_write_multi(2,16) -bus_space_write_multi(4,32) - -#define bus_space_write_multi_8 !!! bus_space_write_multi_8 not implemented !!! - -/* - * void bus_space_read_region_N __P((bus_space_tag_t tag, - * bus_space_handle_t bsh, bus_size_t offset, - * u_intN_t *addr, size_t count)); - * - * Read `count' 1, 2, 4, or 8 byte quantities from bus space - * described by tag/handle and starting at `offset' and copy into - * buffer provided. - */ -#define __BA(t, h, o) ((void *)((h) + (o))) - -static __inline void -bus_space_read_region_1(bus_space_tag_t tag, bus_space_handle_t bsh, - bus_size_t offset, u_int8_t *addr, size_t count) -{ - volatile u_int8_t *s = __BA(tag, bsh, offset); - - while (count--) - *addr++ = *s++; - __asm __volatile("eieio; sync"); -} - -static __inline void -bus_space_read_region_2(bus_space_tag_t tag, bus_space_handle_t bsh, - bus_size_t offset, u_int16_t *addr, size_t count) -{ - volatile u_int16_t *s = __BA(tag, bsh, offset); - - while (count--) - __asm __volatile("lhbrx %0, 0, %1" : - "=r"(*addr++) : "r"(s++)); - __asm __volatile("eieio; sync"); -} - -static __inline void -bus_space_read_region_4(bus_space_tag_t tag, bus_space_handle_t bsh, - bus_size_t offset, u_int32_t *addr, size_t count) -{ - volatile u_int32_t *s = __BA(tag, bsh, offset); - - while (count--) - __asm __volatile("lwbrx %0, 0, %1" : - "=r"(*addr++) : "r"(s++)); - __asm __volatile("eieio; sync"); -} - -#if 0 /* Cause a link error for bus_space_read_region_8 */ -#define bus_space_read_region_8 !!! unimplemented !!! -#endif - - -/* - * void bus_space_write_region_N __P((bus_space_tag_t tag, - * bus_space_handle_t bsh, bus_size_t offset, - * const u_intN_t *addr, size_t count)); - * - * Write `count' 1, 2, 4, or 8 byte quantities from the buffer provided - * to bus space described by tag/handle starting at `offset'. - */ - -static __inline void -bus_space_write_region_1(bus_space_tag_t tag, bus_space_handle_t bsh, - bus_size_t offset, const u_int8_t *addr, size_t count) -{ - volatile u_int8_t *d = __BA(tag, bsh, offset); - - while (count--) - *d++ = *addr++; - __asm __volatile("eieio; sync"); -} - -static __inline void -bus_space_write_region_2(bus_space_tag_t tag, bus_space_handle_t bsh, - bus_size_t offset, const u_int16_t *addr, size_t count) -{ - volatile u_int16_t *d = __BA(tag, bsh, offset); - - while (count--) - __asm __volatile("sthbrx %0, 0, %1" :: - "r"(*addr++), "r"(d++)); - __asm __volatile("eieio; sync"); -} - -static __inline void -bus_space_write_region_4(bus_space_tag_t tag, bus_space_handle_t bsh, - bus_size_t offset, const u_int32_t *addr, size_t count) -{ - volatile u_int32_t *d = __BA(tag, bsh, offset); - - while (count--) - __asm __volatile("stwbrx %0, 0, %1" :: - "r"(*addr++), "r"(d++)); - __asm __volatile("eieio; sync"); -} - -#if 0 -#define bus_space_write_region_8 !!! bus_space_write_region_8 unimplemented !!! -#endif - -/* - * void bus_space_set_multi_N __P((bus_space_tag_t tag, - * bus_space_handle_t bsh, bus_size_t offset, u_intN_t val, - * size_t count)); - * - * Write the 1, 2, 4, or 8 byte value `val' to bus space described - * by tag/handle/offset `count' times. - */ -static __inline void bus_space_set_multi_1 __P((bus_space_tag_t, - bus_space_handle_t, bus_size_t, u_int8_t, size_t)); -static __inline void bus_space_set_multi_2 __P((bus_space_tag_t, - bus_space_handle_t, bus_size_t, u_int16_t, size_t)); -static __inline void bus_space_set_multi_4 __P((bus_space_tag_t, - bus_space_handle_t, bus_size_t, u_int32_t, size_t)); - -static __inline void -bus_space_set_multi_1(tag, bsh, offset, val, count) - bus_space_tag_t tag; - bus_space_handle_t bsh; - bus_size_t offset; - u_int8_t val; - size_t count; -{ - volatile u_int8_t *d = __BA(tag, bsh, offset); - - while (count--) - *d = val; - __asm__ volatile("eieio; sync"); -} - -static __inline void -bus_space_set_multi_2(tag, bsh, offset, val, count) - bus_space_tag_t tag; - bus_space_handle_t bsh; - bus_size_t offset; - u_int16_t val; - size_t count; -{ - volatile u_int16_t *d = __BA(tag, bsh, offset); - - while (count--) - __asm__ volatile("sthbrx %0, 0, %1" :: - "r"(val), "r"(d)); - __asm__ volatile("eieio; sync"); -} - -static __inline void -bus_space_set_multi_4(tag, bsh, offset, val, count) - bus_space_tag_t tag; - bus_space_handle_t bsh; - bus_size_t offset; - u_int32_t val; - size_t count; -{ - volatile u_int32_t *d = __BA(tag, bsh, offset); - - while (count--) - __asm__ volatile("stwbrx %0, 0, %1" :: - "r"(val), "r"(d)); - __asm__ volatile("eieio; sync"); -} - -#define bus_space_set_multi_8 !!! bus_space_set_multi_8 unimplemented !!! - -/* These are OpenBSD extensions to the general NetBSD bus interface. */ -void -bus_space_read_raw_multi_1(bus_space_tag_t bst, bus_space_handle_t bsh, - bus_addr_t ba, u_int8_t *dst, bus_size_t size); -void -bus_space_read_raw_multi_2(bus_space_tag_t bst, bus_space_handle_t bsh, - bus_addr_t ba, u_int8_t *dst, bus_size_t size); -void -bus_space_read_raw_multi_4(bus_space_tag_t bst, bus_space_handle_t bsh, - bus_addr_t ba, u_int8_t *dst, bus_size_t size); -#define bus_space_read_raw_multi_8 \ - !!! bus_space_read_raw_multi_8 not implemented !!! - -void -bus_space_write_raw_multi_1(bus_space_tag_t bst, bus_space_handle_t bsh, - bus_addr_t ba, const u_int8_t *src, bus_size_t size); -void -bus_space_write_raw_multi_2(bus_space_tag_t bst, bus_space_handle_t bsh, - bus_addr_t ba, const u_int8_t *src, bus_size_t size); -void -bus_space_write_raw_multi_4(bus_space_tag_t bst, bus_space_handle_t bsh, - bus_addr_t ba, const u_int8_t *src, bus_size_t size); -#define bus_space_write_raw_multi_8 \ - !!! bus_space_write_raw_multi_8 not implemented !!! - -void -bus_space_set_region_1 __P((void *v, bus_space_handle_t h, bus_size_t o, - u_int8_t val, bus_size_t c)); -void -bus_space_set_region_2 __P((void *v, bus_space_handle_t h, bus_size_t o, - u_int16_t val, bus_size_t c)); -void -bus_space_set_region_4 __P((void *v, bus_space_handle_t h, bus_size_t o, - u_int32_t val, bus_size_t c)); -#define bus_space_set_region_8 \ - !!! bus_space_write_raw_multi_8 not implemented !!! - -void -bus_space_copy_1 __P((void *v, bus_space_handle_t h1, bus_space_handle_t h2, - bus_size_t o1, bus_size_t o2, bus_size_t c)); -void -bus_space_copy_2 __P((void *v, bus_space_handle_t h1, bus_space_handle_t h2, - bus_size_t o1, bus_size_t o2, bus_size_t c)); -void -bus_space_copy_4 __P((void *v, bus_space_handle_t h1, bus_space_handle_t h2, - bus_size_t o1, bus_size_t o2, bus_size_t c)); -#define bus_space_copy_8 \ - !!! bus_space_write_raw_multi_8 not implemented !!! - -/* - * Bus read/write barrier methods. - * - * void bus_space_barrier __P((bus_space_tag_t tag, - * bus_space_handle_t bsh, bus_size_t offset, - * bus_size_t len, int flags)); - * - * Note: powerpc does not currently implement barriers, but we must - * provide the flags to MI code. - * the processor does have eieio which is effectively the barrier - * operator, however due to how memory is mapped this should? not - * be required. - */ -#define bus_space_barrier(t, h, o, l, f) \ - ((void)((void)(t), (void)(h), (void)(o), (void)(l), (void)(f))) -#define BUS_SPACE_BARRIER_READ 0x01 /* force read barrier */ -#define BUS_SPACE_BARRIER_WRITE 0x02 /* force write barrier */ -/* Compatibility defines */ -#define BUS_BARRIER_READ BUS_SPACE_BARRIER_READ -#define BUS_BARRIER_WRITE BUS_SPACE_BARRIER_WRITE - - -#define BUS_DMA_WAITOK 0x00 -#define BUS_DMA_NOWAIT 0x01 -#define BUS_DMA_ALLOCNOW 0x02 -#define BUS_DMAMEM_NOSYNC 0x04 -#define BUS_DMA_COHERENT 0x08 -#define BUS_DMA_BUS1 0x10 /* placeholders for bus functions... */ -#define BUS_DMA_BUS2 0x20 -#define BUS_DMA_BUS3 0x40 -#define BUS_DMA_BUS4 0x80 - -/* Forwards needed by prototypes below. */ -struct mbuf; -struct proc; -struct uio; - -typedef enum { - BUS_DMASYNC_POSTREAD, - BUS_DMASYNC_POSTWRITE, - BUS_DMASYNC_PREREAD, - BUS_DMASYNC_PREWRITE -} bus_dmasync_op_t; - -typedef struct powerpc_bus_dma_tag *bus_dma_tag_t; -typedef struct powerpc_bus_dmamap *bus_dmamap_t; - -/* - * bus_dma_segment_t - * - * Describes a single contiguous DMA transaction. Values - * are suitable for programming into DMA registers. - */ -struct powerpc_bus_dma_segment { - bus_addr_t ds_addr; /* DMA address */ - bus_size_t ds_len; /* length of transfer */ -}; -typedef struct powerpc_bus_dma_segment bus_dma_segment_t; - -/* - * bus_dma_tag_t - * - * A machine-dependent opaque type describing the implementation of - * DMA for a given bus. - */ - -struct powerpc_bus_dma_tag { - void *_cookie; /* cookie used in the guts */ - - /* - * DMA mapping methods. - */ - int (*_dmamap_create) __P((bus_dma_tag_t , bus_size_t, int, - bus_size_t, bus_size_t, int, bus_dmamap_t *)); - void (*_dmamap_destroy) __P((bus_dma_tag_t , bus_dmamap_t)); - int (*_dmamap_load) __P((bus_dma_tag_t , bus_dmamap_t, void *, - bus_size_t, struct proc *, int)); - int (*_dmamap_load_mbuf) __P((bus_dma_tag_t , bus_dmamap_t, - struct mbuf *, int)); - int (*_dmamap_load_uio) __P((bus_dma_tag_t , bus_dmamap_t, - struct uio *, int)); - int (*_dmamap_load_raw) __P((bus_dma_tag_t , bus_dmamap_t, - bus_dma_segment_t *, int, bus_size_t, int)); - void (*_dmamap_unload) __P((bus_dma_tag_t , bus_dmamap_t)); - void (*_dmamap_sync) __P((bus_dma_tag_t , bus_dmamap_t, bus_dmasync_op_t)); - - /* - * DMA memory utility functions. - */ - int (*_dmamem_alloc) __P((bus_dma_tag_t, bus_size_t, bus_size_t, - bus_size_t, bus_dma_segment_t *, int, int *, int)); - void (*_dmamem_free) __P((bus_dma_tag_t, bus_dma_segment_t *, int)); - int (*_dmamem_map) __P((bus_dma_tag_t, bus_dma_segment_t *, - int, size_t, caddr_t *, int)); - void (*_dmamem_unmap) __P((bus_dma_tag_t, caddr_t, size_t)); - paddr_t (*_dmamem_mmap) __P((bus_dma_tag_t, bus_dma_segment_t *, - int, off_t, int, int)); -}; - -#define bus_dmamap_create(t, s, n, m, b, f, p) \ - (*(t)->_dmamap_create)((t), (s), (n), (m), (b), (f), (p)) -#define bus_dmamap_destroy(t, p) \ - (*(t)->_dmamap_destroy)((t), (p)) -#define bus_dmamap_load(t, m, b, s, p, f) \ - (*(t)->_dmamap_load)((t), (m), (b), (s), (p), (f)) -#define bus_dmamap_load_mbuf(t, m, b, f) \ - (*(t)->_dmamap_load_mbuf)((t), (m), (b), (f)) -#define bus_dmamap_load_uio(t, m, u, f) \ - (*(t)->_dmamap_load_uio)((t), (m), (u), (f)) -#define bus_dmamap_load_raw(t, m, sg, n, s, f) \ - (*(t)->_dmamap_load_raw)((t), (m), (sg), (n), (s), (f)) -#define bus_dmamap_unload(t, p) \ - (*(t)->_dmamap_unload)((t), (p)) -#define bus_dmamap_sync(t, p, o) \ - (void)((t)->_dmamap_sync ? \ - (*(t)->_dmamap_sync)((t), (p), (o)) : (void)0) - -#define bus_dmamem_alloc(t, s, a, b, sg, n, r, f) \ - (*(t)->_dmamem_alloc)((t)->_cookie, (s), (a), (b), (sg), (n), (r), (f)) -#define bus_dmamem_free(t, sg, n) \ - (*(t)->_dmamem_free)((t)->_cookie, (sg), (n)) -#define bus_dmamem_map(t, sg, n, s, k, f) \ - (*(t)->_dmamem_map)((t)->_cookie, (sg), (n), (s), (k), (f)) -#define bus_dmamem_unmap(t, k, s) \ - (*(t)->_dmamem_unmap)((t)->_cookie, (k), (s)) -#define bus_dmamem_mmap(t, sg, n, o, p, f) \ - (*(t)->_dmamem_mmap)((t)->_cookie, (sg), (n), (o), (p), (f)) - -int _dmamap_create __P((bus_dma_tag_t, bus_size_t, int, - bus_size_t, bus_size_t, int, bus_dmamap_t *)); -void _dmamap_destroy __P((bus_dma_tag_t, bus_dmamap_t)); -int _dmamap_load __P((bus_dma_tag_t, bus_dmamap_t, void *, - bus_size_t, struct proc *, int)); -int _dmamap_load_mbuf __P((bus_dma_tag_t, bus_dmamap_t, struct mbuf *, int)); -int _dmamap_load_uio __P((bus_dma_tag_t, bus_dmamap_t, struct uio *, int)); -int _dmamap_load_raw __P((bus_dma_tag_t, bus_dmamap_t, - bus_dma_segment_t *, int, bus_size_t, int)); -void _dmamap_unload __P((bus_dma_tag_t, bus_dmamap_t)); -void _dmamap_sync __P((bus_dma_tag_t, bus_dmamap_t, bus_dmasync_op_t)); - -int _dmamem_alloc __P((bus_dma_tag_t, bus_size_t, bus_size_t, - bus_size_t, bus_dma_segment_t *, int, int *, int)); -void _dmamem_free __P((bus_dma_tag_t, bus_dma_segment_t *, int)); -int _dmamem_map __P((bus_dma_tag_t, bus_dma_segment_t *, - int, size_t, caddr_t *, int)); -void _dmamem_unmap __P((bus_dma_tag_t, caddr_t, size_t)); -paddr_t _dmamem_mmap __P((bus_dma_tag_t, bus_dma_segment_t *, int, off_t, int, int)); - -/* - * bus_dmamap_t - * - * Describes a DMA mapping. - */ -struct powerpc_bus_dmamap { - /* - * PRIVATE MEMBERS: not for use by machine-independent code. - */ - bus_size_t _dm_size; /* largest DMA transfer mappable */ - int _dm_segcnt; /* number of segs this map can map */ - bus_size_t _dm_maxsegsz; /* largest possible segment */ - bus_size_t _dm_boundary; /* don't cross this */ - int _dm_flags; /* misc. flags */ - - void *_dm_cookie; /* cookie for bus-specific functions */ - - /* - * PUBLIC MEMBERS: these are used by machine-independent code. - */ - int dm_nsegs; /* # valid segments in mapping */ - bus_dma_segment_t dm_segs[1]; /* segments; variable length */ -}; - -#endif /* _MACHINE_BUS_H_ */ diff --git a/sys/arch/powerpc/include/cdefs.h b/sys/arch/powerpc/include/cdefs.h index ccc21bdaf25..8238ad9bca9 100644 --- a/sys/arch/powerpc/include/cdefs.h +++ b/sys/arch/powerpc/include/cdefs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cdefs.h,v 1.2 1996/12/28 06:25:01 rahnds Exp $ */ +/* $OpenBSD: cdefs.h,v 1.3 2001/09/01 15:49:05 drahn Exp $ */ /* $NetBSD: cdefs.h,v 1.1 1996/09/30 16:34:21 ws Exp $ */ /* @@ -6,8 +6,8 @@ * Public domain. */ -#ifndef _MACHINE_CDEFS_H_ -#define _MACHINE_CDEFS_H_ +#ifndef _POWERPC_CDEFS_H_ +#define _POWERPC_CDEFS_H_ #ifdef __STDC__ #define _C_LABEL(x) _STRING(_ ## x) @@ -40,4 +40,4 @@ */ #endif -#endif /* !_MACHINE_CDEFS_H_ */ +#endif /* !_POWERPC_CDEFS_H_ */ diff --git a/sys/arch/powerpc/include/conf.h b/sys/arch/powerpc/include/conf.h deleted file mode 100644 index 91bf6266337..00000000000 --- a/sys/arch/powerpc/include/conf.h +++ /dev/null @@ -1,39 +0,0 @@ -/* $OpenBSD: conf.h,v 1.1 2001/06/25 00:04:42 drahn Exp $ */ -/* $NetBSD: conf.h,v 1.2 1996/05/05 19:28:34 christos Exp $ */ - -/* - * Copyright (c) 1996 Christos Zoulas. 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 Christos Zoulas. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/conf.h> - -#define mmread mmrw -#define mmwrite mmrw -cdev_decl(mm); - -cdev_decl(apm); diff --git a/sys/arch/powerpc/include/cpu.h b/sys/arch/powerpc/include/cpu.h index 9568ea5ac25..bc1341ed852 100644 --- a/sys/arch/powerpc/include/cpu.h +++ b/sys/arch/powerpc/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.7 2001/07/09 01:35:32 mickey Exp $ */ +/* $OpenBSD: cpu.h,v 1.8 2001/09/01 15:49:05 drahn Exp $ */ /* $NetBSD: cpu.h,v 1.1 1996/09/30 16:34:21 ws Exp $ */ /* @@ -31,8 +31,8 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _MACHINE_CPU_H_ -#define _MACHINE_CPU_H_ +#ifndef _POWERPC_CPU_H_ +#define _POWERPC_CPU_H_ #include <machine/frame.h> @@ -46,7 +46,6 @@ #define cpu_swapout(p) #define cpu_wait(p) -void child_return __P((struct proc *)); void delay __P((unsigned)); #define DELAY(n) delay(n) @@ -57,28 +56,6 @@ extern volatile int astpending; #define need_proftick(p) ((p)->p_flag |= P_OWEUPC, astpending = 1) #define signotify(p) (astpending = 1) -#define CACHELINESIZE 32 /* For now XXX */ - -static __inline void -syncicache(void *from, int len) -{ - int l = len; - char *p = from; - - do { - __asm__ __volatile__ ("dcbst 0,%0" :: "r"(p)); - p += CACHELINESIZE; - } while ((l -= CACHELINESIZE) > 0); - __asm__ __volatile__ ("sync"); - p = from; - l = len; - do { - __asm__ __volatile__ ("icbi 0,%0" :: "r"(p)); - p += CACHELINESIZE; - } while ((l -= CACHELINESIZE) > 0); - __asm__ __volatile__ ("isync"); -} - extern char *bootpath; -#endif /* _MACHINE_CPU_H_ */ +#endif /* _POWERPC_CPU_H_ */ diff --git a/sys/arch/powerpc/include/db_machdep.h b/sys/arch/powerpc/include/db_machdep.h deleted file mode 100644 index 879da1f742f..00000000000 --- a/sys/arch/powerpc/include/db_machdep.h +++ /dev/null @@ -1,103 +0,0 @@ -/* $OpenBSD: db_machdep.h,v 1.14 2001/08/19 19:06:46 miod Exp $ */ -/* $NetBSD: db_machdep.h,v 1.13 1996/04/29 20:50:08 leo Exp $ */ - -/* - * Mach Operating System - * Copyright (c) 1992 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - */ - -/* - * Machine-dependent defines for new kernel debugger. - */ -#ifndef _PPC_DB_MACHDEP_H_ -#define _PPC_DB_MACHDEP_H_ - -#include <sys/types.h> -#include <vm/vm_param.h> -#include <machine/trap.h> - -/* - * We use Elf64 symbols in DDB. - */ -#define DB_ELF_SYMBOLS -#define DB_ELFSIZE 32 - -typedef vm_offset_t db_addr_t; /* address - unsigned */ -typedef int db_expr_t; /* expression - signed */ -struct powerpc_saved_state { - struct trapframe tf; -}; -typedef struct powerpc_saved_state db_regs_t; -db_regs_t ddb_regs; /* register state */ -#define DDB_REGS (&ddb_regs) - -#define PC_REGS(regs) ((regs)->tf.srr0) - -#define BKPT_INST 0x7C810808 /* breakpoint instruction */ - -#define BKPT_SIZE (4) /* size of breakpoint inst */ -#define BKPT_SET(inst) (BKPT_INST) - -#define FIXUP_PC_AFTER_BREAK(regs) ((regs)->tf.srr0 -= 4) - -#define SR_SINGLESTEP 0x8000 -#define db_clear_single_step(regs) ((regs)->tf.srr1 &= ~SR_SINGLESTEP) -#define db_set_single_step(regs) ((regs)->tf.srr1 |= SR_SINGLESTEP) - -#define T_BREAKPOINT 0xffff -#define IS_BREAKPOINT_TRAP(type, code) ((type) == T_BREAKPOINT) - -#ifdef T_WATCHPOINT -#define IS_WATCHPOINT_TRAP(type, code) ((type) == T_WATCHPOINT) -#else -#define IS_WATCHPOINT_TRAP(type, code) 0 -#endif - -#define M_RTS 0xfc0007fe -#define I_RTS 0x4c000020 -#define M_BC 0xfc000000 -#define I_BC 0x40000000 -#define M_B 0xfc000000 -#define I_B 0x50000000 -#define M_RFI 0xfc0007fe -#define I_RFI 0x4c000064 - -#define inst_trap_return(ins) (((ins)&M_RFI) == I_RFI) -#define inst_return(ins) (((ins)&M_RTS) == I_RTS) -#define inst_call(ins) (((ins)&M_BC ) == I_BC || \ - ((ins)&M_B ) == I_B ) -#define inst_load(ins) 0 -#define inst_store(ins) 0 - -#ifdef _KERNEL - -void kdb_kintr __P((void *)); -int kdb_trap __P((int, void *)); -void db_save_regs(struct trapframe *frame); -void ddb_trap __P((void)); -db_expr_t db_dumpframe __P((u_int32_t pframe)); - -#endif /* _KERNEL */ - -#endif /* _PPC_DB_MACHDEP_H_ */ diff --git a/sys/arch/powerpc/include/disklabel.h b/sys/arch/powerpc/include/disklabel.h deleted file mode 100644 index 3ec45cd4b23..00000000000 --- a/sys/arch/powerpc/include/disklabel.h +++ /dev/null @@ -1,166 +0,0 @@ -/* $OpenBSD: disklabel.h,v 1.15 2001/06/24 04:54:21 drahn Exp $ */ - -/* - * Copyright (c) 1994 Christopher G. Demetriou - * 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 Christopher G. Demetriou. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _MACHINE_DISKLABEL_H_ -#define _MACHINE_DISKLABEL_H_ - -#define LABELSECTOR 1 /* sector containing label */ -#define LABELOFFSET 0 /* offset of label in sector */ -#define MAXPARTITIONS 16 /* number of partitions */ -#define RAW_PART 2 /* raw partition: ie. rsd0c */ - -/* MBR partition table */ -#define DOSBBSECTOR 0 /* MBR sector number */ -#define DOSPARTOFF 446 /* Offset of MBR partition table */ -#define NDOSPART 4 /* # of partitions in MBR */ -#define DOSMAGICOFF 510 /* Offset of magic number */ -#define DOSMAGIC 0xaa55 /* Actual magic number */ -#define MBRMAGIC DOSMAGIC -#define DOSMBR_SIGNATURE MBRMAGIC -#define DOSMBR_SIGNATURE_OFF DOSMAGICOFF -#define DOSACTIVE 0x80 - -struct dos_partition { - unsigned char dp_flag; /* default boot flag */ - unsigned char dp_shd; /* start head, IsN't Always Meaningful */ - unsigned char dp_ssect; /* start sector, INAM */ - unsigned char dp_scyl; /* start cylinder, INAM */ - unsigned char dp_typ; /* partition type */ - unsigned char dp_ehd; /* end head, INAM */ - unsigned char dp_esect; /* end sector, INAM */ - unsigned char dp_ecyl; /* end cylinder, INAM */ - unsigned long dp_start; /* absolute start sector number */ - unsigned long dp_size; /* partition size in sectors */ -}; - -/* Known DOS partition types. */ -#define DOSPTYP_UNUSED 0x00 /* Unused partition */ -#define DOSPTYP_FAT12 0x01 /* 12-bit FAT */ -#define DOSPTYP_FAT16S 0x04 /* 16-bit FAT, less than 32M */ -#define DOSPTYP_EXTEND 0x05 /* Extended; contains sub-partitions */ -#define DOSPTYP_FAT16B 0x06 /* 16-bit FAT, more than 32M */ -#define DOSPTYP_FAT32 0x0b /* 32-bit FAT */ -#define DOSPTYP_FAT32L 0x0c /* 32-bit FAT, LBA-mapped */ -#define DOSPTYP_FAT16C 0x0e /* 16-bit FAT, CHS-mapped */ -#define DOSPTYP_EXTENDL 0x0f /* Extended, LBA-mapped; contains sub-partitions */ -#define DOSPTYP_ONTRACK 0x54 -#define DOSPTYP_LINUX 0x83 /* That other thing */ -#define DOSPTYP_FREEBSD 0xa5 /* FreeBSD partition type */ -#define DOSPTYP_OPENBSD 0xa6 /* OpenBSD partition type */ -#define DOSPTYP_NETBSD 0xa9 /* NetBSD partition type */ - -#include <sys/dkbad.h> - -/* Isolate the relevant bits to get sector and cylinder. */ -#define DPSECT(s) ((s) & 0x3f) -#define DPCYL(c, s) ((c) + (((s) & 0xc0) << 2)) - -static __inline u_int32_t get_le __P((void *p)); - -static __inline u_int32_t -#ifdef __cplusplus -get_le(void *p) -#else -get_le(p) - void *p; -#endif -{ - u_int8_t *_p = (u_int8_t *)p; - int x; - x = _p[0]; - x |= _p[1] << 8; - x |= _p[2] << 16; - x |= _p[3] << 24; - return x; -} - -/* HFS/DPME */ - -/* partition map structure from Inside Macintosh: Devices, SCSI Manager - * pp. 13-14. The partition map always begins on physical block 1. - * - * With the exception of block 0, all blocks on the disk must belong to - * exactly one partition. The partition map itself belongs to a partition - * of type `APPLE_PARTITION_MAP', and is not limited in size by anything - * other than available disk space. The partition map is not necessarily - * the first partition listed. - */ -struct part_map_entry { -#define PART_ENTRY_MAGIC 0x504d - u_int16_t pmSig; /* partition signature */ - u_int16_t pmSigPad; /* (reserved) */ - u_int32_t pmMapBlkCnt; /* number of blocks in partition map */ - u_int32_t pmPyPartStart; /* first physical block of partition */ - u_int32_t pmPartBlkCnt; /* number of blocks in partition */ - char pmPartName[32]; /* partition name */ - char pmPartType[32]; /* partition type */ - u_int32_t pmLgDataStart; /* first logical block of data area */ - u_int32_t pmDataCnt; /* number of blocks in data area */ - u_int32_t pmPartStatus; /* partition status information */ - u_int32_t pmLgBootStart; /* first logical block of boot code */ - u_int32_t pmBootSize; /* size of boot code, in bytes */ - u_int32_t pmBootLoad; /* boot code load address */ - u_int32_t pmBootLoad2; /* (reserved) */ - u_int32_t pmBootEntry; /* boot code entry point */ - u_int32_t pmBootEntry2; /* (reserved) */ - u_int32_t pmBootCksum; /* boot code checksum */ - char pmProcessor[16]; /* processor type (e.g. "68020") */ - u_int8_t pmBootArgs[128]; /* A/UX boot arguments */ - /* we do not index the disk image as an array, - * leave out the on disk padding - */ -#if 0 - u_int8_t pad[248]; /* pad to end of block */ -#endif -}; - -#define PART_TYPE_DRIVER "APPLE_DRIVER" -#define PART_TYPE_DRIVER43 "APPLE_DRIVER43" -#define PART_TYPE_DRIVERATA "APPLE_DRIVER_ATA" -#define PART_TYPE_DRIVERIOKIT "APPLE_DRIVER_IOKIT" -#define PART_TYPE_FWDRIVER "APPLE_FWDRIVER" -#define PART_TYPE_FWB_COMPONENT "FWB DRIVER COMPONENTS" -#define PART_TYPE_FREE "APPLE_FREE" -#define PART_TYPE_MAC "APPLE_HFS" -#define PART_TYPE_OPENBSD "OPENBSD" - - -struct cpu_disklabel { - struct dos_partition dosparts[NDOSPART]; - /* only store first entry and openbsd partition */ - struct part_map_entry macparts[2]; - struct dkbad bad; -}; - -#define DKBAD(x) ((x)->bad) - -#endif /* _MACHINE_DISKLABEL_H_ */ diff --git a/sys/arch/powerpc/include/exec.h b/sys/arch/powerpc/include/exec.h index 5bb05a8ccfa..f7d7fc79973 100644 --- a/sys/arch/powerpc/include/exec.h +++ b/sys/arch/powerpc/include/exec.h @@ -1,4 +1,4 @@ -/* $OpenBSD: exec.h,v 1.6 2001/01/22 14:51:06 art Exp $ */ +/* $OpenBSD: exec.h,v 1.7 2001/09/01 15:49:05 drahn Exp $ */ /* * Copyright (c) 1997 Per Fogelstrom, Opsycon AB. @@ -30,11 +30,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: exec.h,v 1.6 2001/01/22 14:51:06 art Exp $ + * $Id: exec.h,v 1.7 2001/09/01 15:49:05 drahn Exp $ */ -#ifndef _MACHINE_EXEC_H_ -#define _MACHINE_EXEC_H_ +#ifndef _POWERPC_EXEC_H_ +#define _POWERPC_EXEC_H_ #define __LDPGSZ 4096 /* linker page size */ @@ -54,4 +54,4 @@ #define _KERN_DO_ELF -#endif /* _MACHINE_EXEC_H_ */ +#endif /* _POWERPC_EXEC_H_ */ diff --git a/sys/arch/powerpc/include/float.h b/sys/arch/powerpc/include/float.h index 9067ea0926e..ac0586aa93f 100644 --- a/sys/arch/powerpc/include/float.h +++ b/sys/arch/powerpc/include/float.h @@ -1,4 +1,4 @@ -/* $OpenBSD: float.h,v 1.4 1997/10/13 10:53:43 pefo Exp $ */ +/* $OpenBSD: float.h,v 1.5 2001/09/01 15:49:05 drahn Exp $ */ /* * Copyright (c) 1989 Regents of the University of California. @@ -35,8 +35,8 @@ * @(#)float.h 7.1 (Berkeley) 5/8/90 */ -#ifndef _MACHINE_FLOAT_H_ -#define _MACHINE_FLOAT_H_ +#ifndef _POWERPC_FLOAT_H_ +#define _POWERPC_FLOAT_H_ #include <sys/cdefs.h> @@ -77,4 +77,4 @@ __END_DECLS #define LDBL_MAX DBL_MAX #define LDBL_MAX_10_EXP DBL_MAX_10_EXP -#endif /* _MACHINE_FLOAT_H_ */ +#endif /* _POWERPC_FLOAT_H_ */ diff --git a/sys/arch/powerpc/include/fpu.h b/sys/arch/powerpc/include/fpu.h index 67f38f0bfdc..b845691b37a 100644 --- a/sys/arch/powerpc/include/fpu.h +++ b/sys/arch/powerpc/include/fpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: fpu.h,v 1.4 2001/06/24 05:07:13 drahn Exp $ */ +/* $OpenBSD: fpu.h,v 1.5 2001/09/01 15:49:05 drahn Exp $ */ /*- * Copyright (C) 1996 Wolfgang Solfrank. @@ -30,8 +30,8 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _MACHINE_FPU_H_ -#define _MACHINE_FPU_H_ +#ifndef _POWERPC_FPU_H_ +#define _POWERPC_FPU_H_ #define FPCSR_FX 0x80000000 #define FPCSR_FEX 0x40000000 @@ -68,4 +68,4 @@ void enable_fpu(struct proc *p); void save_fpu(struct proc *p); -#endif /* _MACHINE_FPU_H_ */ +#endif /* _POWERPC_FPU_H_ */ diff --git a/sys/arch/powerpc/include/frame.h b/sys/arch/powerpc/include/frame.h index 4d958a3ce28..d7628de7cbd 100644 --- a/sys/arch/powerpc/include/frame.h +++ b/sys/arch/powerpc/include/frame.h @@ -1,4 +1,4 @@ -/* $OpenBSD: frame.h,v 1.4 1997/10/13 10:53:44 pefo Exp $ */ +/* $OpenBSD: frame.h,v 1.5 2001/09/01 15:49:05 drahn Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -30,8 +30,8 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _MACHINE_FRAME_H_ -#define _MACHINE_FRAME_H_ +#ifndef _POWERPC_FRAME_H_ +#define _POWERPC_FRAME_H_ #include <machine/types.h> @@ -73,4 +73,4 @@ struct sigframe { struct sigcontext sf_sc; siginfo_t sf_si; }; -#endif /* _MACHINE_FRAME_H_ */ +#endif /* _POWERPC_FRAME_H_ */ diff --git a/sys/arch/powerpc/include/ieeefp.h b/sys/arch/powerpc/include/ieeefp.h index 96336de4963..98aacf621c6 100644 --- a/sys/arch/powerpc/include/ieeefp.h +++ b/sys/arch/powerpc/include/ieeefp.h @@ -1,11 +1,11 @@ -/* $OpenBSD: ieeefp.h,v 1.3 2001/03/29 18:52:19 drahn Exp $ */ +/* $OpenBSD: ieeefp.h,v 1.4 2001/09/01 15:49:05 drahn Exp $ */ /* * Written by J.T. Conklin, Apr 6, 1995 * Public domain. */ -#ifndef _MACHINE_IEEEFP_H_ -#define _MACHINE_IEEEFP_H_ +#ifndef _POWERPC_IEEEFP_H_ +#define _POWERPC_IEEEFP_H_ typedef int fp_except; #define FP_X_IMP 0x01 /* imprecise (loss of precision) */ @@ -21,4 +21,4 @@ typedef enum { FP_RP=3 /* round toward positive infinity */ } fp_rnd; -#endif /* _MACHINE_IEEEFP_H_ */ +#endif /* _POWERPC_IEEEFP_H_ */ diff --git a/sys/arch/powerpc/include/intr.h b/sys/arch/powerpc/include/intr.h index 32b18dd0f86..0618a585495 100644 --- a/sys/arch/powerpc/include/intr.h +++ b/sys/arch/powerpc/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.11 2001/06/24 23:26:29 drahn Exp $ */ +/* $OpenBSD: intr.h,v 1.12 2001/09/01 15:49:05 drahn Exp $ */ /* * Copyright (c) 1997 Per Fogelstrom, Opsycon AB and RTMX Inc, USA. @@ -32,8 +32,8 @@ * */ -#ifndef _MACHINE_INTR_H_ -#define _MACHINE_INTR_H_ +#ifndef _POWERPC_INTR_H_ +#define _POWERPC_INTR_H_ #define IPL_BIO 0 #define IPL_NET 1 @@ -167,4 +167,4 @@ void softnet(int isr); #endif /* _LOCORE */ -#endif /* _MACHINE_INTR_H_ */ +#endif /* _POWERPC_INTR_H_ */ diff --git a/sys/arch/powerpc/include/ipkdb.h b/sys/arch/powerpc/include/ipkdb.h index d677e74192c..6977f908323 100644 --- a/sys/arch/powerpc/include/ipkdb.h +++ b/sys/arch/powerpc/include/ipkdb.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ipkdb.h,v 1.3 1997/10/13 10:53:46 pefo Exp $ */ +/* $OpenBSD: ipkdb.h,v 1.4 2001/09/01 15:49:05 drahn Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. diff --git a/sys/arch/powerpc/include/kbio.h b/sys/arch/powerpc/include/kbio.h deleted file mode 100644 index d6a3e38edf2..00000000000 --- a/sys/arch/powerpc/include/kbio.h +++ /dev/null @@ -1,118 +0,0 @@ -/* $OpenBSD: kbio.h,v 1.1 1998/09/27 03:55:57 rahnds Exp $ */ -/* $NetBSD: kbio.h,v 1.1 1996/04/12 01:45:45 cgd Exp $ */ - -/* - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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, Lawrence Berkeley Laboratory. - * - * 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. - * - * @(#)kbio.h 8.1 (Berkeley) 6/11/93 - */ - -#if 0 /* XXX */ -/* - * The following is a minimal emulation of Sun's `kio' structures - * and related operations necessary to make X11 happy (i.e., make it - * compile, and make old X11 binaries run). - */ - -/* - * The kiockey structure apparently gets and/or sets keyboard mappings. - * It seems to be kind of useless, but X11 uses it (according to the - * comments) to figure out when a Sun 386i has a type-4 keyboard but - * claims to have a type-3 keyboard. We need just enough to cause the - * appropriate ioctl to return the appropriate magic value. - * - * KIOCGETKEY fills in kio_entry from kio_station. Not sure what tablemask - * is for; X sets it before the call, so it is not an output, but we do not - * care anyway. KIOCSDIRECT is supposed to tell the kernel whether to send - * keys to the console or to X; we just send them to X whenever the keyboard - * is open at all. (XXX may need to change this later) - * - * Keyboard commands and types are defined in kbd.h as they are actually - * real hardware commands and type numbers. - */ -struct okiockey { /* Out-dated key translation structure */ - int kio_tablemask; /* whatever */ - u_char kio_station; /* key number */ - u_char kio_entry; /* HOLE if not present */ - char kio_text[10]; /* the silly escape sequences (unsupported) */ -}; - -struct kiockey { - int kio_tablemask; /* whatever */ - u_char kio_station; /* key number */ - u_short kio_entry; /* HOLE if not present */ - char kio_text[10]; /* the silly escape sequences (unsupported) */ -}; - -/* - * Values for kio_tablemask. These determine which table to read/modify - * in KIOC[SG]KEY ioctls. Currently, we only have "non-shift" and "shift" - * tables. - */ -#define KIOC_NOMASK 0x0 -#define KIOC_CAPSMASK 0x1 -#define KIOC_SHIFTMASK 0xe -#define KIOC_CTRLMASK 0x30 -#define KIOC_ALTGMASK 0x200 -#define KIOC_NUMLMASK 0x800 - -#define HOLE 0x302 /* value for kio_entry to say `really type 3' */ - -#define KIOCTRANS _IOW('k', 0, int) /* set translation mode */ - /* (we only accept TR_UNTRANS_EVENT) */ -#define KIOCGETKEY _IOWR('k', 2, struct okiockey) /* fill in kio_entry */ -#define KIOCGTRANS _IOR('k', 5, int) /* get translation mode */ -#define KIOCCMD _IOW('k', 8, int) /* X uses this to ring bell */ -#define KIOCTYPE _IOR('k', 9, int) /* get keyboard type */ -#endif /* 0 XXX */ -#define KIOCSDIRECT _IOW('k', 10, int) /* keys to console? */ -#if 0 /* XXX */ -#define KIOCSKEY _IOW('k', 12, struct kiockey) /* set xlat mode */ -#define KIOCGKEY _IOWR('k', 13, struct kiockey) /* get xlat mode */ -#define KIOCLAYOUT _IOR('k', 20, int) /* get keyboard layout */ -#define KIOCSLED _IOW('k', 14, char) /* set LED state */ -#define KIOCGLED _IOR('k', 15, char) /* get LED state */ - -#define TR_NONE 0 /* X compat, unsupported */ -#define TR_ASCII 1 /* X compat, unsupported */ -#define TR_EVENT 2 /* X compat, unsupported */ -#define TR_UNTRANS_EVENT 3 -#endif /* 0 XXX */ diff --git a/sys/arch/powerpc/include/kcore.h b/sys/arch/powerpc/include/kcore.h index cf947ae0fc8..a85d9390d51 100644 --- a/sys/arch/powerpc/include/kcore.h +++ b/sys/arch/powerpc/include/kcore.h @@ -1,4 +1,4 @@ -/* $OpenBSD: kcore.h,v 1.2 1996/12/28 06:25:15 rahnds Exp $ */ +/* $OpenBSD: kcore.h,v 1.3 2001/09/01 15:49:05 drahn Exp $ */ /* $NetBSD: kcore.h,v 1.1 1996/09/30 16:34:26 ws Exp $ */ /*- @@ -32,8 +32,8 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _MACHINE_KCORE_H_ -#define _MACHINE_KCORE_H_ +#ifndef _POWERPC_KCORE_H_ +#define _POWERPC_KCORE_H_ #define NPHYS_RAM_SEGS 4 @@ -43,4 +43,4 @@ typedef struct cpu_kcore_hdr { phys_ram_seg_t ram_segs[NPHYS_RAM_SEGS]; } cpu_kcore_hdr_t; -#endif /* _MACHINE_KCORE_H_ */ +#endif /* _POWERPC_KCORE_H_ */ diff --git a/sys/arch/powerpc/include/limits.h b/sys/arch/powerpc/include/limits.h index b112768cb12..8b7a8659981 100644 --- a/sys/arch/powerpc/include/limits.h +++ b/sys/arch/powerpc/include/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.8 2000/07/31 20:06:03 millert Exp $ */ +/* $OpenBSD: limits.h,v 1.9 2001/09/01 15:49:05 drahn Exp $ */ /* $NetBSD: limits.h,v 1.1 1996/09/30 16:34:28 ws Exp $ */ /*- @@ -32,8 +32,8 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _MACHINE_LIMITS_H_ -#define _MACHINE_LIMITS_H_ +#ifndef _POWERPC_LIMITS_H_ +#define _POWERPC_LIMITS_H_ #define CHAR_BIT 8 /* bits per char */ #define MB_LEN_MAX 1 /* no multibyte characters */ @@ -85,4 +85,4 @@ #define FLT_MAX 3.40282347E+38F #define FLT_MIN 1.17549435E-38F #endif -#endif /* _MACHINE_LIMITS_H_ */ +#endif /* _POWERPC_LIMITS_H_ */ diff --git a/sys/arch/powerpc/include/loadfile_machdep.h b/sys/arch/powerpc/include/loadfile_machdep.h deleted file mode 100644 index 617fdc1e2d2..00000000000 --- a/sys/arch/powerpc/include/loadfile_machdep.h +++ /dev/null @@ -1,57 +0,0 @@ -/* $OpenBSD: loadfile_machdep.h,v 1.2 2001/07/04 08:38:48 niklas 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation 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 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) -#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) diff --git a/sys/arch/powerpc/include/param.h b/sys/arch/powerpc/include/param.h index 8de202ada69..9d4ce5045c4 100644 --- a/sys/arch/powerpc/include/param.h +++ b/sys/arch/powerpc/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.17 2001/07/09 02:14:05 mickey Exp $ */ +/* $OpenBSD: param.h,v 1.18 2001/09/01 15:49:05 drahn Exp $ */ /* $NetBSD: param.h,v 1.1 1996/09/30 16:34:28 ws Exp $ */ /*- @@ -32,18 +32,18 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef _POWERPC_PARAM_H_ +#define _POWERPC_PARAM_H_ + #ifdef _KERNEL #ifndef _LOCORE #include <machine/cpu.h> #endif /* _LOCORE */ #endif - /* * Machine dependent constants for PowerPC (32-bit only currently) */ -#define MACHINE "powerpc" -#define _MACHINE powerpc #define MACHINE_ARCH "powerpc" #define _MACHINE_ARCH powerpc @@ -68,8 +68,6 @@ #define UPAGES 4 #define USPACE (UPAGES * NBPG) -#define KERNBASE 0x100000 - /* * Constants related to network buffer management. * MCLBYTES must be no larger than the software page size, and, @@ -90,15 +88,6 @@ #endif #endif -#define MSGBUFSIZE (NBPG*2) - -/* - * Size of kernel malloc arena in logical pages. - */ -#ifndef NKMEMCLUSTERS -#define NKMEMCLUSTERS (16 * 1024 * 1024 / PAGE_SIZE) -#endif - /* * pages ("clicks") to disk blocks */ @@ -137,8 +126,6 @@ #define EMPTY_SEGMENT 0xfffff0 #define USER_ADDR ((void *)(USER_SR << ADDR_SR_SHFT)) -#define __COMPAT_OLD_TIMEOUTS - /* * Some system constants */ @@ -150,3 +137,5 @@ * Temporary kludge till we do (ov)bcopy in assembler */ #define ovbcopy bcopy + +#endif /* _POWERPC_PARAM_H_ */ diff --git a/sys/arch/powerpc/include/pcb.h b/sys/arch/powerpc/include/pcb.h index 1229b0b1168..dabc3d740c5 100644 --- a/sys/arch/powerpc/include/pcb.h +++ b/sys/arch/powerpc/include/pcb.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcb.h,v 1.5 2001/06/29 06:07:09 drahn Exp $ */ +/* $OpenBSD: pcb.h,v 1.6 2001/09/01 15:49:05 drahn Exp $ */ /* $NetBSD: pcb.h,v 1.1 1996/09/30 16:34:29 ws Exp $ */ /*- @@ -31,8 +31,8 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _MACHINE_PCB_H_ -#define _MACHINE_PCB_H_ +#ifndef _POWERPC_PCB_H_ +#define _POWERPC_PCB_H_ #include <machine/reg.h> @@ -69,4 +69,4 @@ extern struct pmap *curpm; extern struct proc *fpuproc; int setfault __P((faultbuf env)); #endif -#endif /* _MACHINE_PCB_H_ */ +#endif /* _POWERPC_PCB_H_ */ diff --git a/sys/arch/powerpc/include/pio.h b/sys/arch/powerpc/include/pio.h index b58a7a20b68..25331fdc954 100644 --- a/sys/arch/powerpc/include/pio.h +++ b/sys/arch/powerpc/include/pio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pio.h,v 1.6 2001/06/29 06:07:09 drahn Exp $ */ +/* $OpenBSD: pio.h,v 1.7 2001/09/01 15:49:05 drahn Exp $ */ /* * Copyright (c) 1997 Per Fogelstrom, Opsycon AB and RTMX Inc, USA. @@ -32,8 +32,8 @@ * */ -#ifndef _MACHINE_PIO_H_ -#define _MACHINE_PIO_H_ +#ifndef _POWERPC_PIO_H_ +#define _POWERPC_PIO_H_ /* * I/O macros. */ @@ -178,4 +178,4 @@ __flash_led(bits, count) } #endif /* DEBUG */ -#endif /*_MACHINE_PIO_H_*/ +#endif /*_POWERPC_PIO_H_*/ diff --git a/sys/arch/powerpc/include/pmap.h b/sys/arch/powerpc/include/pmap.h index 0040d215477..dd41a91007e 100644 --- a/sys/arch/powerpc/include/pmap.h +++ b/sys/arch/powerpc/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.17 2001/08/18 20:50:18 art Exp $ */ +/* $OpenBSD: pmap.h,v 1.18 2001/09/01 15:49:05 drahn Exp $ */ /* $NetBSD: pmap.h,v 1.1 1996/09/30 16:34:29 ws Exp $ */ /*- @@ -32,8 +32,8 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _MACHINE_PMAP_H_ -#define _MACHINE_PMAP_H_ +#ifndef _POWERPC_PMAP_H_ +#define _POWERPC_PMAP_H_ #include <machine/pte.h> @@ -106,4 +106,4 @@ paddr_t vtophys __P((vaddr_t)); #endif /* _KERNEL */ #endif /* _LOCORE */ -#endif /* _MACHINE_PMAP_H_ */ +#endif /* _POWERPC_PMAP_H_ */ diff --git a/sys/arch/powerpc/include/powerpc.h b/sys/arch/powerpc/include/powerpc.h deleted file mode 100644 index 731c7fd1da8..00000000000 --- a/sys/arch/powerpc/include/powerpc.h +++ /dev/null @@ -1,86 +0,0 @@ -/* $OpenBSD: powerpc.h,v 1.6 2001/06/29 06:07:09 drahn Exp $ */ -/* $NetBSD: powerpc.h,v 1.1 1996/09/30 16:34:30 ws Exp $ */ - -/* - * Copyright (C) 1996 Wolfgang Solfrank. - * Copyright (C) 1996 TooLs GmbH. - * 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 TooLs GmbH. - * 4. The name of TooLs GmbH may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``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 TOOLS GMBH 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 _MACHINE_POWERPC_H_ -#define _MACHINE_POWERPC_H_ - -struct mem_region { - vm_offset_t start; - vm_size_t size; -}; - -void mem_regions __P((struct mem_region **, struct mem_region **)); - -/* - * These two functions get used solely in boot() in machdep.c. - * - * Not sure whether boot itself should be implementation dependent instead. XXX - */ -typedef void (exit_f) __P((void)) /*__attribute__((__noreturn__))*/ ; -typedef void (boot_f) __P((char *bootspec)) /* __attribute__((__noreturn__))*/ ; -typedef void (vmon_f) __P((void)); - -/* firmware interface. - * regardless of type of firmware used several items - * are need from firmware to boot up. - * these include: - * memory information - * vmsetup for firmware calls. - * default character print mechanism ??? - * firmware exit (return) - * firmware boot (reset) - * vmon - tell firmware the bsd vm is active. - */ - -typedef void (mem_regions_f)__P((struct mem_region **memp, - struct mem_region **availp)); - -struct firmware { - mem_regions_f *mem_regions; - exit_f *exit; - boot_f *boot; - vmon_f *vmon; - -#ifdef FW_HAS_PUTC - boot_f *putc; -#endif -}; -extern struct firmware *fw; -void ofwconprobe(void); -int ppc_open_pci_bridge __P((void)); -void ppc_close_pci_bridge __P((int)); -void install_extint __P((void (*handler) (void))); -void ppc_intr_enable __P((int enable)); -int ppc_intr_disable __P((void)); - -#endif /* _MACHINE_POWERPC_H_ */ diff --git a/sys/arch/powerpc/include/proc.h b/sys/arch/powerpc/include/proc.h index dee3238977d..1582ddd1a12 100644 --- a/sys/arch/powerpc/include/proc.h +++ b/sys/arch/powerpc/include/proc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.h,v 1.2 1996/12/28 06:25:22 rahnds Exp $ */ +/* $OpenBSD: proc.h,v 1.3 2001/09/01 15:49:05 drahn Exp $ */ /* $NetBSD: proc.h,v 1.1 1996/09/30 16:34:31 ws Exp $ */ /*- @@ -32,9 +32,14 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef _POWERPC_PROC_H_ +#define _POWERPC_PROC_H_ + /* * Machine-dependent part of the proc structure */ struct mdproc { int dummy; }; + +#endif /* _POWERPC_PROC_H_ */ diff --git a/sys/arch/powerpc/include/psl.h b/sys/arch/powerpc/include/psl.h index be357039b71..1bf401927b8 100644 --- a/sys/arch/powerpc/include/psl.h +++ b/sys/arch/powerpc/include/psl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: psl.h,v 1.3 1997/10/13 10:53:48 pefo Exp $ */ +/* $OpenBSD: psl.h,v 1.4 2001/09/01 15:49:05 drahn Exp $ */ /* $NetBSD: psl.h,v 1.1 1996/09/30 16:34:32 ws Exp $ */ /* @@ -31,8 +31,8 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _MACHINE_PSL_H_ -#define _MACHINE_PSL_H_ +#ifndef _POWERPC_PSL_H_ +#define _POWERPC_PSL_H_ /* * Flags in MSR: @@ -74,4 +74,4 @@ #include <machine/intr.h> -#endif /* _MACHINE_PSL_H_ */ +#endif /* _POWERPC_PSL_H_ */ diff --git a/sys/arch/powerpc/include/pte.h b/sys/arch/powerpc/include/pte.h index 522dea54ac2..9775dc3b183 100644 --- a/sys/arch/powerpc/include/pte.h +++ b/sys/arch/powerpc/include/pte.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pte.h,v 1.2 1996/12/28 06:25:25 rahnds Exp $ */ +/* $OpenBSD: pte.h,v 1.3 2001/09/01 15:49:05 drahn Exp $ */ /* $NetBSD: pte.h,v 1.1 1996/09/30 16:34:32 ws Exp $ */ /*- @@ -32,8 +32,8 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _MACHINE_PTE_H_ -#define _MACHINE_PTE_H_ +#ifndef _POWERPC_PTE_H_ +#define _POWERPC_PTE_H_ #include <sys/queue.h> @@ -110,4 +110,4 @@ extern u_int dsisr __P((void)); extern vm_offset_t dar __P((void)); #endif /* _KERNEL */ #endif /* _LOCORE */ -#endif /* _MACHINE_PTE_H_ */ +#endif /* _POWERPC_PTE_H_ */ diff --git a/sys/arch/powerpc/include/signal.h b/sys/arch/powerpc/include/signal.h index cec57b43580..46067127310 100644 --- a/sys/arch/powerpc/include/signal.h +++ b/sys/arch/powerpc/include/signal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: signal.h,v 1.3 1997/02/18 15:54:27 rahnds Exp $ */ +/* $OpenBSD: signal.h,v 1.4 2001/09/01 15:49:05 drahn Exp $ */ /* $NetBSD: signal.h,v 1.1 1996/09/30 16:34:34 ws Exp $ */ /* @@ -31,8 +31,8 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _MACHINE_SIGNAL_H_ -#define _MACHINE_SIGNAL_H_ +#ifndef _POWERPC_SIGNAL_H_ +#define _POWERPC_SIGNAL_H_ typedef int sig_atomic_t; @@ -65,4 +65,4 @@ struct sigcontext { int sc_mask; /* saved signal mask */ struct trapframe sc_frame; /* saved registers */ }; -#endif /* _MACHINE_SIGNAL_H_ */ +#endif /* _POWERPC_SIGNAL_H_ */ diff --git a/sys/arch/powerpc/include/spinlock.h b/sys/arch/powerpc/include/spinlock.h index 16e1f34312c..9058f266343 100644 --- a/sys/arch/powerpc/include/spinlock.h +++ b/sys/arch/powerpc/include/spinlock.h @@ -1,7 +1,7 @@ -/* $OpenBSD: spinlock.h,v 1.1 1999/01/08 08:25:36 d Exp $ */ +/* $OpenBSD: spinlock.h,v 1.2 2001/09/01 15:49:05 drahn Exp $ */ -#ifndef _MACHINE_SPINLOCK_H_ -#define _MACHINE_SPINLOCK_H_ +#ifndef _POWERPC_SPINLOCK_H_ +#define _POWERPC_SPINLOCK_H_ #define _SPINLOCK_UNLOCKED (0) #define _SPINLOCK_LOCKED (1) diff --git a/sys/arch/powerpc/include/stdarg.h b/sys/arch/powerpc/include/stdarg.h index 785387980cc..dc432bc3f60 100644 --- a/sys/arch/powerpc/include/stdarg.h +++ b/sys/arch/powerpc/include/stdarg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdarg.h,v 1.3 2001/03/29 18:52:19 drahn Exp $ */ +/* $OpenBSD: stdarg.h,v 1.4 2001/09/01 15:49:05 drahn Exp $ */ /* $NetBSD: stdarg.h,v 1.1 1996/09/30 16:34:35 ws Exp $ */ /*- @@ -36,8 +36,8 @@ * @(#)stdarg.h 8.1 (Berkeley) 6/10/93 */ -#ifndef _MACHINE_STDARG_H_ -#define _MACHINE_STDARG_H_ +#ifndef _POWERPC_STDARG_H_ +#define _POWERPC_STDARG_H_ #include <machine/ansi.h> @@ -48,4 +48,4 @@ typedef _BSD_VA_LIST_ va_list; -#endif /* !_MACHINE_STDARG_H_ */ +#endif /* !_POWERPC_STDARG_H_ */ diff --git a/sys/arch/powerpc/include/trap.h b/sys/arch/powerpc/include/trap.h index 9dd4ba98335..219cbd6b83b 100644 --- a/sys/arch/powerpc/include/trap.h +++ b/sys/arch/powerpc/include/trap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.h,v 1.3 2001/06/10 18:45:02 drahn Exp $ */ +/* $OpenBSD: trap.h,v 1.4 2001/09/01 15:49:05 drahn Exp $ */ /* $NetBSD: trap.h,v 1.1 1996/09/30 16:34:35 ws Exp $ */ /* @@ -31,8 +31,8 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _MACHINE_TRAP_H_ -#define _MACHINE_TRAP_H_ +#ifndef _POWERPC_TRAP_H_ +#define _POWERPC_TRAP_H_ #define EXC_RSVD 0x0000 /* Reserved */ #define EXC_RST 0x0100 /* Reset */ @@ -77,9 +77,10 @@ #define EXC_ALI_OPCODE_INDICATOR(dsisr) ((dsisr >> 10) & 0x7f) #define EXC_ALI_LFD 0x09 #define EXC_ALI_STFD 0x0b +#define EXC_ALI_DCBZ 0x5f /* Macros to extract register information */ #define EXC_ALI_RST(dsisr) ((dsisr >> 5) & 0x1f) /* source or target */ #define EXC_ALI_RA(dsisr) (dsisr & 0x1f) -#endif /* _MACHINE_TRAP_H_ */ +#endif /* _POWERPC_TRAP_H_ */ diff --git a/sys/arch/powerpc/include/types.h b/sys/arch/powerpc/include/types.h index 30f94d0dad1..80d425de7f3 100644 --- a/sys/arch/powerpc/include/types.h +++ b/sys/arch/powerpc/include/types.h @@ -1,5 +1,5 @@ /* $NetBSD: types.h,v 1.1 1996/09/30 16:34:36 ws Exp $ */ -/* $OpenBSD: types.h,v 1.9 1999/11/09 04:13:54 rahnds Exp $ */ +/* $OpenBSD: types.h,v 1.10 2001/09/01 15:49:05 drahn Exp $ */ /*- * Copyright (C) 1995 Wolfgang Solfrank. @@ -32,8 +32,8 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _MACHINE_TYPES_H_ -#define _MACHINE_TYPES_H_ +#ifndef _POWERPC_TYPES_H_ +#define _POWERPC_TYPES_H_ #include <sys/cdefs.h> @@ -67,4 +67,4 @@ typedef struct label_t { #define __BROKEN_INDIRECT_CONFIG -#endif /* _MACHINE_TYPES_H_ */ +#endif /* _POWERPC_TYPES_H_ */ diff --git a/sys/arch/powerpc/include/varargs.h b/sys/arch/powerpc/include/varargs.h index cbc021a5ef7..4f01472a81c 100644 --- a/sys/arch/powerpc/include/varargs.h +++ b/sys/arch/powerpc/include/varargs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: varargs.h,v 1.2 2001/03/29 18:52:19 drahn Exp $ */ +/* $OpenBSD: varargs.h,v 1.3 2001/09/01 15:49:05 drahn Exp $ */ /* $NetBSD: varargs.h,v 1.1 1996/09/30 16:34:37 ws Exp $ */ /*- @@ -41,8 +41,8 @@ * @(#)varargs.h 8.2 (Berkeley) 3/22/94 */ -#ifndef _PPC_VARARGS_H_ -#define _PPC_VARARGS_H_ +#ifndef _POWERPC_VARARGS_H_ +#define _POWERPC_VARARGS_H_ #define _VARARGS_H @@ -51,4 +51,4 @@ typedef _BSD_VA_LIST_ va_list; -#endif /* !_PPC_VARARGS_H_ */ +#endif /* !_POWERPC_VARARGS_H_ */ diff --git a/sys/arch/powerpc/include/vmparam.h b/sys/arch/powerpc/include/vmparam.h deleted file mode 100644 index ce784b191cf..00000000000 --- a/sys/arch/powerpc/include/vmparam.h +++ /dev/null @@ -1,124 +0,0 @@ -/* $OpenBSD: vmparam.h,v 1.10 2001/06/27 06:19:53 art Exp $ */ -/* $NetBSD: vmparam.h,v 1.1 1996/09/30 16:34:38 ws Exp $ */ - -/*- - * Copyright (C) 1995, 1996 Wolfgang Solfrank. - * Copyright (C) 1995, 1996 TooLs GmbH. - * 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 TooLs GmbH. - * 4. The name of TooLs GmbH may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``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 TOOLS GMBH 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 MACHINE_VMPARAM_H -#define MACHINE_VMPARAM_H - -#define USRTEXT PAGE_SIZE -#define USRSTACK VM_MAXUSER_ADDRESS - -#ifndef MAXTSIZ -#define MAXTSIZ (16*1024*1024) /* max text size */ -#endif - -#ifndef DFLDSIZ -#define DFLDSIZ (32*1024*1024) /* default data size */ -#endif - -#ifndef MAXDSIZ -#define MAXDSIZ (512*1024*1024) /* max data size */ -#endif - -#ifndef DFLSSIZ -#define DFLSSIZ (1*1024*1024) /* default stack size */ -#endif - -#ifndef MAXSSIZ -#define MAXSSIZ (32*1024*1024) /* max stack size */ -#endif - -/* - * Min & Max swap space allocation chunks - */ -#define DMMIN 32 -#define DMMAX 4096 - -/* - * Size of shared memory map - */ -#ifndef SHMMAXPGS -#define SHMMAXPGS 1024 -#endif - -/* - * Size of User Raw I/O map - */ -#define USRIOSIZE 1024 - -/* - * 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 - -/* - * Would like to have MAX addresses = 0, but this doesn't (currently) work - */ -#define VM_MIN_ADDRESS ((vm_offset_t)0) -#define VM_MAXUSER_ADDRESS ((vm_offset_t)0xfffff000) -#define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS -#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)(KERNEL_SR << ADDR_SR_SHFT)) - -/* ppc_kvm_size is so that vm space can be stolen before vm is fully - * initialized. - */ -#define VM_KERN_ADDR_SIZE_DEF SEGMENT_LENGTH -extern vm_offset_t ppc_kvm_size; -#define VM_KERN_ADDRESS_SIZE (ppc_kvm_size) -#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)((KERNEL_SR << ADDR_SR_SHFT) \ - + VM_KERN_ADDRESS_SIZE)) - -#define VM_KMEM_SIZE (NKMEMCLUSTERS * PAGE_SIZE) -#define VM_MBUF_SIZE (NMBCLUSTERS * PAGE_SIZE) -#define VM_PHYS_SIZE (USRIOSIZE * PAGE_SIZE) - -struct pmap_physseg { - struct pv_entry *pvent; - char *attrs; - /* NULL ??? */ -}; - -#define VM_PHYSSEG_MAX 32 /* actually we could have this many segments */ -#define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH -#define VM_PHYSSEG_NOADD /* can't add RAM after vm_mem_init */ - -#define VM_NFREELIST 1 -#define VM_FREELIST_DEFAULT 0 - -#endif |