mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-07-09 12:50:45 +00:00
target-arm: Suppress EPD for S2, EL2 and EL3 translations
Stage-2 translations, EL2 and EL3 regimes don't have the EPD control. Backports commit 0c5fbf3b4c1e5210354de71a3dc2ebc8c8a01f31 from qemu
This commit is contained in:
parent
f5b3b9f6e9
commit
2dfdb13786
|
@ -5717,7 +5717,7 @@ static bool get_phys_addr_lpae(CPUARMState *env, target_ulong address,
|
||||||
/* Read an LPAE long-descriptor translation table. */
|
/* Read an LPAE long-descriptor translation table. */
|
||||||
MMUFaultType fault_type = translation_fault;
|
MMUFaultType fault_type = translation_fault;
|
||||||
uint32_t level = 1;
|
uint32_t level = 1;
|
||||||
uint32_t epd;
|
uint32_t epd = 0;
|
||||||
int32_t tsz;
|
int32_t tsz;
|
||||||
uint32_t tg;
|
uint32_t tg;
|
||||||
uint64_t ttbr;
|
uint64_t ttbr;
|
||||||
|
@ -5811,7 +5811,9 @@ static bool get_phys_addr_lpae(CPUARMState *env, target_ulong address,
|
||||||
*/
|
*/
|
||||||
if (ttbr_select == 0) {
|
if (ttbr_select == 0) {
|
||||||
ttbr = regime_ttbr(env, mmu_idx, 0);
|
ttbr = regime_ttbr(env, mmu_idx, 0);
|
||||||
|
if (el < 2) {
|
||||||
epd = extract32(tcr->raw_tcr, 7, 1);
|
epd = extract32(tcr->raw_tcr, 7, 1);
|
||||||
|
}
|
||||||
tsz = t0sz;
|
tsz = t0sz;
|
||||||
|
|
||||||
tg = extract32(tcr->raw_tcr, 14, 2);
|
tg = extract32(tcr->raw_tcr, 14, 2);
|
||||||
|
|
Loading…
Reference in a new issue