mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
target/avr: Move cpu register accesses into system memory
Integrate the i/o 0x00-0x1f and 0x38-0x3f loopbacks into the cpu registers with normal address space accesses. We no longer need to trap accesses to the first page within avr_cpu_tlb_fill but can wait until a write occurs. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
a2860ff908
commit
204a7bd856
5 changed files with 138 additions and 153 deletions
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include "cpu-qom.h"
|
||||
#include "exec/cpu-defs.h"
|
||||
#include "exec/memory.h"
|
||||
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
#error "AVR 8-bit does not support user mode"
|
||||
|
@ -152,6 +153,9 @@ struct ArchCPU {
|
|||
|
||||
CPUAVRState env;
|
||||
|
||||
MemoryRegion cpu_reg1;
|
||||
MemoryRegion cpu_reg2;
|
||||
|
||||
/* Initial value of stack pointer */
|
||||
uint32_t init_sp;
|
||||
};
|
||||
|
@ -252,6 +256,9 @@ bool avr_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
|
|||
MMUAccessType access_type, int mmu_idx,
|
||||
bool probe, uintptr_t retaddr);
|
||||
|
||||
extern const MemoryRegionOps avr_cpu_reg1;
|
||||
extern const MemoryRegionOps avr_cpu_reg2;
|
||||
|
||||
#include "exec/cpu-all.h"
|
||||
|
||||
#endif /* QEMU_AVR_CPU_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue