From: Jamin Lin via <qemu-devel@nongnu.org>
To: "Cédric Le Goater" <clg@kaod.org>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Steven Lee" <steven_lee@aspeedtech.com>,
"Troy Lee" <leetroy@gmail.com>,
"Andrew Jeffery" <andrew@codeconstruct.com.au>,
"Joel Stanley" <joel@jms.id.au>,
"open list:ASPEED BMCs" <qemu-arm@nongnu.org>,
"open list:All patches CC here" <qemu-devel@nongnu.org>
Cc: <jamin_lin@aspeedtech.com>, <troy_lee@aspeedtech.com>
Subject: [PATCH v4 3/3] tests/functional/aarch64/test_aspeed_ast2700fc: Add vbootrom test
Date: Wed, 1 Oct 2025 14:46:24 +0800 [thread overview]
Message-ID: <20251001064625.1058680-4-jamin_lin@aspeedtech.com> (raw)
In-Reply-To: <20251001064625.1058680-1-jamin_lin@aspeedtech.com>
Introduce load_ast2700fc_coprocessor() to load the SSP/TSP ELF images
via -device loader. Use this helper in start_ast2700fc_test() to remove
duplicated code.
Add start_ast2700fc_test_vbootrom() which boots the ast2700fc machine
with -bios ast27x0_bootrom.bin and reuses the coprocessor loader.
Add test_aarch64_ast2700fc_sdk_vbootrom_v09_06() to test the vbootrom
with ast2700fc machine.
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
---
.../aarch64/test_aspeed_ast2700fc.py | 37 ++++++++++++++-----
1 file changed, 28 insertions(+), 9 deletions(-)
diff --git a/tests/functional/aarch64/test_aspeed_ast2700fc.py b/tests/functional/aarch64/test_aspeed_ast2700fc.py
index 28b66614d9..c0458e47b2 100755
--- a/tests/functional/aarch64/test_aspeed_ast2700fc.py
+++ b/tests/functional/aarch64/test_aspeed_ast2700fc.py
@@ -83,6 +83,17 @@ def do_ast2700fc_tsp_test(self):
exec_command_and_wait_for_pattern(self, 'md 72c02000 1',
'[72c02000] 06010103')
+ def load_ast2700fc_coprocessor(self, name):
+ load_elf_list = {
+ 'ssp': self.scratch_file(name, 'zephyr-aspeed-ssp.elf'),
+ 'tsp': self.scratch_file(name, 'zephyr-aspeed-tsp.elf')
+ }
+
+ for cpu_num, key in enumerate(load_elf_list, start=4):
+ file = load_elf_list[key]
+ self.vm.add_args('-device',
+ f'loader,file={file},cpu-num={cpu_num}')
+
def start_ast2700fc_test(self, name):
ca35_core = 4
uboot_size = os.path.getsize(self.scratch_file(name,
@@ -120,16 +131,13 @@ def start_ast2700fc_test(self, name):
self.vm.add_args('-device',
f'loader,addr=0x430000000,cpu-num={i}')
- load_elf_list = {
- 'ssp': self.scratch_file(name, 'zephyr-aspeed-ssp.elf'),
- 'tsp': self.scratch_file(name, 'zephyr-aspeed-tsp.elf')
- }
-
- for cpu_num, key in enumerate(load_elf_list, start=4):
- file = load_elf_list[key]
- self.vm.add_args('-device',
- f'loader,file={file},cpu-num={cpu_num}')
+ self.load_ast2700fc_coprocessor(name)
+ self.do_test_aarch64_aspeed_sdk_start(
+ self.scratch_file(name, 'image-bmc'))
+ def start_ast2700fc_test_vbootrom(self, name):
+ self.vm.add_args('-bios', 'ast27x0_bootrom.bin')
+ self.load_ast2700fc_coprocessor(name)
self.do_test_aarch64_aspeed_sdk_start(
self.scratch_file(name, 'image-bmc'))
@@ -144,5 +152,16 @@ def test_aarch64_ast2700fc_sdk_v09_06(self):
self.do_ast2700fc_ssp_test()
self.do_ast2700fc_tsp_test()
+ def test_aarch64_ast2700fc_sdk_vbootrom_v09_06(self):
+ self.set_machine('ast2700fc')
+
+ self.archive_extract(self.ASSET_SDK_V906_AST2700)
+ self.start_ast2700fc_test_vbootrom('ast2700-default')
+ self.verify_openbmc_boot_and_login('ast2700-default')
+ self.do_ast2700_i2c_test()
+ self.do_ast2700_pcie_test()
+ self.do_ast2700fc_ssp_test()
+ self.do_ast2700fc_tsp_test()
+
if __name__ == '__main__':
QemuSystemTest.main()
--
2.43.0
next prev parent reply other threads:[~2025-10-01 6:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-01 6:46 [PATCH v4 0/3] Support VBOOTROM to ast2700fc machine Jamin Lin via
2025-10-01 6:46 ` [PATCH v4 1/3] hw/arm/aspeed_ast27x0-fc: Map FMC0 flash contents into CA35 boot ROM Jamin Lin via
2025-10-01 6:46 ` [PATCH v4 2/3] hw/arm/aspeed_ast27x0-fc: Add VBOOTROM support Jamin Lin via
2025-10-01 6:46 ` Jamin Lin via [this message]
2025-10-01 7:32 ` [PATCH v4 3/3] tests/functional/aarch64/test_aspeed_ast2700fc: Add vbootrom test Cédric Le Goater
2025-10-01 7:46 ` Jamin Lin
2025-10-01 8:44 ` Cédric Le Goater
2025-10-03 7:26 ` Jamin Lin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251001064625.1058680-4-jamin_lin@aspeedtech.com \
--to=qemu-devel@nongnu.org \
--cc=andrew@codeconstruct.com.au \
--cc=clg@kaod.org \
--cc=jamin_lin@aspeedtech.com \
--cc=joel@jms.id.au \
--cc=leetroy@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=steven_lee@aspeedtech.com \
--cc=troy_lee@aspeedtech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).