mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-07 11:28:46 +00:00
Implement no-fault loads
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5148 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
4487fd349b
commit
e83ce55068
@ -1402,10 +1402,17 @@ uint64_t helper_ld_asi(target_ulong addr, int asi, int size, int sign)
|
|||||||
address_mask(env, &addr);
|
address_mask(env, &addr);
|
||||||
|
|
||||||
switch (asi) {
|
switch (asi) {
|
||||||
case 0x80: // Primary
|
|
||||||
case 0x82: // Primary no-fault
|
case 0x82: // Primary no-fault
|
||||||
case 0x88: // Primary LE
|
|
||||||
case 0x8a: // Primary no-fault LE
|
case 0x8a: // Primary no-fault LE
|
||||||
|
if (page_check_range(addr, size, PAGE_READ) == -1) {
|
||||||
|
#ifdef DEBUG_ASI
|
||||||
|
dump_asi("read ", last_addr, asi, size, ret);
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
// Fall through
|
||||||
|
case 0x80: // Primary
|
||||||
|
case 0x88: // Primary LE
|
||||||
{
|
{
|
||||||
switch(size) {
|
switch(size) {
|
||||||
case 1:
|
case 1:
|
||||||
@ -1424,10 +1431,17 @@ uint64_t helper_ld_asi(target_ulong addr, int asi, int size, int sign)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 0x81: // Secondary
|
|
||||||
case 0x83: // Secondary no-fault
|
case 0x83: // Secondary no-fault
|
||||||
case 0x89: // Secondary LE
|
|
||||||
case 0x8b: // Secondary no-fault LE
|
case 0x8b: // Secondary no-fault LE
|
||||||
|
if (page_check_range(addr, size, PAGE_READ) == -1) {
|
||||||
|
#ifdef DEBUG_ASI
|
||||||
|
dump_asi("read ", last_addr, asi, size, ret);
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
// Fall through
|
||||||
|
case 0x81: // Secondary
|
||||||
|
case 0x89: // Secondary LE
|
||||||
// XXX
|
// XXX
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -1564,12 +1578,19 @@ uint64_t helper_ld_asi(target_ulong addr, int asi, int size, int sign)
|
|||||||
|
|
||||||
helper_check_align(addr, size - 1);
|
helper_check_align(addr, size - 1);
|
||||||
switch (asi) {
|
switch (asi) {
|
||||||
|
case 0x82: // Primary no-fault
|
||||||
|
case 0x8a: // Primary no-fault LE
|
||||||
|
if (cpu_get_phys_page_debug(env, addr) == -1ULL) {
|
||||||
|
#ifdef DEBUG_ASI
|
||||||
|
dump_asi("read ", last_addr, asi, size, ret);
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
// Fall through
|
||||||
case 0x10: // As if user primary
|
case 0x10: // As if user primary
|
||||||
case 0x18: // As if user primary LE
|
case 0x18: // As if user primary LE
|
||||||
case 0x80: // Primary
|
case 0x80: // Primary
|
||||||
case 0x82: // Primary no-fault
|
|
||||||
case 0x88: // Primary LE
|
case 0x88: // Primary LE
|
||||||
case 0x8a: // Primary no-fault LE
|
|
||||||
if ((asi & 0x80) && (env->pstate & PS_PRIV)) {
|
if ((asi & 0x80) && (env->pstate & PS_PRIV)) {
|
||||||
if ((env->def->features & CPU_FEATURE_HYPV)
|
if ((env->def->features & CPU_FEATURE_HYPV)
|
||||||
&& env->hpstate & HS_PRIV) {
|
&& env->hpstate & HS_PRIV) {
|
||||||
@ -1650,15 +1671,22 @@ uint64_t helper_ld_asi(target_ulong addr, int asi, int size, int sign)
|
|||||||
// Only ldda allowed
|
// Only ldda allowed
|
||||||
raise_exception(TT_ILL_INSN);
|
raise_exception(TT_ILL_INSN);
|
||||||
return 0;
|
return 0;
|
||||||
|
case 0x83: // Secondary no-fault
|
||||||
|
case 0x8b: // Secondary no-fault LE
|
||||||
|
if (cpu_get_phys_page_debug(env, addr) == -1ULL) {
|
||||||
|
#ifdef DEBUG_ASI
|
||||||
|
dump_asi("read ", last_addr, asi, size, ret);
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
// Fall through
|
||||||
case 0x04: // Nucleus
|
case 0x04: // Nucleus
|
||||||
case 0x0c: // Nucleus Little Endian (LE)
|
case 0x0c: // Nucleus Little Endian (LE)
|
||||||
case 0x11: // As if user secondary
|
case 0x11: // As if user secondary
|
||||||
case 0x19: // As if user secondary LE
|
case 0x19: // As if user secondary LE
|
||||||
case 0x4a: // UPA config
|
case 0x4a: // UPA config
|
||||||
case 0x81: // Secondary
|
case 0x81: // Secondary
|
||||||
case 0x83: // Secondary no-fault
|
|
||||||
case 0x89: // Secondary LE
|
case 0x89: // Secondary LE
|
||||||
case 0x8b: // Secondary no-fault LE
|
|
||||||
// XXX
|
// XXX
|
||||||
break;
|
break;
|
||||||
case 0x45: // LSU
|
case 0x45: // LSU
|
||||||
|
Loading…
Reference in New Issue
Block a user