Revert "Remove the unused sh4eb target"
authorThomas Huth <thuth@redhat.com>
Thu, 24 Oct 2024 08:27:34 +0000 (10:27 +0200)
committerThomas Huth <thuth@redhat.com>
Mon, 4 Nov 2024 13:16:11 +0000 (14:16 +0100)
This reverts commit 73ceb12960e686b763415f0880cc5171ccce01cf.

The "r2d" machine can work in big endian mode, see:

 https://lore.kernel.org/qemu-devel/d6755445-1060-48a8-82b6-2f392c21f9b9@landley.net/

So the reasoning for removing sh4eb was wrong.

Message-ID: <20241024082735.42324-2-thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Rob Landley <rob@landley.net>
Signed-off-by: Thomas Huth <thuth@redhat.com>
.gitlab-ci.d/buildtest.yml
.gitlab-ci.d/cirrus.yml
.gitlab-ci.d/crossbuilds.yml
.travis.yml
configs/devices/sh4eb-softmmu/default.mak [new file with mode: 0644]
configs/targets/sh4eb-softmmu.mak [new file with mode: 0644]
qapi/machine.json
tests/qemu-iotests/testenv.py
tests/qtest/endianness-test.c
tests/qtest/machine-none-test.c
tests/qtest/meson.build

index 19ba5b9c818c7b486c0f4084e60b3762256e4cf4..4800aed04bcf142f881e13f80118dc07a81c57ce 100644 (file)
@@ -72,7 +72,7 @@ build-system-debian:
   variables:
     IMAGE: debian
     CONFIGURE_ARGS: --with-coroutine=sigaltstack
-    TARGETS: arm-softmmu i386-softmmu riscv64-softmmu sh4-softmmu
+    TARGETS: arm-softmmu i386-softmmu riscv64-softmmu sh4eb-softmmu
       sparc-softmmu xtensa-softmmu
     MAKE_CHECK_ARGS: check-build
 
index 6a7bafac7b67e6c0e168611b8c8f7495f9bf59ae..942730238336cd7d6b475c87337035fd0a0c9fa3 100644 (file)
@@ -57,7 +57,7 @@ x64-freebsd-14-build:
     CIRRUS_VM_RAM: 8G
     UPDATE_COMMAND: pkg update; pkg upgrade -y
     INSTALL_COMMAND: pkg install -y
-    CONFIGURE_ARGS: --target-list-exclude=arm-softmmu,i386-softmmu,microblaze-softmmu,mips64el-softmmu,mipsel-softmmu,mips-softmmu,ppc-softmmu,xtensa-softmmu
+    CONFIGURE_ARGS: --target-list-exclude=arm-softmmu,i386-softmmu,microblaze-softmmu,mips64el-softmmu,mipsel-softmmu,mips-softmmu,ppc-softmmu,sh4eb-softmmu,xtensa-softmmu
     TEST_TARGETS: check
 
 aarch64-macos-build:
index 178f62869d242e967b1ae3d8b4a75348899a05aa..95dfc39224442d2a93f321d09aec750b68f00db2 100644 (file)
@@ -176,7 +176,7 @@ cross-win64-system:
     EXTRA_CONFIGURE_OPTS: --enable-fdt=internal --disable-plugins
     CROSS_SKIP_TARGETS: alpha-softmmu avr-softmmu hppa-softmmu
                         m68k-softmmu microblazeel-softmmu
-                        or1k-softmmu rx-softmmu sh4-softmmu sparc64-softmmu
+                        or1k-softmmu rx-softmmu sh4eb-softmmu sparc64-softmmu
                         tricore-softmmu xtensaeb-softmmu
   artifacts:
     when: on_success
index ad81bc5e1b409f2277afff0c76ef8d7e1c74b65a..8fc1ae0cf22d3f91e5ddcd6bf321ec739631aa30 100644 (file)
@@ -223,7 +223,7 @@ jobs:
           - genisoimage
       env:
         - CONFIG="--disable-containers --audio-drv-list=sdl --disable-user
-            --target-list=arm-softmmu,avr-softmmu,microblaze-softmmu,sh4-softmmu,sparc64-softmmu,xtensaeb-softmmu"
+            --target-list=arm-softmmu,avr-softmmu,microblaze-softmmu,sh4eb-softmmu,sparc64-softmmu,xtensaeb-softmmu"
 
     - name: "[s390x] GCC (user)"
       arch: s390x
diff --git a/configs/devices/sh4eb-softmmu/default.mak b/configs/devices/sh4eb-softmmu/default.mak
new file mode 100644 (file)
index 0000000..f18d1f6
--- /dev/null
@@ -0,0 +1,3 @@
+# Default configuration for sh4eb-softmmu
+
+include ../sh4-softmmu/default.mak
diff --git a/configs/targets/sh4eb-softmmu.mak b/configs/targets/sh4eb-softmmu.mak
new file mode 100644 (file)
index 0000000..226b1fc
--- /dev/null
@@ -0,0 +1,2 @@
+TARGET_ARCH=sh4
+TARGET_BIG_ENDIAN=y
index 3cc055b6fff12d4dfd1437c596866b092f946de8..a6b8795b09edcd714f5a25627278b64e574af195 100644 (file)
@@ -37,7 +37,7 @@
              'loongarch64', 'm68k', 'microblaze', 'microblazeel', 'mips', 'mips64',
              'mips64el', 'mipsel', 'or1k', 'ppc',
              'ppc64', 'riscv32', 'riscv64', 'rx', 's390x', 'sh4',
-             'sparc', 'sparc64', 'tricore',
+             'sh4eb', 'sparc', 'sparc64', 'tricore',
              'x86_64', 'xtensa', 'xtensaeb' ] }
 
 ##
index 8cd620c2027e987e48ed59949ac62a542615db23..6326e46b7b100d20a1299d6d62405a959336af14 100644 (file)
@@ -245,6 +245,7 @@ class TestEnv(ContextManager['TestEnv']):
             ('riscv64', 'virt'),
             ('rx', 'gdbsim-r5f562n8'),
             ('sh4', 'r2d'),
+            ('sh4eb', 'r2d'),
             ('tricore', 'tricore_testboard')
         )
         for suffix, machine in machine_map:
index f4872b0283492f3d84b94e7263db4dae83ea3c60..222d116fae2d52c74808c5a137858c02bd21db5f 100644 (file)
@@ -41,6 +41,7 @@ static const TestCase test_cases[] = {
     { "ppc64", "pseries-2.7", 0x10080000000ULL,
       .bswap = true, .superio = "i82378" },
     { "sh4", "r2d", 0xfe240000, .superio = "i82378" },
+    { "sh4eb", "r2d", 0xfe240000, .bswap = true, .superio = "i82378" },
     { "sparc64", "sun4u", 0x1fe02000000LL, .bswap = true },
     { "x86_64", "pc", -1 },
     {}
index 9cf95bea1ee8390c463ff950a5bc6f2e9e0cf582..159b2a705a7c8838aba394ae6ca62bb0d3ec0111 100644 (file)
@@ -42,6 +42,7 @@ static struct arch2cpu cpus_map[] = {
     { "ppc64", "power8e_v2.1" },
     { "s390x", "qemu" },
     { "sh4", "sh7750r" },
+    { "sh4eb", "sh7751r" },
     { "sparc", "LEON2" },
     { "sparc64", "Fujitsu Sparc64" },
     { "tricore", "tc1796" },
index 9d51114539d8acfd9311197fd3e2bff2b53c3cfd..8ea126c2d833940c1ee8c94eefa78de4b393e7a0 100644 (file)
@@ -186,6 +186,7 @@ qtests_ppc64 = \
   qtests_pci + ['migration-test', 'cpu-plug-test', 'drive_del-test']
 
 qtests_sh4 = (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : [])
+qtests_sh4eb = (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : [])
 
 qtests_sparc = ['prom-env-test', 'm48t59-test', 'boot-serial-test'] + \
   qtests_filter