arm: Remove the 'musicpal' machine
cover arm: Remove the 'musicpal' machine
The 'musicpal' machine emulates the Freecom MusicPal, which was an "internet radio" released in the mid-2000s. The stock system used a 2.6.16 Linux kernel, but as far as I'm aware, support for the hardware was never upstreamed to the mainline kernel.
There are a number of reasons for deprecating this board:
* The hardware is now solidly obsolete
* It was never supported in mainline Linux
* The SoC is a Marvell one with no public datasheet
* The only QEMU changes to it have been the usual tree wide updates and refactoring work
* We have no test image for it that we can distribute
* The only bug report we've ever had about it has been one of the usual "bug found by static analysis" kind (#4135)
But in fact we can just drop it immediately, because in commit 59754f85ed35 ("target/arm: Do memory type alignment check when translation disabled") in 2024 we broke the boot of the standard firmware image for this board. (The image's u-boot does a LDRH to an unaligned address, which is UNPREDICTABLE; we used to let it through, but that commit makes it take a Data Abort, so the image crashes before it boots the kernel.) Since nobody complained, we can deduce that nobody's actually using this machine.
This patchset first fixes up a couple of places (notably the pflash_cfi02 tests) that were using or referring to the musicpal board; then it removes the board, followed by the devices used only by that board.
Strictly speaking it's possible that somebody is using this machine with some other image that doesn't have the same "does an unaligned LDRH" problem the stock firmware image does; but it seems unlikely to me. We can take the standard "deprecate for two releases, then drop" route if people prefer that.
I do also have a patch which reverts the "take a Data Abort on unaligned access" change for v5 and v6-with-SCTLR.U=0 CPUs, which I'll post separately.
thanks
-- PMM
Peter Maydell (5):
tests/qtest/pflash-cfi02-test: Don't use musicpal machine for testing hw/arm: Remove spurious WM8750 dependency from Realview Kconfig hw/arm: Remove the 'musicpal' machine
hw: Remove Marvell 88W8618 devices
hw/audio: Remove wm8750 I2C audio device
MAINTAINERS | 10 - configs/devices/arm-softmmu/default.mak | 1 - docs/about/removed-features.rst | 10 + docs/system/arm/musicpal.rst | 19 - docs/system/target-arm.rst | 1 - hw/arm/Kconfig | 16 - hw/arm/meson.build | 1 - hw/arm/musicpal.c | 1388 ----------------------- hw/audio/Kconfig | 4 - hw/audio/marvell_88w8618.c | 315 ----- hw/audio/meson.build | 2 - hw/audio/wm8750.c | 738 ------------ hw/net/meson.build | 1 - hw/net/mv88w8618_eth.c | 403 ------- include/hw/audio/wm8750.h | 30 - include/hw/net/mv88w8618_eth.h | 13 - tests/qtest/meson.build | 6 +- tests/qtest/pflash-cfi02-test.c | 38 +- 18 files changed, 36 insertions(+), 2960 deletions(-) delete mode 100644 docs/system/arm/musicpal.rst delete mode 100644 hw/arm/musicpal.c delete mode 100644 hw/audio/marvell_88w8618.c delete mode 100644 hw/audio/wm8750.c delete mode 100644 hw/net/mv88w8618_eth.c delete mode 100644 include/hw/audio/wm8750.h delete mode 100644 include/hw/net/mv88w8618_eth.h
Signature · 1 line
2.43.0
PATCH 1/5 tests/qtest/pflash-cfi02-test: Don't use musicpal machine for testing
We currently use the musicpal machine for testing the pflash-cfi02 device. We'd like to remove that machine, so switch the tests to the sh4 r2d board type instead.
We use r2d because it happens to have the same "2 bank" config that musicpal did. (Of our other options, xilinx-zynq-a9 has only a 1-bank setup so wouldn't allow the same range of testing, and the canon-a1100 board both doesn't support specifying a flash drive via -drive if=pflash, plus it seems likely it too might be a candidate for deprecate-and-drop.)
The r2d flash device is not quite the same config as the musicpal
one: it has a different base address and size, and different ID values. So we need to update the test to match.
--- tests/qtest/meson.build | 6 +++--- tests/qtest/pflash-cfi02-test.c | 38 ++++++++++++++++++++------------- 2 files changed, 26 insertions(+), 18 deletions(-)
tests/qtest/meson.build +3 -3
@@ -196,7 +196,9 @@ qtests_ppc64 = \ (config_all_devices.has_key('CONFIG_USB_XHCI_NEC') ? ['usb-hcd-xhci-test'] : []) + \ qtests_pci + ['migration-test', 'cpu-plug-test', 'drive_del-test'] -qtests_sh4 = (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) +qtests_sh4 = (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) + \ + (config_all_devices.has_key('CONFIG_PFLASH_CFI02') and + config_all_devices.has_key('CONFIG_R2D') ? ['pflash-cfi02-test'] : []) qtests_sh4eb = (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) qtests_sparc = ['prom-env-test', 'm48t59-test', 'boot-serial-test'] + \
@@ -243,8 +245,6 @@ qtests_arm = \ (config_all_devices.has_key('CONFIG_CMSDK_APB_TIMER') ? ['cmsdk-apb-timer-test'] : []) + \ (config_all_devices.has_key('CONFIG_STELLARIS') or config_all_devices.has_key('CONFIG_MPS2') ? ['cmsdk-apb-watchdog-test'] : []) + \ - (config_all_devices.has_key('CONFIG_PFLASH_CFI02') and - config_all_devices.has_key('CONFIG_MUSICPAL') ? ['pflash-cfi02-test'] : []) + \ (config_all_devices.has_key('CONFIG_ASPEED_SOC') ? qtests_aspeed : []) + \ (config_all_devices.has_key('CONFIG_NPCM7XX') ? qtests_npcm7xx : []) + \ (config_all_devices.has_key('CONFIG_GENERIC_LOADER') ? ['hexloader-test'] : []) + \
tests/qtest/pflash-cfi02-test.c +23 -15
@@ -11,17 +11,25 @@#include "libqtest.h" /* -* To test the pflash_cfi02 device, we run QEMU with the musicpal machine with +* To test the pflash_cfi02 device, we run QEMU with the sh4 r2d machine with * a pflash drive. This enables us to test some flash configurations, but not * all. In particular, we're limited to a 16-bit wide flash device. */ -#define MP_FLASH_SIZE_MAX (32 * 1024 * 1024) -#define BASE_ADDR (0x100000000ULL - MP_FLASH_SIZE_MAX) +/* +* These need to match the flash size and address in r2d.c. +* If the flash size changes then the sector_len[] and nb_blocs[] +* values in configuration[] below will need to be updated to match. +*/ +#define BASE_ADDR 0x00000000 -#define UNIFORM_FLASH_SIZE (8 * 1024 * 1024) +#define UNIFORM_FLASH_SIZE (16 * 1024 * 1024)#define UNIFORM_FLASH_SECTOR_SIZE (64 * 1024) +/* These must match the id0, id1 args to pflash_cfi02_register() in r2d.c */ +#define FLASH_ID0 0x0001 +#define FLASH_ID1 0x227E +/* Use a newtype to keep flash addresses separate from byte addresses. */ typedef struct { uint64_t addr;
@@ -260,7 +268,7 @@ static void test_geometry(const void *opaque) {const FlashConfig *config = opaque;QTestState *qtest; - qtest =qtest_initf ("-M musicpal" + qtest =qtest_initf ("-M r2d" " -drive if=pflash,file=%s,format=raw,copy-on-read=on" /* Device geometry properties. */ " -global driver=cfi.pflash02,"
@@ -295,16 +303,16 @@ static void test_geometry(const void *opaque)/* Check the IDs. */ unlock (c);flash_cmd (c,UNLOCK0_ADDR ,AUTOSELECT_CMD ); - g_assert_cmphex(flash_query(c, FLASH_ADDR(0)), ==, replicate(c, 0xBF)); + g_assert_cmphex(flash_query(c, FLASH_ADDR(0)), ==, replicate(c, FLASH_ID0));if (c->bank_width >=2 ) {/* -* XXX: The ID returned by the musicpal flash chip is 16 bits which +* XXX: The ID returned by the r2d flash chip is 16 bits which * wouldn't happen with an 8-bit device. It would probably be best to * prohibit addresses larger than the device width in pflash_cfi02.c, * but then we couldn't test smaller device widths at all. */ g_assert_cmphex(flash_query(c, FLASH_ADDR(1)), ==, -replicate (c,0x236D )); +replicate (c,FLASH_ID1 )); }reset (c);
@@ -436,7 +444,7 @@ static void test_geometry(const void *opaque)flash_cmd (c,FLASH_ADDR (0x5555 ),UNLOCK0_CMD );flash_cmd (c,FLASH_ADDR (0x2AAA ),UNLOCK1_CMD );flash_cmd (c,FLASH_ADDR (0x5555 ),AUTOSELECT_CMD ); - g_assert_cmphex(flash_query(c, FLASH_ADDR(0)), ==, replicate(c, 0xBF)); + g_assert_cmphex(flash_query(c, FLASH_ADDR(0)), ==, replicate(c, FLASH_ID0));reset (c);/*
@@ -580,7 +588,7 @@ static void test_cfi_in_autoselect(const void *opaque) {const FlashConfig *config = opaque;QTestState *qtest; - qtest =qtest_initf ("-M musicpal" + qtest =qtest_initf ("-M r2d" " -drive if=pflash,file=%s,format=raw,copy-on-read=on" , image_path);FlashConfig explicit_config =expand_config_defaults (config);
@@ -590,7 +598,7 @@ static void test_cfi_in_autoselect(const void *opaque)/* 1. Enter autoselect. */ unlock (c);flash_cmd (c,UNLOCK0_ADDR ,AUTOSELECT_CMD ); - g_assert_cmphex(flash_query(c, FLASH_ADDR(0)), ==, replicate(c, 0xBF)); + g_assert_cmphex(flash_query(c, FLASH_ADDR(0)), ==, replicate(c, FLASH_ID0));/* 2. Enter CFI. */ flash_cmd (c,CFI_ADDR ,CFI_CMD );
@@ -600,7 +608,7 @@ static void test_cfi_in_autoselect(const void *opaque)/* 3. Exit CFI. */ reset (c); - g_assert_cmphex(flash_query(c, FLASH_ADDR(0)), ==, replicate(c, 0xBF)); + g_assert_cmphex(flash_query(c, FLASH_ADDR(0)), ==, replicate(c, FLASH_ID0));qtest_quit (qtest); }
@@ -613,7 +621,7 @@ static void cleanup(void *opaque)/* * XXX: Tests are limited to bank_width = 2 for now because that's what -* hw/arm/musicpal.c has. +* hw/sh4/r2d.c has. */ static const FlashConfig configuration[] = {/* One x16 device. */
@@ -624,13 +632,13 @@ static const FlashConfig configuration[] = { { .bank_width = 2, .nb_blocs = { 127, 1, 2, 1 }, - .sector_len = { 0x10000, 0x08000, 0x02000, 0x04000 }, + .sector_len = { 0x20000, 0x10000, 0x04000, 0x08000 }, }, /* Nonuniform sectors (bottom boot). */ { .bank_width = 2, .nb_blocs = { 1, 2, 1, 127 }, - .sector_len = { 0x04000, 0x02000, 0x08000, 0x10000 }, + .sector_len = { 0x08000, 0x04000, 0x10000, 0x20000 }, }, };
Signature · 1 line
2.43.0
Re: [PATCH 1/5] tests/qtest/pflash-cfi02-test: Don't use musicpal machine for testing
Quoted 15 lines · Peter Maydell
We currently use the musicpal machine for testing the pflash-cfi02 device. We'd like to remove that machine, so switch the tests to the sh4 r2d board type instead.
We use r2d because it happens to have the same "2 bank" config that musicpal did. (Of our other options, xilinx-zynq-a9 has only a 1-bank setup so wouldn't allow the same range of testing, and the canon-a1100 board both doesn't support specifying a flash drive via -drive if=pflash, plus it seems likely it too might be a candidate for deprecate-and-drop.)
The r2d flash device is not quite the same config as the musicpal
one: it has a different base address and size, and different ID values. So we need to update the test to match.
Quoted 5 lines
Signed-off-by Peter Maydell <[email protected]>--- tests/qtest/meson.build | 6 +++--- tests/qtest/pflash-cfi02-test.c | 38 ++++++++++++++++++++------------- 2 files changed, 26 insertions(+), 18 deletions(-)
PATCH 2/5 hw/arm: Remove spurious WM8750 dependency from Realview Kconfig
In reply to Peter MaydellThe REALVIEW Kconfig stanza has a "select WM8750"; however the board itself doesn't actually use this i2c audio device: its audio is provided by the pl041 (which connects to an LM4549). Remove the spurious dependency.
--- hw/arm/Kconfig | 1 - 1 file changed, 1 deletion(-)
hw/arm/Kconfig +0 -1
@@ -155,7 +155,6 @@ config REALVIEW select ARM11MPCORE select ARM_TIMER select VERSATILE_PCI - select WM8750 # audio codec select LSI_SCSI_PCI select PCI select PL011 # UART
Signature · 1 line
2.43.0
Re: [PATCH 2/5] hw/arm: Remove spurious WM8750 dependency from Realview Kconfig
Quoted 9 lines · Peter Maydell
The REALVIEW
Kconfigstanza has a "select WM8750"; however the board itself doesn't actually use this i2c audio device: its audio is provided by the pl041 (which connects to an LM4549). Remove the spurious dependency.Signed-off-by Peter Maydell<[email protected]>--- hw/arm/Kconfig | 1 - 1 file changed, 1 deletion(-)
r~
Re: [PATCH 2/5] hw/arm: Remove spurious WM8750 dependency from Realview Kconfig
In reply to Peter MaydellQuoted 5 lines · Peter Maydell
The REALVIEW
Kconfigstanza has a "select WM8750"; however the board itself doesn't actually use this i2c audio device: its audio is provided by the pl041 (which connects to an LM4549). Remove the spurious dependency.
Is it worth Cc'ing stable?
Anyway,
Quoted 17 lines
Signed-off-by Peter Maydell <[email protected]>--- hw/arm/Kconfig | 1 - 1 file changed, 1 deletion(-)hw/arm/Kconfig +0
-1@@ -155,7 +155,6 @@ config REALVIEW select ARM11MPCORE select ARM_TIMER select VERSATILE_PCI - select WM8750 # audio codec select LSI_SCSI_PCI select PCI select PL011 # UART
Re: [PATCH 2/5] hw/arm: Remove spurious WM8750 dependency from Realview Kconfig
Quoted 9 lines · Philippe Mathieu-Daudé
Quoted 5 lines · Peter Maydell
The REALVIEW
Kconfigstanza has a "select WM8750"; however the board itself doesn't actually use this i2c audio device: its audio is provided by the pl041 (which connects to an LM4549). Remove the spurious dependency.Is it worth Cc'ing stable?
I don't think so -- the dependency is harmless and has been there for years. We only need to drop it so we can delete the WM8750 code.
thanks
-- PMM
PATCH 3/5 hw/arm: Remove the 'musicpal' machine
In reply to Peter MaydellThe 'musicpal' machine emulates the Freecom MusicPal, which was an "internet radio" released in the mid-2000s. The stock system used a 2.6.16 Linux kernel, but as far as I'm aware, support for the hardware was never upstreamed to the mainline kernel.
There are a number of reasons for deprecating this board:
* The hardware is now solidly obsolete
* It was never supported in mainline Linux
* The SoC is a Marvell one with no public datasheet
* The only QEMU changes to it have been the usual tree wide updates and refactoring work
* The only bug report we've ever had about it has been one of the usual "bug found by static analysis" kind
But in fact we can just drop it immediately, because in commit 59754f85ed35 ("target/arm: Do memory type alignment check when translation disabled") in 2024 we broke the boot of the standard firmware image for this board. (The image's u-boot does a LDRH to an unaligned address, which is UNPREDICTABLE; we used to let it through, but that commit makes it take a Data Abort, so the image crashes before it boots the kernel.) Since nobody complained, we can deduce that nobody's actually using this machine.
Remove the machine proper, and note this in the docs. Devices used only by this board will be removed in subsequent commits.
--- MAINTAINERS | 10 - configs/devices/arm-softmmu/default.mak | 1 - docs/about/removed-features.rst | 10 + docs/system/arm/musicpal.rst | 19 - docs/system/target-arm.rst | 1 - hw/arm/Kconfig | 12 - hw/arm/meson.build | 1 - hw/arm/musicpal.c | 1388 ----------------------- 8 files changed, 10 insertions(+), 1432 deletions(-) delete mode 100644 docs/system/arm/musicpal.rst delete mode 100644 hw/arm/musicpal.c
MAINTAINERS +0 -10
@@ -993,16 +993,6 @@ S: Odd Fixes F: hw/arm/musca.c F: docs/system/arm/musca.rst -Musicpal -M: Jan Kiszka <[email protected]> -M: Peter Maydell <[email protected]> -L: [email protected] -S: Odd Fixes -F: hw/arm/musicpal.c -F: hw/net/mv88w8618_eth.c -F: include/hw/net/mv88w8618_eth.h -F: docs/system/arm/musicpal.rst - Nuvoton NPCM7xx M: Tyrone Ting <[email protected]> M: Hao Wu <[email protected]>
configs/devices/arm-softmmu/default.mak +0 -1
@@ -14,7 +14,6 @@ # CONFIG_EXYNOS4=n # CONFIG_INTEGRATOR=n # CONFIG_FSL_IMX31=n -# CONFIG_MUSICPAL=n # CONFIG_MPS3R=n # CONFIG_MUSCA=n # CONFIG_SX1=n
docs/about/removed-features.rst +10 -0
@@ -1251,6 +1251,16 @@ machine they want to use to avoid confusion. Existing users of the ``spike`` machine must ensure that they're setting the ``spike`` machine in the command line (``-M spike``). +Arm ``musicpal`` machine (removed in 11.2) +'''''''''''''''''''''''''''''''''''''''''' + +The ``musicpal`` machine was an emulation of the Freecom MusicPal, an +"internet radio" device from the mid-2000s. This hardware was never +supported in upstream Linux, was based on a Marvell SoC with no public +documentation, and is now obsolete. We accidentally broke booting this +board in 2024, without anybody noticing; it has therefore been removed +without a deprecation period. + linux-user mode CPUs --------------------
docs/system/arm/musicpal.rst deleted +0 -19
@@ -1,19 +0,0 @@ -Freecom MusicPal (``musicpal``) -=============================== - -The Freecom MusicPal internet radio emulation includes the following -elements: - -- Marvell MV88W8618 Arm core. - -- 32 MB RAM, 256 KB SRAM, 8 MB flash. - -- Up to 2 16550 UARTs - -- MV88W8xx8 Ethernet controller - -- MV88W8618 audio controller, WM8750 CODEC and mixer - -- 128x64 display with brightness control - -- 2 buttons, 2 navigation wheels with button function
docs/system/target-arm.rst +0 -1
@@ -87,7 +87,6 @@ Board-specific documentation arm/cubieboard arm/emcraft-sf2 arm/exynos - arm/musicpal arm/kzm arm/nrf arm/nuvoton
hw/arm/Kconfig +0 -12
@@ -103,18 +103,6 @@ config MUSCA config MARVELL_88W8618 bool -config MUSICPAL - bool - default y - depends on TCG && ARM - select OR_IRQ - select BITBANG_I2C - select MARVELL_88W8618 - select PTIMER - select PFLASH_CFI02 - select SERIAL_MM - select WM8750 - config NETDUINO2 bool default y
hw/arm/meson.build +0 -1
@@ -6,7 +6,6 @@ arm_common_ss.add(when: 'CONFIG_EMCRAFT_SF2', if_true: files('msf2-som.c')) arm_common_ss.add(when: 'CONFIG_INTEGRATOR', if_true: files('integratorcp.c')) arm_common_ss.add(when: 'CONFIG_MICROBIT', if_true: files('microbit.c')) arm_common_ss.add(when: 'CONFIG_MPS3R', if_true: files('mps3r.c')) -arm_common_ss.add(when: 'CONFIG_MUSICPAL', if_true: [files('musicpal.c')]) arm_common_ss.add(when: 'CONFIG_NETDUINOPLUS2', if_true: files('netduinoplus2.c')) arm_common_ss.add(when: 'CONFIG_OLIMEX_STM32_H405', if_true: files('olimex-stm32-h405.c')) arm_common_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx.c', 'npcm7xx_boards.c'))
hw/arm/musicpal.c deleted +0 -1388
1,388 lines not on this page · raw message
Signature · 1 line
2.43.0
Re: [PATCH 3/5] hw/arm: Remove the 'musicpal' machine
Quoted 37 lines · Peter Maydell
The 'musicpal' machine emulates the Freecom MusicPal, which was an "internet radio" released in the mid-2000s. The stock system used a 2.6.16 Linux kernel, but as far as I'm aware, support for the hardware was never upstreamed to the mainline kernel.
There are a number of reasons for deprecating this board:
* The hardware is now solidly obsolete
* It was never supported in mainline Linux
* The SoC is a Marvell one with no public datasheet
* The only QEMU changes to it have been the usual tree wide updates and refactoring work
* The only bug report we've ever had about it has been one of the usual "bug found by static analysis" kindBut in fact we can just drop it immediately, because in commit
59754f85ed35("target/arm: Do memory type alignment check when translation disabled") in 2024 we broke the boot of the standard firmware image for this board. (The image's u-boot does a LDRH to an unaligned address, which is UNPREDICTABLE; we used to let it through, but that commit makes it take a Data Abort, so the image crashes before it boots the kernel.) Since nobody complained, we can deduce that nobody's actually using this machine.Remove the machine proper, and note this in the docs. Devices used only by this board will be removed in subsequent commits.
Signed-off-by Peter Maydell<[email protected]>--- MAINTAINERS | 10 - configs/devices/arm-softmmu/default.mak | 1 - docs/about/removed-features.rst | 10 + docs/system/arm/musicpal.rst | 19 - docs/system/target-arm.rst | 1 - hw/arm/Kconfig | 12 - hw/arm/meson.build | 1 - hw/arm/musicpal.c | 1388 ----------------------- 8 files changed, 10 insertions(+), 1432 deletions(-)
Quoted 2 lines
delete mode 100644
docs/system/arm/musicpal.rst
delete mode 100644hw/arm/musicpal.c
r~
Re: [PATCH 3/5] hw/arm: Remove the 'musicpal' machine
In reply to Peter MaydellQuoted 37 lines · Peter Maydell
The 'musicpal' machine emulates the Freecom MusicPal, which was an "internet radio" released in the mid-2000s. The stock system used a 2.6.16 Linux kernel, but as far as I'm aware, support for the hardware was never upstreamed to the mainline kernel.
There are a number of reasons for deprecating this board:
* The hardware is now solidly obsolete
* It was never supported in mainline Linux
* The SoC is a Marvell one with no public datasheet
* The only QEMU changes to it have been the usual tree wide updates and refactoring work
* The only bug report we've ever had about it has been one of the usual "bug found by static analysis" kindBut in fact we can just drop it immediately, because in commit
59754f85ed35("target/arm: Do memory type alignment check when translation disabled") in 2024 we broke the boot of the standard firmware image for this board. (The image's u-boot does a LDRH to an unaligned address, which is UNPREDICTABLE; we used to let it through, but that commit makes it take a Data Abort, so the image crashes before it boots the kernel.) Since nobody complained, we can deduce that nobody's actually using this machine.Remove the machine proper, and note this in the docs. Devices used only by this board will be removed in subsequent commits.
Signed-off-by Peter Maydell <[email protected]>--- MAINTAINERS | 10 - configs/devices/arm-softmmu/default.mak | 1 - docs/about/removed-features.rst | 10 + docs/system/arm/musicpal.rst | 19 - docs/system/target-arm.rst | 1 - hw/arm/Kconfig | 12 - hw/arm/meson.build | 1 - hw/arm/musicpal.c | 1388 ----------------------- 8 files changed, 10 insertions(+), 1432 deletions(-)
Quoted 2 lines
delete mode 100644
docs/system/arm/musicpal.rst
delete mode 100644hw/arm/musicpal.c
PATCH 4/5 hw: Remove Marvell 88W8618 devices
In reply to Peter MaydellThe mv88w8618 ethernet and audio devices were used only by the now-removed musicpal machine, so can also be deleted.
--- hw/arm/Kconfig | 3 - hw/audio/marvell_88w8618.c | 315 -------------------------- hw/audio/meson.build | 1 - hw/net/meson.build | 1 - hw/net/mv88w8618_eth.c | 403 --------------------------------- include/hw/net/mv88w8618_eth.h | 13 -- 6 files changed, 736 deletions(-) delete mode 100644 hw/audio/marvell_88w8618.c delete mode 100644 hw/net/mv88w8618_eth.c delete mode 100644 include/hw/net/mv88w8618_eth.h
hw/arm/Kconfig +0 -3
@@ -100,9 +100,6 @@ config MUSCA select SPLIT_IRQ select UNIMP -config MARVELL_88W8618 - bool - config NETDUINO2 bool default y
hw/audio/marvell_88w8618.c deleted +0 -315
315 lines not on this page · raw message
hw/audio/meson.build +0 -1
@@ -7,7 +7,6 @@ system_ss.add(when: 'CONFIG_CS4231A', if_true: files('cs4231a.c')) system_ss.add(when: 'CONFIG_ES1370', if_true: files('es1370.c')) system_ss.add(when: 'CONFIG_GUS', if_true: files('gus.c', 'gusemu_hal.c', 'gusemu_mixer.c')) system_ss.add(when: 'CONFIG_HDA', if_true: files('intel-hda.c', 'hda-codec.c')) -system_ss.add(when: 'CONFIG_MARVELL_88W8618', if_true: files('marvell_88w8618.c')) system_ss.add(when: 'CONFIG_PCSPK', if_true: files('pcspk.c')) system_ss.add(when: 'CONFIG_PL041', if_true: files('pl041.c', 'lm4549.c')) system_ss.add(when: 'CONFIG_SB16', if_true: files('sb16.c'))
hw/net/meson.build +0 -1
@@ -27,7 +27,6 @@ system_ss.add(when: 'CONFIG_ALLWINNER_EMAC', if_true: files('allwinner_emac.c')) system_ss.add(when: 'CONFIG_ALLWINNER_SUN8I_EMAC', if_true: files('allwinner-sun8i-emac.c')) system_ss.add(when: 'CONFIG_IMX_FEC', if_true: files('imx_fec.c')) system_ss.add(when: 'CONFIG_MSF2', if_true: files('msf2-emac.c')) -system_ss.add(when: 'CONFIG_MARVELL_88W8618', if_true: files('mv88w8618_eth.c')) system_ss.add(when: 'CONFIG_CADENCE', if_true: files('cadence_gem.c')) system_ss.add(when: 'CONFIG_STELLARIS_ENET', if_true: files('stellaris_enet.c'))
hw/net/mv88w8618_eth.c deleted +0 -403
403 lines not on this page · raw message
include/hw/net/mv88w8618_eth.h deleted +0 -13
@@ -1,13 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ -/* -* Marvell MV88W8618 / Freecom MusicPal emulation. -* -* Copyright (c) 2008-2021 QEMU contributors -*/ - -#ifndef HW_NET_MV88W8618_ETH_H -#define HW_NET_MV88W8618_ETH_H - -#define TYPE_MV88W8618_ETH "mv88w8618_eth" - -#endif
Signature · 1 line
2.43.0
Re: [PATCH 4/5] hw: Remove Marvell 88W8618 devices
Quoted 12 lines · Peter Maydell
The mv88w8618 ethernet and audio devices were used only by the now-removed musicpal machine, so can also be deleted.
Signed-off-by Peter Maydell<[email protected]>--- hw/arm/Kconfig | 3 - hw/audio/marvell_88w8618.c | 315 -------------------------- hw/audio/meson.build | 1 - hw/net/meson.build | 1 - hw/net/mv88w8618_eth.c | 403 --------------------------------- include/hw/net/mv88w8618_eth.h | 13 -- 6 files changed, 736 deletions(-)
Quoted 3 lines
delete mode 100644
hw/audio/marvell_88w8618.cdelete mode 100644hw/net/mv88w8618_eth.cdelete mode 100644include/hw/net/mv88w8618_eth.h
r~
Re: [PATCH 4/5] hw: Remove Marvell 88W8618 devices
In reply to Peter MaydellQuoted 39 lines · Peter Maydell
The mv88w8618 ethernet and audio devices were used only by the now-removed musicpal machine, so can also be deleted.
Signed-off-by Peter Maydell <[email protected]>--- hw/arm/Kconfig | 3 - hw/audio/marvell_88w8618.c | 315 -------------------------- hw/audio/meson.build | 1 - hw/net/meson.build | 1 - hw/net/mv88w8618_eth.c | 403 --------------------------------- include/hw/net/mv88w8618_eth.h | 13 -- 6 files changed, 736 deletions(-)delete mode 100644
hw/audio/marvell_88w8618.cdelete mode 100644hw/net/mv88w8618_eth.cdelete mode 100644include/hw/net/mv88w8618_eth.hhw/audio/marvell_88w8618.c deleted +0
-22-static void mv88w8618_audio_callback (void *opaque,int free_out,int free_in) -{ -mv88w8618_audio_state *s = opaque; -int16_t *codec_buffer; - QEMU_UNINITIALIZED int8_t buf[4096]; -int8_t *mem_buffer; -int pos, block_size; - -if (!(s->playback_mode &MP_AUDIO_PLAYBACK_EN )) { -return ; - } -if (s->playback_mode &MP_AUDIO_16BIT_SAMPLE ) { - free_out <<=1 ; - } -if (!(s->playback_mode &MP_AUDIO_MONO )) { - free_out <<=1 ; - } - block_size = s->threshold /2 ; -if (free_out - s->last_free < block_size) { -return ; - } -if (block_size >4096 ) {
hw/audio/marvell_88w8618.c line 98
Quoted 10 lines
hw/audio/marvell_88w8618.c deleted +0
-10-return ; - } -physical_memory_read (s->target_buffer + s->play_pos, buf, block_size); - mem_buffer = buf; -if (s->playback_mode &MP_AUDIO_16BIT_SAMPLE ) { -if (s->playback_mode &MP_AUDIO_MONO ) { - codec_buffer =wm8750_dac_buffer (s->wm, block_size >>1 ); -for (pos =0 ; pos < block_size; pos +=2 ) { - *codec_buffer++ = *(int16_t *)mem_buffer; - *codec_buffer++ = *(int16_t *)mem_buffer;
There seems to be an endianness bug here.
Quoted 27 lines
hw/audio/marvell_88w8618.c deleted +0
-27- mem_buffer +=2 ; - } - }else { -memcpy (wm8750_dac_buffer (s->wm, block_size >>2 ), - (uint32_t *)mem_buffer, block_size); - } - }else { -if (s->playback_mode &MP_AUDIO_MONO ) { - codec_buffer =wm8750_dac_buffer (s->wm, block_size); -for (pos =0 ; pos < block_size; pos++) { - *codec_buffer++ =cpu_to_le16 (256 * *mem_buffer); - *codec_buffer++ =cpu_to_le16 (256 * *mem_buffer++); - } - }else { - codec_buffer =wm8750_dac_buffer (s->wm, block_size >>1 ); -for (pos =0 ; pos < block_size; pos +=2 ) { - *codec_buffer++ =cpu_to_le16 (256 * *mem_buffer++); - *codec_buffer++ =cpu_to_le16 (256 * *mem_buffer++); - } - } - } -wm8750_dac_commit (s->wm); - - s->last_free = free_out - block_size; - -if (s->play_pos ==0 ) { - s->status |=MP_AUDIO_TX_HALF ;
hw/audio/marvell_88w8618.c line 135
Quoted 10 lines
hw/audio/marvell_88w8618.c deleted +0
-10- s->play_pos = block_size; - }else { - s->status |=MP_AUDIO_TX_FULL ; - s->play_pos =0 ; - } - -if (s->status & s->irq_enable) { -qemu_irq_raise (s->irq); - } -}
Re: [PATCH 4/5] hw: Remove Marvell 88W8618 devices
Quoted 45 lines · Philippe Mathieu-Daudé
Quoted 43 lines · Peter Maydell
The mv88w8618 ethernet and audio devices were used only by the now-removed musicpal machine, so can also be deleted.
Signed-off-by Peter Maydell <[email protected]>--- hw/arm/Kconfig | 3 - hw/audio/marvell_88w8618.c | 315 -------------------------- hw/audio/meson.build | 1 - hw/net/meson.build | 1 - hw/net/mv88w8618_eth.c | 403 --------------------------------- include/hw/net/mv88w8618_eth.h | 13 -- 6 files changed, 736 deletions(-)delete mode 100644
hw/audio/marvell_88w8618.cdelete mode 100644hw/net/mv88w8618_eth.cdelete mode 100644include/hw/net/mv88w8618_eth.hhw/audio/marvell_88w8618.c deleted +0
-26-static void mv88w8618_audio_callback (void *opaque,int free_out,int free_in) -{ -mv88w8618_audio_state *s = opaque; -int16_t *codec_buffer; - QEMU_UNINITIALIZED int8_t buf[4096]; -int8_t *mem_buffer; -int pos, block_size; - -if (!(s->playback_mode &MP_AUDIO_PLAYBACK_EN )) { -return ; - } -if (s->playback_mode &MP_AUDIO_16BIT_SAMPLE ) { - free_out <<=1 ; - } -if (!(s->playback_mode &MP_AUDIO_MONO )) { - free_out <<=1 ; - } - block_size = s->threshold /2 ; -if (free_out - s->last_free < block_size) { -return ; - } -if (block_size >4096 ) { -return ; - } -physical_memory_read (s->target_buffer + s->play_pos, buf, block_size); - mem_buffer = buf;
Quoted 8 lines
hw/audio/marvell_88w8618.c line 98
Quoted 6 lines
hw/audio/marvell_88w8618.c deleted +0
-6-if (s->playback_mode &MP_AUDIO_16BIT_SAMPLE ) { -if (s->playback_mode &MP_AUDIO_MONO ) { - codec_buffer =wm8750_dac_buffer (s->wm, block_size >>1 ); -for (pos =0 ; pos < block_size; pos +=2 ) { - *codec_buffer++ = *(int16_t *)mem_buffer; - *codec_buffer++ = *(int16_t *)mem_buffer;There seems to be an endianness bug here.
Not that it matters, since the code is being deleted, but I don't think there is. In guest memory the sample data is 16-bit little endian values; in this code path we copy it directly into the DAC buffer. The wm8750 code then copies from the DAC buffer to the audio backend, and it has created the backend with formats with big_endian == false. This matches up with the 8-bit-sample codepaths in this function, where because we calculate a (host-order) 16-bit sample value from the guest's 8-bit sample we need to use cpu_to_le16() to write the LE16 data into the DAC buffer.
Quoted 1 line
Reviewed-by Philippe Mathieu-Daudé <[email protected]>
thanks
-- PMM
PATCH 5/5 hw/audio: Remove wm8750 I2C audio device
In reply to Peter MaydellThe wm8750 audio I2C device was used only by the audio device on the SoC used in the now-removed musicpal machine. Since it has no users, we can delete it entirely.
Although the wm8750 is an I2C device that could technically have been created on the command line, it isn't possible to do this usefully because the device only works when C code calls functions like wm8750_data_req_set() and wm8750_dac_buffer().
This resolves the problem noted in issue #4135 that there's a buffer overflow in the interaction between the marvell_88w8618 audio device and the wm8750, by removing the offending code entirely.
Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/4135
--- hw/audio/Kconfig | 4 - hw/audio/meson.build | 1 - hw/audio/wm8750.c | 738 -------------------------------------- include/hw/audio/wm8750.h | 30 -- 4 files changed, 773 deletions(-) delete mode 100644 hw/audio/wm8750.c delete mode 100644 include/hw/audio/wm8750.h
hw/audio/Kconfig +0 -4
@@ -38,10 +38,6 @@ config PCSPK default y depends on I8254 -config WM8750 - bool - depends on I2C - config PL041 bool
hw/audio/meson.build +0 -1
@@ -11,6 +11,5 @@ system_ss.add(when: 'CONFIG_PCSPK', if_true: files('pcspk.c')) system_ss.add(when: 'CONFIG_PL041', if_true: files('pl041.c', 'lm4549.c')) system_ss.add(when: 'CONFIG_SB16', if_true: files('sb16.c')) system_ss.add(when: 'CONFIG_VT82C686', if_true: files('via-ac97.c')) -system_ss.add(when: 'CONFIG_WM8750', if_true: files('wm8750.c')) system_ss.add(when: ['CONFIG_VIRTIO_SND', 'CONFIG_VIRTIO'], if_true: files('virtio-snd.c')) system_ss.add(when: ['CONFIG_VIRTIO_SND', 'CONFIG_VIRTIO', 'CONFIG_VIRTIO_PCI'], if_true: files('virtio-snd-pci.c'))
hw/audio/wm8750.c deleted +0 -738
738 lines not on this page · raw message
include/hw/audio/wm8750.h deleted +0 -30
@@ -1,30 +0,0 @@ -/* -* This program is free software; you can redistribute it and/or modify it -* under the terms and conditions of the GNU General Public License, -* version 2 or later, as published by the Free Software Foundation. -* -* This program is distributed in the hope it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along with -* this program. If not, see <http://www.gnu.org/licenses/>. -*/ -#ifndef HW_DAC_WM8750_H -#define HW_DAC_WM8750_H - - -#define TYPE_WM8750 "wm8750" -#define TYPE_MV88W8618_AUDIO "mv88w8618_audio" - -typedef void data_req_cb (void *opaque,int free_out,int free_in); - -void wm8750_data_req_set (DeviceState *dev,data_req_cb *data_req,void *opaque); -void wm8750_dac_dat (void *opaque,uint32_t sample); -uint32_t wm8750_adc_dat (void *opaque); -void *wm8750_dac_buffer (void *opaque,int samples); -void wm8750_dac_commit (void *opaque); -void wm8750_set_bclk_in (void *opaque,int new_hz); - -#endif
Signature · 1 line
2.43.0
Re: [PATCH 5/5] hw/audio: Remove wm8750 I2C audio device
Quoted 15 lines · Peter Maydell
The wm8750 audio I2C device was used only by the audio device on the SoC used in the now-removed musicpal machine. Since it has no users, we can delete it entirely.
Although the wm8750 is an I2C device that could technically have been created on the command line, it isn't possible to do this usefully because the device only works when C code calls functions like
wm8750_data_req_set()andwm8750_dac_buffer().This resolves the problem noted in issue #4135 that there's a buffer overflow in the interaction between the
marvell_88w8618audio device and the wm8750, by removing the offending code entirely.Resolves:https://gitlab.com/qemu-project/qemu/-/work_items/4135
Signed-off-by Peter Maydell<[email protected]>
Quoted 8 lines
--- hw/audio/Kconfig | 4 - hw/audio/meson.build | 1 - hw/audio/wm8750.c | 738 -------------------------------------- include/hw/audio/wm8750.h | 30 -- 4 files changed, 773 deletions(-)delete mode 100644
hw/audio/wm8750.c
delete mode 100644include/hw/audio/wm8750.h
r~
Re: [PATCH 5/5] hw/audio: Remove wm8750 I2C audio device
In reply to Peter MaydellQuoted 15 lines · Peter Maydell
The wm8750 audio I2C device was used only by the audio device on the SoC used in the now-removed musicpal machine. Since it has no users, we can delete it entirely.
Although the wm8750 is an I2C device that could technically have been created on the command line, it isn't possible to do this usefully because the device only works when C code calls functions like
wm8750_data_req_set()andwm8750_dac_buffer().This resolves the problem noted in issue #4135 that there's a buffer overflow in the interaction between the
marvell_88w8618audio device and the wm8750, by removing the offending code entirely.Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/4135
Signed-off-by Peter Maydell <[email protected]>
Quoted 8 lines
--- hw/audio/Kconfig | 4 - hw/audio/meson.build | 1 - hw/audio/wm8750.c | 738 -------------------------------------- include/hw/audio/wm8750.h | 30 -- 4 files changed, 773 deletions(-)delete mode 100644
hw/audio/wm8750.c
delete mode 100644include/hw/audio/wm8750.h
Quoted 4 lines · Peter Maydell
The 'musicpal' machine emulates the Freecom MusicPal, which was an "internet radio" released in the mid-2000s. The stock system used a 2.6.16 Linux kernel, but as far as I'm aware, support for the hardware was never upstreamed to the mainline kernel.
Right. I once talked to the developer at Freecom behind the software, but they were already in maintenance mode and apparently had neither the power nor the will to influence Marvell on this.
Quoted 63 lines
There are a number of reasons for deprecating this board:
* The hardware is now solidly obsolete
* It was never supported in mainline Linux
* The SoC is a Marvell one with no public datasheet
* The only QEMU changes to it have been the usual tree wide updates and refactoring work
* We have no test image for it that we can distribute
* The only bug report we've ever had about it has been one of the usual "bug found by static analysis" kind (#4135)But in fact we can just drop it immediately, because in commit
59754f85ed35("target/arm: Do memory type alignment check when translation disabled") in 2024 we broke the boot of the standard firmware image for this board. (The image's u-boot does a LDRH to an unaligned address, which is UNPREDICTABLE; we used to let it through, but that commit makes it take a Data Abort, so the image crashes before it boots the kernel.) Since nobody complained, we can deduce that nobody's actually using this machine.This patchset first fixes up a couple of places (notably the
pflash_cfi02tests) that were using or referring to the musicpal board; then it removes the board, followed by the devices used only by that board.Strictly speaking it's possible that somebody is using this machine with some other image that doesn't have the same "does an unaligned LDRH" problem the stock firmware image does; but it seems unlikely to me. We can take the standard "deprecate for two releases, then drop" route if people prefer that.
I do also have a patch which reverts the "take a Data Abort on unaligned access" change for v5 and v6-with-SCTLR.U=0 CPUs, which I'll post separately.
thanks
-- PMMPeter Maydell (5):
tests/qtest/pflash-cfi02-test: Don't use musicpal machine for testing hw/arm: Remove spurious WM8750 dependency from RealviewKconfighw/arm: Remove the 'musicpal' machine
hw: Remove Marvell 88W8618 devices
hw/audio: Remove wm8750 I2C audio deviceMAINTAINERS | 10 - configs/devices/arm-softmmu/default.mak | 1 - docs/about/removed-features.rst | 10 + docs/system/arm/musicpal.rst | 19 - docs/system/target-arm.rst | 1 - hw/arm/Kconfig | 16 - hw/arm/meson.build | 1 - hw/arm/musicpal.c | 1388 ----------------------- hw/audio/Kconfig | 4 - hw/audio/marvell_88w8618.c | 315 ----- hw/audio/meson.build | 2 - hw/audio/wm8750.c | 738 ------------ hw/net/meson.build | 1 - hw/net/mv88w8618_eth.c | 403 ------- include/hw/audio/wm8750.h | 30 - include/hw/net/mv88w8618_eth.h | 13 - tests/qtest/meson.build | 6 +- tests/qtest/pflash-cfi02-test.c | 38 +-
Quoted 9 lines
18 files changed, 36 insertions(+), 2960 deletions(-) delete mode 100644 docs/system/arm/musicpal.rst delete mode 100644 hw/arm/musicpal.c delete mode 100644 hw/audio/marvell_88w8618.c delete mode 100644 hw/audio/wm8750.c delete mode 100644 hw/net/mv88w8618_eth.c delete mode 100644 include/hw/audio/wm8750.h delete mode 100644 include/hw/net/mv88w8618_eth.h
RIP - no problems with this. At least it was allowed to turn 18 years in-tree. ;)
Fun fact: My real device that once motivated this reverse-engineered machine model is still alive and basically working. Its hard-coded web-radio service is dead by now, but manually entered streams still work. Only the power supply had to be replace a while ago.
Jan