/[gxemul]/trunk/src/include/exec_ecoff_mips.h
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/src/include/exec_ecoff_mips.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4 - (show annotations)
Mon Oct 8 16:18:00 2007 UTC (16 years, 5 months ago) by dpavlin
File MIME type: text/plain
File size: 4429 byte(s)
++ trunk/HISTORY	(local)
$Id: HISTORY,v 1.707 2005/04/27 16:37:33 debug Exp $
20050408	Some minor updates to the wdc. Linux now doesn't complain
		anymore if a disk is non-present.
20050409	Various minor fixes (a bintrans bug, and some other things).
		The wdc seems to work with Playstation2 emulation, but there
		is a _long_ annoying delay when disks are detected.
		Fixing a really important bintrans bug (when devices and RAM
		are mixed within 4KB pages), which was triggered with
		NetBSD/playstation2 kernels.
20050410	Adding a dummy dev_ps2_ether (just so that NetBSD doesn't
		complain as much during bootup).
		Symbols starting with '$' are now ignored.
		Renaming dev_ps2_ohci.c to dev_ohci.c, etc.
20050411	Moving the bintrans-cache-isolation check from cpu_mips.c to
		cpu_mips_coproc.c. (I thought this would give a speedup, but
		it's not noticable.)
		Better playstation2 sbus interrupt code.
		Skip ahead many ticks if the count register is read manually.
		(This increases the speed of delay-loops that simply read
		the count register.)
20050412	Updates to the playstation2 timer/interrupt code.
		Some other minor updates.
20050413	NetBSD/cobalt runs from a disk image :-) including userland;
		updating the documentation on how to install NetBSD/cobalt
		using NetBSD/pmax (!).
		Some minor bintrans updates (no real speed improvement) and
		other minor updates (playstation2 now uses the -o options).
20050414	Adding a dummy x86 (and AMD64) mode.
20050415	Adding some (32-bit and 16-bit) x86 instructions.
		Adding some initial support for non-SCSI, non-IDE floppy
		images. (The x86 mode can boot from these, more or less.)
		Moving the devices/ and include/ directories to src/devices/
		and src/include/, respectively.
20050416	Continuing on the x86 stuff. (Adding pc_bios.c and some simple
		support for software interrupts in 16-bit mode.)
20050417	Ripping out most of the x86 instruction decoding stuff, trying
		to rewrite it in a cleaner way.
		Disabling some of the least working CPU families in the
		configure script (sparc, x86, alpha, hppa), so that they are
		not enabled by default.
20050418	Trying to fix the bug which caused problems when turning on
		and off bintrans interactively, by flushing the bintrans cache
		whenever bintrans is manually (re)enabled.
20050419	Adding the 'lswi' ppc instruction.
		Minor updates to the x86 instruction decoding.
20050420	Renaming x86 register name indices from R_xx to X86_R_xx (this
		makes building on Tru64 nicer).
20050422	Adding a check for duplicate MIPS TLB entries on tlbwr/tlbwi.
20050427	Adding screenshots to guestoses.html.
		Some minor fixes and testing for the next release.

==============  RELEASE 0.3.2  ==============


1 /* gxemul: $Id: exec_ecoff_mips.h,v 1.7 2005/03/05 12:34:02 debug Exp $
2 * Addition of some ECOFF magin numbers, and ECOFF_BADMAG has been commented
3 * out to avoid warnings on Solaris.
4 */
5
6 #ifndef EXEC_ECOFF_MIPS_H
7 #define EXEC_ECOFF_MIPS_H
8
9 /* $NetBSD: ecoff_machdep.h,v 1.18 2002/03/05 14:12:29 simonb Exp $ */
10
11 /*
12 * Copyright (c) 1997 Jonathan Stone
13 * All rights reserved.
14 *
15 * Copyright (c) 1994 Adam Glass
16 * All rights reserved.
17 *
18 * Redistribution and use in source and binary forms, with or without
19 * modification, are permitted provided that the following conditions
20 * are met:
21 * 1. Redistributions of source code must retain the above copyright
22 * notice, this list of conditions and the following disclaimer.
23 * 2. Redistributions in binary form must reproduce the above copyright
24 * notice, this list of conditions and the following disclaimer in the
25 * documentation and/or other materials provided with the distribution.
26 * 3. All advertising materials mentioning features or use of this software
27 * must display the following acknowledgement:
28 * This product includes software developed by Adam Glass.
29 * 4. The name of the Author may not be used to endorse or promote products
30 * derived from this software without specific prior written permission.
31 *
32 * THIS SOFTWARE IS PROVIDED BY Adam Glass ``AS IS'' AND
33 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
34 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
35 * ARE DISCLAIMED. IN NO EVENT SHALL Adam Glass BE LIABLE
36 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
38 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
39 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
40 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
41 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
42 * SUCH DAMAGE.
43 */
44
45 #define ECOFF_LDPGSZ 4096
46
47 #define ECOFF_PAD
48
49 /* gxemul NOTE: Original types in NetBSD were 'u_long', not uint32_t */
50
51 #define ECOFF_MACHDEP \
52 uint32_t gprmask; \
53 uint32_t cprmask[4]; \
54 uint32_t gp_value
55 #ifdef _KERNEL
56 #include <mips/cpu.h> /* mips CPU architecture levels */
57 #define _MIPS3_OK() CPUISMIPS3
58 #else
59 #define _MIPS3_OK() 1
60 #endif
61
62
63 #define ECOFF_MAGIC_MIPSEB 0x0160 /* mips1, big-endian */
64 #define ECOFF_MAGIC_MIPSEL 0x0162 /* mips1, little-endian */
65 #define ECOFF_MAGIC_MIPSEB2 0x0163 /* mips2, big-endian (gxemul addition) */
66 #define ECOFF_MAGIC_MIPSEL2 0x0166 /* mips2, little-endian (gxemul addition) */
67 #define ECOFF_MAGIC_MIPSEB3 0x0140 /* mips3, big-endian (gxemul addition) */
68 #define ECOFF_MAGIC_MIPSEL3 0x0142 /* mips3, little-endian */
69
70 #if 0
71 /* commented out in gxemul, to avoid warnings on Solaris */
72 #if BYTE_ORDER == LITTLE_ENDIAN
73 #define ECOFF_BADMAG(ep) \
74 (! \
75 ((ep)->f.f_magic == ECOFF_MAGIC_MIPSEL || \
76 (_MIPS3_OK() && (ep)->f.f_magic == ECOFF_MAGIC_MIPSEL3)) \
77 )
78 #endif
79 #if BYTE_ORDER == BIG_ENDIAN
80 #define ECOFF_BADMAG(ep) ((ep)->f.f_magic != ECOFF_MAGIC_MIPSEB)
81 #endif
82 #endif /* gxemul */
83
84 #define ECOFF_SEGMENT_ALIGNMENT(ep) ((ep)->a.vstamp < 23 ? 8 : 16)
85
86 #ifdef _KERNEL
87 struct proc;
88 struct exec_package;
89 void cpu_exec_ecoff_setregs(struct proc *, struct exec_package *, u_long);
90 #endif /* _KERNEL */
91
92
93 /*
94 * ECOFF symbol definitions for 32-bit mips.
95 * XXX 64-bit (mips3?) may be different.
96 */
97 struct ecoff_symhdr {
98 int16_t magic;
99 int16_t vstamp;
100 int32_t ilineMax;
101 int32_t cbLine;
102 int32_t cbLineOffset;
103 int32_t idnMax;
104 int32_t cbDnOffset;
105 int32_t ipdMax;
106 int32_t cbPdOffset;
107 int32_t isymMax;
108 int32_t cbSymOffset;
109 int32_t ioptMax;
110 int32_t cbOptOffset;
111 int32_t iauxMax;
112 int32_t cbAuxOffset;
113 int32_t issMax;
114 int32_t cbSsOffset;
115 int32_t issExtMax;
116 int32_t cbSsExtOffset;
117 int32_t ifdMax;
118 int32_t cbFdOffset;
119 int32_t crfd;
120 int32_t cbRfdOffset;
121 int32_t iextMax;
122 int32_t cbExtOffset;
123 };
124
125 #define MIPS_MAGIC_SYM 0x7009 /* gxemul addition */
126
127 /* Macro for field name used by cgd's Alpha-derived code */
128 #define esymMax iextMax
129
130
131 struct ecoff_extsym {
132 uint16_t es_flags;
133 uint16_t es_ifd;
134 int32_t es_strindex;
135 int32_t es_value;
136 unsigned es_type:6;
137 unsigned es_class:5;
138 unsigned :1;
139 unsigned es_symauxindex:20;
140 };
141
142 #endif /* EXEC_ECOFF_MIPS_H */
143

  ViewVC Help
Powered by ViewVC 1.1.26