mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-24 22:15:07 +00:00
target/arm: Allow execution from small regions
Now that we have full support for small regions, including execution, we can remove the workarounds where we marked all small regions as non-executable for the M-profile MPU and SAU. Backports commit d4b6275df320cee764d56b194b1898547f545857 from qemu
This commit is contained in:
parent
1301becdab
commit
680c79956d
|
@ -9434,17 +9434,6 @@ static bool get_phys_addr_pmsav7(CPUARMState *env, uint32_t address,
|
||||||
|
|
||||||
fi->type = ARMFault_Permission;
|
fi->type = ARMFault_Permission;
|
||||||
fi->level = 1;
|
fi->level = 1;
|
||||||
/*
|
|
||||||
* Core QEMU code can't handle execution from small pages yet, so
|
|
||||||
* don't try it. This way we'll get an MPU exception, rather than
|
|
||||||
* eventually causing QEMU to exit in get_page_addr_code().
|
|
||||||
*/
|
|
||||||
if (*page_size < TARGET_PAGE_SIZE && (*prot & PAGE_EXEC)) {
|
|
||||||
qemu_log_mask(LOG_UNIMP,
|
|
||||||
"MPU: No support for execution from regions "
|
|
||||||
"smaller than 1K\n");
|
|
||||||
*prot &= ~PAGE_EXEC;
|
|
||||||
}
|
|
||||||
return !(*prot & (1 << access_type));
|
return !(*prot & (1 << access_type));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9674,18 +9663,6 @@ static bool pmsav8_mpu_lookup(CPUARMState *env, uint32_t address,
|
||||||
|
|
||||||
fi->type = ARMFault_Permission;
|
fi->type = ARMFault_Permission;
|
||||||
fi->level = 1;
|
fi->level = 1;
|
||||||
/*
|
|
||||||
* Core QEMU code can't handle execution from small pages yet, so
|
|
||||||
* don't try it. This means any attempted execution will generate
|
|
||||||
* an MPU exception, rather than eventually causing QEMU to exit in
|
|
||||||
* get_page_addr_code().
|
|
||||||
*/
|
|
||||||
if (*is_subpage && (*prot & PAGE_EXEC)) {
|
|
||||||
qemu_log_mask(LOG_UNIMP,
|
|
||||||
"MPU: No support for execution from regions "
|
|
||||||
"smaller than 1K\n");
|
|
||||||
*prot &= ~PAGE_EXEC;
|
|
||||||
}
|
|
||||||
return !(*prot & (1 << access_type));
|
return !(*prot & (1 << access_type));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue