hw/sh4: current patch queue
cover hw/sh4: current patch queue
Hi,
As there is no SH4 active maintainer, I gathered various patches in a single series, in case someone is willing to apply them.
CI report:
https://travis-ci.org/github/philmd/qemu/builds/692828388
Regards,
Phil.
Philippe Mathieu-Daudé (3):
hw/sh4: Use MemoryRegion typedef
hw/sh4: Extract timer definitions to 'hw/timer/tmu012.h' hw/timer/sh_timer: Remove unused 'qemu/timer.h' include
Thomas Huth (2):
tests/acceptance: Add boot tests for sh4 QEMU advent calendar image .travis.yml: Test SH4 QEMU advent calendar image
include/hw/sh4/sh.h | 12 +----------- include/hw/timer/tmu012.h | 23 +++++++++++++++++++++++ hw/sh4/sh7750.c | 1 + hw/timer/sh_timer.c | 3 ++- .travis.yml | 2 +- tests/acceptance/boot_linux_console.py | 13 +++++++++++-- 6 files changed, 39 insertions(+), 15 deletions(-) create mode 100644 include/hw/timer/tmu012.h
Signature · 1 line
2.21.3
PATCH 1/5 hw/sh4: Use MemoryRegion typedef
Use the MemoryRegion type defined in "qemu/typedefs.h", to keep the repository style consistent.
Message-Id: <[email protected]>
--- include/hw/sh4/sh.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
include/hw/sh4/sh.h +2 -3
@@ -10,9 +10,8 @@/* sh7750.c */ struct SH7750State ; -struct MemoryRegion ; -struct SH7750State *sh7750_init (SuperHCPU *cpu,struct MemoryRegion *sysmem); +struct SH7750State *sh7750_init (SuperHCPU *cpu,MemoryRegion *sysmem); typedef struct { /* The callback will be triggered if any of the designated lines change */
@@ -32,7 +31,7 @@ int sh7750_register_io_device(struct SH7750State *s,#define TMU012_FEAT_TOCR (1 << 0)#define TMU012_FEAT_3CHAN (1 << 1)#define TMU012_FEAT_EXTCLK (1 << 2) -void tmu012_init (struct MemoryRegion *sysmem,hwaddr base, +void tmu012_init (MemoryRegion *sysmem,hwaddr base,int feat,uint32_t freq,qemu_irq ch0_irq,qemu_irq ch1_irq,qemu_irq ch2_irq0,qemu_irq ch2_irq1);
Signature · 1 line
2.21.3
PATCH 2/5 hw/sh4: Extract timer definitions to 'hw/timer/tmu012.h'
In reply to Philippe Mathieu-DaudéExtract timer definitions to 'hw/timer/tmu012.h'.
Message-Id: <[email protected]>
--- include/hw/sh4/sh.h | 9 --------- include/hw/timer/tmu012.h | 23 +++++++++++++++++++++++ hw/sh4/sh7750.c | 1 + hw/timer/sh_timer.c | 2 ++ 4 files changed, 26 insertions(+), 9 deletions(-) create mode 100644 include/hw/timer/tmu012.h
include/hw/sh4/sh.h +0 -9
@@ -27,15 +27,6 @@ typedef struct {int sh7750_register_io_device (struct SH7750State *s,sh7750_io_device * device); -/* sh_timer.c */ -#define TMU012_FEAT_TOCR (1 << 0) -#define TMU012_FEAT_3CHAN (1 << 1) -#define TMU012_FEAT_EXTCLK (1 << 2) -void tmu012_init (MemoryRegion *sysmem,hwaddr base, -int feat,uint32_t freq, -qemu_irq ch0_irq,qemu_irq ch1_irq, -qemu_irq ch2_irq0,qemu_irq ch2_irq1); -/* sh_serial.c */ #define SH_SERIAL_FEAT_SCIF (1 << 0)
include/hw/timer/tmu012.h new file +23 -0
@@ -0,0 +1,23 @@ +/* +* SuperH Timer +* +* Copyright (c) 2007 Magnus Damm +* +* This code is licensed under the GPL. +*/ + +#ifndef HW_TIMER_TMU012_H +#define HW_TIMER_TMU012_H + +#include "exec/hwaddr.h" + +#define TMU012_FEAT_TOCR (1 << 0) +#define TMU012_FEAT_3CHAN (1 << 1) +#define TMU012_FEAT_EXTCLK (1 << 2) + +void tmu012_init (MemoryRegion *sysmem,hwaddr base, +int feat,uint32_t freq, +qemu_irq ch0_irq,qemu_irq ch1_irq, +qemu_irq ch2_irq0,qemu_irq ch2_irq1); + +#endif
hw/sh4/sh7750.c +1 -0
@@ -30,6 +30,7 @@#include "sh7750_regs.h" #include "sh7750_regnames.h" #include "hw/sh4/sh_intc.h" +#include "hw/timer/tmu012.h" #include "cpu.h" #include "exec/exec-all.h"
hw/timer/sh_timer.c +2 -0
@@ -9,10 +9,12 @@*/ #include "qemu/osdep.h" +#include "exec/memory.h" #include "hw/hw.h" #include "hw/irq.h" #include "hw/sh4/sh.h" #include "qemu/timer.h" +#include "hw/timer/tmu012.h" #include "hw/ptimer.h" //#define DEBUG_TIMER
Signature · 1 line
2.21.3
PATCH 3/5 hw/timer/sh_timer: Remove unused 'qemu/timer.h' include
In reply to Philippe Mathieu-DaudéRemove unused "qemu/timer.h" include.
Message-Id: <[email protected]>
--- hw/timer/sh_timer.c | 1 - 1 file changed, 1 deletion(-)
hw/timer/sh_timer.c +0 -1
@@ -13,7 +13,6 @@#include "hw/hw.h" #include "hw/irq.h" #include "hw/sh4/sh.h" -#include "qemu/timer.h" #include "hw/timer/tmu012.h" #include "hw/ptimer.h"
Signature · 1 line
2.21.3
PATCH 4/5 tests/acceptance: Add boot tests for sh4 QEMU advent calendar image
In reply to Philippe Mathieu-DaudéFrom: Thomas Huth <[email protected]>
Now that we can select the second serial console in the acceptance tests (see commit 746f244d9720 "Allow to use other serial consoles than default"), we can also test the sh4 image from the QEMU advent calendar 2018.
Message-Id: <[email protected]>
--- tests/acceptance/boot_linux_console.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
tests/acceptance/boot_linux_console.py +11 -2
@@ -826,12 +826,12 @@ def test_m68k_q800(self): console_pattern = 'No filesystem could mount root' self.wait_for_console_pattern(console_pattern) - def do_test_advcal_2018(self, day, tar_hash, kernel_name): + def do_test_advcal_2018(self, day, tar_hash, kernel_name, console=0): tar_url = ('https://www.qemu-advent-calendar.org' '/2018/download/day' + day + '.tar.xz') file_path = self.fetch_asset(tar_url, asset_hash=tar_hash) archive.extract(file_path, self.workdir) - self.vm.set_console() + self.vm.set_console(console_index=console) self.vm.add_args('-kernel', self.workdir + '/day' + day + '/' + kernel_name) self.vm.launch()
@@ -905,6 +905,15 @@ def test_ppc_mac99(self): self.vm.add_args('-M', 'graphics=off') self.do_test_advcal_2018('15', tar_hash, 'invaders.elf') + def test_sh4_r2d(self): + """ + :avocado: tags=arch:sh4 + :avocado: tags=machine:r2d + """ + tar_hash = 'fe06a4fd8ccbf2e27928d64472939d47829d4c7e' + self.vm.add_args('-append', 'console=ttySC1') + self.do_test_advcal_2018('09', tar_hash, 'zImage', console=1) + def test_sparc_ss20(self): """ :avocado: tags=arch:sparc
Signature · 1 line
2.21.3
PATCH 5/5 .travis.yml: Test SH4 QEMU advent calendar image
In reply to Philippe Mathieu-DaudéFrom: Thomas Huth <[email protected]>
Now that we can select the second serial console in the acceptance tests (see commit 746f244d9720 "Allow to use other serial consoles than default"), we can also test the sh4 image from the QEMU advent calendar 2018.
Message-Id: <[email protected]>
--- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
.travis.yml +1 -1
@@ -293,7 +293,7 @@ jobs: - name: "GCC check-acceptance" dist: bionic env: - - CONFIG="--enable-tools --target-list=aarch64-softmmu,alpha-softmmu,arm-softmmu,m68k-softmmu,microblaze-softmmu,mips-softmmu,mips64el-softmmu,nios2-softmmu,or1k-softmmu,ppc-softmmu,ppc64-softmmu,s390x-softmmu,sparc-softmmu,x86_64-softmmu,xtensa-softmmu" + - CONFIG="--enable-tools --target-list=aarch64-softmmu,alpha-softmmu,arm-softmmu,m68k-softmmu,microblaze-softmmu,mips-softmmu,mips64el-softmmu,nios2-softmmu,or1k-softmmu,ppc-softmmu,ppc64-softmmu,s390x-softmmu,sh4-softmmu,sparc-softmmu,x86_64-softmmu,xtensa-softmmu" - TEST_CMD="make check-acceptance" - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-acceptance" after_script:
Signature · 1 line
2.21.3
Re: [PATCH 5/5] .travis.yml: Test SH4 QEMU advent calendar image
Quoted 6 lines · Philippe Mathieu-Daudé
From: Thomas Huth <[email protected]>
Now that we can select the second serial console in the acceptance tests (see commit
746f244d9720"Allow to use other serial consoles than default"), we can also test the sh4 image from the QEMU advent calendar 2018.
Quoted 6 lines
Signed-off-by Thomas Huth <[email protected]>Reviewed-by Philippe Mathieu-Daudé <[email protected]>Message-Id: <[email protected]>
[PMD: Split tests/acceptance/boot_linux_console.py in previous commit]Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 17 lines
--- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-).travis.yml +1
-1@@ -293,7 +293,7 @@ jobs: - name: "GCC check-acceptance" dist: bionic env: - - CONFIG="--enable-tools --target-list=aarch64-softmmu,alpha-softmmu,arm-softmmu,m68k-softmmu,microblaze-softmmu,mips-softmmu,mips64el-softmmu,nios2-softmmu,or1k-softmmu,ppc-softmmu,ppc64-softmmu,s390x-softmmu,sparc-softmmu,x86_64-softmmu,xtensa-softmmu" + - CONFIG="--enable-tools --target-list=aarch64-softmmu,alpha-softmmu,arm-softmmu,m68k-softmmu,microblaze-softmmu,mips-softmmu,mips64el-softmmu,nios2-softmmu,or1k-softmmu,ppc-softmmu,ppc64-softmmu,s390x-softmmu,sh4-softmmu,sparc-softmmu,x86_64-softmmu,xtensa-softmmu" - TEST_CMD="make check-acceptance" - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-acceptance" after_script:
Signature · 1 line
Alex Bennée
Quoted 5 lines · Philippe Mathieu-Daudé
Hi,
As there is no SH4 active maintainer, I gathered various patches in a single series, in case someone is willing to apply them.
I'm sure you you could put yourself down as an "Odd Fixes" maintainer and put together a PR if you want?
Quoted 25 lines
CI report:
https://travis-ci.org/github/philmd/qemu/builds/692828388Regards,
Phil.
Philippe Mathieu-Daudé (3):
hw/sh4: Use MemoryRegion typedef
hw/sh4: Extract timer definitions to 'hw/timer/tmu012.h' hw/timer/sh_timer: Remove unused 'qemu/timer.h' includeThomas Huth (2):
tests/acceptance: Add boot tests for sh4 QEMU advent calendar image .travis.yml: Test SH4 QEMU advent calendar imageinclude/hw/sh4/sh.h | 12 +----------- include/hw/timer/tmu012.h | 23 +++++++++++++++++++++++ hw/sh4/sh7750.c | 1 + hw/timer/sh_timer.c | 3 ++- .travis.yml | 2 +- tests/acceptance/boot_linux_console.py | 13 +++++++++++-- 6 files changed, 39 insertions(+), 15 deletions(-) create mode 100644 include/hw/timer/tmu012.h
Signature · 1 line
Alex Bennée
Quoted 11 lines · Alex Bennée
Quoted 5 lines · Philippe Mathieu-Daudé
Hi,
As there is no SH4 active maintainer, I gathered various patches in a single series, in case someone is willing to apply them.
I'm sure you you could put yourself down as an "Odd Fixes" maintainer and put together a PR if you want?
Odd Fixes: It has a maintainer but they don't have time to do
much other than throw the odd patch in.
OK 'Odd Fixes' matches what I can offer as a hobbyist.
I'm happy to help avoiding this code to bitrot, as long as I don't get the same pressure imposed on other targets.
After all this Renesas hardware has a lot in common with the RX I've been looking at recently.
Quoted 28 lines
Quoted 26 lines
CI report:
https://travis-ci.org/github/philmd/qemu/builds/692828388Regards,
Phil.
Philippe Mathieu-Daudé (3):
hw/sh4: Use MemoryRegion typedef
hw/sh4: Extract timer definitions to 'hw/timer/tmu012.h' hw/timer/sh_timer: Remove unused 'qemu/timer.h' includeThomas Huth (2):
tests/acceptance: Add boot tests for sh4 QEMU advent calendar image .travis.yml: Test SH4 QEMU advent calendar imageinclude/hw/sh4/sh.h | 12 +----------- include/hw/timer/tmu012.h | 23 +++++++++++++++++++++++ hw/sh4/sh7750.c | 1 + hw/timer/sh_timer.c | 3 ++- .travis.yml | 2 +- tests/acceptance/boot_linux_console.py | 13 +++++++++++-- 6 files changed, 39 insertions(+), 15 deletions(-) create mode 100644 include/hw/timer/tmu012.h
Quoted 13 lines · Philippe Mathieu-Daudé
Quoted 11 lines · Alex Bennée
Quoted 5 lines · Philippe Mathieu-Daudé
Hi,
As there is no SH4 active maintainer, I gathered various patches in a single series, in case someone is willing to apply them.
I'm sure you you could put yourself down as an "Odd Fixes" maintainer and put together a PR if you want?
Quoted 6 lines
Odd Fixes: It has a maintainer but they don't have time to do
much other than throw the odd patch in.OK 'Odd Fixes' matches what I can offer as a hobbyist.
I'm happy to help avoiding this code to bitrot, as long as I don't get the same pressure imposed on other targets.
Yeah Odd Fixes doesn't imply anything other than at least some might look at it. It's easier that convincing someone else who cares even less to put it in a PR for you ;-)
Quoted 31 lines
After all this Renesas hardware has a lot in common with the RX I've been looking at recently.
Quoted 28 lines
Quoted 26 lines
CI report:
https://travis-ci.org/github/philmd/qemu/builds/692828388Regards,
Phil.
Philippe Mathieu-Daudé (3):
hw/sh4: Use MemoryRegion typedef
hw/sh4: Extract timer definitions to 'hw/timer/tmu012.h' hw/timer/sh_timer: Remove unused 'qemu/timer.h' includeThomas Huth (2):
tests/acceptance: Add boot tests for sh4 QEMU advent calendar image .travis.yml: Test SH4 QEMU advent calendar imageinclude/hw/sh4/sh.h | 12 +----------- include/hw/timer/tmu012.h | 23 +++++++++++++++++++++++ hw/sh4/sh7750.c | 1 + hw/timer/sh_timer.c | 3 ++- .travis.yml | 2 +- tests/acceptance/boot_linux_console.py | 13 +++++++++++-- 6 files changed, 39 insertions(+), 15 deletions(-) create mode 100644 include/hw/timer/tmu012.h
Signature · 1 line
Alex Bennée