diff options
Diffstat (limited to 'sys/arch/pmax/include')
-rw-r--r-- | sys/arch/pmax/include/asm.h | 4 | ||||
-rw-r--r-- | sys/arch/pmax/include/autoconf.h | 4 | ||||
-rw-r--r-- | sys/arch/pmax/include/cdefs.h | 21 | ||||
-rw-r--r-- | sys/arch/pmax/include/conf.h | 9 | ||||
-rw-r--r-- | sys/arch/pmax/include/cpuregs.h | 14 | ||||
-rw-r--r-- | sys/arch/pmax/include/ecoff_machdep.h | 49 | ||||
-rw-r--r-- | sys/arch/pmax/include/elf_machdep.h | 75 | ||||
-rw-r--r-- | sys/arch/pmax/include/fbvar.h | 6 | ||||
-rw-r--r-- | sys/arch/pmax/include/locore.h | 1 | ||||
-rw-r--r-- | sys/arch/pmax/include/mips_param.h | 1 | ||||
-rw-r--r-- | sys/arch/pmax/include/param.h | 12 | ||||
-rw-r--r-- | sys/arch/pmax/include/pmap.h | 6 | ||||
-rw-r--r-- | sys/arch/pmax/include/proc.h | 8 | ||||
-rw-r--r-- | sys/arch/pmax/include/tc_machdep.h | 4 | ||||
-rw-r--r-- | sys/arch/pmax/include/types.h | 4 |
15 files changed, 205 insertions, 13 deletions
diff --git a/sys/arch/pmax/include/asm.h b/sys/arch/pmax/include/asm.h index 6d1efa978be..56d58cd16b8 100644 --- a/sys/arch/pmax/include/asm.h +++ b/sys/arch/pmax/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.3 1997/05/11 16:12:12 pefo Exp $ */ +/* $OpenBSD: asm.h,v 1.4 1997/06/10 14:18:56 graichen Exp $ */ /* * Copyright (c) 1992, 1993 @@ -92,7 +92,7 @@ /* * Define -pg profile entry code. */ -#if defined(GPROF) || defined(PROF) +#ifdef GPROF #define MCOUNT \ .set noreorder; \ .set noat; \ diff --git a/sys/arch/pmax/include/autoconf.h b/sys/arch/pmax/include/autoconf.h index 06416ffb952..ac1d235bba5 100644 --- a/sys/arch/pmax/include/autoconf.h +++ b/sys/arch/pmax/include/autoconf.h @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.h,v 1.7 1996/05/29 06:19:49 mhitch Exp $ */ +/* $NetBSD: autoconf.h,v 1.8 1997/05/25 06:10:47 jonathan Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -74,3 +74,5 @@ void set_clockintr __P((void (*)(struct clockframe *))); #endif void set_iointr __P((void (*)(void *, int))); int badaddr __P((void *, u_int)); +void configure __P((void)); +void makebootdev __P((char *cp)); diff --git a/sys/arch/pmax/include/cdefs.h b/sys/arch/pmax/include/cdefs.h index bc0383e8f7d..6812d5fcc4a 100644 --- a/sys/arch/pmax/include/cdefs.h +++ b/sys/arch/pmax/include/cdefs.h @@ -35,4 +35,25 @@ #define __indr_references(sym,msg) /* nothing */ #define __warn_references(sym,msg) /* nothing */ +/* Kernel-only .sections for kernel copyright */ +#ifdef _KERNEL + +#ifdef __STDC__ +#define __KERNEL_SECTIONSTRING(_sec, _str) \ + __asm__(".section " #_sec " ; .asciz \"" _str "\" ; .text") +#else +#define __KERNEL_SECTIONSTRING(_sec, _str) \ + __asm__(".section _sec ; .asciz _str ; .text") +#endif + +#define __KERNEL_RCSID(_n, _s) __KERNEL_SECTIONSTRING(.ident, _s) +#define __KERNEL_COPYRIGHT(_n, _s) __KERNEL_SECTIONSTRING(.copyright, _s) + +#ifdef NO_KERNEL_RCSIDS +#undef __KERNEL_RCSID +#define __KERNEL_RCSID(_n, _s) /* nothing */ +#endif + +#endif /* _KERNEL */ + #endif /* !_MACHINE_CDEFS_H_ */ diff --git a/sys/arch/pmax/include/conf.h b/sys/arch/pmax/include/conf.h index e854da965a1..cd3694affe7 100644 --- a/sys/arch/pmax/include/conf.h +++ b/sys/arch/pmax/include/conf.h @@ -21,7 +21,7 @@ cdev_decl(mm); -cdev_decl(scc); /* pmax (also alpha m-d z8530 SCC */ +cdev_decl(scc); /* pmax (also alpha) m-d z8530 SCC */ cdev_decl(dc); /* dc7085 dz11-on-a-chip */ bdev_decl(rz); /* antique 4.4bsd/pmax SCSI disk */ @@ -33,3 +33,10 @@ cdev_decl(tz); cdev_decl(dtop); /* Personal Decstation (MAXINE) desktop bus */ cdev_decl(fb); /* generic framebuffer pseudo-device */ cdev_decl(rcons); /* framebuffer-based raster console pseudo-device */ + +/* TTTTT - stuff from NetBSD mips conf.h */ +cdev_decl(pms); + +bdev_decl(fd); +cdev_decl(fd); +/* TTTTT - end of stuff from NetBSD mips conf.h */ diff --git a/sys/arch/pmax/include/cpuregs.h b/sys/arch/pmax/include/cpuregs.h index f446b79de00..a5f197211e0 100644 --- a/sys/arch/pmax/include/cpuregs.h +++ b/sys/arch/pmax/include/cpuregs.h @@ -587,4 +587,18 @@ #define VMMACH_TLB_FOUND_WITH_PATCH 2 #define VMMACH_TLB_PROBE_ERROR 3 +/* TTTTT - stuff from NetBSD mips cpuregs.h */ +/* + * nesting interrupt masks. + */ +#define MACH_INT_MASK_SPL_SOFT0 MACH_SOFT_INT_MASK_0 +#define MACH_INT_MASK_SPL_SOFT1 (MACH_SOFT_INT_MASK_1|MACH_INT_MASK_SPL_SOFT0) +#define MACH_INT_MASK_SPL0 (MACH_INT_MASK_0|MACH_INT_MASK_SPL_SOFT1) +#define MACH_INT_MASK_SPL1 (MACH_INT_MASK_1|MACH_INT_MASK_SPL0) +#define MACH_INT_MASK_SPL2 (MACH_INT_MASK_2|MACH_INT_MASK_SPL1) +#define MACH_INT_MASK_SPL3 (MACH_INT_MASK_3|MACH_INT_MASK_SPL2) +#define MACH_INT_MASK_SPL4 (MACH_INT_MASK_4|MACH_INT_MASK_SPL3) +#define MACH_INT_MASK_SPL5 (MACH_INT_MASK_5|MACH_INT_MASK_SPL4) +/* TTTTT - end of stuff from NetBSD mips cpuregs.h */ + #endif /* _MACHCONST */ diff --git a/sys/arch/pmax/include/ecoff_machdep.h b/sys/arch/pmax/include/ecoff_machdep.h index 72dba194502..e5c88a636f4 100644 --- a/sys/arch/pmax/include/ecoff_machdep.h +++ b/sys/arch/pmax/include/ecoff_machdep.h @@ -44,3 +44,52 @@ #define ECOFF_BADMAG(ep) ((ep)->f.f_magic != ECOFF_MAGIC_MIPSEL) #define ECOFF_SEGMENT_ALIGNMENT(ep) ((ep)->a.vstamp < 23 ? 8 : 16) + +/* TTTTT - stuff from NetBSD mips dir */ + +extern void cpu_exec_ecoff_setregs __P(( + struct proc *, struct exec_package *, u_long, register_t *)); + + +/* + * ECOFF symbol definitions for 32-bit mips. + * XXX 64-bit (mips3?) may be different. + */ +struct ecoff_symhdr { + int16_t magic; + int16_t vstamp; + int32_t lineMax; + int32_t densenumMax; + int32_t procMax; + int32_t lsymMax; + int32_t optsymMax; + int32_t auxsymMax; + int32_t lstrMax; + int32_t estrMax; + int32_t fdMax; + int32_t rfdMax; + int32_t esymMax; + long linesize; + long cbLineOffset; + long cbDnOffset; + long cbPdOffset; + long cbSymOffset; + long cbOptOffset; + long cbAuxOffset; + long cbSsOffset; + long cbSsExtOffset; + long cbFdOffset; + long cbRfdOffset; + long cbExtOffset; +}; + +struct ecoff_extsym { + int32_t es_strindex; + int32_t es_value; + unsigned es_type:6; + unsigned es_class:5; + unsigned :1; + unsigned es_symauxindex:20; +}; + +/* TTTTT - end of stuff from NetBSD mips dir */ diff --git a/sys/arch/pmax/include/elf_machdep.h b/sys/arch/pmax/include/elf_machdep.h index d93b48b6c93..6b8a56bf48e 100644 --- a/sys/arch/pmax/include/elf_machdep.h +++ b/sys/arch/pmax/include/elf_machdep.h @@ -1,8 +1,81 @@ -/* $NetBSD: elf_machdep.h,v 1.1 1996/09/26 21:50:59 cgd Exp $ */ +/* $NetBSD: elf_machdep.h,v 1.2 1996/12/17 03:45:05 jonathan Exp $ */ #define ELF32_MACHDEP_ID_CASES \ + +/* + * pmaxes are mipsel machines + */ + +#define ELF32_MACHDEP_ENDIANNESS Elf_ed_2lsb + +#define ELF64_MACHDEP_ENDIANNESS XXX /* break compilation */ case Elf_em_mips: \ break; #define ELF64_MACHDEP_ID_CASES \ /* no 64-bit ELF machine types supported */ + +/* TTTTT - stuff from NetBSD mips dir */ +/* mips relocs. */ + +#define R_MIPS_NONE 0 +#define R_MIPS_16 1 +#define R_MIPS_32 2 +#define R_MIPS_REL32 3 +#define R_MIPS_REL R_MIPS_REL32 +#define R_MIPS_26 4 +#define R_MIPS_HI16 5 /* high 16 bits of symbol value */ +#define R_MIPS_LO16 6 /* low 16 bits of symbol value */ +#define R_MIPS_GPREL16 7 /* GP-relative reference */ +#define R_MIPS_LITERAL 8 /* Reference to literal section */ +#define R_MIPS_GOT16 9 /* Reference to global offset table */ +#define R_MIPS_GOT R_MIPS_GOT16 +#define R_MIPS_PC16 10 /* 16 bit PC relative reference */ +#define R_MIPS_CALL16 11 /* 16 bit call thru glbl offset tbl */ +#define R_MIPS_CALL R_MIPS_CALL16 +#define R_MIPS_GPREL32 12 + +/* 13, 14, 15 are not defined at this point. */ +#define R_MIPS_UNUSED1 13 +#define R_MIPS_UNUSED2 14 +#define R_MIPS_UNUSED3 15 + +/* + * The remaining relocs are apparently part of the 64-bit Irix ELF ABI. + */ +#define R_MIPS_SHIFT5 16 +#define R_MIPS_SHIFT6 17 + +#define R_MIPS_64 18 +#define R_MIPS_GOT_DISP 19 +#define R_MIPS_GOT_PAGE 20 +#define R_MIPS_GOT_OFST 21 +#define R_MIPS_GOT_HI16 22 +#define R_MIPS_GOT_LO16 23 +#define R_MIPS_SUB 24 +#define R_MIPS_INSERT_A 25 +#define R_MIPS_INSERT_B 26 +#define R_MIPS_DELETE 27 +#define R_MIPS_HIGHER 28 +#define R_MIPS_HIGHEST 29 +#define R_MIPS_CALL_HI16 30 +#define R_MIPS_CALL_LO16 31 +#define R_MIPS_SCN_DISP 32 +#define R_MIPS_REL16 33 +#define R_MIPS_ADD_IMMEDIATE 34 +#define R_MIPS_PJUMP 35 +#define R_MIPS_RELGOT 36 + +#define R_MIPS_max 37 +#define R_TYPE(name) __CONCAT(R_MIPS_,name) + + +/* + * Tell the kernel ELF exec code not to try relocating the interpreter + * (ld.so) for dynamically-linked ELF binaries. + */ +#ifdef _KERNEL +#define ELF_INTERP_NON_RELOCATABLE +#endif + +/* TTTTT - end of stuff from NetBSD mips dir */ diff --git a/sys/arch/pmax/include/fbvar.h b/sys/arch/pmax/include/fbvar.h index 6a178238ffe..2547aab7988 100644 --- a/sys/arch/pmax/include/fbvar.h +++ b/sys/arch/pmax/include/fbvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: fbvar.h,v 1.1 1995/09/11 08:18:51 jonathan Exp $ */ +/* $NetBSD: fbvar.h,v 1.2 1997/05/24 05:49:22 jonathan Exp $ */ /* * Copyright (c) 1992, 1993, 1995 @@ -145,7 +145,9 @@ struct fbdevice { #define FB_INESC 0x001 /* processing an escape sequence */ #define FB_STANDOUT 0x002 /* standout mode */ -/* #define FB_BOLD 0x? /* boldface mode */ +#ifdef notyet +# define FB_BOLD 0x? /* boldface mode */ +#endif #define FB_INVERT 0x008 /* white on black mode */ #define FB_VISBELL 0x010 /* visual bell */ #define FB_CURSOR 0x020 /* cursor is visible */ diff --git a/sys/arch/pmax/include/locore.h b/sys/arch/pmax/include/locore.h index e3235bfff7d..39492c6693d 100644 --- a/sys/arch/pmax/include/locore.h +++ b/sys/arch/pmax/include/locore.h @@ -49,6 +49,7 @@ struct user; extern int copykstack __P((struct user *up)); extern void MachSaveCurFPState __P((struct proc *p)); extern int switch_exit __P((void)); /* XXX never really returns? */ +extern void blkclr __P((caddr_t val, int size)); /* bulk aligned bzero */ /* MIPS-generic locore functions used by trap.c */ extern void MachFPTrap __P((u_int statusReg, u_int CauseReg, u_int pc)); diff --git a/sys/arch/pmax/include/mips_param.h b/sys/arch/pmax/include/mips_param.h index 9c3ad6736be..0a4b1947385 100644 --- a/sys/arch/pmax/include/mips_param.h +++ b/sys/arch/pmax/include/mips_param.h @@ -7,6 +7,7 @@ */ #define ALIGNBYTES 7 #define ALIGN(p) (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES) +#define ALIGNED_POINTER(p,t) ((((u_long)(p)) & (sizeof(t)-1)) == 0) #define NBPG 4096 /* bytes/page */ #define PGOFSET (NBPG-1) /* byte offset into page */ diff --git a/sys/arch/pmax/include/param.h b/sys/arch/pmax/include/param.h index 81090a088f0..db56a782c17 100644 --- a/sys/arch/pmax/include/param.h +++ b/sys/arch/pmax/include/param.h @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.17 1996/05/20 10:50:52 jonathan Exp $ */ +/* $NetBSD: param.h,v 1.18 1997/02/26 01:45:41 jonathan Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -88,9 +88,15 @@ * of the hardware page size. */ #define MSIZE 128 /* size of an mbuf */ -#define MCLSHIFT 11 -#define MCLBYTES (1 << MCLSHIFT) /* enough for whole Ethernet packet */ +#ifndef MCLSHIFT + +# define MCLSHIFT 11 /* convert bytes to m_buf clusters */ + /* 2K cluster can hold Ether frame */ +#endif /* MCLSHIFT */ + +#define MCLBYTES (1 << MCLSHIFT) /* size of a m_buf cluster */ #define MCLOFSET (MCLBYTES - 1) + #ifndef NMBCLUSTERS #ifdef GATEWAY #define NMBCLUSTERS 2048 /* map size, max cluster allocation */ diff --git a/sys/arch/pmax/include/pmap.h b/sys/arch/pmax/include/pmap.h index fb948a7ed87..500cf946ed6 100644 --- a/sys/arch/pmax/include/pmap.h +++ b/sys/arch/pmax/include/pmap.h @@ -107,4 +107,10 @@ struct pmap kernel_pmap_store; #define pmax_round_seg(a) mips_round_seg(a) /* End of stuff from the NetBSD mips tree TTTTT */ +/* + * Bootstrap the system enough to run with virtual memory. + * firstaddr is the first unused kseg0 address (not page aligned). + */ +void pmap_bootstrap __P((vm_offset_t firstaddr)); + #endif /* _PMAP_MACHINE_ */ diff --git a/sys/arch/pmax/include/proc.h b/sys/arch/pmax/include/proc.h index 202d9562314..72d5cc4811b 100644 --- a/sys/arch/pmax/include/proc.h +++ b/sys/arch/pmax/include/proc.h @@ -51,3 +51,11 @@ struct mdproc { /* md_flags */ #define MDP_FPUSED 0x0001 /* floating point coprocessor used */ + +/* TTTTT - stuff from NetBSD mips dir */ +#ifdef _KERNEL +/* kernel single-step emulation */ +struct proc; +extern int mips_singlestep __P((struct proc *p)); +#endif /* _KERNEL */ +/* TTTTT - end of stuff from NetBSD mips dir */ diff --git a/sys/arch/pmax/include/tc_machdep.h b/sys/arch/pmax/include/tc_machdep.h index 4afd08f4fee..40a31833858 100644 --- a/sys/arch/pmax/include/tc_machdep.h +++ b/sys/arch/pmax/include/tc_machdep.h @@ -1,4 +1,4 @@ -/* $NetBSD: tc_machdep.h,v 1.5 1996/10/06 06:29:51 jonathan Exp $ */ +/* $NetBSD: tc_machdep.h,v 1.6 1997/05/25 05:58:36 jonathan Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -106,6 +106,6 @@ int tc_checkslot __P((tc_addr_t slotbase, char *namep)); extern int tc_findconsole __P((int preferred_slot)); extern void config_tcbus __P((struct device *parent, int cputype, int printfn __P((void*, const char*)) )); - +extern int badaddr __P((void *, u_int)); #endif /* __MACHINE_TC_MACHDEP_H__*/ diff --git a/sys/arch/pmax/include/types.h b/sys/arch/pmax/include/types.h index cab9865caa3..2d4ea03a2c4 100644 --- a/sys/arch/pmax/include/types.h +++ b/sys/arch/pmax/include/types.h @@ -1,6 +1,8 @@ -/* $NetBSD: types.h,v 1.12 1996/04/09 20:54:08 jonathan Exp $ */ +/* $NetBSD: types.h,v 1.13 1996/12/05 00:13:56 cgd Exp $ */ /*- + +#define __BROKEN_INDIRECT_CONFIG * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * |