diff options
author | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-07 19:39:58 +0000 |
---|---|---|
committer | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-07 19:39:58 +0000 |
commit | 5c16736a371525e1bafd1941b0d9a83c84cb0702 (patch) | |
tree | a0a1af4115dfeb4cfdb87d4c0479306adf41bbc0 /hw/sh7750.c | |
parent | 486579de70a08098edf3c59eec3e6482a8136e32 (diff) | |
download | qemu-5c16736a371525e1bafd1941b0d9a83c84cb0702.zip qemu-5c16736a371525e1bafd1941b0d9a83c84cb0702.tar.gz qemu-5c16736a371525e1bafd1941b0d9a83c84cb0702.tar.bz2 |
SH4: Eliminate P4 to A7 mangling (Takashi YOSHII).
Main purpose of this is to delete
*physical = address & 0x1fffffff;
at target-sh4/helper.c:449, using new mmio rule introduced by #5849
This masking is a nice trick to realize P4/A7 duality of SH registers.
But, IMHO, it is logically wrong.
Most of SH4 cpu control registers in P4 area(0xfc000000...0xffffffff) have
one more address called A7 which is usually P4 address with upper 3bits masked.
This is an address only appears in TLB's physical address part.
Current code use trick writing drivers as if they are really in A7
(that's why you see many *_A7 in hw/sh*.c), and using translation P4 to A7.
Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5935 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/sh7750.c')
-rw-r--r-- | hw/sh7750.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/sh7750.c b/hw/sh7750.c index afdb9f5..af86f0e 100644 --- a/hw/sh7750.c +++ b/hw/sh7750.c @@ -683,10 +683,16 @@ SH7750State *sh7750_init(CPUSH4State * cpu) sh7750_mem_write, s); cpu_register_physical_memory_offset(0x1f000000, 0x1000, sh7750_io_memory, 0x1f000000); + cpu_register_physical_memory_offset(0xff000000, 0x1000, + sh7750_io_memory, 0x1f000000); cpu_register_physical_memory_offset(0x1f800000, 0x1000, sh7750_io_memory, 0x1f800000); + cpu_register_physical_memory_offset(0xff800000, 0x1000, + sh7750_io_memory, 0x1f800000); cpu_register_physical_memory_offset(0x1fc00000, 0x1000, sh7750_io_memory, 0x1fc00000); + cpu_register_physical_memory_offset(0xffc00000, 0x1000, + sh7750_io_memory, 0x1fc00000); sh7750_mm_cache_and_tlb = cpu_register_io_memory(0, sh7750_mmct_read, |