Commit 03073201da for qemu.org
commit 03073201dae5315ea850fc63805302d7f178af04
Author: Jamin Lin <jamin_lin@aspeedtech.com>
Date: Tue Feb 3 10:08:50 2026 +0800
tests/functional/aarch64/test_aspeed_ast2700: Enable PCIe2 DTS status for AST2700 tests
PCIe2 is disabled by default starting from SDK v10.00.
Add a helper function to stop U-Boot autoboot and update the device
tree at runtime, setting the PCIe2 node status to "okay" before
booting Linux. This allows the AST2700 functional test to verify
the PCIe2 root complex behavior correctly.
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260203020855.1642884-6-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
diff --git a/tests/functional/aarch64/test_aspeed_ast2700.py b/tests/functional/aarch64/test_aspeed_ast2700.py
index 0ced1a2502..1f1b5749f4 100755
--- a/tests/functional/aarch64/test_aspeed_ast2700.py
+++ b/tests/functional/aarch64/test_aspeed_ast2700.py
@@ -9,7 +9,7 @@
import os
from qemu_test import QemuSystemTest, Asset
-from qemu_test import wait_for_console_pattern
+from qemu_test import wait_for_console_pattern, exec_command
from qemu_test import exec_command_and_wait_for_pattern
@@ -37,9 +37,23 @@ def verify_vbootrom_firmware_flow(self):
wait_for_console_pattern(self, 'done')
wait_for_console_pattern(self, 'Jumping to BL31 (Trusted Firmware-A)')
+ def enable_ast2700_pcie2(self):
+ wait_for_console_pattern(self, 'Hit any key to stop autoboot')
+ exec_command_and_wait_for_pattern(self, '\012', '=>')
+ exec_command_and_wait_for_pattern(self,
+ 'cp 100420000 403000000 900000', '=>')
+ exec_command_and_wait_for_pattern(self,
+ 'bootm start 403000000', '=>')
+ exec_command_and_wait_for_pattern(self, 'bootm loados', '=>')
+ exec_command_and_wait_for_pattern(self, 'bootm ramdisk', '=>')
+ exec_command_and_wait_for_pattern(self, 'bootm prep', '=>')
+ exec_command_and_wait_for_pattern(self,
+ 'fdt set /soc@14000000/pcie@140d0000 status "okay"', '=>')
+ exec_command(self, 'bootm go')
+
def verify_openbmc_boot_start(self):
wait_for_console_pattern(self, 'U-Boot 2023.10')
- wait_for_console_pattern(self, '## Loading kernel from FIT Image')
+ self.enable_ast2700_pcie2()
wait_for_console_pattern(self, 'Linux version ')
def verify_openbmc_boot_and_login(self, name):
diff --git a/tests/functional/aarch64/test_aspeed_ast2700fc.py b/tests/functional/aarch64/test_aspeed_ast2700fc.py
index 8dbc8f234f..a1d8046f58 100755
--- a/tests/functional/aarch64/test_aspeed_ast2700fc.py
+++ b/tests/functional/aarch64/test_aspeed_ast2700fc.py
@@ -9,7 +9,7 @@
import os
from qemu_test import QemuSystemTest, Asset
-from qemu_test import wait_for_console_pattern
+from qemu_test import wait_for_console_pattern, exec_command
from qemu_test import exec_command_and_wait_for_pattern
@@ -27,9 +27,23 @@ def do_test_aarch64_aspeed_sdk_start(self, image):
self.vm.launch()
+ def enable_ast2700_pcie2(self):
+ wait_for_console_pattern(self, 'Hit any key to stop autoboot')
+ exec_command_and_wait_for_pattern(self, '\012', '=>')
+ exec_command_and_wait_for_pattern(self,
+ 'cp 100420000 403000000 900000', '=>')
+ exec_command_and_wait_for_pattern(self,
+ 'bootm start 403000000', '=>')
+ exec_command_and_wait_for_pattern(self, 'bootm loados', '=>')
+ exec_command_and_wait_for_pattern(self, 'bootm ramdisk', '=>')
+ exec_command_and_wait_for_pattern(self, 'bootm prep', '=>')
+ exec_command_and_wait_for_pattern(self,
+ 'fdt set /soc@14000000/pcie@140d0000 status "okay"', '=>')
+ exec_command(self, 'bootm go')
+
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')
+ self.enable_ast2700_pcie2()
wait_for_console_pattern(self, 'Starting kernel ...')
wait_for_console_pattern(self, f'{name} login:')