tests/qtest/aspeed: Add Data FIFO qtest coverage for AST2700 SMC
cover tests/qtest/aspeed: Add Data FIFO qtest coverage for AST2700 SMC
This series depends on https://github.com/legoater/qemu.git at aspeed-next branch.
v1
1. Add Data FIFO mode test
2. Clarify SCU/SCUIO/FMC fields are shared with PSP SoC to AST2700
3. Bump vmstate version after ASPEED_SMC_R_MAX increase
Jamin Lin (3):
tests/qtest/ast2700-smc-test: Add Data FIFO mode test hw/arm/aspeed_coprocessor: Clarify SCU/SCUIO/FMC fields are shared
with PSP SoC to AST2700
hw/ssi/aspeed_smc: Bump vmstate version after ASPEED_SMC_R_MAX
increase
include/hw/arm/aspeed_coprocessor.h | 5 ++ tests/qtest/aspeed-smc-utils.h | 4 ++ hw/ssi/aspeed_smc.c | 4 +- tests/qtest/aspeed-smc-utils.c | 102 ++++++++++++++++++++++++++++ tests/qtest/ast2700-smc-test.c | 4 ++ 5 files changed, 117 insertions(+), 2 deletions(-)
Signature · 1 line
2.43.0
PATCH 2/3 hw/arm/aspeed_coprocessor: Clarify SCU/SCUIO/FMC fields are shared with PSP SoC to AST2700
Add a comment above Aspeed27x0CoprocessorState's scu_alias/scuio_alias/ fmc_alias and scu/scuio/fmc fields noting that they are not owned by the coprocessor: they point at resources owned by the main PSP SoC, only aliased into this coprocessor's own address space.
No functional change.
--- include/hw/arm/aspeed_coprocessor.h | 5 +++++ 1 file changed, 5 insertions(+)
include/hw/arm/aspeed_coprocessor.h +5 -0
@@ -49,6 +49,11 @@ struct Aspeed27x0CoprocessorState {ARMv7MState armv7m; +/* +* SCU, SCUIO and FMC are not owned by this coprocessor: they are +* shared with the main PSP SoC, and only aliased into this +* coprocessor's own address space here. +*/ MemoryRegion scu_alias;MemoryRegion scuio_alias;MemoryRegion fmc_alias;
Signature · 1 line
2.43.0
PATCH 3/3 hw/ssi/aspeed_smc: Bump vmstate version after ASPEED_SMC_R_MAX increase
In reply to Jamin LinASPEED_SMC_R_MAX grew from (0x100 / 4) to (0x300 / 4) to cover the new AST2700 data fifo registers.
This breaks migration compatibility with older QEMU builds for the affected models, even though Aspeed machines are not officially covered by migration compatibility guarantees.
Bump version_id to 4 and minimum_version_id to 2 to reflect the incompatible format.
--- hw/ssi/aspeed_smc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/ssi/aspeed_smc.c +2 -2
@@ -1218,8 +1218,8 @@ static void aspeed_smc_realize(DeviceState *dev, Error **errp)static const VMStateDescription vmstate_aspeed_smc = { .name ="aspeed.smc" , - .version_id =3 , - .minimum_version_id =1 , + .version_id =4 , + .minimum_version_id =2 , .fields = (const VMStateField []) {VMSTATE_UINT32_ARRAY (regs, AspeedSMCState,ASPEED_SMC_R_MAX ),VMSTATE_UNUSED_V (2 ,2 ),/* was snoop_index/snoop_dummies */
Signature · 1 line
2.43.0
PATCH 1/3 tests/qtest/ast2700-smc-test: Add Data FIFO mode test
In reply to Jamin LinAdd two qtest cases exercising the new AST2700 Data FIFO-based flash access path (R_DATA_FIFO at spi_base + 0x200).
Write_page_datafifo sends the page-program command and data through the FIFO port, then verifies the result via the regular read path. Read_page_datafifo writes a page the regular way, then reads it back through the FIFO port, so both directions are checked independently.
--- tests/qtest/aspeed-smc-utils.h | 4 ++ tests/qtest/aspeed-smc-utils.c | 102 +++++++++++++++++++++++++++++++++ tests/qtest/ast2700-smc-test.c | 4 ++ 3 files changed, 110 insertions(+)
tests/qtest/aspeed-smc-utils.h +4 -0
@@ -45,6 +45,8 @@#define CTRL_WRITEMODE 0x2#define CTRL_USERMODE 0x3#define SR_WEL BIT(1) +/* Data fifo */ +#define R_DATA_FIFO 0x200/* * Flash commands
@@ -90,5 +92,7 @@ void aspeed_smc_test_status_reg_write_protection(const void *data);void aspeed_smc_test_write_block_protect (const void *data);void aspeed_smc_test_write_block_protect_bottom_bit (const void *data);void aspeed_smc_test_write_page_qpi (const void *data); +void aspeed_smc_test_write_page_datafifo (const void *data); +void aspeed_smc_test_read_page_datafifo (const void *data);#endif /* TESTS_ASPEED_SMC_UTILS_H */
tests/qtest/aspeed-smc-utils.c +102 -0
111 lines not on this page · raw message
tests/qtest/ast2700-smc-test.c +4 -0
@@ -52,6 +52,10 @@ static void test_ast2700_evb(AspeedSMCTestData *data) data, aspeed_smc_test_read_status_reg);qtest_add_data_func ("/ast2700/smc/write_page_qpi" , data, aspeed_smc_test_write_page_qpi); +qtest_add_data_func ("/ast2700/smc/write_page_datafifo" , + data, aspeed_smc_test_write_page_datafifo); +qtest_add_data_func ("/ast2700/smc/read_page_datafifo" , + data, aspeed_smc_test_read_page_datafifo); }int main (int argc,char **argv)
Signature · 1 line
2.43.0
Jamin,
Quoted 1 line · Jamin Lin
This series depends on https://github.com/legoater/qemu.git at aspeed-next branch.
Since we have time,
Could you please resend a v3 of
https://lore.kernel.org/qemu-devel/[email protected]/
Quoted 2 lines
v1
1. Add Data FIFO mode test
Please add this patch at end of the respin, making sure it applies on top :
https://lore.kernel.org/qemu-devel/[email protected]/
This series is also applied on the aspeed-next branch.
Quoted 2 lines
2. Clarify SCU/SCUIO/FMC fields are shared with PSP SoC to AST2700
3. Bump vmstate version afterASPEED_SMC_R_MAXincrease
And fold these 2 changes where they should be !
Thanks,
C.
Hi Cédric
Quoted 40 lines
-----Original Message-----
From: Cédric Le Goater <[email protected]>
Sent: Friday, July 17, 2026 3:24 PM
To: Jamin Lin <[email protected]>; Peter Maydell <[email protected]>; Steven Lee <[email protected]>; Troy Lee <[email protected]>; Kane Chen <[email protected]>; Andrew Jeffery <[email protected]>; Joel Stanley <[email protected]>; Alistair Francis <[email protected]>; Fabiano Rosas <[email protected]>; Laurent Vivier <[email protected]>; Paolo Bonzini <[email protected]>; open list:ASPEED BMCs <[email protected]>; open list:All patches CC here <[email protected]>
Cc: Troy Lee <[email protected]>
Subject: Re: [PATCH v1 0/3] tests/qtest/aspeed: Add Data FIFO qtest coverage for AST2700 SMCJamin,
Quoted 1 line · Jamin Lin
This series depends on https://github.com/legoater/qemu.git at aspeed-next
branch.
Since we have time,
Could you please resend a v3 of
https://lore.kernel.org/qemu-devel/20260707060919.350637-1-jamin_lin@asp
eedtech.com/Quoted 2 lines
v1
1. Add Data FIFO mode testPlease add this patch at end of the respin, making sure it applies on top :
https://lore.kernel.org/qemu-devel/[email protected]
m/This series is also applied on the aspeed-next branch.
Quoted 8 lines
Quoted 2 lines
2. Clarify SCU/SCUIO/FMC fields are shared with PSP SoC to AST2700
3. Bump vmstate version afterASPEED_SMC_R_MAXincreaseAnd fold these 2 changes where they should be !
Thanks,
C.
Will resend v2
Thanks,
Jamin