Line 239... |
Line 239... |
{
|
{
|
unsigned long temp;
|
unsigned long temp;
|
struct dev_memarea *dev;
|
struct dev_memarea *dev;
|
|
|
cur_vadd = memaddr;
|
cur_vadd = memaddr;
|
if (DEBUG_ENABLED)
|
if (config.debug.enabled)
|
*breakpoint += CheckDebugUnit(DebugLoadAddress,memaddr); /* 28/05/01 CZ */
|
*breakpoint += CheckDebugUnit(DebugLoadAddress,memaddr); /* 28/05/01 CZ */
|
temp = evalsim_mem32(memaddr);
|
temp = evalsim_mem32(memaddr);
|
if (DEBUG_ENABLED)
|
if (config.debug.enabled)
|
*breakpoint += CheckDebugUnit(DebugLoadData,temp); /* MM170901 */
|
*breakpoint += CheckDebugUnit(DebugLoadData,temp); /* MM170901 */
|
return temp;
|
return temp;
|
}
|
}
|
|
|
/* Returns 32-bit values from mem array. Big endian version. */
|
/* Returns 32-bit values from mem array. Big endian version. */
|
Line 267... |
Line 267... |
if (memaddr & 3) {
|
if (memaddr & 3) {
|
except_handle (EXCEPT_ALIGN, memaddr);
|
except_handle (EXCEPT_ALIGN, memaddr);
|
return 0;
|
return 0;
|
}
|
}
|
|
|
if (DEBUG_ENABLED)
|
if (config.debug.enabled)
|
*breakpoint += CheckDebugUnit(DebugLoadAddress,memaddr); /* 28/05/01 CZ */
|
*breakpoint += CheckDebugUnit(DebugLoadAddress,memaddr); /* 28/05/01 CZ */
|
temp = evalsim_mem32(memaddr);
|
temp = evalsim_mem32(memaddr);
|
if (DEBUG_ENABLED)
|
if (config.debug.enabled)
|
*breakpoint += CheckDebugUnit(DebugLoadData,temp); /* MM170901 */
|
*breakpoint += CheckDebugUnit(DebugLoadData,temp); /* MM170901 */
|
return temp;
|
return temp;
|
}
|
}
|
|
|
/* Returns 32-bit values from mem array. Big endian version. */
|
/* Returns 32-bit values from mem array. Big endian version. */
|
Line 286... |
Line 286... |
if (config.sim.mprofile)
|
if (config.sim.mprofile)
|
mprofile (memaddr, MPROF_32 | MPROF_FETCH);
|
mprofile (memaddr, MPROF_32 | MPROF_FETCH);
|
// memaddr = simulate_ic_mmu_fetch(memaddr);
|
// memaddr = simulate_ic_mmu_fetch(memaddr);
|
cur_vadd = pc;
|
cur_vadd = pc;
|
ic_simulate_fetch(memaddr);
|
ic_simulate_fetch(memaddr);
|
if (DEBUG_ENABLED)
|
if (config.debug.enabled)
|
*breakpoint += CheckDebugUnit(DebugLoadAddress,memaddr); /* 28/05/01 CZ */
|
*breakpoint += CheckDebugUnit(DebugLoadAddress,memaddr); /* 28/05/01 CZ */
|
temp = evalsim_mem32(memaddr);
|
temp = evalsim_mem32(memaddr);
|
if (DEBUG_ENABLED)
|
if (config.debug.enabled)
|
*breakpoint += CheckDebugUnit(DebugLoadData,temp); /* MM170901 */
|
*breakpoint += CheckDebugUnit(DebugLoadData,temp); /* MM170901 */
|
return temp;
|
return temp;
|
}
|
}
|
|
|
unsigned long evalsim_mem32(unsigned long memaddr)
|
unsigned long evalsim_mem32(unsigned long memaddr)
|
Line 346... |
Line 346... |
if (memaddr & 1) {
|
if (memaddr & 1) {
|
except_handle (EXCEPT_ALIGN, memaddr);
|
except_handle (EXCEPT_ALIGN, memaddr);
|
return 0;
|
return 0;
|
}
|
}
|
|
|
if (DEBUG_ENABLED)
|
if (config.debug.enabled)
|
*breakpoint += CheckDebugUnit(DebugLoadAddress,memaddr); /* 28/05/01 CZ */
|
*breakpoint += CheckDebugUnit(DebugLoadAddress,memaddr); /* 28/05/01 CZ */
|
|
|
temp = evalsim_mem16(memaddr);
|
temp = evalsim_mem16(memaddr);
|
if (DEBUG_ENABLED)
|
if (config.debug.enabled)
|
*breakpoint += CheckDebugUnit(DebugLoadData,temp); /* MM170901 */
|
*breakpoint += CheckDebugUnit(DebugLoadData,temp); /* MM170901 */
|
return temp;
|
return temp;
|
}
|
}
|
|
|
unsigned short evalsim_mem16(unsigned long memaddr)
|
unsigned short evalsim_mem16(unsigned long memaddr)
|
Line 402... |
Line 402... |
|
|
cur_vadd = memaddr;
|
cur_vadd = memaddr;
|
memaddr = simulate_dc_mmu_load(memaddr);
|
memaddr = simulate_dc_mmu_load(memaddr);
|
if (pending.valid)
|
if (pending.valid)
|
return 0;
|
return 0;
|
if (DEBUG_ENABLED)
|
if (config.debug.enabled)
|
*breakpoint += CheckDebugUnit(DebugLoadAddress,memaddr); /* 28/05/01 CZ */
|
*breakpoint += CheckDebugUnit(DebugLoadAddress,memaddr); /* 28/05/01 CZ */
|
|
|
temp = evalsim_mem8(memaddr);
|
temp = evalsim_mem8(memaddr);
|
if (DEBUG_ENABLED)
|
if (config.debug.enabled)
|
*breakpoint += CheckDebugUnit(DebugLoadData,temp); /* MM170901 */
|
*breakpoint += CheckDebugUnit(DebugLoadData,temp); /* MM170901 */
|
return temp;
|
return temp;
|
}
|
}
|
|
|
unsigned char evalsim_mem8(unsigned long memaddr)
|
unsigned char evalsim_mem8(unsigned long memaddr)
|
Line 464... |
Line 464... |
if (memaddr & 3) {
|
if (memaddr & 3) {
|
except_handle (EXCEPT_ALIGN, memaddr);
|
except_handle (EXCEPT_ALIGN, memaddr);
|
return;
|
return;
|
}
|
}
|
|
|
if (DEBUG_ENABLED) {
|
if (config.debug.enabled) {
|
*breakpoint += CheckDebugUnit(DebugStoreAddress,memaddr); /* 28/05/01 CZ */
|
*breakpoint += CheckDebugUnit(DebugStoreAddress,memaddr); /* 28/05/01 CZ */
|
*breakpoint += CheckDebugUnit(DebugStoreData,value);
|
*breakpoint += CheckDebugUnit(DebugStoreData,value);
|
}
|
}
|
|
|
setsim_mem32(memaddr, value);
|
setsim_mem32(memaddr, value);
|
Line 522... |
Line 522... |
if (memaddr & 1) {
|
if (memaddr & 1) {
|
except_handle (EXCEPT_ALIGN, memaddr);
|
except_handle (EXCEPT_ALIGN, memaddr);
|
return;
|
return;
|
}
|
}
|
|
|
if (DEBUG_ENABLED) {
|
if (config.debug.enabled) {
|
*breakpoint += CheckDebugUnit(DebugStoreAddress,memaddr); /* 28/05/01 CZ */
|
*breakpoint += CheckDebugUnit(DebugStoreAddress,memaddr); /* 28/05/01 CZ */
|
*breakpoint += CheckDebugUnit(DebugStoreData,value);
|
*breakpoint += CheckDebugUnit(DebugStoreData,value);
|
}
|
}
|
|
|
setsim_mem16(memaddr, value);
|
setsim_mem16(memaddr, value);
|
Line 573... |
Line 573... |
|
|
/* If we produced exception don't set anything */
|
/* If we produced exception don't set anything */
|
if (pending.valid == 1)
|
if (pending.valid == 1)
|
return;
|
return;
|
|
|
if (DEBUG_ENABLED) {
|
if (config.debug.enabled) {
|
*breakpoint += CheckDebugUnit(DebugStoreAddress,memaddr); /* 28/05/01 CZ */
|
*breakpoint += CheckDebugUnit(DebugStoreAddress,memaddr); /* 28/05/01 CZ */
|
*breakpoint += CheckDebugUnit(DebugStoreData,value);
|
*breakpoint += CheckDebugUnit(DebugStoreData,value);
|
}
|
}
|
|
|
setsim_mem8(memaddr, value);
|
setsim_mem8(memaddr, value);
|