/[gxemul]/trunk/src/include/yamon.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

Annotation of /trunk/src/include/yamon.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 28 - (hide annotations)
Mon Oct 8 16:20:26 2007 UTC (13 years, 3 months ago) by dpavlin
File MIME type: text/plain
File size: 4137 byte(s)
++ trunk/HISTORY	(local)
$Id: HISTORY,v 1.1298 2006/07/22 11:27:46 debug Exp $
20060626	Continuing on SPARC emulation (beginning on the 'save'
		instruction, register windows, etc).
20060629	Planning statistics gathering (new -s command line option),
		and renaming speed_tricks to allow_instruction_combinations.
20060630	Some minor manual page updates.
		Various cleanups.
		Implementing the -s command line option.
20060701	FINALLY found the bug which prevented Linux and Ultrix from
		running without the ugly hack in the R2000/R3000 cache isol
		code; it was the phystranslation hint array which was buggy.
		Removing the phystranslation hint code completely, for now.
20060702	Minor dyntrans cleanups; invalidation of physpages now only
		invalidate those parts of a page that have actually been
		translated. (32 parts per page.)
		Some MIPS non-R3000 speed fixes.
		Experimenting with MIPS instruction combination for some
		addiu+bne+sw loops, and sw+sw+sw.
		Adding support (again) for larger-than-4KB pages in MIPS tlbw*.
		Continuing on SPARC emulation: adding load/store instructions.
20060704	Fixing a virtual vs physical page shift bug in the new tlbw*
		implementation. Problem noticed by Jakub Jermar. (Many thanks.)
		Moving rfe and eret to cpu_mips_instr.c, since that is the
		only place that uses them nowadays.
20060705	Removing the BSD license from the "testmachine" include files,
		placing them in the public domain instead; this enables the
		testmachine stuff to be used from projects which are
		incompatible with the BSD license for some reason.
20060707	Adding instruction combinations for the R2000/R3000 L1
		I-cache invalidation code used by NetBSD/pmax 3.0, lui+addiu,
		various branches followed by addiu or nop, and jr ra followed
		by addiu. The time it takes to perform a full NetBSD/pmax R3000
		install on the laptop has dropped from 573 seconds to 539. :-)
20060708	Adding a framebuffer controller device (dev_fbctrl), which so
		far can be used to change the fb resolution during runtime, but
		in the future will also be useful for accelerated block fill/
		copy, and possibly also simplified character output.
		Adding an instruction combination for NetBSD/pmax' strlen.
20060709	Minor fixes: reading raw files in src/file.c wasn't memblock
		aligned, removing buggy multi_sw MIPS instruction combination,
		etc.
20060711	Adding a machine_qemu.c, which contains a "qemu_mips" machine.
		(It mimics QEMU's MIPS machine mode, so that a test kernel
		made for QEMU_MIPS also can run in GXemul... at least to some
		extent.)  Adding a short section about how to run this mode to
		doc/guestoses.html.
20060714	Misc. minor code cleanups.
20060715	Applying a patch which adds getchar() to promemul/yamon.c
		(from Oleksandr Tymoshenko).
		Adding yamon.h from NetBSD, and rewriting yamon.c to use it
		(instead of ugly hardcoded numbers) + some cleanup.
20060716	Found and fixed the bug which broke single-stepping of 64-bit
		programs between 0.4.0 and 0.4.0.1 (caused by too quick
		refactoring and no testing). Hopefully this fix will not
		break too many other things.
20060718	Continuing on the 8253 PIT; it now works with Linux/QEMU_MIPS.
		Re-adding the sw+sw+sw instr comb (the problem was that I had
		ignored endian issues); however, it doesn't seem to give any
		big performance gain.
20060720	Adding a dummy Transputer mode (T414, T800 etc) skeleton (only
		the 'j' and 'ldc' instructions are implemented so far). :-}
20060721	Adding gtreg.h from NetBSD, updating dev_gt.c to use it, plus
		misc. other updates to get Linux 2.6 for evbmips/malta working
		(thanks to Alec Voropay for the details).
		FINALLY found and fixed the bug which made tlbw* for non-R3000
		buggy; it was a reference count problem in the dyntrans core.
20060722	Testing stuff; things seem stable enough for a new release.

==============  RELEASE 0.4.1  ==============


1 dpavlin 28 /* GXemul: $Id: yamon.h,v 1.1 2006/07/16 07:44:18 debug Exp $ */
2     /* $NetBSD: yamon.h,v 1.3 2005/06/09 21:43:13 he Exp $ */
3    
4     #ifndef _MIPS_YAMON_YAMON_H_
5     #define _MIPS_YAMON_YAMON_H_
6    
7     /*
8     * Copyright 2002 Wasabi Systems, Inc.
9     * All rights reserved.
10     *
11     * Written by Simon Burge for Wasabi Systems, Inc.
12     *
13     * Redistribution and use in source and binary forms, with or without
14     * modification, are permitted provided that the following conditions
15     * are met:
16     * 1. Redistributions of source code must retain the above copyright
17     * notice, this list of conditions and the following disclaimer.
18     * 2. Redistributions in binary form must reproduce the above copyright
19     * notice, this list of conditions and the following disclaimer in the
20     * documentation and/or other materials provided with the distribution.
21     * 3. All advertising materials mentioning features or use of this software
22     * must display the following acknowledgement:
23     * This product includes software developed for the NetBSD Project by
24     * Wasabi Systems, Inc.
25     * 4. The name of Wasabi Systems, Inc. may not be used to endorse
26     * or promote products derived from this software without specific prior
27     * written permission.
28     *
29     * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
30     * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
31     * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
32     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
33     * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
34     * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
35     * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
36     * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
37     * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
38     * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39     * POSSIBILITY OF SUCH DAMAGE.
40     */
41    
42     /* XXX move to arch/mips/yamon/yamon.h or similar? */
43    
44     #define YAMON_FUNCTION_BASE 0x1fc00500
45    
46     #define YAMON_PRINT_COUNT_OFS (YAMON_FUNCTION_BASE + 0x04)
47     #define YAMON_EXIT_OFS (YAMON_FUNCTION_BASE + 0x20)
48     #define YAMON_FLUSH_CACHE_OFS (YAMON_FUNCTION_BASE + 0x2c)
49     #define YAMON_PRINT_OFS (YAMON_FUNCTION_BASE + 0x34)
50     #define YAMON_REG_CPU_ISR_OFS (YAMON_FUNCTION_BASE + 0x38)
51     #define YAMON_DEREG_CPU_ISR_OFS (YAMON_FUNCTION_BASE + 0x3c)
52     #define YAMON_REG_IC_ISR_OFS (YAMON_FUNCTION_BASE + 0x40)
53     #define YAMON_DEREG_IC_ISR_OFS (YAMON_FUNCTION_BASE + 0x44)
54     #define YAMON_REG_ESR_OFS (YAMON_FUNCTION_BASE + 0x48)
55     #define YAMON_DEREG_ESR_OFS (YAMON_FUNCTION_BASE + 0x4c)
56     #define YAMON_GETCHAR_OFS (YAMON_FUNCTION_BASE + 0x50)
57     #define YAMON_SYSCON_READ_OFS (YAMON_FUNCTION_BASE + 0x54)
58    
59     #if 0
60     #define YAMON_FUNC(ofs) (*(uint32_t *)(MIPS_PHYS_TO_KSEG0(ofs)))
61    
62     typedef void (*t_yamon_print_count)(uint32_t port, char *s, uint32_t count);
63     #define YAMON_PRINT_COUNT(s, count) \
64     ((t_yamon_print_count)(YAMON_FUNC(YAMON_PRINT_COUNT_OFS)))(0, s, count)
65    
66     typedef void (*t_yamon_exit)(uint32_t rc);
67     #define YAMON_EXIT(rc) ((t_yamon_exit)(YAMON_FUNC(YAMON_EXIT_OFS)))(rc)
68    
69     typedef void (*t_yamon_print)(uint32_t port, char *s);
70     #define YAMON_PRINT(s) ((t_yamon_print)(YAMON_FUNC(YAMON_PRINT_OFS)))(0, s)
71    
72     typedef int (*t_yamon_getchar)(uint32_t port, char *ch);
73     #define YAMON_GETCHAR(ch) \
74     ((t_yamon_getchar)(YAMON_FUNC(YAMON_GETCHAR_OFS)))(0, ch)
75    
76     typedef int t_yamon_syscon_id;
77     typedef int (*t_yamon_syscon_read)(t_yamon_syscon_id id, void *param, uint32_t size);
78     #define YAMON_SYSCON_READ(id, param, size) \
79     ((t_yamon_syscon_read)(YAMON_FUNC(YAMON_SYSCON_READ_OFS)))\
80     (id, param, size)
81    
82     typedef struct {
83     char *name;
84     char *val;
85     } yamon_env_var;
86     #endif
87    
88     #define SYSCON_BOARD_CPU_CLOCK_FREQ_ID 34 /* UINT32 */
89     #define SYSCON_BOARD_BUS_CLOCK_FREQ_ID 35 /* UINT32 */
90     #define SYSCON_BOARD_PCI_FREQ_KHZ_ID 36 /* UINT32 */
91    
92     #if 0
93     const char *yamon_getenv(const char *);
94     void yamon_print(char *);
95     void yamon_exit(uint32_t);
96     int yamon_setcpufreq(int);
97    
98     extern yamon_env_var *yamon_envp;
99     extern struct consdev yamon_promcd;
100     #endif
101    
102     #endif /* _MIPS_YAMON_YAMON_H_ */

  ViewVC Help
Powered by ViewVC 1.1.26