25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: memory_arm.c,v 1.35 2006/06/24 21:47:23 debug Exp $ |
* $Id: memory_arm.c,v 1.36 2006/07/14 16:33:28 debug Exp $ |
29 |
* |
* |
30 |
* |
* |
31 |
* TODO/NOTE: The B and/or C bits could also cause the return value to |
* TODO/NOTE: The B and/or C bits could also cause the return value to |
136 |
|
|
137 |
if (cpu->cd.arm.translation_table == NULL || |
if (cpu->cd.arm.translation_table == NULL || |
138 |
cpu->cd.arm.ttb != cpu->cd.arm.last_ttb) { |
cpu->cd.arm.ttb != cpu->cd.arm.last_ttb) { |
|
uint32_t ofs; |
|
139 |
cpu->cd.arm.translation_table = memory_paddr_to_hostaddr( |
cpu->cd.arm.translation_table = memory_paddr_to_hostaddr( |
140 |
cpu->mem, cpu->cd.arm.ttb & 0x0fffffff, 0); |
cpu->mem, cpu->cd.arm.ttb & 0x0fffffff, 0); |
|
if (cpu->cd.arm.translation_table != NULL) { |
|
|
ofs = cpu->cd.arm.ttb & ((1 << BITS_PER_MEMBLOCK) - 1); |
|
|
cpu->cd.arm.translation_table += ofs; |
|
|
} |
|
141 |
cpu->cd.arm.last_ttb = cpu->cd.arm.ttb; |
cpu->cd.arm.last_ttb = cpu->cd.arm.ttb; |
142 |
} |
} |
143 |
|
|
175 |
printf("arm memory blah blah adfh asfg asdgasdg\n"); |
printf("arm memory blah blah adfh asfg asdgasdg\n"); |
176 |
exit(1); |
exit(1); |
177 |
} |
} |
178 |
d2 = *(uint32_t *)(q + (addr & ((1 << BITS_PER_MEMBLOCK) - 1))); |
d2 = *(uint32_t *)(q); |
179 |
#ifdef HOST_LITTLE_ENDIAN |
#ifdef HOST_LITTLE_ENDIAN |
180 |
if (cpu->byte_order == EMUL_BIG_ENDIAN) |
if (cpu->byte_order == EMUL_BIG_ENDIAN) |
181 |
#else |
#else |