diff options
author | Thomas Graichen <graichen@cvs.openbsd.org> | 1997-01-13 10:32:03 +0000 |
---|---|---|
committer | Thomas Graichen <graichen@cvs.openbsd.org> | 1997-01-13 10:32:03 +0000 |
commit | dd6041742a0b625f351f0923829c377a9c5406ca (patch) | |
tree | e793cf2b25697644504fc58de3961fb892c2194d /sys | |
parent | 6e1e04df52107fc53426e638d0a71d7259663899 (diff) |
<pmax/xxx> -> <machine/xxx>
<mips/xxx> -> <machine/xxx>
... plus missing files from arc
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/pmax/include/dlfcn.h | 42 | ||||
-rw-r--r-- | sys/arch/pmax/include/elf_abi.h | 58 | ||||
-rw-r--r-- | sys/arch/pmax/include/endian.h | 2 | ||||
-rw-r--r-- | sys/arch/pmax/include/link.h | 125 | ||||
-rw-r--r-- | sys/arch/pmax/include/machConst.h | 2 | ||||
-rw-r--r-- | sys/arch/pmax/include/param.h | 2 | ||||
-rw-r--r-- | sys/arch/pmax/include/pte.h | 6 | ||||
-rw-r--r-- | sys/arch/pmax/include/tc_machdep.h | 2 |
8 files changed, 232 insertions, 7 deletions
diff --git a/sys/arch/pmax/include/dlfcn.h b/sys/arch/pmax/include/dlfcn.h new file mode 100644 index 00000000000..24d132c7e13 --- /dev/null +++ b/sys/arch/pmax/include/dlfcn.h @@ -0,0 +1,42 @@ +/* $OpenBSD: dlfcn.h,v 1.1 1997/01/13 10:31:56 graichen Exp $ */ + +/* + * Copyright (c) 1996 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 by + * Per Fogelstrom. + * 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 _DLFCN_H +#define _DLFCN_H 1 + +/* + * This is a dummy file. Empty until libdl has been done. + */ + +#endif /* _DLFCN_H */ diff --git a/sys/arch/pmax/include/elf_abi.h b/sys/arch/pmax/include/elf_abi.h new file mode 100644 index 00000000000..8b95f12c6df --- /dev/null +++ b/sys/arch/pmax/include/elf_abi.h @@ -0,0 +1,58 @@ +/* $OpenBSD: elf_abi.h,v 1.1 1997/01/13 10:31:58 graichen Exp $ */ + +/* + * Copyright (c) 1996 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 by + * Per Fogelstrom. + * 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. + * + */ + +/* From MIPS ABI supplemental */ + +/* Architecture dependent Segment types - p_type */ +#define PT_MIPS_REGINFO 0x70000000 /* Register usage information */ + +/* Architecture dependent d_tag field for Elf32_Dyn. */ +#define DT_MIPS_RLD_VERSION 0x70000001 /* Runtime Linker Interface ID */ +#define DT_MIPS_TIME_STAMP 0x70000002 /* Timestamp */ +#define DT_MIPS_ICHECKSUM 0x70000003 /* Cksum of ext. str. and com. sizes */ +#define DT_MIPS_IVERSION 0x70000004 /* Version string (string tbl index) */ +#define DT_MIPS_FLAGS 0x70000005 /* Flags */ +#define DT_MIPS_BASE_ADDRESS 0x70000006 /* Segment base address */ +#define DT_MIPS_CONFLICT 0x70000008 /* Adr of .conflict section */ +#define DT_MIPS_LIBLIST 0x70000009 /* Address of .liblist section */ +#define DT_MIPS_LOCAL_GOTNO 0x7000000a /* Number of local .GOT entries */ +#define DT_MIPS_CONFLICTNO 0x7000000b /* Number of .conflict entries */ +#define DT_MIPS_LIBLISTNO 0x70000010 /* Number of .liblist entries */ +#define DT_MIPS_SYMTABNO 0x70000011 /* Number of .dynsym entries */ +#define DT_MIPS_UNREFEXTNO 0x70000012 /* First external DYNSYM */ +#define DT_MIPS_GOTSYM 0x70000013 /* First GOT entry in .dynsym */ +#define DT_MIPS_HIPAGENO 0x70000014 /* Number of GOT page table entries */ +#define DT_MIPS_RLD_MAP 0x70000016 /* Address of debug map pointer */ + +#define DT_PROCNUM (DT_MIPS_HIPAGENO - DT_LOPROC + 1) diff --git a/sys/arch/pmax/include/endian.h b/sys/arch/pmax/include/endian.h index 17b0253a45b..d9dee656d27 100644 --- a/sys/arch/pmax/include/endian.h +++ b/sys/arch/pmax/include/endian.h @@ -61,7 +61,7 @@ #define BYTE_ORDER LITTLE_ENDIAN #include <sys/cdefs.h> -#include <pmax/types.h> +#include <machine/types.h> typedef u_int32_t in_addr_t; typedef u_int16_t in_port_t; diff --git a/sys/arch/pmax/include/link.h b/sys/arch/pmax/include/link.h new file mode 100644 index 00000000000..4affb777e59 --- /dev/null +++ b/sys/arch/pmax/include/link.h @@ -0,0 +1,125 @@ +/* $OpenBSD: link.h,v 1.1 1997/01/13 10:31:59 graichen Exp $ */ + +/* + * Copyright (c) 1996 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 by + * Per Fogelstrom. + * 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 _LINK_H +#define _LINK_H 1 + +#include <elf_abi.h> +#include <machine/elf_abi.h> + +/* + * Debug rendezvous struct. Pointer to this is set up in the + * target code pointed by the DT_MIPS_RLD_MAP tag. If it is + * defined. + */ + +struct r_debug { + int r_version; /* Protocol version. */ + struct link_map *r_map; /* Head of list of loaded objects. */ + + /* This is the address of a function internal to the run-time linker, + that will always be called when the linker begins to map in a + library or unmap it, and again when the mapping change is complete. + The debugger can set a breakpoint at this address if it wants to + notice shared object mapping changes. */ + Elf32_Addr r_brk; + enum { + /* This state value describes the mapping change taking place when + the `r_brk' address is called. */ + RT_CONSISTENT, /* Mapping change is complete. */ + RT_ADD, /* Adding a new object. */ + RT_DELETE, /* Removing an object mapping. */ + } r_state; + + Elf32_Addr r_ldbase; /* Base address the linker is loaded at. */ + }; + +/* This symbol refers to the "dynamic structure" in the `.dynamic' section + of whatever module refers to `_DYNAMIC'. So, to find its own + `struct r_debug', a program could do: + for (dyn = _DYNAMIC; dyn->d_tag != DT_NULL) + if (dyn->d_tag == DT_MIPS_RLD_MAP) r_debug = (struct r_debug) dyn->d_un.d_ptr; + */ + +extern Elf32_Dyn _DYNAMIC[]; + + +/* Structure describing a loaded shared object. The `l_next' and `l_prev' + members form a chain of all the shared objects loaded at startup. + + These data structures exist in space used by the run-time dynamic linker; + modifying them may have disastrous results. */ + +struct link_map + { + /* These first few members are part of the protocol with the debugger. + This is the same format used in SVR4. */ + + Elf32_Addr l_addr; /* Base address shared object is loaded at. */ + Elf32_Addr l_offs; /* Offset */ + char *l_name; /* Absolute file name object was found in. */ + Elf32_Dyn *l_ld; /* Dynamic section of the shared object. */ + struct link_map *l_next, *l_prev; /* Chain of loaded objects. */ + + /* All following members are internal to the dynamic linker. + They may change without notice. */ + + const char *l_libname; /* Name requested (before search). */ + + /* Indexed pointers to dynamic section. */ + Elf32_Dyn *l_info[DT_NUM + DT_PROCNUM]; + + const Elf32_Phdr *l_phdr; /* Pointer to program header table in core. */ + Elf32_Word l_phnum; /* Number of program header entries. */ + Elf32_Addr l_entry; /* Entry point location. */ + + /* Symbol hash table. */ + Elf32_Word l_nbuckets; + const Elf32_Word *l_buckets, *l_chain; + + unsigned int l_opencount; /* Reference count for dlopen/dlclose. */ + enum /* Where this object came from. */ + { + lt_executable, /* The main executable program. */ + lt_interpreter, /* The interpreter: the dynamic linker. */ + lt_library, /* Library needed by main executable. */ + lt_loaded, /* Extra run-time loaded shared object. */ + } l_type:2; + unsigned int l_deps_loaded:1; /* Nonzero if DT_NEEDED items loaded. */ + unsigned int l_relocated:1; /* Nonzero if object's relocations done. */ + unsigned int l_init_called:1; /* Nonzero if DT_INIT function called. */ + unsigned int l_init_running:1; /* Nonzero while DT_INIT function runs. */ + }; + +#endif /* _LINK_H */ diff --git a/sys/arch/pmax/include/machConst.h b/sys/arch/pmax/include/machConst.h index 19234930fdd..bba227f3089 100644 --- a/sys/arch/pmax/include/machConst.h +++ b/sys/arch/pmax/include/machConst.h @@ -1,4 +1,4 @@ /* $NetBSD: machConst.h,v 1.6 1996/09/30 07:58:20 jonathan Exp $ */ -#include <pmax/cpuregs.h> +#include <machine/cpuregs.h> diff --git a/sys/arch/pmax/include/param.h b/sys/arch/pmax/include/param.h index e677902b4b2..81090a088f0 100644 --- a/sys/arch/pmax/include/param.h +++ b/sys/arch/pmax/include/param.h @@ -46,7 +46,7 @@ * Machine-dependent constants (VM, etc) common across MIPS cpus */ -#include <pmax/mips_param.h> +#include <machine/mips_param.h> /* * Machine dependent constants for DEC Station 3100. diff --git a/sys/arch/pmax/include/pte.h b/sys/arch/pmax/include/pte.h index 70dd4be56bf..c5dbb36a89b 100644 --- a/sys/arch/pmax/include/pte.h +++ b/sys/arch/pmax/include/pte.h @@ -18,15 +18,15 @@ #if defined(MIPS1) && defined(MIPS3) -#error Cannot yet upport both "MIPS1" (r2000 family) and "MIP3" (r4000 family) in the same kernel. +#error Cannot yet support both "MIPS1" (r2000 family) and "MIPS3" (r4000 family) in the same kernel. #endif #ifdef MIPS1 -#include <pmax/mips1_pte.h> +#include <machine/mips1_pte.h> #endif #ifdef MIPS3 -#include <pmax/mips3_pte.h> +#include <machine/mips3_pte.h> #endif diff --git a/sys/arch/pmax/include/tc_machdep.h b/sys/arch/pmax/include/tc_machdep.h index a8770f29341..4afd08f4fee 100644 --- a/sys/arch/pmax/include/tc_machdep.h +++ b/sys/arch/pmax/include/tc_machdep.h @@ -60,7 +60,7 @@ #ifndef __MACHINE_TC_MACHDEP_H__ #define __MACHINE_TC_MACHDEP_H__ -#include <pmax/cpuregs.h> /* defines MACH_PHYS_TO_UNCACHED */ +#include <machine/cpuregs.h> /* defines MACH_PHYS_TO_UNCACHED */ typedef int32_t tc_addr_t; typedef int32_t tc_offset_t; |