mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-08-04 08:12:01 +00:00
target-arm: Implement cpu_get_phys_page_attrs_debug
Implement cpu_get_phys_page_attrs_debug instead of cpu_get_phys_page_debug. Backports commit 0faea0c7e6b729c64035b3591b184eeeeef6f1d4 from qemu
This commit is contained in:
parent
f96988503a
commit
d3eb5fb710
|
@ -129,7 +129,7 @@
|
|||
#define arm_cpu_do_interrupt arm_cpu_do_interrupt_aarch64
|
||||
#define arm_cpu_exec_interrupt arm_cpu_exec_interrupt_aarch64
|
||||
#define arm_cpu_finalizefn arm_cpu_finalizefn_aarch64
|
||||
#define arm_cpu_get_phys_page_debug arm_cpu_get_phys_page_debug_aarch64
|
||||
#define arm_cpu_get_phys_page_attrs_debug arm_cpu_get_phys_page_attrs_debug_aarch64
|
||||
#define arm_cpu_initfn arm_cpu_initfn_aarch64
|
||||
#define arm_cpu_list arm_cpu_list_aarch64
|
||||
#define cpu_loop_exit cpu_loop_exit_aarch64
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
#define arm_cpu_do_interrupt arm_cpu_do_interrupt_aarch64eb
|
||||
#define arm_cpu_exec_interrupt arm_cpu_exec_interrupt_aarch64eb
|
||||
#define arm_cpu_finalizefn arm_cpu_finalizefn_aarch64eb
|
||||
#define arm_cpu_get_phys_page_debug arm_cpu_get_phys_page_debug_aarch64eb
|
||||
#define arm_cpu_get_phys_page_attrs_debug arm_cpu_get_phys_page_attrs_debug_aarch64eb
|
||||
#define arm_cpu_initfn arm_cpu_initfn_aarch64eb
|
||||
#define arm_cpu_list arm_cpu_list_aarch64eb
|
||||
#define cpu_loop_exit cpu_loop_exit_aarch64eb
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
#define arm_cpu_do_interrupt arm_cpu_do_interrupt_arm
|
||||
#define arm_cpu_exec_interrupt arm_cpu_exec_interrupt_arm
|
||||
#define arm_cpu_finalizefn arm_cpu_finalizefn_arm
|
||||
#define arm_cpu_get_phys_page_debug arm_cpu_get_phys_page_debug_arm
|
||||
#define arm_cpu_get_phys_page_attrs_debug arm_cpu_get_phys_page_attrs_debug_arm
|
||||
#define arm_cpu_initfn arm_cpu_initfn_arm
|
||||
#define arm_cpu_list arm_cpu_list_arm
|
||||
#define cpu_loop_exit cpu_loop_exit_arm
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
#define arm_cpu_do_interrupt arm_cpu_do_interrupt_armeb
|
||||
#define arm_cpu_exec_interrupt arm_cpu_exec_interrupt_armeb
|
||||
#define arm_cpu_finalizefn arm_cpu_finalizefn_armeb
|
||||
#define arm_cpu_get_phys_page_debug arm_cpu_get_phys_page_debug_armeb
|
||||
#define arm_cpu_get_phys_page_attrs_debug arm_cpu_get_phys_page_attrs_debug_armeb
|
||||
#define arm_cpu_initfn arm_cpu_initfn_armeb
|
||||
#define arm_cpu_list arm_cpu_list_armeb
|
||||
#define cpu_loop_exit cpu_loop_exit_armeb
|
||||
|
|
|
@ -135,7 +135,7 @@ symbols = (
|
|||
'arm_cpu_do_interrupt',
|
||||
'arm_cpu_exec_interrupt',
|
||||
'arm_cpu_finalizefn',
|
||||
'arm_cpu_get_phys_page_debug',
|
||||
'arm_cpu_get_phys_page_attrs_debug',
|
||||
'arm_cpu_initfn',
|
||||
'arm_cpu_list',
|
||||
'cpu_loop_exit',
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
#define arm_cpu_do_interrupt arm_cpu_do_interrupt_m68k
|
||||
#define arm_cpu_exec_interrupt arm_cpu_exec_interrupt_m68k
|
||||
#define arm_cpu_finalizefn arm_cpu_finalizefn_m68k
|
||||
#define arm_cpu_get_phys_page_debug arm_cpu_get_phys_page_debug_m68k
|
||||
#define arm_cpu_get_phys_page_attrs_debug arm_cpu_get_phys_page_attrs_debug_m68k
|
||||
#define arm_cpu_initfn arm_cpu_initfn_m68k
|
||||
#define arm_cpu_list arm_cpu_list_m68k
|
||||
#define cpu_loop_exit cpu_loop_exit_m68k
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
#define arm_cpu_do_interrupt arm_cpu_do_interrupt_mips
|
||||
#define arm_cpu_exec_interrupt arm_cpu_exec_interrupt_mips
|
||||
#define arm_cpu_finalizefn arm_cpu_finalizefn_mips
|
||||
#define arm_cpu_get_phys_page_debug arm_cpu_get_phys_page_debug_mips
|
||||
#define arm_cpu_get_phys_page_attrs_debug arm_cpu_get_phys_page_attrs_debug_mips
|
||||
#define arm_cpu_initfn arm_cpu_initfn_mips
|
||||
#define arm_cpu_list arm_cpu_list_mips
|
||||
#define cpu_loop_exit cpu_loop_exit_mips
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
#define arm_cpu_do_interrupt arm_cpu_do_interrupt_mips64
|
||||
#define arm_cpu_exec_interrupt arm_cpu_exec_interrupt_mips64
|
||||
#define arm_cpu_finalizefn arm_cpu_finalizefn_mips64
|
||||
#define arm_cpu_get_phys_page_debug arm_cpu_get_phys_page_debug_mips64
|
||||
#define arm_cpu_get_phys_page_attrs_debug arm_cpu_get_phys_page_attrs_debug_mips64
|
||||
#define arm_cpu_initfn arm_cpu_initfn_mips64
|
||||
#define arm_cpu_list arm_cpu_list_mips64
|
||||
#define cpu_loop_exit cpu_loop_exit_mips64
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
#define arm_cpu_do_interrupt arm_cpu_do_interrupt_mips64el
|
||||
#define arm_cpu_exec_interrupt arm_cpu_exec_interrupt_mips64el
|
||||
#define arm_cpu_finalizefn arm_cpu_finalizefn_mips64el
|
||||
#define arm_cpu_get_phys_page_debug arm_cpu_get_phys_page_debug_mips64el
|
||||
#define arm_cpu_get_phys_page_attrs_debug arm_cpu_get_phys_page_attrs_debug_mips64el
|
||||
#define arm_cpu_initfn arm_cpu_initfn_mips64el
|
||||
#define arm_cpu_list arm_cpu_list_mips64el
|
||||
#define cpu_loop_exit cpu_loop_exit_mips64el
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
#define arm_cpu_do_interrupt arm_cpu_do_interrupt_mipsel
|
||||
#define arm_cpu_exec_interrupt arm_cpu_exec_interrupt_mipsel
|
||||
#define arm_cpu_finalizefn arm_cpu_finalizefn_mipsel
|
||||
#define arm_cpu_get_phys_page_debug arm_cpu_get_phys_page_debug_mipsel
|
||||
#define arm_cpu_get_phys_page_attrs_debug arm_cpu_get_phys_page_attrs_debug_mipsel
|
||||
#define arm_cpu_initfn arm_cpu_initfn_mipsel
|
||||
#define arm_cpu_list arm_cpu_list_mipsel
|
||||
#define cpu_loop_exit cpu_loop_exit_mipsel
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
#define arm_cpu_do_interrupt arm_cpu_do_interrupt_powerpc
|
||||
#define arm_cpu_exec_interrupt arm_cpu_exec_interrupt_powerpc
|
||||
#define arm_cpu_finalizefn arm_cpu_finalizefn_powerpc
|
||||
#define arm_cpu_get_phys_page_debug arm_cpu_get_phys_page_debug_powerpc
|
||||
#define arm_cpu_get_phys_page_attrs_debug arm_cpu_get_phys_page_attrs_debug_powerpc
|
||||
#define arm_cpu_initfn arm_cpu_initfn_powerpc
|
||||
#define arm_cpu_list arm_cpu_list_powerpc
|
||||
#define cpu_loop_exit cpu_loop_exit_powerpc
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
#define arm_cpu_do_interrupt arm_cpu_do_interrupt_sparc
|
||||
#define arm_cpu_exec_interrupt arm_cpu_exec_interrupt_sparc
|
||||
#define arm_cpu_finalizefn arm_cpu_finalizefn_sparc
|
||||
#define arm_cpu_get_phys_page_debug arm_cpu_get_phys_page_debug_sparc
|
||||
#define arm_cpu_get_phys_page_attrs_debug arm_cpu_get_phys_page_attrs_debug_sparc
|
||||
#define arm_cpu_initfn arm_cpu_initfn_sparc
|
||||
#define arm_cpu_list arm_cpu_list_sparc
|
||||
#define cpu_loop_exit cpu_loop_exit_sparc
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
#define arm_cpu_do_interrupt arm_cpu_do_interrupt_sparc64
|
||||
#define arm_cpu_exec_interrupt arm_cpu_exec_interrupt_sparc64
|
||||
#define arm_cpu_finalizefn arm_cpu_finalizefn_sparc64
|
||||
#define arm_cpu_get_phys_page_debug arm_cpu_get_phys_page_debug_sparc64
|
||||
#define arm_cpu_get_phys_page_attrs_debug arm_cpu_get_phys_page_attrs_debug_sparc64
|
||||
#define arm_cpu_initfn arm_cpu_initfn_sparc64
|
||||
#define arm_cpu_list arm_cpu_list_sparc64
|
||||
#define cpu_loop_exit cpu_loop_exit_sparc64
|
||||
|
|
|
@ -215,7 +215,8 @@ void arm_cpu_do_interrupt(CPUState *cpu);
|
|||
void arm_v7m_cpu_do_interrupt(CPUState *cpu);
|
||||
bool arm_cpu_exec_interrupt(CPUState *cpu, int int_req);
|
||||
|
||||
hwaddr arm_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
|
||||
hwaddr arm_cpu_get_phys_page_attrs_debug(CPUState *cpu, vaddr addr,
|
||||
MemTxAttrs *attrs);
|
||||
|
||||
int arm_cpu_gdb_read_register(CPUState *cpu, uint8_t *buf, int reg);
|
||||
int arm_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg);
|
||||
|
|
|
@ -1327,7 +1327,7 @@ static void arm_cpu_class_init(struct uc_struct *uc, ObjectClass *oc, void *data
|
|||
#else
|
||||
cc->do_interrupt = arm_cpu_do_interrupt;
|
||||
cc->do_unaligned_access = arm_cpu_do_unaligned_access;
|
||||
cc->get_phys_page_debug = arm_cpu_get_phys_page_debug;
|
||||
cc->get_phys_page_attrs_debug = arm_cpu_get_phys_page_attrs_debug;
|
||||
cc->asidx_from_attrs = arm_asidx_from_attrs;
|
||||
// UNICORN: Commented out
|
||||
//cc->vmsd = &vmstate_arm_cpu;
|
||||
|
|
|
@ -6690,7 +6690,8 @@ bool arm_tlb_fill(CPUState *cs, vaddr address,
|
|||
return ret;
|
||||
}
|
||||
|
||||
hwaddr arm_cpu_get_phys_page_debug(CPUState *cs, vaddr addr)
|
||||
hwaddr arm_cpu_get_phys_page_attrs_debug(CPUState *cs, vaddr addr,
|
||||
MemTxAttrs *attrs)
|
||||
{
|
||||
ARMCPU *cpu = ARM_CPU(NULL, cs);
|
||||
CPUARMState *env = &cpu->env;
|
||||
|
@ -6699,16 +6700,14 @@ hwaddr arm_cpu_get_phys_page_debug(CPUState *cs, vaddr addr)
|
|||
int prot;
|
||||
bool ret;
|
||||
uint32_t fsr;
|
||||
MemTxAttrs attrs = {0};
|
||||
ARMMMUFaultInfo fi = {0};
|
||||
|
||||
ret = get_phys_addr(env, addr, 0, cpu_mmu_index(env, false), &phys_addr,
|
||||
&attrs, &prot, &page_size, &fsr, &fi);
|
||||
attrs, &prot, &page_size, &fsr, &fi);
|
||||
|
||||
if (ret) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return phys_addr;
|
||||
}
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
#define arm_cpu_do_interrupt arm_cpu_do_interrupt_x86_64
|
||||
#define arm_cpu_exec_interrupt arm_cpu_exec_interrupt_x86_64
|
||||
#define arm_cpu_finalizefn arm_cpu_finalizefn_x86_64
|
||||
#define arm_cpu_get_phys_page_debug arm_cpu_get_phys_page_debug_x86_64
|
||||
#define arm_cpu_get_phys_page_attrs_debug arm_cpu_get_phys_page_attrs_debug_x86_64
|
||||
#define arm_cpu_initfn arm_cpu_initfn_x86_64
|
||||
#define arm_cpu_list arm_cpu_list_x86_64
|
||||
#define cpu_loop_exit cpu_loop_exit_x86_64
|
||||
|
|
Loading…
Reference in a new issue