Parent Directory | Revision Log
++ trunk/HISTORY (local) $Id: HISTORY,v 1.1539 2007/05/01 04:03:51 debug Exp $ 20070415 Landisk PCLOCK should be 33.33 MHz, not 50 MHz. (This makes the clock run at correct speed.) FINALLY found and fixed the bug which caused OpenBSD/landisk to randomly bug out: an &-sign was missing in the special case handling of FPSCR in the 'LDS.L @Rm+,FPSCR' instruction. Adding similar special case handling for 'LDC.L @Rm+,SR' (calling sh_update_sr() instead of just loading). Implementing the 'FCNVSD FPUL,DRn' and 'FCNVDS DRm,FPUL' SuperH instructions. The 'LDC Rm,SR' instruction now immediately breaks out of the dyntrans loop if an interrupt is to be triggered. 20070416 In memory_rw.c, if mapping a page as writable, make sure to invalidate code translations even if the data access was a read. Minor SuperH updates. 20070418 Removing the dummy M68K emulation mode. Minor SH update (turning unnecessary sts_mach_rn, sts_macl_rn, and sts_pr_rn instruction handlers into mov_rm_rn). 20070419 Beginning to add a skeleton for an M88K mode: Adding a hack to allow OpenBSD/m88k a.out binaries to be loaded, and disassembly of a few simple 88K instructions. Commenting out the 'LDC Rm,SR' fix from a few days ago, because it made Linux/dreamcast bug out. Adding a hack to dev_sh4.c (an extra translation cache invalidation), which allows OpenBSD/landisk to boot ok after an install. Upgrading the Landisk machine mode to stable, updating documentation, etc. 20070420 Experimenting with adding a PCI controller (pcic) to dev_sh4. Adding a dummy Realtek 8139C+ skeleton device (dev_rtl8139c). Implementing the first M88K instructions (br, or[.u] imm), and adding disassembly of some more instructions. 20070421 Continuing a little on dev_rtl8139c. 20070422 Implementing the 9346 EEPROM "read" command for dev_rtl8139c. Finally found and fixed an old bug in the log n symbol search (it sometimes missed symbols). Debug trace (-i, -t etc) should now show more symbols. :-) 20070423 Continuing a little on M88K disassembly. 20070428 Fixing a memset arg order bug in src/net/net.c (thanks to Nigel Horne for noticing the bug). Applying parts of a patch from Carl van Schaik to clear out bottom bits of MIPS addresses more correctly, when using large page sizes, and doing some other minor cleanup/refactoring. Fixing a couple of warnings given by gcc with the -W option (a few more warnings than just plain -Wall). Reducing SuperH dyntrans physical address space from 64-bit to 32-bit (since SH5/SH64 isn't imlemented yet anyway). Adding address-to-symbol annotation to a few more instructions in the SuperH instruction trace output. Beginning regression testing for the next release. Reverting the value of SCIF_DELAYED_TX_VALUE from 1 to 2, because OpenBSD/landisk may otherwise hang randomly. 20070429 The ugly hack/workaround to get OpenBSD/landisk booting without crashing does NOT work anymore (with the April 21 snapshot of OpenBSD/landisk). Strangely enough, removing the hack completely causes OpenBSD/landisk to work (!). More regression testing (re-testing everything SuperH-related, and some other things). Cobalt interrupts were actually broken; fixing by commenting out the DEC21143s in the Cobalt machine. 20070430 More regression testing. 20070501 Updating the OpenBSD/landisk install instructions to use 4.1 instead of the current snapshot. GAAAH! OpenBSD/landisk 4.1 _needs_ the ugly hack/workaround; reintroducing it again. (The 4.1 kernel is actually from 2007-03-11.) Simplifying the NetBSD/evbarm install instructions a bit. More regression testing. ============== RELEASE 0.4.5.1 ==============
1 | #ifndef CPU_M88K_H |
2 | #define CPU_M88K_H |
3 | |
4 | /* |
5 | * Copyright (C) 2007 Anders Gavare. All rights reserved. |
6 | * |
7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions are met: |
9 | * |
10 | * 1. Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. |
12 | * 2. Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. |
15 | * 3. The name of the author may not be used to endorse or promote products |
16 | * derived from this software without specific prior written permission. |
17 | * |
18 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND |
19 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE |
22 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
23 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
24 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
25 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
26 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
27 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
28 | * SUCH DAMAGE. |
29 | * |
30 | * |
31 | * $Id: cpu_m88k.h,v 1.4 2007/04/28 00:12:03 debug Exp $ |
32 | */ |
33 | |
34 | #include "misc.h" |
35 | #include "interrupt.h" |
36 | |
37 | struct cpu_family; |
38 | |
39 | /* M88K CPU types: */ |
40 | struct m88k_cpu_type_def { |
41 | char *name; |
42 | int type; |
43 | }; |
44 | |
45 | #define M88K_CPU_TYPE_DEFS { \ |
46 | { "88100", 88100 }, \ |
47 | { "88110", 88110 }, \ |
48 | { NULL, 0 } \ |
49 | } |
50 | |
51 | |
52 | #define M88K_N_IC_ARGS 3 |
53 | #define M88K_INSTR_ALIGNMENT_SHIFT 2 |
54 | #define M88K_IC_ENTRIES_SHIFT 10 |
55 | #define M88K_IC_ENTRIES_PER_PAGE (1 << M88K_IC_ENTRIES_SHIFT) |
56 | #define M88K_PC_TO_IC_ENTRY(a) (((a)>>M88K_INSTR_ALIGNMENT_SHIFT) \ |
57 | & (M88K_IC_ENTRIES_PER_PAGE-1)) |
58 | #define M88K_ADDR_TO_PAGENR(a) ((a) >> (M88K_IC_ENTRIES_SHIFT \ |
59 | + M88K_INSTR_ALIGNMENT_SHIFT)) |
60 | |
61 | DYNTRANS_MISC_DECLARATIONS(m88k,M88K,uint32_t) |
62 | |
63 | #define M88K_MAX_VPH_TLB_ENTRIES 128 |
64 | |
65 | |
66 | #define N_M88K_REGS 32 |
67 | |
68 | /* Register r0 is always zero. */ |
69 | #define M88K_ZERO_REG 0 |
70 | |
71 | struct m88k_cpu { |
72 | struct m88k_cpu_type_def cpu_type; |
73 | |
74 | /* General-Purpose Registers: */ |
75 | uint32_t r[N_M88K_REGS]; |
76 | |
77 | /* Destination for non-nop instructions with r0 as dest. reg.: */ |
78 | uint32_t zero; |
79 | |
80 | int irq_asserted; |
81 | |
82 | |
83 | /* |
84 | * Instruction translation cache, and 32-bit virtual -> physical -> |
85 | * host address translation: |
86 | */ |
87 | DYNTRANS_ITC(m88k) |
88 | VPH_TLBS(m88k,M88K) |
89 | VPH32(m88k,M88K,uint32_t,uint8_t) |
90 | }; |
91 | |
92 | |
93 | /* cpu_m88k.c: */ |
94 | int m88k_cpu_instruction_has_delayslot(struct cpu *cpu, unsigned char *ib); |
95 | int m88k_run_instr(struct cpu *cpu); |
96 | void m88k_update_translation_table(struct cpu *cpu, uint64_t vaddr_page, |
97 | unsigned char *host_page, int writeflag, uint64_t paddr_page); |
98 | void m88k_invalidate_translation_caches(struct cpu *cpu, uint64_t, int); |
99 | void m88k_invalidate_code_translation(struct cpu *cpu, uint64_t, int); |
100 | int m88k_memory_rw(struct cpu *cpu, struct memory *mem, uint64_t vaddr, |
101 | unsigned char *data, size_t len, int writeflag, int cache_flags); |
102 | int m88k_cpu_family_init(struct cpu_family *); |
103 | |
104 | #endif /* CPU_M88K_H */ |
ViewVC Help | |
Powered by ViewVC 1.1.26 |