Skip to contentSkip to conversation

aspeed queue

GIT PULL Applied Cédric Le Goater 7 participants 39 messages May 5, 2025 – Oct 6, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

The following changes since commit e578dcc7e1590b20a84036afe5bdfa8d23a6048e:

pc-bios: Add AST27x0 vBootrom (2025-05-02 09:47:14 +0200)

are available in the Git repository at:

https://github.com/legoater/qemu/ tags/pull-aspeed-20250505

for you to fetch changes up to f32ef57f7de98ec36da52b0a13bd5d18ac4bd583:

docs: Add support for ast2700fc machine (2025-05-05 09:42:16 +0200)

----------------------------------------------------------------
aspeed queue:

* Fixed AST2700 SPI model issues
* Updated SDK images
* Added FW support to the AST2700 EVB machines
* Introduced an AST27x0 multi-SoC machine

----------------------------------------------------------------
Jamin Lin (12):
tests/functional/aspeed: Update test ASPEED SDK v09.06 for AST2500 tests/functional/aspeed: Update test ASPEED SDK v09.06 for AST2600 tests/functional/aspeed: Update test ASPEED SDK v03.00 for AST1030 hw/arm/aspeed_ast27x0: Rename variable sram_name to name in ast2700 realize tests/functional/aspeed: Move I2C test into shared helper for AST2700 reuse tests/functional/aspeed: Update test ASPEED SDK v09.06 tests/functional/aspeed: extract boot and login sequence into helper function hw/arm/aspeed_ast27x0 Introduce vbootrom memory region hw/arm/aspeed: Add support for loading vbootrom image via "-bios" tests/functional/aspeed: Add to test vbootrom for AST2700 docs/system/arm/aspeed: move AST2700 content to new section docs/system/arm/aspeed: Support vbootrom for AST2700

Joe Komlodi (1):
hw/ssi/aspeed_smc: Allow 64-bit wide flash accesses

Steven Lee (9):
aspeed: ast27x0: Map unimplemented devices in SoC memory
aspeed: ast27x0: Correct hex notation for device addresses hw/intc/aspeed: Add support for AST2700 SSP INTC hw/intc/aspeed: Add support for AST2700 TSP INTC hw/arm/aspeed_ast27x0-ssp: Introduce AST27x0 A1 SSP SoC hw/arm/aspeed_ast27x0-tsp: Introduce AST27x0 A1 TSP SoC hw/arm: Introduce ASPEED AST2700 A1 full core machine tests/function/aspeed: Add functional test for ast2700fc
docs: Add support for ast2700fc machine

Troy Lee (1):
hw/arm: ast27x0: Wire up EHCI controllers

 docs/system/arm/aspeed.rst                         | 164 +++++++-
 include/hw/arm/aspeed.h                            |   1 +
 include/hw/arm/aspeed_soc.h                        |  38 +-
 include/hw/intc/aspeed_intc.h                      |   5 +
 hw/arm/aspeed.c                                    |  36 ++
 hw/arm/aspeed_ast27x0-fc.c                         | 192 ++++++++++
 hw/arm/aspeed_ast27x0-ssp.c                        | 294 +++++++++++++++
 hw/arm/aspeed_ast27x0-tsp.c                        | 294 +++++++++++++++
 hw/arm/aspeed_ast27x0.c                            | 125 +++++--
 hw/intc/aspeed_intc.c                              | 416 +++++++++++++++++++++
 hw/ssi/aspeed_smc.c                                |   4 +-
 hw/arm/meson.build                                 |   6 +-
 tests/functional/meson.build                       |   6 +-
 ...64_aspeed.py => test_aarch64_aspeed_ast2700.py} |  82 ++--
 tests/functional/test_aarch64_aspeed_ast2700fc.py  | 135 +++++++
 tests/functional/test_arm_aspeed_ast1030.py        |  10 +-
 tests/functional/test_arm_aspeed_ast2500.py        |   8 +-
 tests/functional/test_arm_aspeed_ast2600.py        |  15 +-
 18 files changed, 1749 insertions(+), 82 deletions(-)
 create mode 100644 hw/arm/aspeed_ast27x0-fc.c
 create mode 100644 hw/arm/aspeed_ast27x0-ssp.c
 create mode 100644 hw/arm/aspeed_ast27x0-tsp.c
 rename tests/functional/{test_aarch64_aspeed.py => test_aarch64_aspeed_ast2700.py} (64%)
 create mode 100755 tests/functional/test_aarch64_aspeed_ast2700fc.py
#1 lore raw

[PULL 07/23] tests/functional/aspeed: Move I2C test into shared helper for AST2700 reuse

From: Jamin Lin <[email protected]>

Move the I2C test case into a common helper function (do_ast2700_i2c_test) so it can be reused across multiple AST2700-based test cases. This reduces duplication and improves maintainability.

---
 tests/functional/test_aarch64_aspeed.py | 28 +++++++++++++------------
 1 file changed, 15 insertions(+), 13 deletions(-)
tests/functional/test_aarch64_aspeed.py +15 -13
index c7f3b3b319fd..4b6851db2add 100755
@@ -18,6 +18,8 @@ class AST2x00MachineSDK(QemuSystemTest):
     def do_test_aarch64_aspeed_sdk_start(self, image):
         self.require_netdev('user')
         self.vm.set_console()
+        self.vm.add_args('-device',
+                         'tmp105,bus=aspeed.i2c.bus.1,address=0x4d,id=tmp-test')
         self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw',
                          '-net', 'nic', '-net', 'user', '-snapshot')
 
@@ -35,6 +37,17 @@ def do_test_aarch64_aspeed_sdk_start(self, image):
             'https://github.com/AspeedTech-BMC/openbmc/releases/download/v09.05/ast2700-default-obmc.tar.gz',
             'c1f4496aec06743c812a6e9a1a18d032f34d62f3ddb6956e924fef62aa2046a5')
 
+    def do_ast2700_i2c_test(self):
+        exec_command_and_wait_for_pattern(self,
+            'echo lm75 0x4d > /sys/class/i2c-dev/i2c-1/device/new_device ',
+            'i2c i2c-1: new_device: Instantiated device lm75 at 0x4d')
+        exec_command_and_wait_for_pattern(self,
+            'cat /sys/bus/i2c/devices/1-004d/hwmon/hwmon*/temp1_input', '0')
+        self.vm.cmd('qom-set', path='/machine/peripheral/tmp-test',
+                    property='temperature', value=18000)
+        exec_command_and_wait_for_pattern(self,
+            'cat /sys/bus/i2c/devices/1-004d/hwmon/hwmon*/temp1_input', '18000')
+
     def start_ast2700_test(self, name):
         num_cpu = 4
         uboot_size = os.path.getsize(self.scratch_file(name,
@@ -73,8 +86,6 @@ def start_ast2700_test(self, name):
                              f'loader,addr=0x430000000,cpu-num={i}')
 
         self.vm.add_args('-smp', str(num_cpu))
-        self.vm.add_args('-device',
-                         'tmp105,bus=aspeed.i2c.bus.1,address=0x4d,id=tmp-test')
         self.do_test_aarch64_aspeed_sdk_start(
             self.scratch_file(name, 'image-bmc'))
 
@@ -83,28 +94,19 @@ def start_ast2700_test(self, name):
         exec_command_and_wait_for_pattern(self, 'root', 'Password:')
         exec_command_and_wait_for_pattern(self, '0penBmc', f'root@{name}:~#')
 
-        exec_command_and_wait_for_pattern(self,
-            'echo lm75 0x4d > /sys/class/i2c-dev/i2c-1/device/new_device ',
-            'i2c i2c-1: new_device: Instantiated device lm75 at 0x4d')
-        exec_command_and_wait_for_pattern(self,
-            'cat /sys/bus/i2c/devices/1-004d/hwmon/hwmon*/temp1_input', '0')
-        self.vm.cmd('qom-set', path='/machine/peripheral/tmp-test',
-                    property='temperature', value=18000)
-        exec_command_and_wait_for_pattern(self,
-            'cat /sys/bus/i2c/devices/1-004d/hwmon/hwmon*/temp1_input', '18000')
-
     def test_aarch64_ast2700_evb_sdk_v09_05(self):
         self.set_machine('ast2700-evb')
 
         self.archive_extract(self.ASSET_SDK_V905_AST2700)
         self.start_ast2700_test('ast2700-a0-default')
+        self.do_ast2700_i2c_test()
 
     def test_aarch64_ast2700a1_evb_sdk_v09_05(self):
         self.set_machine('ast2700a1-evb')
 
         self.archive_extract(self.ASSET_SDK_V905_AST2700A1)
         self.start_ast2700_test('ast2700-default')
-
+        self.do_ast2700_i2c_test()
 
 if __name__ == '__main__':
     QemuSystemTest.main()
Signature · 1 line
2.49.0
#2 lore raw

[PULL 08/23] tests/functional/aspeed: Update test ASPEED SDK v09.06

In reply to Cédric Le Goater

From: Jamin Lin <[email protected]>

---
 tests/functional/test_aarch64_aspeed.py | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
tests/functional/test_aarch64_aspeed.py +10 -10
index 4b6851db2add..b6e2be1f8292 100755
@@ -29,13 +29,13 @@ def do_test_aarch64_aspeed_sdk_start(self, image):
         wait_for_console_pattern(self, '## Loading kernel from FIT Image')
         wait_for_console_pattern(self, 'Starting kernel ...')
 
-    ASSET_SDK_V905_AST2700 = Asset(
-            'https://github.com/AspeedTech-BMC/openbmc/releases/download/v09.05/ast2700-a0-default-obmc.tar.gz',
-            'cfbbd1cce72f2a3b73b9080c41eecdadebb7077fba4f7806d72ac99f3e84b74a')
+    ASSET_SDK_V906_AST2700 = Asset(
+            'https://github.com/AspeedTech-BMC/openbmc/releases/download/v09.06/ast2700-a0-default-obmc.tar.gz',
+            '7247b6f19dbfb700686f8d9f723ac23f3eb229226c0589cb9b06b80d1b61f3cb')
 
-    ASSET_SDK_V905_AST2700A1 = Asset(
-            'https://github.com/AspeedTech-BMC/openbmc/releases/download/v09.05/ast2700-default-obmc.tar.gz',
-            'c1f4496aec06743c812a6e9a1a18d032f34d62f3ddb6956e924fef62aa2046a5')
+    ASSET_SDK_V906_AST2700A1 = Asset(
+            'https://github.com/AspeedTech-BMC/openbmc/releases/download/v09.06/ast2700-default-obmc.tar.gz',
+            'f1d53e0be8a404ecce3e105f72bc50fa4e090ad13160ffa91b10a6e0233a9dc6')
 
     def do_ast2700_i2c_test(self):
         exec_command_and_wait_for_pattern(self,
@@ -94,17 +94,17 @@ def start_ast2700_test(self, name):
         exec_command_and_wait_for_pattern(self, 'root', 'Password:')
         exec_command_and_wait_for_pattern(self, '0penBmc', f'root@{name}:~#')
 
-    def test_aarch64_ast2700_evb_sdk_v09_05(self):
+    def test_aarch64_ast2700_evb_sdk_v09_06(self):
         self.set_machine('ast2700-evb')
 
-        self.archive_extract(self.ASSET_SDK_V905_AST2700)
+        self.archive_extract(self.ASSET_SDK_V906_AST2700)
         self.start_ast2700_test('ast2700-a0-default')
         self.do_ast2700_i2c_test()
 
-    def test_aarch64_ast2700a1_evb_sdk_v09_05(self):
+    def test_aarch64_ast2700a1_evb_sdk_v09_06(self):
         self.set_machine('ast2700a1-evb')
 
-        self.archive_extract(self.ASSET_SDK_V905_AST2700A1)
+        self.archive_extract(self.ASSET_SDK_V906_AST2700A1)
         self.start_ast2700_test('ast2700-default')
         self.do_ast2700_i2c_test()
 
Signature · 1 line
2.49.0
#3 lore raw

[PULL 11/23] hw/arm/aspeed: Add support for loading vbootrom image via "-bios"

In reply to Cédric Le Goater

From: Jamin Lin <[email protected]>

Introduce "aspeed_load_vbootrom()" to support loading a virtual boot ROM image into the vbootrom memory region, using the "-bios" command-line option.

Introduce a new "vbootrom" field in the AspeedMachineClass to indicate whether a machine supports the virtual boot ROM region.

Set this field to true by default for the AST2700-A0 and AST2700-A1 EVB machines.

---
 include/hw/arm/aspeed.h |  1 +
 hw/arm/aspeed.c         | 36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+)
include/hw/arm/aspeed.h +1 -0
index 9cae45a1c99c..973277bea655 100644
@@ -40,6 +40,7 @@ struct AspeedMachineClass {
     void (*i2c_init)(AspeedMachineState *bmc);
     uint32_t uart_default;
     bool sdhci_wp_inverted;
+    bool vbootrom;
 };
 
 
hw/arm/aspeed.c +36 -0
index 20f418fb63bc..d0b333646e99 100644
@@ -27,6 +27,7 @@
 #include "system/reset.h"
 #include "hw/loader.h"
 #include "qemu/error-report.h"
+#include "qemu/datadir.h"
 #include "qemu/units.h"
 #include "hw/qdev-clock.h"
 #include "system/system.h"
@@ -305,6 +306,33 @@ static void aspeed_install_boot_rom(AspeedMachineState *bmc, BlockBackend *blk,
                    rom_size, &error_abort);
 }
 
+#define VBOOTROM_FILE_NAME  "ast27x0_bootrom.bin"
+
+/*
+ * This function locates the vbootrom image file specified via the command line
+ * using the -bios option. It loads the specified image into the vbootrom
+ * memory region and handles errors if the file cannot be found or loaded.
+ */
+static void aspeed_load_vbootrom(AspeedMachineState *bmc, const char *bios_name,
+                                 Error **errp)
+{
+    g_autofree char *filename = NULL;
+    AspeedSoCState *soc = bmc->soc;
+    int ret;
+
+    filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
+    if (!filename) {
+        error_setg(errp, "Could not find vbootrom image '%s'", bios_name);
+        return;
+    }
+
+    ret = load_image_mr(filename, &soc->vbootrom);
+    if (ret < 0) {
+        error_setg(errp, "Failed to load vbootrom image '%s'", bios_name);
+        return;
+    }
+}
+
 void aspeed_board_init_flashes(AspeedSMCState *s, const char *flashtype,
                                       unsigned int count, int unit0)
 {
@@ -380,6 +408,7 @@ static void aspeed_machine_init(MachineState *machine)
     AspeedMachineClass *amc = ASPEED_MACHINE_GET_CLASS(machine);
     AspeedSoCClass *sc;
     int i;
+    const char *bios_name = NULL;
     DriveInfo *emmc0 = NULL;
     bool boot_emmc;
 
@@ -482,6 +511,11 @@ static void aspeed_machine_init(MachineState *machine)
         }
     }
 
+    if (amc->vbootrom) {
+        bios_name = machine->firmware ?: VBOOTROM_FILE_NAME;
+        aspeed_load_vbootrom(bmc, bios_name, &error_abort);
+    }
+
     arm_load_kernel(ARM_CPU(first_cpu), machine, &aspeed_board_binfo);
 }
 
@@ -1701,6 +1735,7 @@ static void aspeed_machine_ast2700a0_evb_class_init(ObjectClass *oc,
     amc->macs_mask = ASPEED_MAC0_ON | ASPEED_MAC1_ON | ASPEED_MAC2_ON;
     amc->uart_default = ASPEED_DEV_UART12;
     amc->i2c_init  = ast2700_evb_i2c_init;
+    amc->vbootrom = true;
     mc->auto_create_sdcard = true;
     mc->default_ram_size = 1 * GiB;
     aspeed_machine_class_init_cpus_defaults(mc);
@@ -1722,6 +1757,7 @@ static void aspeed_machine_ast2700a1_evb_class_init(ObjectClass *oc,
     amc->macs_mask = ASPEED_MAC0_ON | ASPEED_MAC1_ON | ASPEED_MAC2_ON;
     amc->uart_default = ASPEED_DEV_UART12;
     amc->i2c_init  = ast2700_evb_i2c_init;
+    amc->vbootrom = true;
     mc->auto_create_sdcard = true;
     mc->default_ram_size = 1 * GiB;
     aspeed_machine_class_init_cpus_defaults(mc);
Signature · 1 line
2.49.0
#4 lore raw

[PULL 02/23] hw/ssi/aspeed_smc: Allow 64-bit wide flash accesses

In reply to Cédric Le Goater

From: Joe Komlodi <[email protected]>

cde3247651dc998da5dc1005148302a90d72f21f fixed atomicity for LDRD, which ends up making accesses 64-bits wide. However, the AST2600 bootloader can sometimes compile with LDRD instructions, which causes the acceses to fail when accessing the memory-mapped SPI flash.

To fix this, increase the MMIO region valid access size to allow for 64-bit accesses.

---
 hw/ssi/aspeed_smc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/ssi/aspeed_smc.c +2 -2
index 0d38f95c7a39..614528b8ef65 100644
@@ -359,7 +359,7 @@ static const MemoryRegionOps aspeed_smc_flash_default_ops = {
     .endianness = DEVICE_LITTLE_ENDIAN,
     .valid = {
         .min_access_size = 1,
-        .max_access_size = 4,
+        .max_access_size = 8,
     },
 };
 
@@ -670,7 +670,7 @@ static const MemoryRegionOps aspeed_smc_flash_ops = {
     .endianness = DEVICE_LITTLE_ENDIAN,
     .valid = {
         .min_access_size = 1,
-        .max_access_size = 4,
+        .max_access_size = 8,
     },
 };
 
Signature · 1 line
2.49.0
#5 lore raw

[PULL 03/23] tests/functional/aspeed: Update test ASPEED SDK v09.06 for AST2500

In reply to Cédric Le Goater

From: Jamin Lin <[email protected]>

---
 tests/functional/test_arm_aspeed_ast2500.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
tests/functional/test_arm_aspeed_ast2500.py +4 -4
index a3b44572fcf6..6923fe870170 100755
@@ -37,14 +37,14 @@ def test_arm_ast2500_evb_buildroot(self):
 
         self.do_test_arm_aspeed_buildroot_poweroff()
 
-    ASSET_SDK_V806_AST2500 = Asset(
-        'https://github.com/AspeedTech-BMC/openbmc/releases/download/v08.06/ast2500-default-obmc.tar.gz',
-        'e1755f3cadff69190438c688d52dd0f0d399b70a1e14b1d3d5540fc4851d38ca')
+    ASSET_SDK_V906_AST2500 = Asset(
+        'https://github.com/AspeedTech-BMC/openbmc/releases/download/v09.06/ast2500-default-obmc.tar.gz',
+        '542db84645b4efd8aed50385d7f4dd1caff379a987032311cfa7b563a3addb2a')
 
     def test_arm_ast2500_evb_sdk(self):
         self.set_machine('ast2500-evb')
 
-        self.archive_extract(self.ASSET_SDK_V806_AST2500)
+        self.archive_extract(self.ASSET_SDK_V906_AST2500)
 
         self.do_test_arm_aspeed_sdk_start(
             self.scratch_file("ast2500-default", "image-bmc"))
Signature · 1 line
2.49.0
#6 lore raw

[PULL 12/23] tests/functional/aspeed: Add to test vbootrom for AST2700

In reply to Cédric Le Goater

From: Jamin Lin <[email protected]>

Add the AST2700 functional test to boot using the vbootrom image instead of manually loading boot components with -device loader. The boot ROM binary is now passed via the
-bios option, using the image located in pc-bios/ast27x0_bootrom.bin.

---
 tests/functional/test_aarch64_aspeed.py | 26 +++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
tests/functional/test_aarch64_aspeed.py +26 -0
index 1e1f3f9ecece..d02dc7991c1a 100755
@@ -25,6 +25,18 @@ def do_test_aarch64_aspeed_sdk_start(self, image):
 
         self.vm.launch()
 
+    def verify_vbootrom_firmware_flow(self):
+        wait_for_console_pattern(self, 'Found valid FIT image')
+        wait_for_console_pattern(self, '[uboot] loading')
+        wait_for_console_pattern(self, 'done')
+        wait_for_console_pattern(self, '[fdt] loading')
+        wait_for_console_pattern(self, 'done')
+        wait_for_console_pattern(self, '[tee] loading')
+        wait_for_console_pattern(self, 'done')
+        wait_for_console_pattern(self, '[atf] loading')
+        wait_for_console_pattern(self, 'done')
+        wait_for_console_pattern(self, 'Jumping to BL31 (Trusted Firmware-A)')
+
     def verify_openbmc_boot_and_login(self, name):
         wait_for_console_pattern(self, 'U-Boot 2023.10')
         wait_for_console_pattern(self, '## Loading kernel from FIT Image')
@@ -94,6 +106,11 @@ def start_ast2700_test(self, name):
         self.do_test_aarch64_aspeed_sdk_start(
             self.scratch_file(name, 'image-bmc'))
 
+    def start_ast2700_test_vbootrom(self, name):
+        self.vm.add_args('-bios', 'ast27x0_bootrom.bin')
+        self.do_test_aarch64_aspeed_sdk_start(
+                self.scratch_file(name, 'image-bmc'))
+
     def test_aarch64_ast2700_evb_sdk_v09_06(self):
         self.set_machine('ast2700-evb')
 
@@ -110,5 +127,14 @@ def test_aarch64_ast2700a1_evb_sdk_v09_06(self):
         self.verify_openbmc_boot_and_login('ast2700-default')
         self.do_ast2700_i2c_test()
 
+    def test_aarch64_ast2700a1_evb_sdk_vbootrom_v09_06(self):
+        self.set_machine('ast2700a1-evb')
+
+        self.archive_extract(self.ASSET_SDK_V906_AST2700A1)
+        self.start_ast2700_test_vbootrom('ast2700-default')
+        self.verify_vbootrom_firmware_flow()
+        self.verify_openbmc_boot_and_login('ast2700-default')
+        self.do_ast2700_i2c_test()
+
 if __name__ == '__main__':
     QemuSystemTest.main()
Signature · 1 line
2.49.0
#7 lore raw

Re: [PULL 12/23] tests/functional/aspeed: Add to test vbootrom for AST2700

Quoted 6 lines · Cédric Le Goater

From: Jamin Lin <[email protected]>

Add the AST2700 functional test to boot using the vbootrom image instead of manually loading boot components with -device loader. The boot ROM binary is now passed via the
-bios option, using the image located in pc-bios/ast27x0_bootrom.bin.

...

tests/functional/test_aarch64_aspeed.py def test_aarch64_ast2700a1_evb_sdk_v09_06(self): · line 137

Quoted 12 lines
tests/functional/test_aarch64_aspeed.py +8 -0
@@ -110,5 +127,14 @@ def test_aarch64_ast2700a1_evb_sdk_v09_06(self):
          self.verify_openbmc_boot_and_login('ast2700-default')
          self.do_ast2700_i2c_test()
 
+    def test_aarch64_ast2700a1_evb_sdk_vbootrom_v09_06(self):
+        self.set_machine('ast2700a1-evb')
+
+        self.archive_extract(self.ASSET_SDK_V906_AST2700A1)
+        self.start_ast2700_test_vbootrom('ast2700-default')
+        self.verify_vbootrom_firmware_flow()
+        self.verify_openbmc_boot_and_login('ast2700-default')
+        self.do_ast2700_i2c_test()

Hi,

just a question / idea: The ast2700 test is now one of the longest running aarch64 tests ... would it maybe be ok to drop (or disable by default) the test_aarch64_ast2700a1_evb_sdk_v09_06 test now that the vbootrom test has been added? Or do we really get a lot of additional test coverage (that we don't get by the a0 test yet) by booting Linux twice on the a1 machine here?

Thanks,
Thomas

#8 lore raw

Re: [PULL 12/23] tests/functional/aspeed: Add to test vbootrom for AST2700

Quoted 22 lines · Thomas Huth
Quoted 6 lines · Cédric Le Goater

From: Jamin Lin <[email protected]>

Add the AST2700 functional test to boot using the vbootrom image instead of manually loading boot components with -device loader. The boot ROM binary is now passed via the
-bios option, using the image located in pc-bios/ast27x0_bootrom.bin.

...

tests/functional/test_aarch64_aspeed.py def test_aarch64_ast2700a1_evb_sdk_v09_06(self): · line 136

Quoted 11 lines
tests/functional/test_aarch64_aspeed.py +8 -0
@@ -110,5 +127,14 @@ def test_aarch64_ast2700a1_evb_sdk_v09_06(self):
           self.verify_openbmc_boot_and_login('ast2700-default')
           self.do_ast2700_i2c_test()
+    def test_aarch64_ast2700a1_evb_sdk_vbootrom_v09_06(self):
+        self.set_machine('ast2700a1-evb')
+
+        self.archive_extract(self.ASSET_SDK_V906_AST2700A1)
+        self.start_ast2700_test_vbootrom('ast2700-default')
+        self.verify_vbootrom_firmware_flow()
+        self.verify_openbmc_boot_and_login('ast2700-default')
+        self.do_ast2700_i2c_test()

 Hi,

Quoted 1 line

just a question / idea: The ast2700 test is now one of the longest running aarch64 tests ...

yes. I should split the ast2600 test in two too to improve parallelism.

Quoted 1 line

would it maybe be ok to drop (or disable by default) the test_aarch64_ast2700a1_evb_sdk_v09_06 test now that the vbootrom test has been added? Or do we really get a lot of additional test coverage (that we don't get by the a0 test yet) by booting Linux twice on the a1 machine here?

We don't need to keep 'test_aarch64_ast2700a0_evb_sdk_v09_06', since ast2700a0-evb is being deprecated.

May be we can reduce 'test_aarch64_ast2700a1_evb_sdk_vbootrom_v09_08' to 'verify_vbootrom_firmware_flow()' and a check on the kernel being started only.

Jamin, what do you think ?

Thanks,

C.

#9 lore raw

[PULL 10/23] hw/arm/aspeed_ast27x0 Introduce vbootrom memory region

In reply to Cédric Le Goater

From: Jamin Lin <[email protected]>

Introduce a new vbootrom memory region. The region is mapped at address "0x00000000" and has a size of 128KB, identical to the SRAM region size. This memory region is intended for loading a vbootrom image file as part of the boot process.

The vbootrom registered in the SoC's address space using the ASPEED_DEV_VBOOTROM index.

---
 include/hw/arm/aspeed_soc.h | 2 ++
 hw/arm/aspeed_ast27x0.c     | 9 +++++++++
 2 files changed, 11 insertions(+)
include/hw/arm/aspeed_soc.h +2 -0
index c1e80c8908b3..4dcb1010dc28 100644
@@ -59,6 +59,7 @@ struct AspeedSoCState {
     MemoryRegion sram;
     MemoryRegion spi_boot_container;
     MemoryRegion spi_boot;
+    MemoryRegion vbootrom;
     AddressSpace dram_as;
     AspeedRtcState rtc;
     AspeedTimerCtrlState timerctrl;
@@ -169,6 +170,7 @@ struct AspeedSoCClass {
 const char *aspeed_soc_cpu_type(AspeedSoCClass *sc);
 
 enum {
+    ASPEED_DEV_VBOOTROM,
     ASPEED_DEV_SPI_BOOT,
     ASPEED_DEV_IOMEM,
     ASPEED_DEV_UART0,
hw/arm/aspeed_ast27x0.c +9 -0
index 2e21c3a98fa0..a289e65e495d 100644
@@ -24,6 +24,7 @@
 #include "qemu/log.h"
 
 static const hwaddr aspeed_soc_ast2700_memmap[] = {
+    [ASPEED_DEV_VBOOTROM]  =  0x00000000,
     [ASPEED_DEV_SRAM]      =  0x10000000,
     [ASPEED_DEV_EHCI1]     =  0x12061000,
     [ASPEED_DEV_EHCI2]     =  0x12063000,
@@ -672,6 +673,14 @@ static void aspeed_soc_ast2700_realize(DeviceState *dev, Error **errp)
     memory_region_add_subregion(s->memory,
                                 sc->memmap[ASPEED_DEV_SRAM], &s->sram);
 
+    /* VBOOTROM */
+    if (!memory_region_init_ram(&s->vbootrom, OBJECT(s), "aspeed.vbootrom",
+                                0x20000, errp)) {
+        return;
+    }
+    memory_region_add_subregion(s->memory,
+                                sc->memmap[ASPEED_DEV_VBOOTROM], &s->vbootrom);
+
     /* SCU */
     if (!sysbus_realize(SYS_BUS_DEVICE(&s->scu), errp)) {
         return;
Signature · 1 line
2.49.0
#10 lore raw

[PULL 09/23] tests/functional/aspeed: extract boot and login sequence into helper function

In reply to Cédric Le Goater

From: Jamin Lin <[email protected]>

Extracted repeated boot and login steps into a new helper function. No change in functional behavior.

---
 tests/functional/test_aarch64_aspeed.py | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
tests/functional/test_aarch64_aspeed.py +7 -5
index b6e2be1f8292..1e1f3f9ecece 100755
@@ -25,10 +25,15 @@ def do_test_aarch64_aspeed_sdk_start(self, image):
 
         self.vm.launch()
 
+    def verify_openbmc_boot_and_login(self, name):
         wait_for_console_pattern(self, 'U-Boot 2023.10')
         wait_for_console_pattern(self, '## Loading kernel from FIT Image')
         wait_for_console_pattern(self, 'Starting kernel ...')
 
+        wait_for_console_pattern(self, f'{name} login:')
+        exec_command_and_wait_for_pattern(self, 'root', 'Password:')
+        exec_command_and_wait_for_pattern(self, '0penBmc', f'root@{name}:~#')
+
     ASSET_SDK_V906_AST2700 = Asset(
             'https://github.com/AspeedTech-BMC/openbmc/releases/download/v09.06/ast2700-a0-default-obmc.tar.gz',
             '7247b6f19dbfb700686f8d9f723ac23f3eb229226c0589cb9b06b80d1b61f3cb')
@@ -89,16 +94,12 @@ def start_ast2700_test(self, name):
         self.do_test_aarch64_aspeed_sdk_start(
             self.scratch_file(name, 'image-bmc'))
 
-        wait_for_console_pattern(self, f'{name} login:')
-
-        exec_command_and_wait_for_pattern(self, 'root', 'Password:')
-        exec_command_and_wait_for_pattern(self, '0penBmc', f'root@{name}:~#')
-
     def test_aarch64_ast2700_evb_sdk_v09_06(self):
         self.set_machine('ast2700-evb')
 
         self.archive_extract(self.ASSET_SDK_V906_AST2700)
         self.start_ast2700_test('ast2700-a0-default')
+        self.verify_openbmc_boot_and_login('ast2700-a0-default')
         self.do_ast2700_i2c_test()
 
     def test_aarch64_ast2700a1_evb_sdk_v09_06(self):
@@ -106,6 +107,7 @@ def test_aarch64_ast2700a1_evb_sdk_v09_06(self):
 
         self.archive_extract(self.ASSET_SDK_V906_AST2700A1)
         self.start_ast2700_test('ast2700-default')
+        self.verify_openbmc_boot_and_login('ast2700-default')
         self.do_ast2700_i2c_test()
 
 if __name__ == '__main__':
Signature · 1 line
2.49.0
#11 lore raw

[PULL 05/23] tests/functional/aspeed: Update test ASPEED SDK v03.00 for AST1030

In reply to Cédric Le Goater

From: Jamin Lin <[email protected]>

---
 tests/functional/test_arm_aspeed_ast1030.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
tests/functional/test_arm_aspeed_ast1030.py +5 -5
index d45d9f7c1cf8..77037f01793c 100755
@@ -12,17 +12,17 @@
 
 class AST1030Machine(LinuxKernelTest):
 
-    ASSET_ZEPHYR_1_04 = Asset(
+    ASSET_ZEPHYR_3_00 = Asset(
         ('https://github.com/AspeedTech-BMC'
-         '/zephyr/releases/download/v00.01.04/ast1030-evb-demo.zip'),
-        '4ac6210adcbc61294927918707c6762483fd844dde5e07f3ba834ad1f91434d3')
+         '/zephyr/releases/download/v00.03.00/ast1030-evb-demo.zip'),
+        '37fe3ecd4a1b9d620971a15b96492a81093435396eeac69b6f3e384262ff555f')
 
-    def test_ast1030_zephyros_1_04(self):
+    def test_ast1030_zephyros_3_00(self):
         self.set_machine('ast1030-evb')
 
         kernel_name = "ast1030-evb-demo/zephyr.elf"
         kernel_file = self.archive_extract(
-            self.ASSET_ZEPHYR_1_04, member=kernel_name)
+            self.ASSET_ZEPHYR_3_00, member=kernel_name)
 
         self.vm.set_console()
         self.vm.add_args('-kernel', kernel_file, '-nographic')
Signature · 1 line
2.49.0
#12 lore raw

[PULL 06/23] hw/arm/aspeed_ast27x0: Rename variable sram_name to name in ast2700 realize

In reply to Cédric Le Goater

From: Jamin Lin <[email protected]>

The variable "sram_name" was only used for naming the SRAM memory region. Rename it to "name" for consistency with similar code and avoid unnecessary new local variable declarations.

---
 hw/arm/aspeed_ast27x0.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
hw/arm/aspeed_ast27x0.c +4 -4
index ea4a611b9068..2e21c3a98fa0 100644
@@ -592,7 +592,7 @@ static void aspeed_soc_ast2700_realize(DeviceState *dev, Error **errp)
     AspeedSoCClass *sc = ASPEED_SOC_GET_CLASS(s);
     AspeedINTCClass *ic = ASPEED_INTC_GET_CLASS(&a->intc[0]);
     AspeedINTCClass *icio = ASPEED_INTC_GET_CLASS(&a->intc[1]);
-    g_autofree char *sram_name = NULL;
+    g_autofree char *name = NULL;
     qemu_irq irq;
 
     /* Default boot region (SPI memory or ROMs) */
@@ -664,9 +664,9 @@ static void aspeed_soc_ast2700_realize(DeviceState *dev, Error **errp)
     }
 
     /* SRAM */
-    sram_name = g_strdup_printf("aspeed.sram.%d", CPU(&a->cpu[0])->cpu_index);
-    if (!memory_region_init_ram(&s->sram, OBJECT(s), sram_name, sc->sram_size,
-                                 errp)) {
+    name = g_strdup_printf("aspeed.sram.%d", CPU(&a->cpu[0])->cpu_index);
+    if (!memory_region_init_ram(&s->sram, OBJECT(s), name, sc->sram_size,
+                                errp)) {
         return;
     }
     memory_region_add_subregion(s->memory,
Signature · 1 line
2.49.0
#13 lore raw

[PULL 18/23] hw/intc/aspeed: Add support for AST2700 TSP INTC

In reply to Cédric Le Goater

From: Steven Lee <[email protected]>

- Define new types for ast2700tsp INTC and INTCIO
- Add register definitions for TSP INTC and INTCIO
- Implement write handlers for TSP INTC and INTCIO
- Register new types in aspeed_intc_register_types

The design of the TSP INTC and INTCIO controllers is similar to AST2700, with the following differences:

- AST2700
Support GICINT128 to GICINT136 in INTC
The INTCIO GIC_192_201 has 10 output pins, mapped as follows:

    Bit 0 -> GIC 192
    Bit 1 -> GIC 193
    Bit 2 -> GIC 194
    Bit 3 -> GIC 195
    Bit 4 -> GIC 196

- AST2700-tsp
Support TSPINT128 to TSPINT136 in INTC
The INTCIO TSPINT_160_169 has 10 output pins, mapped as follows:

    Bit 0 -> TSPINT 160
    Bit 1 -> TSPINT 161
    Bit 2 -> TSPINT 162
    Bit 3 -> TSPINT 163
    Bit 4 -> TSPINT 164
---
 include/hw/intc/aspeed_intc.h |   2 +
 hw/intc/aspeed_intc.c         | 209 +++++++++++++++++++++++++++++++++-
 2 files changed, 209 insertions(+), 2 deletions(-)
include/hw/intc/aspeed_intc.h +2 -0
index 746f159bf335..51288384a569 100644
@@ -17,6 +17,8 @@
 #define TYPE_ASPEED_2700_INTCIO TYPE_ASPEED_INTC "io-ast2700"
 #define TYPE_ASPEED_2700SSP_INTC TYPE_ASPEED_INTC "-ast2700ssp"
 #define TYPE_ASPEED_2700SSP_INTCIO TYPE_ASPEED_INTC "io-ast2700ssp"
+#define TYPE_ASPEED_2700TSP_INTC TYPE_ASPEED_INTC "-ast2700tsp"
+#define TYPE_ASPEED_2700TSP_INTCIO TYPE_ASPEED_INTC "io-ast2700tsp"
 
 OBJECT_DECLARE_TYPE(AspeedINTCState, AspeedINTCClass, ASPEED_INTC)
 
hw/intc/aspeed_intc.c +207 -2

247 lines not on this page · raw message

Signature · 1 line
2.49.0
#14 lore raw

[PULL 04/23] tests/functional/aspeed: Update test ASPEED SDK v09.06 for AST2600

In reply to Cédric Le Goater

From: Jamin Lin <[email protected]>

Update test for AST2600 production revision A3.

---
 tests/functional/test_arm_aspeed_ast2600.py | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
tests/functional/test_arm_aspeed_ast2600.py +8 -7
index 5ef52f06595d..fdae4c939d8c 100755
@@ -97,26 +97,27 @@ def test_arm_ast2600_evb_buildroot_tpm(self):
 
         self.do_test_arm_aspeed_buildroot_poweroff()
 
-    ASSET_SDK_V806_AST2600_A2 = Asset(
-        'https://github.com/AspeedTech-BMC/openbmc/releases/download/v08.06/ast2600-a2-obmc.tar.gz',
-        '9083506135f622d5e7351fcf7d4e1c7125cee5ba16141220c0ba88931f3681a4')
+    ASSET_SDK_V906_AST2600 = Asset(
+        'https://github.com/AspeedTech-BMC/openbmc/releases/download/v09.06/ast2600-default-obmc.tar.gz',
+        '768d76e247896ad78c154b9cff4f766da2ce65f217d620b286a4a03a8a4f68f5')
 
     def test_arm_ast2600_evb_sdk(self):
         self.set_machine('ast2600-evb')
 
-        self.archive_extract(self.ASSET_SDK_V806_AST2600_A2)
+        self.archive_extract(self.ASSET_SDK_V906_AST2600)
 
         self.vm.add_args('-device',
             'tmp105,bus=aspeed.i2c.bus.5,address=0x4d,id=tmp-test')
         self.vm.add_args('-device',
             'ds1338,bus=aspeed.i2c.bus.5,address=0x32')
         self.do_test_arm_aspeed_sdk_start(
-            self.scratch_file("ast2600-a2", "image-bmc"))
+            self.scratch_file("ast2600-default", "image-bmc"))
 
-        self.wait_for_console_pattern('ast2600-a2 login:')
+        self.wait_for_console_pattern('ast2600-default login:')
 
         exec_command_and_wait_for_pattern(self, 'root', 'Password:')
-        exec_command_and_wait_for_pattern(self, '0penBmc', 'root@ast2600-a2:~#')
+        exec_command_and_wait_for_pattern(self, '0penBmc',
+                                          'root@ast2600-default:~#')
 
         exec_command_and_wait_for_pattern(self,
             'echo lm75 0x4d > /sys/class/i2c-dev/i2c-5/device/new_device',
Signature · 1 line
2.49.0
#15 lore raw

[PULL 16/23] aspeed: ast27x0: Correct hex notation for device addresses

In reply to Cédric Le Goater

From: Steven Lee <[email protected]>

Corrected the hexadecimal notation for several device addresses in the aspeed_soc_ast2700_memmap array by changing the uppercase 'X' to lowercase 'x'.

---
 hw/arm/aspeed_ast27x0.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)
hw/arm/aspeed_ast27x0.c +14 -14
index 21769669df27..1974a257660c 100644
@@ -46,7 +46,7 @@ static const hwaddr aspeed_soc_ast2700_memmap[] = {
     [ASPEED_DEV_RTC]       =  0x12C0F000,
     [ASPEED_DEV_TIMER1]    =  0x12C10000,
     [ASPEED_DEV_SLI]       =  0x12C17000,
-    [ASPEED_DEV_UART4]     =  0X12C1A000,
+    [ASPEED_DEV_UART4]     =  0x12C1A000,
     [ASPEED_DEV_IOMEM1]    =  0x14000000,
     [ASPEED_DEV_FMC]       =  0x14000000,
     [ASPEED_DEV_SPI0]      =  0x14010000,
@@ -67,19 +67,19 @@ static const hwaddr aspeed_soc_ast2700_memmap[] = {
     [ASPEED_DEV_I2C]       =  0x14C0F000,
     [ASPEED_DEV_INTCIO]    =  0x14C18000,
     [ASPEED_DEV_SLIIO]     =  0x14C1E000,
-    [ASPEED_DEV_VUART]     =  0X14C30000,
-    [ASPEED_DEV_UART0]     =  0X14C33000,
-    [ASPEED_DEV_UART1]     =  0X14C33100,
-    [ASPEED_DEV_UART2]     =  0X14C33200,
-    [ASPEED_DEV_UART3]     =  0X14C33300,
-    [ASPEED_DEV_UART5]     =  0X14C33400,
-    [ASPEED_DEV_UART6]     =  0X14C33500,
-    [ASPEED_DEV_UART7]     =  0X14C33600,
-    [ASPEED_DEV_UART8]     =  0X14C33700,
-    [ASPEED_DEV_UART9]     =  0X14C33800,
-    [ASPEED_DEV_UART10]    =  0X14C33900,
-    [ASPEED_DEV_UART11]    =  0X14C33A00,
-    [ASPEED_DEV_UART12]    =  0X14C33B00,
+    [ASPEED_DEV_VUART]     =  0x14C30000,
+    [ASPEED_DEV_UART0]     =  0x14C33000,
+    [ASPEED_DEV_UART1]     =  0x14C33100,
+    [ASPEED_DEV_UART2]     =  0x14C33200,
+    [ASPEED_DEV_UART3]     =  0x14C33300,
+    [ASPEED_DEV_UART5]     =  0x14C33400,
+    [ASPEED_DEV_UART6]     =  0x14C33500,
+    [ASPEED_DEV_UART7]     =  0x14C33600,
+    [ASPEED_DEV_UART8]     =  0x14C33700,
+    [ASPEED_DEV_UART9]     =  0x14C33800,
+    [ASPEED_DEV_UART10]    =  0x14C33900,
+    [ASPEED_DEV_UART11]    =  0x14C33A00,
+    [ASPEED_DEV_UART12]    =  0x14C33B00,
     [ASPEED_DEV_WDT]       =  0x14C37000,
     [ASPEED_DEV_SPI_BOOT]  =  0x100000000,
     [ASPEED_DEV_LTPI]      =  0x300000000,
Signature · 1 line
2.49.0
#16 lore raw

[PULL 01/23] hw/arm: ast27x0: Wire up EHCI controllers

In reply to Cédric Le Goater

From: Troy Lee <[email protected]>

AST27x0 has 4 EHCI controllers, where each CPU and I/O die has 2 instances. This patch use existing TYPE_PLATFORM_EHCI. After wiring up the EHCI controller, the ast2700a1-evb can find up to 4 USB EHCI interfaces.

ehci-platform 12061000.usb: EHCI Host Controller
ehci-platform 12061000.usb: new USB bus registered, assigned bus number 2 ehci-platform 12063000.usb: EHCI Host Controller
ehci-platform 12063000.usb: new USB bus registered, assigned bus number 3 ehci-platform 12061000.usb: irq 88, io mem 0x12061000
ehci-platform 12063000.usb: irq 90, io mem 0x12063000
ehci-platform 14121000.usb: EHCI Host Controller
ehci-platform 14123000.usb: EHCI Host Controller
ehci-platform 12061000.usb: USB 2.0 started, EHCI 1.00
ehci-platform 14121000.usb: new USB bus registered, assigned bus number 5 ehci-platform 14123000.usb: new USB bus registered, assigned bus number 6 ehci-platform 14121000.usb: irq 91, io mem 0x14121000
ehci-platform 14123000.usb: irq 92, io mem 0x14123000
ehci-platform 12063000.usb: USB 2.0 started, EHCI 1.00
usb usb2: Manufacturer: Linux 6.6.78-dirty-bafd2830c17c-gbafd2830c17c-dirty ehci_hcd usb usb3: Manufacturer: Linux 6.6.78-dirty-bafd2830c17c-gbafd2830c17c-dirty ehci_hcd ehci-platform 14121000.usb: USB 2.0 started, EHCI 1.00
usb usb5: Manufacturer: Linux 6.6.78-dirty-bafd2830c17c-gbafd2830c17c-dirty ehci_hcd ehci-platform 14123000.usb: USB 2.0 started, EHCI 1.00
usb usb6: Manufacturer: Linux 6.6.78-dirty-bafd2830c17c-gbafd2830c17c-dirty ehci_hcd

Note that, AST27x0A0 only has 2 EHCI controllers due to hw issue.

---
 include/hw/arm/aspeed_soc.h |  4 +++-
 hw/arm/aspeed_ast27x0.c     | 28 ++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+), 1 deletion(-)
include/hw/arm/aspeed_soc.h +3 -1
index f069d17d1629..c1e80c8908b3 100644
@@ -43,7 +43,7 @@
 #include "hw/intc/arm_gicv3.h"
 
 #define ASPEED_SPIS_NUM  3
-#define ASPEED_EHCIS_NUM 2
+#define ASPEED_EHCIS_NUM 4
 #define ASPEED_WDTS_NUM  8
 #define ASPEED_CPUS_NUM  4
 #define ASPEED_MACS_NUM  4
@@ -192,6 +192,8 @@ enum {
     ASPEED_DEV_SPI2,
     ASPEED_DEV_EHCI1,
     ASPEED_DEV_EHCI2,
+    ASPEED_DEV_EHCI3,
+    ASPEED_DEV_EHCI4,
     ASPEED_DEV_VIC,
     ASPEED_DEV_INTC,
     ASPEED_DEV_INTCIO,
hw/arm/aspeed_ast27x0.c +28 -0
index 63a366f7e837..ea4a611b9068 100644
@@ -25,6 +25,8 @@
 
 static const hwaddr aspeed_soc_ast2700_memmap[] = {
     [ASPEED_DEV_SRAM]      =  0x10000000,
+    [ASPEED_DEV_EHCI1]     =  0x12061000,
+    [ASPEED_DEV_EHCI2]     =  0x12063000,
     [ASPEED_DEV_HACE]      =  0x12070000,
     [ASPEED_DEV_EMMC]      =  0x12090000,
     [ASPEED_DEV_INTC]      =  0x12100000,
@@ -47,6 +49,8 @@ static const hwaddr aspeed_soc_ast2700_memmap[] = {
     [ASPEED_DEV_ETH2]      =  0x14060000,
     [ASPEED_DEV_ETH3]      =  0x14070000,
     [ASPEED_DEV_SDHCI]     =  0x14080000,
+    [ASPEED_DEV_EHCI3]     =  0x14121000,
+    [ASPEED_DEV_EHCI4]     =  0x14123000,
     [ASPEED_DEV_ADC]       =  0x14C00000,
     [ASPEED_DEV_SCUIO]     =  0x14C02000,
     [ASPEED_DEV_GPIO]      =  0x14C0B000,
@@ -91,6 +95,8 @@ static const int aspeed_soc_ast2700a0_irqmap[] = {
     [ASPEED_DEV_TIMER7]    = 22,
     [ASPEED_DEV_TIMER8]    = 23,
     [ASPEED_DEV_DP]        = 28,
+    [ASPEED_DEV_EHCI1]     = 33,
+    [ASPEED_DEV_EHCI2]     = 37,
     [ASPEED_DEV_LPC]       = 128,
     [ASPEED_DEV_IBT]       = 128,
     [ASPEED_DEV_KCS]       = 128,
@@ -137,6 +143,8 @@ static const int aspeed_soc_ast2700a1_irqmap[] = {
     [ASPEED_DEV_TIMER7]    = 22,
     [ASPEED_DEV_TIMER8]    = 23,
     [ASPEED_DEV_DP]        = 28,
+    [ASPEED_DEV_EHCI1]     = 33,
+    [ASPEED_DEV_EHCI2]     = 37,
     [ASPEED_DEV_LPC]       = 192,
     [ASPEED_DEV_IBT]       = 192,
     [ASPEED_DEV_KCS]       = 192,
@@ -212,6 +220,8 @@ static const int ast2700_gic132_gic196_intcmap[] = {
     [ASPEED_DEV_UART10]    = 16,
     [ASPEED_DEV_UART11]    = 17,
     [ASPEED_DEV_UART12]    = 18,
+    [ASPEED_DEV_EHCI3]     = 28,
+    [ASPEED_DEV_EHCI4]     = 29,
 };
 
 /* GICINT 133 */
@@ -434,6 +444,11 @@ static void aspeed_soc_ast2700_init(Object *obj)
         object_initialize_child(obj, "spi[*]", &s->spi[i], typename);
     }
 
+    for (i = 0; i < sc->ehcis_num; i++) {
+        object_initialize_child(obj, "ehci[*]", &s->ehci[i],
+                                TYPE_PLATFORM_EHCI);
+    }
+
     snprintf(typename, sizeof(typename), "aspeed.sdmc-%s", socname);
     object_initialize_child(obj, "sdmc", &s->sdmc, typename);
     object_property_add_alias(obj, "ram-size", OBJECT(&s->sdmc),
@@ -709,6 +724,17 @@ static void aspeed_soc_ast2700_realize(DeviceState *dev, Error **errp)
                         ASPEED_SMC_GET_CLASS(&s->spi[i])->flash_window_base);
     }
 
+    /* EHCI */
+    for (i = 0; i < sc->ehcis_num; i++) {
+        if (!sysbus_realize(SYS_BUS_DEVICE(&s->ehci[i]), errp)) {
+            return;
+        }
+        aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->ehci[i]), 0,
+                        sc->memmap[ASPEED_DEV_EHCI1 + i]);
+        sysbus_connect_irq(SYS_BUS_DEVICE(&s->ehci[i]), 0,
+                           aspeed_soc_get_irq(s, ASPEED_DEV_EHCI1 + i));
+    }
+
     /*
      * SDMC - SDRAM Memory Controller
      * The SDMC controller is unlocked at SPL stage.
@@ -900,6 +926,7 @@ static void aspeed_soc_ast2700a0_class_init(ObjectClass *oc, const void *data)
     sc->silicon_rev  = AST2700_A0_SILICON_REV;
     sc->sram_size    = 0x20000;
     sc->spis_num     = 3;
+    sc->ehcis_num    = 2;
     sc->wdts_num     = 8;
     sc->macs_num     = 1;
     sc->uarts_num    = 13;
@@ -927,6 +954,7 @@ static void aspeed_soc_ast2700a1_class_init(ObjectClass *oc, const void *data)
     sc->silicon_rev  = AST2700_A1_SILICON_REV;
     sc->sram_size    = 0x20000;
     sc->spis_num     = 3;
+    sc->ehcis_num    = 4;
     sc->wdts_num     = 8;
     sc->macs_num     = 3;
     sc->uarts_num    = 13;
Signature · 1 line
2.49.0
#17 lore raw

[PULL 14/23] docs/system/arm/aspeed: Support vbootrom for AST2700

In reply to Cédric Le Goater

From: Jamin Lin <[email protected]>

Using the vbootrom image support and the boot ROM binary is now passed via the -bios option, using the image located in pc-bios/ast27x0_bootrom.bin.

---
 docs/system/arm/aspeed.rst | 29 ++++++++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)
docs/system/arm/aspeed.rst +28 -1
index 08a33b7008b7..014545f4440f 100644
@@ -306,7 +306,14 @@ Images can be downloaded from the ASPEED Forked OpenBMC GitHub release repositor
 Booting the ast2700-evb machine
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-Boot the AST2700 machine from the flash image, use an MTD drive :
+Boot the AST2700 machine from the flash image.
+
+There are two supported methods for booting the AST2700 machine with a flash image:
+
+Manual boot using ``-device loader``:
+
+It causes all 4 CPU cores to start execution from address ``0x430000000``, which
+corresponds to the BL31 image load address.
 
 .. code-block:: bash
 
@@ -326,6 +333,26 @@ Boot the AST2700 machine from the flash image, use an MTD drive :
        -drive file=${IMGDIR}/image-bmc,format=raw,if=mtd \
        -nographic
 
+Boot using a virtual boot ROM (``-bios``):
+
+If users do not specify the ``-bios option``, QEMU will attempt to load the
+default vbootrom image ``ast27x0_bootrom.bin`` from either the current working
+directory or the ``pc-bios`` directory within the QEMU source tree.
+
+.. code-block:: bash
+
+  $ qemu-system-aarch64 -M ast2700-evb \
+      -drive file=image-bmc,format=raw,if=mtd \
+      -nographic
+
+The ``-bios`` option allows users to specify a custom path for the vbootrom
+image to be loaded during boot. This will load the vbootrom image from the
+specified path in the ${HOME} directory.
+
+.. code-block:: bash
+
+  -bios ${HOME}/ast27x0_bootrom.bin
+
 Aspeed minibmc family boards (``ast1030-evb``)
 ==================================================================
 
Signature · 1 line
2.49.0
#18 lore raw

[PULL 19/23] hw/arm/aspeed_ast27x0-ssp: Introduce AST27x0 A1 SSP SoC

In reply to Cédric Le Goater

From: Steven Lee <[email protected]>

The AST2700 SSP (Secondary Service Processor) is a Cortex-M4 coprocessor. This patch adds support for A1 SSP with the following updates:

- Introduce Aspeed27x0SSPSoCState structure in aspeed_soc.h
- Define memory map and IRQ map for AST27x0 A1 SSP SoC
- Implement initialization and realization functions
- Add support for UART, INTC, and SCU devices
- Map unimplemented devices for IPC and SCUIO

The IRQ mapping is similar to AST2700 CA35 SoC, featuring a two-level interrupt controller.

Difference from AST2700:

    - AST2700
      - Support GICINT128 to GICINT136 in INTC
      - The INTCIO GIC_192_201 has 10 output pins, mapped as follows:
          Bit 0 -> GIC 192
          Bit 1 -> GIC 193
          Bit 2 -> GIC 194
          Bit 3 -> GIC 195
          Bit 4 -> GIC 196

    - AST2700-ssp
      - Support SSPINT128 to SSPINT136 in INTC
      - The INTCIO SSPINT_160_169 has 10 output pins, mapped as follows:
          Bit 0 -> SSPINT 160
          Bit 1 -> SSPINT 161
          Bit 2 -> SSPINT 162
          Bit 3 -> SSPINT 163
          Bit 4 -> SSPINT 164
Change-Id I924bf1a657f1e83f9e16d6673713f4a06ecdb496
[ clg: removed local 'Error* err' in aspeed_soc_ast27x0ssp_realize() ]
---
 include/hw/arm/aspeed_soc.h |  14 ++
 hw/arm/aspeed_ast27x0-ssp.c | 294 ++++++++++++++++++++++++++++++++++++
 hw/arm/meson.build          |   1 +
 3 files changed, 309 insertions(+)
 create mode 100644 hw/arm/aspeed_ast27x0-ssp.c
include/hw/arm/aspeed_soc.h +14 -0
index 5fcfd2fe2e62..32be90bc3536 100644
@@ -146,6 +146,18 @@ struct Aspeed10x0SoCState {
     ARMv7MState armv7m;
 };
 
+struct Aspeed27x0SSPSoCState {
+    AspeedSoCState parent;
+    AspeedINTCState intc[2];
+    UnimplementedDeviceState ipc[2];
+    UnimplementedDeviceState scuio;
+
+    ARMv7MState armv7m;
+};
+
+#define TYPE_ASPEED27X0SSP_SOC "aspeed27x0ssp-soc"
+OBJECT_DECLARE_SIMPLE_TYPE(Aspeed27x0SSPSoCState, ASPEED27X0SSP_SOC)
+
 #define TYPE_ASPEED10X0_SOC "aspeed10x0-soc"
 OBJECT_DECLARE_SIMPLE_TYPE(Aspeed10x0SoCState, ASPEED10X0_SOC)
 
@@ -259,6 +271,8 @@ enum {
     ASPEED_DEV_SLIIO,
     ASPEED_GIC_DIST,
     ASPEED_GIC_REDIST,
+    ASPEED_DEV_IPC0,
+    ASPEED_DEV_IPC1,
 };
 
 qemu_irq aspeed_soc_get_irq(AspeedSoCState *s, int dev);
hw/arm/aspeed_ast27x0-ssp.c new file +294 -0

294 lines not on this page · raw message

hw/arm/meson.build +1 -0
index 09b1cfe5b572..39b74a89ed8e 100644
@@ -44,6 +44,7 @@ arm_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files(
   'aspeed_soc_common.c',
   'aspeed_ast2400.c',
   'aspeed_ast2600.c',
+  'aspeed_ast27x0-ssp.c',
   'aspeed_ast10x0.c',
   'aspeed_eeprom.c',
   'fby35.c'))
Signature · 1 line
2.49.0
#19 lore raw

[PULL 17/23] hw/intc/aspeed: Add support for AST2700 SSP INTC

In reply to Cédric Le Goater

From: Steven Lee <[email protected]>

- Define new types for ast2700ssp INTC and INTCIO
- Add register definitions for SSP INTC and INTCIO
- Implement write handlers for SSP INTC and INTCIO
- Register new types in aspeed_intc_register_types

The design of the SSP INTC and INTCIO controllers is similar to AST2700, with the following differences:

- AST2700
Support GICINT128 to GICINT136 in INTC
The INTCIO GIC_192_201 has 10 output pins, mapped as follows:

    Bit 0 -> GIC 192
    Bit 1 -> GIC 193
    Bit 2 -> GIC 194
    Bit 3 -> GIC 195
    Bit 4 -> GIC 196

- AST2700-ssp
Support SSPINT128 to SSPINT136 in INTC
The INTCIO SSPINT_160_169 has 10 output pins, mapped as follows:

    Bit 0 -> SSPINT 160
    Bit 1 -> SSPINT 161
    Bit 2 -> SSPINT 162
    Bit 3 -> SSPINT 163
    Bit 4 -> SSPINT 164
---
 include/hw/intc/aspeed_intc.h |   3 +
 hw/intc/aspeed_intc.c         | 211 ++++++++++++++++++++++++++++++++++
 2 files changed, 214 insertions(+)
include/hw/intc/aspeed_intc.h +3 -0
index 3727ba24be72..746f159bf335 100644
@@ -15,6 +15,9 @@
 #define TYPE_ASPEED_INTC "aspeed.intc"
 #define TYPE_ASPEED_2700_INTC TYPE_ASPEED_INTC "-ast2700"
 #define TYPE_ASPEED_2700_INTCIO TYPE_ASPEED_INTC "io-ast2700"
+#define TYPE_ASPEED_2700SSP_INTC TYPE_ASPEED_INTC "-ast2700ssp"
+#define TYPE_ASPEED_2700SSP_INTCIO TYPE_ASPEED_INTC "io-ast2700ssp"
+
 OBJECT_DECLARE_TYPE(AspeedINTCState, AspeedINTCClass, ASPEED_INTC)
 
 #define ASPEED_INTC_MAX_INPINS 10
hw/intc/aspeed_intc.c +211 -0

246 lines not on this page · raw message

Signature · 1 line
2.49.0
#20 lore raw

[PULL 20/23] hw/arm/aspeed_ast27x0-tsp: Introduce AST27x0 A1 TSP SoC

In reply to Cédric Le Goater

From: Steven Lee <[email protected]>

AST2700 TSP(Tertiary Service Processor) is a Cortex-M4 coprocessor The patch adds support for TSP with following update:

- Introduce Aspeed27x0TSPSoCState structure in aspeed_soc.h
- Implement initialization and realization functions
- Add support for UART, INTC, and SCU devices
- Map unimplemented devices for IPC and SCUIO
- Defined memory map and IRQ maps for AST27x0 A1 TSP SoC

The IRQ mapping is similar to AST2700 CA35 SoC, featuring a two-level interrupt controller.

Difference from AST2700:

    - AST2700
      - Support GICINT128 to GICINT136 in INTC
      - The INTCIO GIC_192_201 has 10 output pins, mapped as follows:
          Bit 0 -> GIC 192
          Bit 1 -> GIC 193
          Bit 2 -> GIC 194
          Bit 3 -> GIC 195
          Bit 4 -> GIC 196

    - AST2700-tsp
      - Support TSPINT128 to TSPINT136 in INTC
      - The INTCIO TSPINT_160_169 has 10 output pins, mapped as follows:
          Bit 0 -> TSPINT 160
          Bit 1 -> TSPINT 161
          Bit 2 -> TSPINT 162
          Bit 3 -> TSPINT 163
          Bit 4 -> TSPINT 164
Change-Id I69eec2b68b26ef04187b2922c5f2e584b9076c66
[ clg: removed local 'Error* err' in aspeed_soc_ast27x0tsp_realize() ]
---
 include/hw/arm/aspeed_soc.h |  12 ++
 hw/arm/aspeed_ast27x0-tsp.c | 294 ++++++++++++++++++++++++++++++++++++
 hw/arm/meson.build          |   1 +
 3 files changed, 307 insertions(+)
 create mode 100644 hw/arm/aspeed_ast27x0-tsp.c
include/hw/arm/aspeed_soc.h +12 -0
index 32be90bc3536..217ef0eafd6c 100644
@@ -158,6 +158,18 @@ struct Aspeed27x0SSPSoCState {
 #define TYPE_ASPEED27X0SSP_SOC "aspeed27x0ssp-soc"
 OBJECT_DECLARE_SIMPLE_TYPE(Aspeed27x0SSPSoCState, ASPEED27X0SSP_SOC)
 
+struct Aspeed27x0TSPSoCState {
+    AspeedSoCState parent;
+    AspeedINTCState intc[2];
+    UnimplementedDeviceState ipc[2];
+    UnimplementedDeviceState scuio;
+
+    ARMv7MState armv7m;
+};
+
+#define TYPE_ASPEED27X0TSP_SOC "aspeed27x0tsp-soc"
+OBJECT_DECLARE_SIMPLE_TYPE(Aspeed27x0TSPSoCState, ASPEED27X0TSP_SOC)
+
 #define TYPE_ASPEED10X0_SOC "aspeed10x0-soc"
 OBJECT_DECLARE_SIMPLE_TYPE(Aspeed10x0SoCState, ASPEED10X0_SOC)
 
hw/arm/aspeed_ast27x0-tsp.c new file +294 -0

294 lines not on this page · raw message

hw/arm/meson.build +1 -0
index 39b74a89ed8e..98c563150640 100644
@@ -45,6 +45,7 @@ arm_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files(
   'aspeed_ast2400.c',
   'aspeed_ast2600.c',
   'aspeed_ast27x0-ssp.c',
+  'aspeed_ast27x0-tsp.c',
   'aspeed_ast10x0.c',
   'aspeed_eeprom.c',
   'fby35.c'))
Signature · 1 line
2.49.0
#21 lore raw

[PULL 22/23] tests/function/aspeed: Add functional test for ast2700fc

In reply to Cédric Le Goater

From: Steven Lee <[email protected]>

Introduce a new test suite for ast2700fc machine.
Rename the original test_aarch64_aspeed.py to
test_aarch64_aspeed_ast2700.py.

Change-Id I3855f55c9f6e5cca1270c179445f549f8d81f36c
[ clg: Added new tests in meson.build ]
---
 tests/functional/meson.build                  |   6 +-
 ...peed.py => test_aarch64_aspeed_ast2700.py} |   0
 .../test_aarch64_aspeed_ast2700fc.py          | 135 ++++++++++++++++++
 3 files changed, 139 insertions(+), 2 deletions(-)
 rename tests/functional/{test_aarch64_aspeed.py => test_aarch64_aspeed_ast2700.py} (100%)
 create mode 100755 tests/functional/test_aarch64_aspeed_ast2700fc.py
tests/functional/meson.build +4 -2
index b317ad42c5a4..ab9df03b1f69 100644
@@ -11,7 +11,8 @@ endif
 
 # Timeouts for individual tests that can be slow e.g. with debugging enabled
 test_timeouts = {
-  'aarch64_aspeed' : 600,
+  'aarch64_aspeed_ast2700' : 600,
+  'aarch64_aspeed_ast2700fc' : 600,
   'aarch64_raspi4' : 480,
   'aarch64_reverse_debug' : 180,
   'aarch64_rme_virt' : 1200,
@@ -79,7 +80,8 @@ tests_aarch64_system_quick = [
 ]
 
 tests_aarch64_system_thorough = [
-  'aarch64_aspeed',
+  'aarch64_aspeed_ast2700',
+  'aarch64_aspeed_ast2700fc',
   'aarch64_raspi3',
   'aarch64_raspi4',
   'aarch64_replay',
tests/functional/test_aarch64_aspeed_ast2700.py renamed from tests/functional/test_aarch64_aspeed.py +0 -0
similarity index 100%
rename from tests/functional/test_aarch64_aspeed.py
rename to tests/functional/test_aarch64_aspeed_ast2700.py
tests/functional/test_aarch64_aspeed_ast2700fc.py new file +135 -0

135 lines not on this page · raw message

Signature · 1 line
2.49.0
#22 lore raw

Re: [PULL 22/23] tests/function/aspeed: Add functional test for ast2700fc

Quoted 7 lines · Cédric Le Goater

From: Steven Lee <[email protected]>

Introduce a new test suite for ast2700fc machine.
Rename the original test_aarch64_aspeed.py to
test_aarch64_aspeed_ast2700.py.

Quoted 6 lines
Change-Id I3855f55c9f6e5cca1270c179445f549f8d81f36c
[ clg: Added new tests in meson.build ]

Hi; this new test seems to trigger an error in a clang-sanitizer build; would you mind having a look?

Output: qemu-system-aarch64: warning: hub port hub0port0 has no peer
qemu-system-aarch64: warning: hub 0 with no nics
qemu-system-aarch64: warning: netdev hub0port0 has no peer
qemu-system-aarch64: warning: nic ftgmac100.0 has no peer
qemu-system-aarch64: warning: nic ftgmac100.1 has no peer
qemu-system-aarch64: warning: nic ftgmac100.2 has no peer
qemu-system-aarch64: warning: requested NIC (#net038, model unspecified) was not created (not supported by this machine?) ../../system/memory.c:2798:27: runtime error: null pointer passed as argument 2, which is declared to never be null /usr/include/stdlib.h:962:6: note: nonnull attribute specified here

    #0 0x617e4121b113 in flatview_lookup
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/memory.c:2798:12
    #1 0x617e4121b113 in memory_region_find_rcu
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/memory.c:2833:10
    #2 0x617e4121a5a9 in memory_region_find
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/memory.c:2860:11
    #3 0x617e411c21ea in rom_check_and_register_reset
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../hw/core/loader.c:1317:19
    #4 0x617e411d5ec7 in qdev_machine_creation_done
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../hw/core/machine.c:1756:9
    #5 0x617e403d4877 in qemu_machine_creation_done
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/vl.c:2782:5
    #6 0x617e403d4877 in qmp_x_exit_preconfig
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/vl.c:2810:10
    #7 0x617e403d9a3c in qemu_init
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/vl.c:3844:9
    #8 0x617e41301126 in main
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/main.c:71:5
    #9 0x7faf8202a1c9 in __libc_start_call_main
csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #10 0x7faf8202a28a in __libc_start_main csu/../csu/libc-start.c:360:3
    #11 0x617e3f920654 in _start

(/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/qemu-system-aarch64+0x161d654) (BuildId: f3f8c2ca821e695937a615bee293c4a5a336a6bd)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../system/memory.c:2798:27

thanks
-- PMM

#23 lore raw

Re: [PULL 22/23] tests/function/aspeed: Add functional test for ast2700fc

Quoted 15 lines · Peter Maydell
Quoted 7 lines · Cédric Le Goater

From: Steven Lee <[email protected]>

Introduce a new test suite for ast2700fc machine.
Rename the original test_aarch64_aspeed.py to
test_aarch64_aspeed_ast2700.py.

Quoted 6 lines
Change-Id I3855f55c9f6e5cca1270c179445f549f8d81f36c
[ clg: Added new tests in meson.build ]
Quoted 2 lines

Hi; this new test seems to trigger an error in a clang-sanitizer build; would you mind having a look?

yes. I can reproduce. I will check next week.

Thanks,

C.

Quoted 44 lines

Output: qemu-system-aarch64: warning: hub port hub0port0 has no peer
qemu-system-aarch64: warning: hub 0 with no nics
qemu-system-aarch64: warning: netdev hub0port0 has no peer
qemu-system-aarch64: warning: nic ftgmac100.0 has no peer
qemu-system-aarch64: warning: nic ftgmac100.1 has no peer
qemu-system-aarch64: warning: nic ftgmac100.2 has no peer
qemu-system-aarch64: warning: requested NIC (#net038, model unspecified) was not created (not supported by this machine?) ../../system/memory.c:2798:27: runtime error: null pointer passed as argument 2, which is declared to never be null /usr/include/stdlib.h:962:6: note: nonnull attribute specified here

     #0 0x617e4121b113 in flatview_lookup
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/memory.c:2798:12
     #1 0x617e4121b113 in memory_region_find_rcu
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/memory.c:2833:10
     #2 0x617e4121a5a9 in memory_region_find
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/memory.c:2860:11
     #3 0x617e411c21ea in rom_check_and_register_reset
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../hw/core/loader.c:1317:19
     #4 0x617e411d5ec7 in qdev_machine_creation_done
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../hw/core/machine.c:1756:9
     #5 0x617e403d4877 in qemu_machine_creation_done
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/vl.c:2782:5
     #6 0x617e403d4877 in qmp_x_exit_preconfig
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/vl.c:2810:10
     #7 0x617e403d9a3c in qemu_init
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/vl.c:3844:9
     #8 0x617e41301126 in main
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/main.c:71:5
     #9 0x7faf8202a1c9 in __libc_start_call_main
csu/../sysdeps/nptl/libc_start_call_main.h:58:16
     #10 0x7faf8202a28a in __libc_start_main csu/../csu/libc-start.c:360:3
     #11 0x617e3f920654 in _start

(/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/qemu-system-aarch64+0x161d654) (BuildId: f3f8c2ca821e695937a615bee293c4a5a336a6bd)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../system/memory.c:2798:27

thanks
-- PMM

#24 lore raw

RE: [PULL 22/23] tests/function/aspeed: Add functional test for ast2700fc

Hi Cédric, Peter,

Quoted 26 lines

-----Original Message-----
From: Cédric Le Goater <[email protected]>
Sent: Tuesday, May 6, 2025 11:15 PM
To: Peter Maydell <[email protected]>
Cc: [email protected]; [email protected]; Steven Lee <[email protected]>; Jamin Lin <[email protected]>
Subject: Re: [PULL 22/23] tests/function/aspeed: Add functional test for ast2700fc

Quoted 16 lines · Peter Maydell
Quoted 14 lines · Cédric Le Goater

From: Steven Lee <[email protected]>

Introduce a new test suite for ast2700fc machine.
Rename the original test_aarch64_aspeed.py to
test_aarch64_aspeed_ast2700.py.

Change-Id I3855f55c9f6e5cca1270c179445f549f8d81f36c

Link:
https://lore.kernel.org/qemu-devel/20250505030618.3612042-1-steven_le
[email protected] [ clg: Added new tests in meson.build ]

Quoted 5 lines
Quoted 2 lines

Hi; this new test seems to trigger an error in a clang-sanitizer build; would you mind having a look?

yes. I can reproduce. I will check next week.

The issue is related to improper MAC configuration in the ast2700fc machine. I will submit a new patch series to fix it.

Regards,
Steven

Quoted 64 lines
Quoted 12 lines

Output: qemu-system-aarch64: warning: hub port hub0port0 has no peer
qemu-system-aarch64: warning: hub 0 with no nics
qemu-system-aarch64: warning: netdev hub0port0 has no peer
qemu-system-aarch64: warning: nic ftgmac100.0 has no peer
qemu-system-aarch64: warning: nic ftgmac100.1 has no peer
qemu-system-aarch64: warning: nic ftgmac100.2 has no peer
qemu-system-aarch64: warning: requested NIC (#net038, model unspecified) was not created (not supported by this machine?) ../../system/memory.c:2798:27: runtime error: null pointer passed as argument 2, which is declared to never be null /usr/include/stdlib.h:962:6: note: nonnull attribute specified here

Quoted 2 lines
     #0 0x617e4121b113 in flatview_lookup

/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/ memory.c:2798:12

Quoted 2 lines
     #1 0x617e4121b113 in memory_region_find_rcu

/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/ memory.c:2833:10

Quoted 2 lines
     #2 0x617e4121a5a9 in memory_region_find

/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/ memory.c:2860:11

Quoted 2 lines
     #3 0x617e411c21ea in rom_check_and_register_reset

/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../hw/core /loader.c:1317:19

Quoted 2 lines
     #4 0x617e411d5ec7 in qdev_machine_creation_done

/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../hw/core /machine.c:1756:9

Quoted 2 lines
     #5 0x617e403d4877 in qemu_machine_creation_done

/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/v l.c:2782:5

Quoted 2 lines
     #6 0x617e403d4877 in qmp_x_exit_preconfig

/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/v l.c:2810:10

Quoted 2 lines
     #7 0x617e403d9a3c in qemu_init

/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/v l.c:3844:9

Quoted 2 lines
     #8 0x617e41301126 in main

/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/ main.c:71:5

Quoted 5 lines
     #9 0x7faf8202a1c9 in __libc_start_call_main
csu/../sysdeps/nptl/libc_start_call_main.h:58:16
     #10 0x7faf8202a28a in __libc_start_main csu/../csu/libc-start.c:360:3
     #11 0x617e3f920654 in _start

(/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/qemu-syste

Quoted 10 lines

m-aarch64+0x161d654)
(BuildId: f3f8c2ca821e695937a615bee293c4a5a336a6bd)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../system/memory.c:2798:27

thanks
-- PMM

#25 lore raw

Re: [PULL 22/23] tests/function/aspeed: Add functional test for ast2700fc

Quoted 28 lines · Steven Lee

Hi Cédric, Peter,

Quoted 26 lines

-----Original Message-----
From: Cédric Le Goater <[email protected]>
Sent: Tuesday, May 6, 2025 11:15 PM
To: Peter Maydell <[email protected]>
Cc: [email protected]; [email protected]; Steven Lee <[email protected]>; Jamin Lin <[email protected]>
Subject: Re: [PULL 22/23] tests/function/aspeed: Add functional test for ast2700fc

Quoted 16 lines · Peter Maydell
Quoted 14 lines · Cédric Le Goater

From: Steven Lee <[email protected]>

Introduce a new test suite for ast2700fc machine.
Rename the original test_aarch64_aspeed.py to
test_aarch64_aspeed_ast2700.py.

Change-Id I3855f55c9f6e5cca1270c179445f549f8d81f36c

Link:
https://lore.kernel.org/qemu-devel/20250505030618.3612042-1-steven_le
[email protected] [ clg: Added new tests in meson.build ]

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Hi; this new test seems to trigger an error in a clang-sanitizer build; would you mind having a look?

yes. I can reproduce. I will check next week.

The issue is related to improper MAC configuration in the ast2700fc machine. I will submit a new patch series to fix it.

I think it is deeper and related to the system memory initialization. The fby35 machine has the same issue btw,

Anyhow, all fixes are welcome.

Thanks,

C.

Quoted 69 lines

Regards,
Steven

Quoted 64 lines
Quoted 12 lines

Output: qemu-system-aarch64: warning: hub port hub0port0 has no peer
qemu-system-aarch64: warning: hub 0 with no nics
qemu-system-aarch64: warning: netdev hub0port0 has no peer
qemu-system-aarch64: warning: nic ftgmac100.0 has no peer
qemu-system-aarch64: warning: nic ftgmac100.1 has no peer
qemu-system-aarch64: warning: nic ftgmac100.2 has no peer
qemu-system-aarch64: warning: requested NIC (#net038, model unspecified) was not created (not supported by this machine?) ../../system/memory.c:2798:27: runtime error: null pointer passed as argument 2, which is declared to never be null /usr/include/stdlib.h:962:6: note: nonnull attribute specified here

Quoted 2 lines
      #0 0x617e4121b113 in flatview_lookup

/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/ memory.c:2798:12

Quoted 2 lines
      #1 0x617e4121b113 in memory_region_find_rcu

/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/ memory.c:2833:10

Quoted 2 lines
      #2 0x617e4121a5a9 in memory_region_find

/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/ memory.c:2860:11

Quoted 2 lines
      #3 0x617e411c21ea in rom_check_and_register_reset

/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../hw/core /loader.c:1317:19

Quoted 2 lines
      #4 0x617e411d5ec7 in qdev_machine_creation_done

/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../hw/core /machine.c:1756:9

Quoted 2 lines
      #5 0x617e403d4877 in qemu_machine_creation_done

/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/v l.c:2782:5

Quoted 2 lines
      #6 0x617e403d4877 in qmp_x_exit_preconfig

/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/v l.c:2810:10

Quoted 2 lines
      #7 0x617e403d9a3c in qemu_init

/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/v l.c:3844:9

Quoted 2 lines
      #8 0x617e41301126 in main

/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/ main.c:71:5

Quoted 5 lines
      #9 0x7faf8202a1c9 in __libc_start_call_main
csu/../sysdeps/nptl/libc_start_call_main.h:58:16
      #10 0x7faf8202a28a in __libc_start_main csu/../csu/libc-start.c:360:3
      #11 0x617e3f920654 in _start

(/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/qemu-syste

Quoted 10 lines

m-aarch64+0x161d654)
(BuildId: f3f8c2ca821e695937a615bee293c4a5a336a6bd)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../system/memory.c:2798:27

thanks
-- PMM

#26 lore raw

Re: [PULL 22/23] tests/function/aspeed: Add functional test for ast2700fc

In reply to Peter Maydell
Quoted 51 lines · Peter Maydell
Quoted 7 lines · Cédric Le Goater

From: Steven Lee <[email protected]>

Introduce a new test suite for ast2700fc machine.
Rename the original test_aarch64_aspeed.py to
test_aarch64_aspeed_ast2700.py.

Quoted 6 lines
Change-Id I3855f55c9f6e5cca1270c179445f549f8d81f36c
[ clg: Added new tests in meson.build ]

Hi; this new test seems to trigger an error in a clang-sanitizer build; would you mind having a look?

Output: qemu-system-aarch64: warning: hub port hub0port0 has no peer
qemu-system-aarch64: warning: hub 0 with no nics
qemu-system-aarch64: warning: netdev hub0port0 has no peer
qemu-system-aarch64: warning: nic ftgmac100.0 has no peer
qemu-system-aarch64: warning: nic ftgmac100.1 has no peer
qemu-system-aarch64: warning: nic ftgmac100.2 has no peer
qemu-system-aarch64: warning: requested NIC (#net038, model unspecified) was not created (not supported by this machine?) ../../system/memory.c:2798:27: runtime error: null pointer passed as argument 2, which is declared to never be null /usr/include/stdlib.h:962:6: note: nonnull attribute specified here

     #0 0x617e4121b113 in flatview_lookup
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/memory.c:2798:12
     #1 0x617e4121b113 in memory_region_find_rcu
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/memory.c:2833:10
     #2 0x617e4121a5a9 in memory_region_find
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/memory.c:2860:11
     #3 0x617e411c21ea in rom_check_and_register_reset
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../hw/core/loader.c:1317:19
     #4 0x617e411d5ec7 in qdev_machine_creation_done
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../hw/core/machine.c:1756:9
     #5 0x617e403d4877 in qemu_machine_creation_done
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/vl.c:2782:5
     #6 0x617e403d4877 in qmp_x_exit_preconfig
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/vl.c:2810:10
     #7 0x617e403d9a3c in qemu_init
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/vl.c:3844:9
     #8 0x617e41301126 in main
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/main.c:71:5
     #9 0x7faf8202a1c9 in __libc_start_call_main
csu/../sysdeps/nptl/libc_start_call_main.h:58:16
     #10 0x7faf8202a28a in __libc_start_main csu/../csu/libc-start.c:360:3
     #11 0x617e3f920654 in _start
Quoted 6 lines

(/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/qemu-system-aarch64+0x161d654) (BuildId: f3f8c2ca821e695937a615bee293c4a5a336a6bd)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../system/memory.c:2798:27

Ran into this as well.
It would be nice to run sanitizers build in the upstream CI, so it's fixed before hitting master...

Quoted 4 lines

thanks
-- PMM

#27 lore raw

Re: [PULL 22/23] tests/function/aspeed: Add functional test for ast2700fc

Quoted 55 lines · Pierrick Bouvier
Quoted 54 lines · Peter Maydell
Quoted 7 lines · Cédric Le Goater

From: Steven Lee <[email protected]>

Introduce a new test suite for ast2700fc machine.
Rename the original test_aarch64_aspeed.py to
test_aarch64_aspeed_ast2700.py.

Quoted 6 lines
Change-Id I3855f55c9f6e5cca1270c179445f549f8d81f36c
[ clg: Added new tests in meson.build ]

Hi; this new test seems to trigger an error in a clang-sanitizer build; would you mind having a look?

  Output: qemu-system-aarch64: warning: hub port hub0port0 has no peer
qemu-system-aarch64: warning: hub 0 with no nics
qemu-system-aarch64: warning: netdev hub0port0 has no peer
qemu-system-aarch64: warning: nic ftgmac100.0 has no peer
qemu-system-aarch64: warning: nic ftgmac100.1 has no peer
qemu-system-aarch64: warning: nic ftgmac100.2 has no peer
qemu-system-aarch64: warning: requested NIC (#net038, model
unspecified) was not created (not supported by this machine?) ../../system/memory.c:2798:27: runtime error: null pointer passed as argument 2, which is declared to never be null
/usr/include/stdlib.h:962:6: note: nonnull attribute specified here
     #0 0x617e4121b113 in flatview_lookup /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/memory.c:2798:12 #1 0x617e4121b113 in memory_region_find_rcu /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/memory.c:2833:10 #2 0x617e4121a5a9 in memory_region_find /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/memory.c:2860:11 #3 0x617e411c21ea in rom_check_and_register_reset /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../hw/core/loader.c:1317:19 #4 0x617e411d5ec7 in qdev_machine_creation_done /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../hw/core/machine.c:1756:9 #5 0x617e403d4877 in qemu_machine_creation_done /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/vl.c:2782:5 #6 0x617e403d4877 in qmp_x_exit_preconfig /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/vl.c:2810:10 #7 0x617e403d9a3c in qemu_init /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/vl.c:3844:9 #8 0x617e41301126 in main /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/main.c:71:5 #9 0x7faf8202a1c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
     #10 0x7faf8202a28a in __libc_start_main csu/../csu/libc-start.c:360:3 #11 0x617e3f920654 in _start (/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/qemu-system-aarch64+0x161d654) (BuildId: f3f8c2ca821e695937a615bee293c4a5a336a6bd)

Quoted 6 lines
Quoted 3 lines

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../system/memory.c:2798:27

Ran into this as well.
It would be nice to run sanitizers build in the upstream CI, so it's fixed before hitting master...

yes. The fby35 has the same problem, so we overlooked something related to RAM initialization a while ago.

The fby35 machine has no public FW images and no test. That's probably why.

Thanks,

C.

#28 lore raw

Re: [PULL 22/23] tests/function/aspeed: Add functional test for ast2700fc

In reply to Peter Maydell
Quoted 51 lines · Peter Maydell
Quoted 7 lines · Cédric Le Goater

From: Steven Lee <[email protected]>

Introduce a new test suite for ast2700fc machine.
Rename the original test_aarch64_aspeed.py to
test_aarch64_aspeed_ast2700.py.

Quoted 6 lines
Change-Id I3855f55c9f6e5cca1270c179445f549f8d81f36c
[ clg: Added new tests in meson.build ]

Hi; this new test seems to trigger an error in a clang-sanitizer build; would you mind having a look?

Output: qemu-system-aarch64: warning: hub port hub0port0 has no peer
qemu-system-aarch64: warning: hub 0 with no nics
qemu-system-aarch64: warning: netdev hub0port0 has no peer
qemu-system-aarch64: warning: nic ftgmac100.0 has no peer
qemu-system-aarch64: warning: nic ftgmac100.1 has no peer
qemu-system-aarch64: warning: nic ftgmac100.2 has no peer
qemu-system-aarch64: warning: requested NIC (#net038, model unspecified) was not created (not supported by this machine?) ../../system/memory.c:2798:27: runtime error: null pointer passed as argument 2, which is declared to never be null /usr/include/stdlib.h:962:6: note: nonnull attribute specified here

     #0 0x617e4121b113 in flatview_lookup
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/memory.c:2798:12
     #1 0x617e4121b113 in memory_region_find_rcu
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/memory.c:2833:10
     #2 0x617e4121a5a9 in memory_region_find
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/memory.c:2860:11
     #3 0x617e411c21ea in rom_check_and_register_reset
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../hw/core/loader.c:1317:19
     #4 0x617e411d5ec7 in qdev_machine_creation_done
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../hw/core/machine.c:1756:9
     #5 0x617e403d4877 in qemu_machine_creation_done
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/vl.c:2782:5
     #6 0x617e403d4877 in qmp_x_exit_preconfig
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/vl.c:2810:10
     #7 0x617e403d9a3c in qemu_init
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/vl.c:3844:9
     #8 0x617e41301126 in main
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../system/main.c:71:5
     #9 0x7faf8202a1c9 in __libc_start_call_main
csu/../sysdeps/nptl/libc_start_call_main.h:58:16
     #10 0x7faf8202a28a in __libc_start_main csu/../csu/libc-start.c:360:3
     #11 0x617e3f920654 in _start
Quoted 6 lines

(/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/qemu-system-aarch64+0x161d654) (BuildId: f3f8c2ca821e695937a615bee293c4a5a336a6bd)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../system/memory.c:2798:27

In the ast2700fc machine and the fby35, each SoC has its own memory region and, since there is no need for the global system memory region, it's empty. But in some places, like rom_check_and_register_reset(), it's a problem for the flattened global view.

Could we patch the system memory with:

    @@ -2924,6 +2924,9 @@ static int cmp_flatrange_addr(const void
     
     static FlatRange *flatview_lookup(FlatView *view, AddrRange addr)
     {
    +    if (!view->ranges) {
    +        return NULL;
    +    }
         return bsearch(&addr, view->ranges, view->nr,
                        sizeof(FlatRange), cmp_flatrange_addr);
     }

Or, as a workaround to satisfy QEMU, insert the main SoC memory in get_system_memory() maybe ?

I will dig more next week.

Thanks,

C.

#29 lore raw

Re: [PULL 22/23] tests/function/aspeed: Add functional test for ast2700fc

Quoted 5 lines · Cédric Le Goater

In the ast2700fc machine and the fby35, each SoC has its own memory region and, since there is no need for the global system memory region, it's empty. But in some places, like rom_check_and_register_reset(), it's a problem for the flattened global view.

Generally speaking, board models should set things up so that the "main" SoC for the board uses the main system memory MR, rather than creating its own empty MR for that purpose, I think.

But separately from that, it's weird to get into flatview_lookup with an empty FlatView here. We called memory_region_find(), which is a wrapper around memory_region_find_rcu(). That function doesn't make assumptions about where the MR it's passed is from: it walks up the tree of MRs to find the root MR, it looks up the AddressSpace for that root MR, and then it gets the FlatView for that AS and calls flatview_lookup(). If the FlatView we end up with doesn't have the MR in it, what's happened ?

-- PMM

#30 lore raw

RE: [PULL 22/23] tests/function/aspeed: Add functional test for ast2700fc

Hi Cédric, Peter,

Quoted 20 lines

-----Original Message-----
From: Peter Maydell <[email protected]>
Sent: Friday, May 9, 2025 11:28 PM
To: Cédric Le Goater <[email protected]>
Cc: [email protected]; [email protected]; Steven Lee <[email protected]>
Subject: Re: [PULL 22/23] tests/function/aspeed: Add functional test for ast2700fc

Quoted 5 lines · Cédric Le Goater

In the ast2700fc machine and the fby35, each SoC has its own memory region and, since there is no need for the global system memory region, it's empty. But in some places, like rom_check_and_register_reset(), it's a problem for the flattened global view.

Generally speaking, board models should set things up so that the "main" SoC for the board uses the main system memory MR, rather than creating its own empty MR for that purpose, I think.

Quoted 8 lines

But separately from that, it's weird to get into flatview_lookup with an empty FlatView here. We called memory_region_find(), which is a wrapper around memory_region_find_rcu(). That function doesn't make assumptions about where the MR it's passed is from: it walks up the tree of MRs to find the root MR, it looks up the AddressSpace for that root MR, and then it gets the FlatView for that AS and calls flatview_lookup(). If the FlatView we end up with doesn't have the MR in it, what's happened ?

I also realized this was caused by the CA35 memory not being part of the system memory, while fixing the 2700FC Clang sanitizer issue last Wednesday. To fix it, I added the CA35 memory region to the system memory:

memory_region_add_subregion(get_system_memory(), 0, &s->ca35_memory);

Patch for reference:
https://patchwork.kernel.org/project/qemu-devel/patch/[email protected]/

This seems to resolve the issue, though I'm not sure whether it's a proper fix or just a workaround.

Regards,
Steven

#31 lore raw

Re: [PULL 22/23] tests/function/aspeed: Add functional test for ast2700fc

In reply to Peter Maydell
Quoted 11 lines · Peter Maydell
Quoted 5 lines · Cédric Le Goater

In the ast2700fc machine and the fby35, each SoC has its own memory region and, since there is no need for the global system memory region, it's empty. But in some places, like rom_check_and_register_reset(), it's a problem for the flattened global view.

Generally speaking, board models should set things up so that the "main" SoC for the board uses the main system memory MR, rather than creating its own empty MR for that purpose, I think.

We can do that.

Quoted 9 lines

But separately from that, it's weird to get into flatview_lookup with an empty FlatView here. We called memory_region_find(), which is a wrapper around memory_region_find_rcu(). That function doesn't make assumptions about where the MR it's passed is from: it walks up the tree of MRs to find the root MR, it looks up the AddressSpace for that root MR, and then it gets the FlatView for that AS and calls flatview_lookup(). If the FlatView we end up with doesn't have the MR in it, what's happened ?

The ROM created by the loader device does not have an associated memory region.

Thanks,

C.

#32 lore raw

[PULL 23/23] docs: Add support for ast2700fc machine

In reply to Cédric Le Goater

From: Steven Lee <[email protected]>

- Updated Aspeed family boards list to include ast2700fc.
- Added boot instructions for the ast2700fc machine.
- Detailed the configuration and loading of firmware for the Cortex-A35 and Cortex-M4 processors.

---
 docs/system/arm/aspeed.rst | 69 ++++++++++++++++++++++++++++++++++++--
 1 file changed, 66 insertions(+), 3 deletions(-)
docs/system/arm/aspeed.rst +66 -3
index 014545f4440f..58a8020eec23 100644
@@ -1,5 +1,5 @@
-Aspeed family boards (``ast2500-evb``, ``ast2600-evb``, ``bletchley-bmc``, ``fuji-bmc``, ``fby35-bmc``, ``fp5280g2-bmc``, ``g220a-bmc``, ``palmetto-bmc``, ``qcom-dc-scm-v1-bmc``, ``qcom-firework-bmc``, ``quanta-q71l-bmc``, ``rainier-bmc``, ``romulus-bmc``, ``sonorapass-bmc``, ``supermicrox11-bmc``, ``supermicrox11spi-bmc``, ``tiogapass-bmc``, ``witherspoon-bmc``, ``yosemitev2-bmc``)
-==================================================================================================================================================================================================================================================================================================================================================================================================================
+Aspeed family boards (``ast2500-evb``, ``ast2600-evb``, ``ast2700-evb``, ``ast2700fc``, ``bletchley-bmc``, ``fuji-bmc``, ``fby35-bmc``, ``fp5280g2-bmc``, ``g220a-bmc``, ``palmetto-bmc``, ``qcom-dc-scm-v1-bmc``, ``qcom-firework-bmc``, ``quanta-q71l-bmc``, ``rainier-bmc``, ``romulus-bmc``, ``sonorapass-bmc``, ``supermicrox11-bmc``, ``supermicrox11spi-bmc``, ``tiogapass-bmc``, ``witherspoon-bmc``, ``yosemitev2-bmc``)
+=================================================================================================================================================================================================================================================================================================================================================================================================================================
 
 The QEMU Aspeed machines model BMCs of various OpenPOWER systems and
 Aspeed evaluation boards. They are based on different releases of the
@@ -255,6 +255,7 @@ etc.
 AST2700 SoC based machines :
 
 - ``ast2700-evb``          Aspeed AST2700 Evaluation board (Cortex-A35)
+- ``ast2700fc``            Aspeed AST2700 Evaluation board (Cortex-A35 + Cortex-M4)
 
 Supported devices
 -----------------
@@ -285,7 +286,6 @@ Supported devices
 
 Missing devices
 ---------------
- * Coprocessor support
  * PWM and Fan Controller
  * Slave GPIO Controller
  * Super I/O Controller
@@ -353,6 +353,69 @@ specified path in the ${HOME} directory.
 
   -bios ${HOME}/ast27x0_bootrom.bin
 
+Booting the ast2700fc machine
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+AST2700 features four Cortex-A35 primary processors and two Cortex-M4 coprocessors.
+**ast2700-evb** machine focuses on emulating the four Cortex-A35 primary processors,
+**ast2700fc** machine extends **ast2700-evb** by adding support for the two Cortex-M4 coprocessors.
+
+Steps to boot the AST2700fc machine:
+
+1. Ensure you have the following AST2700A1 binaries available in a directory
+
+ * u-boot-nodtb.bin
+ * u-boot.dtb
+ * bl31.bin
+ * optee/tee-raw.bin
+ * image-bmc
+ * zephyr-aspeed-ssp.elf (for SSP firmware, CPU 5)
+ * zephyr-aspeed-tsp.elf (for TSP firmware, CPU 6)
+
+2. Execute the following command to start ``ast2700fc`` machine:
+
+.. code-block:: bash
+
+  IMGDIR=ast2700-default
+  UBOOT_SIZE=$(stat --format=%s -L ${IMGDIR}/u-boot-nodtb.bin)
+
+  $ qemu-system-aarch64 -M ast2700fc \
+       -device loader,force-raw=on,addr=0x400000000,file=${IMGDIR}/u-boot-nodtb.bin \
+       -device loader,force-raw=on,addr=$((0x400000000 + ${UBOOT_SIZE})),file=${IMGDIR}/u-boot.dtb \
+       -device loader,force-raw=on,addr=0x430000000,file=${IMGDIR}/bl31.bin \
+       -device loader,force-raw=on,addr=0x430080000,file=${IMGDIR}/optee/tee-raw.bin \
+       -device loader,cpu-num=0,addr=0x430000000 \
+       -device loader,cpu-num=1,addr=0x430000000 \
+       -device loader,cpu-num=2,addr=0x430000000 \
+       -device loader,cpu-num=3,addr=0x430000000 \
+       -drive file=${IMGDIR}/image-bmc,if=mtd,format=raw \
+       -device loader,file=${IMGDIR}/zephyr-aspeed-ssp.elf,cpu-num=4 \
+       -device loader,file=${IMGDIR}/zephyr-aspeed-tsp.elf,cpu-num=5 \
+       -serial pty -serial pty -serial pty \
+       -snapshot \
+       -S -nographic
+
+After launching QEMU, serial devices will be automatically redirected.
+Example output:
+
+.. code-block:: bash
+
+   char device redirected to /dev/pts/55 (label serial0)
+   char device redirected to /dev/pts/56 (label serial1)
+   char device redirected to /dev/pts/57 (label serial2)
+
+- serial0: Console for the four Cortex-A35 primary processors.
+- serial1 and serial2: Consoles for the two Cortex-M4 coprocessors.
+
+Use ``tio`` or another terminal emulator to connect to the consoles:
+
+.. code-block:: bash
+
+   $ tio /dev/pts/55
+   $ tio /dev/pts/56
+   $ tio /dev/pts/57
+
+
 Aspeed minibmc family boards (``ast1030-evb``)
 ==================================================================
 
Signature · 1 line
2.49.0
#33 lore raw

[PULL 13/23] docs/system/arm/aspeed: move AST2700 content to new section

In reply to Cédric Le Goater

From: Jamin Lin <[email protected]>

Moved AST2700-related content from the general Aspeed board list into a dedicated section for Aspeed 2700 family boards. Improves clarity and readability.

---
 docs/system/arm/aspeed.rst | 70 ++++++++++++++++++++++++++++++++++----
 1 file changed, 63 insertions(+), 7 deletions(-)
docs/system/arm/aspeed.rst +63 -7
index 97fd6a0e7fbd..08a33b7008b7 100644
@@ -1,12 +1,11 @@
-Aspeed family boards (``ast2500-evb``, ``ast2600-evb``, ``ast2700-evb``, ``bletchley-bmc``, ``fuji-bmc``, ``fby35-bmc``, ``fp5280g2-bmc``, ``g220a-bmc``, ``palmetto-bmc``, ``qcom-dc-scm-v1-bmc``, ``qcom-firework-bmc``, ``quanta-q71l-bmc``, ``rainier-bmc``, ``romulus-bmc``, ``sonorapass-bmc``, ``supermicrox11-bmc``, ``supermicrox11spi-bmc``, ``tiogapass-bmc``, ``witherspoon-bmc``, ``yosemitev2-bmc``)
+Aspeed family boards (``ast2500-evb``, ``ast2600-evb``, ``bletchley-bmc``, ``fuji-bmc``, ``fby35-bmc``, ``fp5280g2-bmc``, ``g220a-bmc``, ``palmetto-bmc``, ``qcom-dc-scm-v1-bmc``, ``qcom-firework-bmc``, ``quanta-q71l-bmc``, ``rainier-bmc``, ``romulus-bmc``, ``sonorapass-bmc``, ``supermicrox11-bmc``, ``supermicrox11spi-bmc``, ``tiogapass-bmc``, ``witherspoon-bmc``, ``yosemitev2-bmc``)
 ==================================================================================================================================================================================================================================================================================================================================================================================================================
 
 The QEMU Aspeed machines model BMCs of various OpenPOWER systems and
 Aspeed evaluation boards. They are based on different releases of the
 Aspeed SoC : the AST2400 integrating an ARM926EJ-S CPU (400MHz), the
 AST2500 with an ARM1176JZS CPU (800MHz), the AST2600
-with dual cores ARM Cortex-A7 CPUs (1.2GHz) and more recently the AST2700
-with quad cores ARM Cortex-A35 64 bits CPUs (1.6GHz)
+with dual cores ARM Cortex-A7 CPUs (1.2GHz).
 
 The SoC comes with RAM, Gigabit ethernet, USB, SD/MMC, USB, SPI, I2C,
 etc.
@@ -39,10 +38,6 @@ AST2600 SoC based machines :
 - ``qcom-dc-scm-v1-bmc``   Qualcomm DC-SCM V1 BMC
 - ``qcom-firework-bmc``    Qualcomm Firework BMC
 
-AST2700 SoC based machines :
-
-- ``ast2700-evb``          Aspeed AST2700 Evaluation board (Cortex-A35)
-
 Supported devices
 -----------------
 
@@ -247,6 +242,67 @@ under Linux), use :
 
   -M ast2500-evb,bmc-console=uart3
 
+Aspeed 2700 family boards (``ast2700-evb``)
+==================================================================
+
+The QEMU Aspeed machines model BMCs of Aspeed evaluation boards.
+They are based on different releases of the Aspeed SoC :
+the AST2700 with quad cores ARM Cortex-A35 64 bits CPUs (1.6GHz).
+
+The SoC comes with RAM, Gigabit ethernet, USB, SD/MMC, USB, SPI, I2C,
+etc.
+
+AST2700 SoC based machines :
+
+- ``ast2700-evb``          Aspeed AST2700 Evaluation board (Cortex-A35)
+
+Supported devices
+-----------------
+ * Interrupt Controller
+ * Timer Controller
+ * RTC Controller
+ * I2C Controller
+ * System Control Unit (SCU)
+ * SRAM mapping
+ * X-DMA Controller (basic interface)
+ * Static Memory Controller (SMC or FMC) - Only SPI Flash support
+ * SPI Memory Controller
+ * USB 2.0 Controller
+ * SD/MMC storage controllers
+ * SDRAM controller (dummy interface for basic settings and training)
+ * Watchdog Controller
+ * GPIO Controller (Master only)
+ * UART
+ * Ethernet controllers
+ * Front LEDs (PCA9552 on I2C bus)
+ * LPC Peripheral Controller (a subset of subdevices are supported)
+ * Hash/Crypto Engine (HACE) - Hash support only. TODO: Crypto
+ * ADC
+ * eMMC Boot Controller (dummy)
+ * PECI Controller (minimal)
+ * I3C Controller
+ * Internal Bridge Controller (SLI dummy)
+
+Missing devices
+---------------
+ * Coprocessor support
+ * PWM and Fan Controller
+ * Slave GPIO Controller
+ * Super I/O Controller
+ * PCI-Express 1 Controller
+ * Graphic Display Controller
+ * MCTP Controller
+ * Mailbox Controller
+ * Virtual UART
+ * eSPI Controller
+
+Boot options
+------------
+
+Images can be downloaded from the ASPEED Forked OpenBMC GitHub release repository :
+
+   https://github.com/AspeedTech-BMC/openbmc/releases
+
 Booting the ast2700-evb machine
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
Signature · 1 line
2.49.0
#34 lore raw

[PULL 21/23] hw/arm: Introduce ASPEED AST2700 A1 full core machine

In reply to Cédric Le Goater

From: Steven Lee <[email protected]>

- Added new machine type ast2700fc with full core support.
- Defined Ast2700FCState structure for the new machine type.
- Implemented initialization functions for CA35, SSP, and TSP components.
- Updated ast2700fc_types to include the new machine type.
- Set machine class properties for ast2700fc.

Test Step:
- Download ast2700-default-obmc.tar.gz from AspeedTech-BMC OpenBmc release page.
- Run the following QEMU command:

  ```
  IMGDIR=~/path/to/image
  UBOOT_SIZE=$(stat --format=%s -L ${IMGDIR}/u-boot-nodtb.bin)

  ./qemu-system-aarch64 -machine ast2700fc \
  -device loader,force-raw=on,addr=0x400000000,file=${IMGDIR}/u-boot-nodtb.bin \
  -device loader,force-raw=on,addr=$((0x400000000 + ${UBOOT_SIZE})),file=${IMGDIR}/u-boot.dtb \
  -device loader,force-raw=on,addr=0x430000000,file=${IMGDIR}/bl31.bin \
  -device loader,force-raw=on,addr=0x430080000,file=${IMGDIR}/tee-raw.bin \
  -device loader,cpu-num=0,addr=0x430000000 \
  -device loader,cpu-num=1,addr=0x430000000 \
  -device loader,cpu-num=2,addr=0x430000000 \
  -device loader,cpu-num=3,addr=0x430000000 \
  -device loader,file=${IMGDIR}/ast2700-ssp.elf,cpu-num=4 \
  -device loader,file=${IMGDIR}/ast2700-tsp.elf,cpu-num=5 \
  -drive file=${IMGDIR}/image-bmc,if=mtd,format=raw \
  -serial pty -serial pty -serial pty \
  -snapshot \
  -S -nographic
  ```

- After starting QEMU, serial devices will be redirected:

char device redirected to /dev/pts/51 (label serial0) char device redirected to /dev/pts/52 (label serial1) char device redirected to /dev/pts/53 (label serial2)

- serial0 is the console for the four Cortex-A35 primary processors, serial1 and serial2 are the consoles for the two Cortex-M4 coprocessors.

- Connect to the consoles using a terminal emulator.

---
 hw/arm/aspeed_ast27x0-fc.c | 192 +++++++++++++++++++++++++++++++++++++
 hw/arm/meson.build         |   4 +-
 2 files changed, 195 insertions(+), 1 deletion(-)
 create mode 100644 hw/arm/aspeed_ast27x0-fc.c
hw/arm/aspeed_ast27x0-fc.c new file +192 -0
new file mode 100644
index 000000000000..125a3ade4092
@@ -0,0 +1,192 @@
+/*
+ * ASPEED SoC 2700 family
+ *
+ * Copyright (C) 2025 ASPEED Technology Inc.
+ *
+ * This code is licensed under the GPL version 2 or later.  See
+ * the COPYING file in the top-level directory.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include "qemu/osdep.h"
+#include "qemu/units.h"
+#include "qapi/error.h"
+#include "system/block-backend.h"
+#include "system/system.h"
+#include "hw/arm/aspeed.h"
+#include "hw/boards.h"
+#include "hw/qdev-clock.h"
+#include "hw/arm/aspeed_soc.h"
+#include "hw/loader.h"
+#include "hw/arm/boot.h"
+#include "hw/block/flash.h"
+
+
+#define TYPE_AST2700A1FC MACHINE_TYPE_NAME("ast2700fc")
+OBJECT_DECLARE_SIMPLE_TYPE(Ast2700FCState, AST2700A1FC);
+
+static struct arm_boot_info ast2700fc_board_info = {
+    .board_id = -1, /* device-tree-only board */
+};
+
+struct Ast2700FCState {
+    MachineState parent_obj;
+
+    MemoryRegion ca35_memory;
+    MemoryRegion ca35_dram;
+    MemoryRegion ssp_memory;
+    MemoryRegion tsp_memory;
+
+    Clock *ssp_sysclk;
+    Clock *tsp_sysclk;
+
+    Aspeed27x0SoCState ca35;
+    Aspeed27x0SSPSoCState ssp;
+    Aspeed27x0TSPSoCState tsp;
+
+    bool mmio_exec;
+};
+
+#define AST2700FC_BMC_RAM_SIZE (2 * GiB)
+#define AST2700FC_CM4_DRAM_SIZE (32 * MiB)
+
+#define AST2700FC_HW_STRAP1 0x000000C0
+#define AST2700FC_HW_STRAP2 0x00000003
+#define AST2700FC_FMC_MODEL "w25q01jvq"
+#define AST2700FC_SPI_MODEL "w25q512jv"
+
+static void ast2700fc_ca35_init(MachineState *machine)
+{
+    Ast2700FCState *s = AST2700A1FC(machine);
+    AspeedSoCState *soc;
+    AspeedSoCClass *sc;
+
+    object_initialize_child(OBJECT(s), "ca35", &s->ca35, "ast2700-a1");
+    soc = ASPEED_SOC(&s->ca35);
+    sc = ASPEED_SOC_GET_CLASS(soc);
+
+    memory_region_init(&s->ca35_memory, OBJECT(&s->ca35), "ca35-memory",
+                       UINT64_MAX);
+
+    if (!memory_region_init_ram(&s->ca35_dram, OBJECT(&s->ca35), "ca35-dram",
+                                AST2700FC_BMC_RAM_SIZE, &error_abort)) {
+        return;
+    }
+    if (!object_property_set_link(OBJECT(&s->ca35), "memory",
+                                  OBJECT(&s->ca35_memory),
+                                  &error_abort)) {
+        return;
+    };
+    if (!object_property_set_link(OBJECT(&s->ca35), "dram",
+                                  OBJECT(&s->ca35_dram), &error_abort)) {
+        return;
+    }
+    if (!object_property_set_int(OBJECT(&s->ca35), "ram-size",
+                                 AST2700FC_BMC_RAM_SIZE, &error_abort)) {
+        return;
+    }
+    if (!object_property_set_int(OBJECT(&s->ca35), "hw-strap1",
+                                 AST2700FC_HW_STRAP1, &error_abort)) {
+        return;
+    }
+    if (!object_property_set_int(OBJECT(&s->ca35), "hw-strap2",
+                                 AST2700FC_HW_STRAP2, &error_abort)) {
+        return;
+    }
+    aspeed_soc_uart_set_chr(soc, ASPEED_DEV_UART12, serial_hd(0));
+    if (!qdev_realize(DEVICE(&s->ca35), NULL, &error_abort)) {
+        return;
+    }
+
+    /*
+     * AST2700 EVB has a LM75 temperature sensor on I2C bus 0 at address 0x4d.
+     */
+    i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 0), "tmp105", 0x4d);
+
+    aspeed_board_init_flashes(&soc->fmc, AST2700FC_FMC_MODEL, 2, 0);
+    aspeed_board_init_flashes(&soc->spi[0], AST2700FC_SPI_MODEL, 1, 2);
+
+    ast2700fc_board_info.ram_size = machine->ram_size;
+    ast2700fc_board_info.loader_start = sc->memmap[ASPEED_DEV_SDRAM];
+
+    arm_load_kernel(ARM_CPU(first_cpu), machine, &ast2700fc_board_info);
+}
+
+static void ast2700fc_ssp_init(MachineState *machine)
+{
+    AspeedSoCState *soc;
+    Ast2700FCState *s = AST2700A1FC(machine);
+    s->ssp_sysclk = clock_new(OBJECT(s), "SSP_SYSCLK");
+    clock_set_hz(s->ssp_sysclk, 200000000ULL);
+
+    object_initialize_child(OBJECT(s), "ssp", &s->ssp, TYPE_ASPEED27X0SSP_SOC);
+    memory_region_init(&s->ssp_memory, OBJECT(&s->ssp), "ssp-memory",
+                       UINT64_MAX);
+
+    qdev_connect_clock_in(DEVICE(&s->ssp), "sysclk", s->ssp_sysclk);
+    if (!object_property_set_link(OBJECT(&s->ssp), "memory",
+                                  OBJECT(&s->ssp_memory), &error_abort)) {
+        return;
+    }
+
+    soc = ASPEED_SOC(&s->ssp);
+    aspeed_soc_uart_set_chr(soc, ASPEED_DEV_UART4, serial_hd(1));
+    if (!qdev_realize(DEVICE(&s->ssp), NULL, &error_abort)) {
+        return;
+    }
+}
+
+static void ast2700fc_tsp_init(MachineState *machine)
+{
+    AspeedSoCState *soc;
+    Ast2700FCState *s = AST2700A1FC(machine);
+    s->tsp_sysclk = clock_new(OBJECT(s), "TSP_SYSCLK");
+    clock_set_hz(s->tsp_sysclk, 200000000ULL);
+
+    object_initialize_child(OBJECT(s), "tsp", &s->tsp, TYPE_ASPEED27X0TSP_SOC);
+    memory_region_init(&s->tsp_memory, OBJECT(&s->tsp), "tsp-memory",
+                       UINT64_MAX);
+
+    qdev_connect_clock_in(DEVICE(&s->tsp), "sysclk", s->tsp_sysclk);
+    if (!object_property_set_link(OBJECT(&s->tsp), "memory",
+                                  OBJECT(&s->tsp_memory), &error_abort)) {
+        return;
+    }
+
+    soc = ASPEED_SOC(&s->tsp);
+    aspeed_soc_uart_set_chr(soc, ASPEED_DEV_UART7, serial_hd(2));
+    if (!qdev_realize(DEVICE(&s->tsp), NULL, &error_abort)) {
+        return;
+    }
+}
+
+static void ast2700fc_init(MachineState *machine)
+{
+    ast2700fc_ca35_init(machine);
+    ast2700fc_ssp_init(machine);
+    ast2700fc_tsp_init(machine);
+}
+
+static void ast2700fc_class_init(ObjectClass *oc, const void *data)
+{
+    MachineClass *mc = MACHINE_CLASS(oc);
+
+    mc->alias = "ast2700fc";
+    mc->desc = "ast2700 full core support";
+    mc->init = ast2700fc_init;
+    mc->no_floppy = 1;
+    mc->no_cdrom = 1;
+    mc->min_cpus = mc->max_cpus = mc->default_cpus = 6;
+}
+
+static const TypeInfo ast2700fc_types[] = {
+    {
+        .name           = MACHINE_TYPE_NAME("ast2700fc"),
+        .parent         = TYPE_MACHINE,
+        .class_init     = ast2700fc_class_init,
+        .instance_size  = sizeof(Ast2700FCState),
+    },
+};
+
+DEFINE_TYPES(ast2700fc_types)
hw/arm/meson.build +3 -1
index 98c563150640..5098795f61de 100644
@@ -49,7 +49,9 @@ arm_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files(
   'aspeed_ast10x0.c',
   'aspeed_eeprom.c',
   'fby35.c'))
-arm_common_ss.add(when: ['CONFIG_ASPEED_SOC', 'TARGET_AARCH64'], if_true: files('aspeed_ast27x0.c'))
+arm_common_ss.add(when: ['CONFIG_ASPEED_SOC', 'TARGET_AARCH64'], if_true: files(
+  'aspeed_ast27x0.c',
+  'aspeed_ast27x0-fc.c',))
 arm_common_ss.add(when: 'CONFIG_MPS2', if_true: files('mps2.c'))
 arm_common_ss.add(when: 'CONFIG_MPS2', if_true: files('mps2-tz.c'))
 arm_common_ss.add(when: 'CONFIG_MSF2', if_true: files('msf2-soc.c'))
Signature · 1 line
2.49.0
#35 lore raw

[PULL 15/23] aspeed: ast27x0: Map unimplemented devices in SoC memory

In reply to Cédric Le Goater

From: Steven Lee <[email protected]>

Maps following unimplemented devices in SoC memory
- dpmcu
- iomem
- iomem0
- iomem1
- ltpi

Iomem, Iomem0 and Iomem1 include unimplemented controllers in the memory ranges 0x0 - 0x1000000, 0x120000000 - 0x121000000 and 0x14000000 - 0x141000000.

For instance:
- USB hub at 0x12010000
- eSPI at 0x14C5000
- PWM at 0x140C0000

DPMCU stands for Display Port MCU controller. LTPI is used to connect to AST1700. AST1700 is an I/O expander that supports the DC-SCM 2.1 LTPI protocol. It provides AST2700 with additional GPIO, UART, I3C, and other interfaces.

---
 include/hw/arm/aspeed_soc.h |  6 +++++
 hw/arm/aspeed_ast27x0.c     | 52 ++++++++++++++++++++++++++++++++-----
 2 files changed, 51 insertions(+), 7 deletions(-)
include/hw/arm/aspeed_soc.h +6 -0
index 4dcb1010dc28..5fcfd2fe2e62 100644
@@ -91,6 +91,8 @@ struct AspeedSoCState {
     SerialMM uart[ASPEED_UARTS_NUM];
     Clock *sysclk;
     UnimplementedDeviceState iomem;
+    UnimplementedDeviceState iomem0;
+    UnimplementedDeviceState iomem1;
     UnimplementedDeviceState video;
     UnimplementedDeviceState emmc_boot_controller;
     UnimplementedDeviceState dpmcu;
@@ -98,6 +100,7 @@ struct AspeedSoCState {
     UnimplementedDeviceState espi;
     UnimplementedDeviceState udc;
     UnimplementedDeviceState sgpiom;
+    UnimplementedDeviceState ltpi;
     UnimplementedDeviceState jtag[ASPEED_JTAG_NUM];
     AspeedAPB2OPBState fsi[2];
 };
@@ -173,6 +176,9 @@ enum {
     ASPEED_DEV_VBOOTROM,
     ASPEED_DEV_SPI_BOOT,
     ASPEED_DEV_IOMEM,
+    ASPEED_DEV_IOMEM0,
+    ASPEED_DEV_IOMEM1,
+    ASPEED_DEV_LTPI,
     ASPEED_DEV_UART0,
     ASPEED_DEV_UART1,
     ASPEED_DEV_UART2,
hw/arm/aspeed_ast27x0.c +45 -7

91 lines not on this page · raw message

Signature · 1 line
2.49.0
#36 lore raw
In reply to Cédric Le Goater

Hi Cédric,

Quoted 49 lines · Cédric Le Goater

The following changes since commit e578dcc7e1590b20a84036afe5bdfa8d23a6048e:

   pc-bios: Add AST27x0 vBootrom (2025-05-02 09:47:14 +0200)

are available in the Git repository at:

   https://github.com/legoater/qemu/ tags/pull-aspeed-20250505

for you to fetch changes up to f32ef57f7de98ec36da52b0a13bd5d18ac4bd583:

   docs: Add support for ast2700fc machine (2025-05-05 09:42:16 +0200)

----------------------------------------------------------------
aspeed queue:

* Fixed AST2700 SPI model issues
* Updated SDK images
* Added FW support to the AST2700 EVB machines
* Introduced an AST27x0 multi-SoC machine

----------------------------------------------------------------
Jamin Lin (12):
tests/functional/aspeed: Update test ASPEED SDK v09.06 for AST2500 tests/functional/aspeed: Update test ASPEED SDK v09.06 for AST2600 tests/functional/aspeed: Update test ASPEED SDK v03.00 for AST1030 hw/arm/aspeed_ast27x0: Rename variable sram_name to name in ast2700 realize tests/functional/aspeed: Move I2C test into shared helper for AST2700 reuse tests/functional/aspeed: Update test ASPEED SDK v09.06 tests/functional/aspeed: extract boot and login sequence into helper function hw/arm/aspeed_ast27x0 Introduce vbootrom memory region hw/arm/aspeed: Add support for loading vbootrom image via "-bios" tests/functional/aspeed: Add to test vbootrom for AST2700 docs/system/arm/aspeed: move AST2700 content to new section docs/system/arm/aspeed: Support vbootrom for AST2700

Joe Komlodi (1):
hw/ssi/aspeed_smc: Allow 64-bit wide flash accesses

Steven Lee (9):
aspeed: ast27x0: Map unimplemented devices in SoC memory
aspeed: ast27x0: Correct hex notation for device addresses hw/intc/aspeed: Add support for AST2700 SSP INTC hw/intc/aspeed: Add support for AST2700 TSP INTC hw/arm/aspeed_ast27x0-ssp: Introduce AST27x0 A1 SSP SoC hw/arm/aspeed_ast27x0-tsp: Introduce AST27x0 A1 TSP SoC hw/arm: Introduce ASPEED AST2700 A1 full core machine tests/function/aspeed: Add functional test for ast2700fc
docs: Add support for ast2700fc machine

Quoted 2 lines

Troy Lee (1):
hw/arm: ast27x0: Wire up EHCI controllers

If you ever have to send a v2, please remove the 'Change-Id:' tags.

#37 lore raw
Quoted 52 lines · Philippe Mathieu-Daudé

Hi Cédric,

Quoted 49 lines · Cédric Le Goater

The following changes since commit e578dcc7e1590b20a84036afe5bdfa8d23a6048e:

   pc-bios: Add AST27x0 vBootrom (2025-05-02 09:47:14 +0200)

are available in the Git repository at:

   https://github.com/legoater/qemu/ tags/pull-aspeed-20250505

for you to fetch changes up to f32ef57f7de98ec36da52b0a13bd5d18ac4bd583:

   docs: Add support for ast2700fc machine (2025-05-05 09:42:16 +0200)

----------------------------------------------------------------
aspeed queue:

* Fixed AST2700 SPI model issues
* Updated SDK images
* Added FW support to the AST2700 EVB machines
* Introduced an AST27x0 multi-SoC machine

----------------------------------------------------------------
Jamin Lin (12):
       tests/functional/aspeed: Update test ASPEED SDK v09.06 for AST2500 tests/functional/aspeed: Update test ASPEED SDK v09.06 for AST2600 tests/functional/aspeed: Update test ASPEED SDK v03.00 for AST1030 hw/arm/aspeed_ast27x0: Rename variable sram_name to name in ast2700 realize tests/functional/aspeed: Move I2C test into shared helper for AST2700 reuse tests/functional/aspeed: Update test ASPEED SDK v09.06 tests/functional/aspeed: extract boot and login sequence into helper function hw/arm/aspeed_ast27x0 Introduce vbootrom memory region hw/arm/aspeed: Add support for loading vbootrom image via "-bios" tests/functional/aspeed: Add to test vbootrom for AST2700 docs/system/arm/aspeed: move AST2700 content to new section docs/system/arm/aspeed: Support vbootrom for AST2700

Joe Komlodi (1):
       hw/ssi/aspeed_smc: Allow 64-bit wide flash accesses

Steven Lee (9):
       aspeed: ast27x0: Map unimplemented devices in SoC memory
       aspeed: ast27x0: Correct hex notation for device addresses hw/intc/aspeed: Add support for AST2700 SSP INTC hw/intc/aspeed: Add support for AST2700 TSP INTC hw/arm/aspeed_ast27x0-ssp: Introduce AST27x0 A1 SSP SoC hw/arm/aspeed_ast27x0-tsp: Introduce AST27x0 A1 TSP SoC hw/arm: Introduce ASPEED AST2700 A1 full core machine tests/function/aspeed: Add functional test for ast2700fc
       docs: Add support for ast2700fc machine

Quoted 5 lines
Quoted 2 lines

Troy Lee (1):
       hw/arm: ast27x0: Wire up EHCI controllers

If you ever have to send a v2, please remove the 'Change-Id:' tags.

This is a Gerrit trailer AFAICT.

Why ? is it breaking some tool ? Can't we keep such reference ? If so, I'd rather fix checkpatch.pl.

Thanks,

C.