qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/11] target/avr: Increase page size
@ 2025-03-25 22:43 Richard Henderson
  2025-03-25 22:43 ` [PATCH v2 01/11] target/avr: Fix buffer read in avr_print_insn Richard Henderson
                   ` (11 more replies)
  0 siblings, 12 replies; 27+ messages in thread
From: Richard Henderson @ 2025-03-25 22:43 UTC (permalink / raw)
  To: qemu-devel; +Cc: mrolnik, philmd, pierrick.bouvier

For single-binary, we would really like to have a common TARGET_PAGE_BITS_MIN.

AVR's use of TARGET_PAGE_BITS == 8 is unfortunately too small.  This was due
to having mmio in the first 256 or 512 bytes and RAM starting immediately
afterward -- the softmmu page table mapping really doesn't like mixed i/o
and sram on the same page.

For v2, my solution is to map the balance of the first page with a ram device
instead of normal ram.  This way, the entire first page is always i/o.
In addition, add some symbolic names for the cpu registers in i/o 0x38-0x3f.


r~


Richard Henderson (11):
  target/avr: Fix buffer read in avr_print_insn
  target/avr: Improve decode of LDS, STS
  hw/core/cpu: Use size_t for memory_rw_debug len argument
  target/avr: Remove OFFSET_CPU_REGISTERS
  target/avr: Remove NUMBER_OF_IO_REGISTERS
  target/avr: Add defines for i/o port registers
  target/avr: Move cpu register accesses into system memory
  target/avr: Use cpu_stb_mmuidx_ra in helper_fullwr
  target/avr: Use do_stb in avr_cpu_do_interrupt
  hw/avr: Prepare for TARGET_PAGE_SIZE > 256
  target/avr: Increase TARGET_PAGE_BITS to 10

 hw/avr/atmega.h           |   1 +
 include/hw/core/cpu.h     |   2 +-
 target/avr/cpu-param.h    |   8 +-
 target/avr/cpu.h          |  21 ++-
 target/avr/helper.h       |   3 -
 target/sparc/cpu.h        |   2 +-
 hw/avr/atmega.c           |  39 +++++-
 target/avr/cpu.c          |  16 +++
 target/avr/disas.c        |  21 ++-
 target/avr/helper.c       | 262 ++++++++++++++++----------------------
 target/avr/translate.c    |  44 ++++---
 target/sparc/mmu_helper.c |   2 +-
 target/avr/insn.decode    |   7 +-
 13 files changed, 222 insertions(+), 206 deletions(-)

-- 
2.43.0



^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2025-03-31 18:51 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-25 22:43 [PATCH v2 00/11] target/avr: Increase page size Richard Henderson
2025-03-25 22:43 ` [PATCH v2 01/11] target/avr: Fix buffer read in avr_print_insn Richard Henderson
2025-03-25 23:09   ` Philippe Mathieu-Daudé
2025-03-25 22:43 ` [PATCH v2 02/11] target/avr: Improve decode of LDS, STS Richard Henderson
2025-03-25 23:13   ` Philippe Mathieu-Daudé
2025-03-25 23:40     ` Richard Henderson
2025-03-25 22:43 ` [PATCH v2 03/11] hw/core/cpu: Use size_t for memory_rw_debug len argument Richard Henderson
2025-03-25 22:43 ` [PATCH v2 04/11] target/avr: Remove OFFSET_CPU_REGISTERS Richard Henderson
2025-03-25 22:43 ` [PATCH v2 05/11] target/avr: Remove NUMBER_OF_IO_REGISTERS Richard Henderson
2025-03-25 23:03   ` Philippe Mathieu-Daudé
2025-03-25 23:41     ` Richard Henderson
2025-03-26 15:14   ` Pierrick Bouvier
2025-03-25 22:43 ` [PATCH v2 06/11] target/avr: Add defines for i/o port registers Richard Henderson
2025-03-25 23:04   ` Philippe Mathieu-Daudé
2025-03-26 15:15   ` Pierrick Bouvier
2025-03-25 22:43 ` [PATCH v2 07/11] target/avr: Move cpu register accesses into system memory Richard Henderson
2025-03-26 15:16   ` Pierrick Bouvier
2025-03-25 22:44 ` [PATCH v2 08/11] target/avr: Use cpu_stb_mmuidx_ra in helper_fullwr Richard Henderson
2025-03-25 22:44 ` [PATCH v2 09/11] target/avr: Use do_stb in avr_cpu_do_interrupt Richard Henderson
2025-03-25 22:44 ` [PATCH v2 10/11] hw/avr: Prepare for TARGET_PAGE_SIZE > 256 Richard Henderson
2025-03-26 15:18   ` Pierrick Bouvier
2025-03-27 18:24   ` Philippe Mathieu-Daudé
2025-03-27 18:46     ` Richard Henderson
2025-03-25 22:44 ` [PATCH v2 11/11] target/avr: Increase TARGET_PAGE_BITS to 10 Richard Henderson
2025-03-26 15:16   ` Pierrick Bouvier
2025-03-31 18:48 ` [PATCH v2 00/11] target/avr: Increase page size Philippe Mathieu-Daudé
2025-03-31 18:51   ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).