[PATCH v1 11/22] hw/misc/aspeed_hace: Add trace-events for better debugging

2025-03-22 Thread Jamin Lin via
Introduced "trace_aspeed_hace_addr", "trace_aspeed_hace_sg", "trace_aspeed_hace_read", and "trace_aspeed_hace_write" trace events. Signed-off-by: Jamin Lin --- hw/misc/aspeed_hace.c | 8 hw/misc/trace-events | 6 ++ 2 files changed, 14 insertions(+) diff --git a/hw/misc/aspeed_hac

[PATCH v1 02/22] hw/misc/aspeed_hace: Fix buffer overflow in has_padding function

2025-03-22 Thread Jamin Lin via
The maximum padding size is either 64 or 128 bytes and should always be smaller than "req_len". If "padding_size" exceeds "req_len", then "req_len - padding_size" underflows due to "uint32_t" data type, leading to a large incorrect value (e.g., `0xFFXX`). This causes an out-of-bounds memory acc

[PATCH v1 07/22] hw/misc/aspeed_hace: Add support for source, digest, key buffer 64 bit addresses

2025-04-04 Thread Jamin Lin via
According to the AST2700 design, the data source address is 64-bit, with R_HASH_SRC_HI storing bits [63:32] and R_HASH_SRC storing bits [31:0]. Similarly, the digest address is 64-bit, with R_HASH_DEST_HI storing bits [63:32] and R_HASH_DEST storing bits [31:0]. The HMAC key buffer address is also

[PATCH v1 21/22] test/qtest/hace: Support to validate 64-bit hmac key buffer addresses

2025-04-05 Thread Jamin Lin via
Added "key" and "key_hi" fields to "AspeedMasks" for 64-bit addresses test. Updated "aspeed_test_addresses" to validate "HACE_HASH_KEY_BUFF" and "HACE_HASH_KEY_BUFF_HI". Ensured correct masking of 64-bit addresses by checking both lower and upper 32-bit registers. Signed-off-by: Jamin Lin --- te

[PATCH v1 10/22] hw/misc/aspeed_hace:: Support setting different memory size

2025-04-05 Thread Jamin Lin via
The memory size was previously hardcoded to 0x1000 (4K). However, the actual memory size of the HACE controller varies across different models: 1. AST2400/AST2500: 0x1000 (4K) 2. AST2600/AST1030: 0x1 (64K) 3. AST2700: 0x100 (256 bytes) To address this, a new class attribute, mem_size, has been

[PATCH v1 20/22] test/qtest/hace: Support to test upper 32 bits of digest and source addresses

2025-04-05 Thread Jamin Lin via
Added "src_hi" and "dest_hi" fields to "AspeedMasks" for 64-bit addresses test. Updated "aspeed_test_addresses" to validate "HACE_HASH_SRC_HI" and "HACE_HASH_DIGEST_HI". Ensured correct masking of 64-bit addresses by checking both lower and upper 32-bit registers. Signed-off-by: Jamin Lin --- te

[PATCH v1 14/22] test/qtest/hace: Adjust test address range for AST1030 due to SRAM limitations

2025-04-05 Thread Jamin Lin via
The digest_addr is set to "src_addr + 0x100", where src_addr is the DRAM base address. However, the value 0x100 (16MB) is too large because the AST1030 does not support DRAM, and its SRAM size is only 768KB. A range size of 0x1000 (64KB) is sufficient for HACE test cases, as the test vecto

[PATCH v1 03/22] hw/misc/aspeed_hace: Improve readability and consistency in variable naming

2025-04-05 Thread Jamin Lin via
Currently, users define multiple local variables within different if-statements. To improve readability and maintain consistency in variable naming, rename the variables accordingly. Introduced "sg_addr" to clearly indicate the scatter-gather mode buffer address. Signed-off-by: Jamin Lin --- hw/

[PATCH v1 16/22] test/qtest/hace: Add SHA-384 tests for AST2600

2025-04-05 Thread Jamin Lin via
Introduced "test_sha384_ast2600" to validate SHA-384 hashing. Added "test_sha384_sg_ast2600" for scatter-gather SHA-384 verification. Implemented "test_sha384_accum_ast2600" to test SHA-384 accumulation. Registered new test cases in "main" to ensure execution. Signed-off-by: Jamin Lin --- tests/

[PATCH v2] hw/i2c/aspeed: Fix wrong I2CC_DMA_LEN when I2CM_DMA_TX/RX_ADDR set first

2025-04-08 Thread Jamin Lin via
In the previous design, the I2C model would update I2CC_DMA_LEN (0x54) based on the value of I2CM_DMA_LEN (0x1C) when the firmware set either I2CM_DMA_TX_ADDR (0x30) or I2CM_DMA_RX_ADDR (0x34). However, this only worked correctly if the firmware set I2CM_DMA_LEN before setting I2CM_DMA_TX_ADDR or I

[PATCH v1 2/9] hw/arm/aspeed_ast27x0: Rename variable sram_name to name in ast2700 realize

2025-04-09 Thread Jamin Lin via
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. Signed-off-by: Jamin Lin --- hw/arm/aspeed_ast27x0.c | 8 1 file changed, 4 insertions(+), 4 deletions(-

[PATCH v2 05/10] hw/arm/aspeed: Enable vbootrom support by default on AST2700 EVB machines

2025-04-09 Thread Jamin Lin via
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. Signed-off-by: Jamin Lin --- include/hw/arm/aspeed.h | 1 + hw/arm/aspeed.c |

[PATCH v2 08/10] pc-bios: Add AST27x0 vBootrom

2025-04-09 Thread Jamin Lin via
The boot ROM is a minimal implementation designed to load an AST27x0 boot image. Its source code is available at: https://github.com/google/vbootrom Signed-off-by: Jamin Lin --- MAINTAINERS | 1 + pc-bios/README | 6 ++ pc-bios/ast27x0_bootrom.bin | Bin 0 ->

[PATCH v2 00/10] Support vbootrom for AST2700

2025-04-09 Thread Jamin Lin via
v1: Add initial support for AST27x0 The purpose of vbootrom here is to simulate the work of BootMCU SPL (riscv) in AST2700, because QEMU doesn't support heterogenous architecture yet. ast27x0_bootrom.bin is a simplified, free (Apache 2.0) boot ROM for ASPEED AST27x0 BMC SOC. It currentl

[PATCH v2 03/10] hw/arm/aspeed_ast27x0: Rename variable sram_name to name in ast2700 realize

2025-04-09 Thread Jamin Lin via
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. Signed-off-by: Jamin Lin --- hw/arm/aspeed_ast27x0.c | 8 1 file changed, 4 insertions(+), 4 deletions(-

[PATCH v2 06/10] hw/arm/aspeed: Reuse rom_size variable for vbootrom setup

2025-04-09 Thread Jamin Lin via
Move the declaration of `rom_size` to an outer scope in aspeed_machine_init() so it can be reused for setting up the vbootrom region as well. This avoids introducing a redundant local variable and ensures consistent ROM sizing logic when both SPI boot and vbootrom are used. Signed-off-by: Jamin L

[PATCH v2 04/10] hw/arm/aspeed_ast27x0 Introduce vbootrom memory region

2025-04-09 Thread Jamin Lin via
Introduce a new vbootrom memory region. The region is mapped at address "0x" 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 region is initialized as ROM and registered in

[PATCH v2 09/10] tests/functional/aspeed: Update AST2700 functional test to use vbootrom

2025-04-09 Thread Jamin Lin via
Refactor 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. Signed-off-by: Jamin Lin --- tests/functional/tes

[PATCH v2 01/10] hw/arm/aspeed: Introduced ASPEED_DEV_VBOOTROM in the device enumeration

2025-04-09 Thread Jamin Lin via
Introduced ASPEED_DEV_VBOOTROM into the ASPEED device enumeration to support a virtual boot ROM. Signed-off-by: Jamin Lin --- include/hw/arm/aspeed_soc.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h index f069d17d16..37cd7cd793 100

[PATCH v2 10/10] docs/system/arm/aspeed: Support vbootrom for AST2700

2025-04-09 Thread Jamin Lin via
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. Signed-off-by: Jamin Lin --- docs/system/arm/aspeed.rst | 18 -- 1 file change

[PATCH v2 07/10] hw/arm/aspeed: Add support for loading vbootrom image via "-bios"

2025-04-09 Thread Jamin Lin via
Introduce "aspeed_load_vbootrom()" to support loading a virtual boot ROM image into the vbootrom memory region, using the "-bios" command-line option. Signed-off-by: Jamin Lin --- hw/arm/aspeed.c | 32 1 file changed, 32 insertions(+) diff --git a/hw/arm/aspeed.

[PATCH v2 02/10] hw/arm/aspeed_ast27x0: Add "vbootrom_size" field to AspeedSoCClass

2025-04-10 Thread Jamin Lin via
Introduced a "vbootrom_size" attribute in "AspeedSoCClass" to define virtual boot ROM size. Initialized "vbootrom_size" to "0x2" for both AST2700 A0 and A1 variants. Signed-off-by: Jamin Lin --- include/hw/arm/aspeed_soc.h | 1 + hw/arm/aspeed_ast27x0.c | 2 ++ 2 files changed, 3 inserti

[PATCH v5 18/29] hw/misc/aspeed_scu: Add Support for AST2700/AST2750 A1 Silicon Revisions

2025-03-15 Thread Jamin Lin via
Added new definitions for AST2700_A1_SILICON_REV and AST2750_A1_SILICON_REV to identify the A1 silicon revisions. Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater --- include/hw/misc/aspeed_scu.h | 2 ++ hw/misc/aspeed_scu.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/i

[PATCH v1 1/9] hw/arm/aspeed_ast27x0: Add "vbootrom_size" field to AspeedSoCClass

2025-04-09 Thread Jamin Lin via
Introduced a "vbootrom_size" attribute in "AspeedSoCClass" to define virtual boot ROM size. Initialized "vbootrom_size" to "0x2" for both AST2700 A0 and A1 variants. Signed-off-by: Jamin Lin --- include/hw/arm/aspeed_soc.h | 1 + hw/arm/aspeed_ast27x0.c | 2 ++ 2 files changed, 3 inserti

[PATCH v1 6/9] hw/arm/aspeed: Add support for loading vbootrom image via "-bios"

2025-04-09 Thread Jamin Lin via
Introduce "aspeed_load_vbootrom()" to support loading a virtual boot ROM image into the vbootrom memory region, using the "-bios" command-line option. Signed-off-by: Jamin Lin --- hw/arm/aspeed.c | 32 1 file changed, 32 insertions(+) diff --git a/hw/arm/aspeed.

[PATCH v1 9/9] docs/system/arm/aspeed: Support vbootrom for AST2700

2025-04-09 Thread Jamin Lin via
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. Signed-off-by: Jamin Lin --- docs/system/arm/aspeed.rst | 18 -- 1 file change

[PATCH v1 5/9] hw/arm/aspeed: Reuse rom_size variable for vbootrom setup

2025-04-09 Thread Jamin Lin via
Move the declaration of `rom_size` to an outer scope in aspeed_machine_init() so it can be reused for setting up the vbootrom region as well. This avoids introducing a redundant local variable and ensures consistent ROM sizing logic when both SPI boot and vbootrom are used. Signed-off-by: Jamin L

[PATCH v1 0/9] Support vbootrom for AST2700

2025-04-09 Thread Jamin Lin via
v1: Add initial support for AST27x0 The purpose of vbootrom here is to simulate the work of BootMCU SPL (riscv) in AST2700, because QEMU doesn't support heterogenous architecture yet. ast27x0_bootrom.bin is a simplified, free (Apache 2.0) boot ROM for ASPEED AST27x0 BMC SOC. It currentl

[PATCH v1 7/9] pc-bios: Add AST27x0 vBootrom

2025-04-09 Thread Jamin Lin via
The boot ROM is a minimal implementation designed to load an AST27x0 boot image. Its source code is available at: https://github.com/google/vbootrom Signed-off-by: Jamin Lin --- MAINTAINERS | 1 + pc-bios/README | 6 ++ pc-bios/ast27x0_bootrom.bin | Bin 0 ->

[PATCH v1 4/9] hw/arm/aspeed: Enable vbootrom support by default on AST2700 EVB machines

2025-04-09 Thread Jamin Lin via
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. Signed-off-by: Jamin Lin --- include/hw/arm/aspeed.h | 1 + hw/arm/aspeed.c |

[PATCH v1 8/9] tests/functional/aspeed: Update AST2700 functional test to use vbootrom

2025-04-09 Thread Jamin Lin via
Refactor 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. Signed-off-by: Jamin Lin --- tests/functional/tes

[PATCH v1 3/9] hw/arm/aspeed_ast27x0 Introduce vbootrom memory region

2025-04-09 Thread Jamin Lin via
Introduce a new vbootrom memory region. The region is mapped at address "0x" 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 region is initialized as ROM and registered in

[PATCH v1 3/3] tests/functional/aspeed: Update test ASPEED SDK v03.00 for AST1030

2025-04-22 Thread Jamin Lin via
Updated test to target SDK version v03.00. Removed redundant test case to simplify validation. Cleaned up unsupported shell commands. Signed-off-by: Jamin Lin --- tests/functional/test_arm_aspeed_ast1030.py | 40 - 1 file changed, 7 insertions(+), 33 deletions(-) diff --git

[PATCH v1 0/3] Update to test new ASPEED SDK version

2025-04-22 Thread Jamin Lin via
v1: Update to test new ASPEED SDK version for AST2600, AST2500 ,and AST1030. Jamin Lin (3): tests/functional/aspeed: Update test ASPEED SDK v09.06 for AST2500 tests/functional/aspeed: Update test ASPEED SDK v09.06 for AST2500 tests/functional/aspeed: Update test ASPEED SDK v03.00 for AST10

[PATCH v1 2/3] tests/functional/aspeed: Update test ASPEED SDK v09.06 for AST2500

2025-04-22 Thread Jamin Lin via
Update test for AST2600 production revision A3. Signed-off-by: Jamin Lin --- tests/functional/test_arm_aspeed_ast2600.py | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/functional/test_arm_aspeed_ast2600.py b/tests/functional/test_arm_aspeed_ast2600.py

[PATCH v1 1/3] tests/functional/aspeed: Update test ASPEED SDK v09.06 for AST2500

2025-04-22 Thread Jamin Lin via
Signed-off-by: Jamin Lin --- tests/functional/test_arm_aspeed_ast2500.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/functional/test_arm_aspeed_ast2500.py b/tests/functional/test_arm_aspeed_ast2500.py index 1ffba6c995..90f3940e2a 100755 --- a/tests/functiona

[PATCH v4 01/10] hw/arm/aspeed_ast27x0: Rename variable sram_name to name in ast2700 realize

2025-04-18 Thread Jamin Lin via
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. Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater Tested-by: Nabih Estefan --- hw/arm/aspeed_ast27x0.c | 8

[PATCH v5 03/11] hw/arm/aspeed: Add vbootrom support on AST2700 EVB machines

2025-04-23 Thread Jamin Lin via
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. Signed-off-by: Jamin Lin Reviewed-by: Nabih Estefan Tested-by: Nabih Estefan --- inc

[PATCH v5 11/11] docs/system/arm/aspeed: Support vbootrom for AST2700

2025-04-23 Thread Jamin Lin via
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. Signed-off-by: Jamin Lin Reviewed-by: Nabih Estefan --- docs/system/arm/aspeed.rst | 96 +++--- 1 file changed, 90

[PATCH v5 05/11] pc-bios: Add AST27x0 vBootrom

2025-04-23 Thread Jamin Lin via
The boot ROM is a minimal implementation designed to load an AST27x0 boot image. Its source code is available at: https://github.com/google/vbootrom Signed-off-by: Jamin Lin Reviewed-by: Nabih Estefan Tested-by: Nabih Estefan --- MAINTAINERS | 1 + pc-bios/README

[PATCH v5 00/11] Support vbootrom for AST2700

2025-04-23 Thread Jamin Lin via
v1: Add initial support for AST27x0 The purpose of vbootrom here is to simulate the work of BootMCU SPL (riscv) in AST2700, because QEMU doesn't support heterogenous architecture yet. ast27x0_bootrom.bin is a simplified, free (Apache 2.0) boot ROM for ASPEED AST27x0 BMC SOC. It currently

[PATCH v5 02/11] hw/arm/aspeed_ast27x0 Introduce vbootrom memory region

2025-04-23 Thread Jamin Lin via
Introduce a new vbootrom memory region. The region is mapped at address "0x" 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 th

[PATCH v5 10/11] tests/functional/aspeed: Add to test vbootrom for AST2700

2025-04-23 Thread Jamin Lin via
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. Signed-off-by: Jamin Lin --- tests/functional/test_aar

[PATCH v5 06/11] hw/arm/aspeed: Add support for loading vbootrom image via "-bios"

2025-04-23 Thread Jamin Lin via
Introduce "aspeed_load_vbootrom()" to support loading a virtual boot ROM image into the vbootrom memory region, using the "-bios" command-line option. Signed-off-by: Jamin Lin Reviewed-by: Nabih Estefan Tested-by: Nabih Estefan --- hw/arm/aspeed.c | 35 +++ 1 fi

[PATCH v5 07/11] tests/functional/aspeed: Move I2C test into shared helper for AST2700 reuse

2025-04-23 Thread Jamin Lin via
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. Signed-off-by: Jamin Lin Reviewed-by: Nabih Estefan Reviewed-by: Cédric Le Goater --- tests/functional

[PATCH v5 01/11] hw/arm/aspeed_ast27x0: Rename variable sram_name to name in ast2700 realize

2025-04-23 Thread Jamin Lin via
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. Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater Tested-by: Nabih Estefan --- hw/arm/aspeed_ast27x0.c | 8

[PATCH v5 08/11] tests/functional/aspeed: Update test ASPEED SDK v09.06

2025-04-23 Thread Jamin Lin via
Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater --- tests/functional/test_aarch64_aspeed.py | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/functional/test_aarch64_aspeed.py b/tests/functional/test_aarch64_aspeed.py index 441f7f3919..337d7

[PATCH v5 04/11] hw/arm/aspeed: Reuse rom_size variable for vbootrom setup

2025-04-23 Thread Jamin Lin via
Move the declaration of "rom_size" to an outer scope in aspeed_machine_init() so it can be reused for setting up the vbootrom region as well. This avoids introducing a redundant local variable and ensures consistent ROM sizing logic when both SPI boot and vbootrom are used. Signed-off-by: Jamin L

[PATCH v5 09/11] tests/functional/aspeed: extract boot and login sequence into helper function

2025-04-23 Thread Jamin Lin via
Extracted repeated boot and login steps into a new helper function. No change in functional behavior. Signed-off-by: Jamin Lin --- tests/functional/test_aarch64_aspeed.py | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/functional/test_aarch64_aspeed.py b/t

[PATCH v2 0/3] Update to test new ASPEED SDK version

2025-04-22 Thread Jamin Lin via
v1: Update to test new ASPEED SDK version for AST2600, AST2500 ,and AST1030. v2: Fix review issue for AST1030. Jamin Lin (3): 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: Upd

[PATCH v2 1/3] tests/functional/aspeed: Update test ASPEED SDK v09.06 for AST2500

2025-04-22 Thread Jamin Lin via
Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater --- tests/functional/test_arm_aspeed_ast2500.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/functional/test_arm_aspeed_ast2500.py b/tests/functional/test_arm_aspeed_ast2500.py index 1ffba6c995..90f3940e

[PATCH v2 2/3] tests/functional/aspeed: Update test ASPEED SDK v09.06 for AST2600

2025-04-22 Thread Jamin Lin via
Update test for AST2600 production revision A3. Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater --- tests/functional/test_arm_aspeed_ast2600.py | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/functional/test_arm_aspeed_ast2600.py b/tests/functio

[PATCH v2 3/3] tests/functional/aspeed: Update test ASPEED SDK v03.00 for AST1030

2025-04-22 Thread Jamin Lin via
Signed-off-by: Jamin Lin --- tests/functional/test_arm_aspeed_ast1030.py | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/functional/test_arm_aspeed_ast1030.py b/tests/functional/test_arm_aspeed_ast1030.py index d45d9f7c1c..77037f0179 100755 --- a/tests/functi

[PATCH v3 05/10] hw/arm/aspeed: Add support for loading vbootrom image via "-bios"

2025-04-15 Thread Jamin Lin via
Introduce "aspeed_load_vbootrom()" to support loading a virtual boot ROM image into the vbootrom memory region, using the "-bios" command-line option. Signed-off-by: Jamin Lin --- include/hw/arm/aspeed.h | 1 + hw/arm/aspeed.c | 36 2 files changed,

[PATCH v3 09/10] tests/functional/aspeed: Add to test vbootrom for AST2700

2025-04-15 Thread Jamin Lin via
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. Signed-off-by: Jamin Lin --- tests/functional/test_aar

[PATCH v3 02/10] hw/arm/aspeed_ast27x0 Introduce vbootrom memory region

2025-04-15 Thread Jamin Lin via
Introduce a new vbootrom memory region. The region is mapped at address "0x" 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 th

[PATCH v3 06/10] pc-bios: Add AST27x0 vBootrom

2025-04-15 Thread Jamin Lin via
The boot ROM is a minimal implementation designed to load an AST27x0 boot image. Its source code is available at: https://github.com/google/vbootrom Signed-off-by: Jamin Lin --- MAINTAINERS | 1 + pc-bios/README | 6 ++ pc-bios/ast27x0_bootrom.bin | Bin 0 ->

[PATCH v3 04/10] hw/arm/aspeed: Reuse rom_size variable for vbootrom setup

2025-04-15 Thread Jamin Lin via
Move the declaration of `rom_size` to an outer scope in aspeed_machine_init() so it can be reused for setting up the vbootrom region as well. This avoids introducing a redundant local variable and ensures consistent ROM sizing logic when both SPI boot and vbootrom are used. Signed-off-by: Jamin L

[PATCH v3 00/10] Support vbootrom for AST2700

2025-04-15 Thread Jamin Lin via
v1: Add initial support for AST27x0 The purpose of vbootrom here is to simulate the work of BootMCU SPL (riscv) in AST2700, because QEMU doesn't support heterogenous architecture yet. ast27x0_bootrom.bin is a simplified, free (Apache 2.0) boot ROM for ASPEED AST27x0 BMC SOC. It currently

[PATCH v3 03/10] hw/arm/aspeed: Add vbootrom support on AST2700 EVB machines

2025-04-15 Thread Jamin Lin via
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. Signed-off-by: Jamin Lin --- include/hw/arm/aspeed.h | 1 + hw/arm/aspeed.c |

[PATCH v3 01/10] hw/arm/aspeed_ast27x0: Rename variable sram_name to name in ast2700 realize

2025-04-15 Thread Jamin Lin via
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. Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater --- hw/arm/aspeed_ast27x0.c | 8 1 file changed,

[PATCH v3 07/10] tests/functional/aspeed: Move I2C test into shared helper for AST2700 reuse

2025-04-15 Thread Jamin Lin via
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. Signed-off-by: Jamin Lin --- tests/functional/test_aarch64_aspeed.py | 28 + 1 f

[PATCH v3 08/10] tests/functional/aspeed: Update test ASPEED SDK v09.06

2025-04-15 Thread Jamin Lin via
Signed-off-by: Jamin Lin --- tests/functional/test_aarch64_aspeed.py | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/functional/test_aarch64_aspeed.py b/tests/functional/test_aarch64_aspeed.py index 441f7f3919..337d701917 100755 --- a/tests/functi

[PATCH v3 10/10] docs/system/arm/aspeed: Support vbootrom for AST2700

2025-04-15 Thread Jamin Lin via
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. Signed-off-by: Jamin Lin --- docs/system/arm/aspeed.rst | 29 - 1 file changed, 28 insertions(+), 1 deletion(-) diff -

[PATCH v4 03/10] hw/arm/aspeed: Add vbootrom support on AST2700 EVB machines

2025-04-16 Thread Jamin Lin via
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. Signed-off-by: Jamin Lin Reviewed-by: Nabih Estefan Tested-by: Nabih Estefan --- inc

[PATCH v4 00/10] Support vbootrom for AST2700

2025-04-16 Thread Jamin Lin via
v1: Add initial support for AST27x0 The purpose of vbootrom here is to simulate the work of BootMCU SPL (riscv) in AST2700, because QEMU doesn't support heterogenous architecture yet. ast27x0_bootrom.bin is a simplified, free (Apache 2.0) boot ROM for ASPEED AST27x0 BMC SOC. It currently

[PATCH v4 05/10] pc-bios: Add AST27x0 vBootrom

2025-04-16 Thread Jamin Lin via
The boot ROM is a minimal implementation designed to load an AST27x0 boot image. Its source code is available at: https://github.com/google/vbootrom Signed-off-by: Jamin Lin Reviewed-by: Nabih Estefan Tested-by: Nabih Estefan --- MAINTAINERS | 1 + pc-bios/README

[PATCH v4 06/10] hw/arm/aspeed: Add support for loading vbootrom image via "-bios"

2025-04-16 Thread Jamin Lin via
Introduce "aspeed_load_vbootrom()" to support loading a virtual boot ROM image into the vbootrom memory region, using the "-bios" command-line option. Signed-off-by: Jamin Lin Reviewed-by: Nabih Estefan Tested-by: Nabih Estefan --- include/hw/arm/aspeed.h | 1 + hw/arm/aspeed.c | 36 +

[PATCH v4 09/10] tests/functional/aspeed: Add to test vbootrom for AST2700

2025-04-16 Thread Jamin Lin via
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. Signed-off-by: Jamin Lin --- tests/functional/test_aar

[PATCH v4 10/10] docs/system/arm/aspeed: Support vbootrom for AST2700

2025-04-16 Thread Jamin Lin via
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. Signed-off-by: Jamin Lin Reviewed-by: Nabih Estefan --- docs/system/arm/aspeed.rst | 29 - 1 file changed, 28 insertio

[PATCH v4 02/10] hw/arm/aspeed_ast27x0 Introduce vbootrom memory region

2025-04-16 Thread Jamin Lin via
Introduce a new vbootrom memory region. The region is mapped at address "0x" 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 th

[PATCH v4 07/10] tests/functional/aspeed: Move I2C test into shared helper for AST2700 reuse

2025-04-16 Thread Jamin Lin via
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. Signed-off-by: Jamin Lin --- tests/functional/test_aarch64_aspeed.py | 28 + 1 f

[PATCH v4 08/10] tests/functional/aspeed: Update test ASPEED SDK v09.06

2025-04-16 Thread Jamin Lin via
Signed-off-by: Jamin Lin --- tests/functional/test_aarch64_aspeed.py | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/functional/test_aarch64_aspeed.py b/tests/functional/test_aarch64_aspeed.py index 441f7f3919..337d701917 100755 --- a/tests/functi

[PATCH v4 04/10] hw/arm/aspeed: Reuse rom_size variable for vbootrom setup

2025-04-16 Thread Jamin Lin via
Move the declaration of "rom_size" to an outer scope in aspeed_machine_init() so it can be reused for setting up the vbootrom region as well. This avoids introducing a redundant local variable and ensures consistent ROM sizing logic when both SPI boot and vbootrom are used. Signed-off-by: Jamin L

[PATCH v6 6/6] docs/system/arm/aspeed: Support vbootrom for AST2700

2025-04-24 Thread Jamin Lin via
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. Signed-off-by: Jamin Lin Reviewed-by: Nabih Estefan Reviewed-by: Cédric Le Goater --- docs/system/arm/aspeed.rst | 29 +++

[PATCH v6 1/6] hw/arm/aspeed_ast27x0 Introduce vbootrom memory region

2025-04-24 Thread Jamin Lin via
Introduce a new vbootrom memory region. The region is mapped at address "0x" 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 th

[PATCH v6 5/6] docs/system/arm/aspeed: move AST2700 content to new section

2025-04-24 Thread Jamin Lin via
Moved AST2700-related content from the general Aspeed board list into a dedicated section for Aspeed 2700 family boards. Improves clarity and readability. Signed-off-by: Jamin Lin --- docs/system/arm/aspeed.rst | 70 ++ 1 file changed, 63 insertions(+), 7 dele

[PATCH v6 2/6] pc-bios: Add AST27x0 vBootrom

2025-04-24 Thread Jamin Lin via
The boot ROM is a minimal implementation designed to load an AST27x0 boot image. Its source code is available at: https://github.com/google/vbootrom Commit id: 82bed5ca62295228ea7bcdc721b63db178f686e8 Signed-off-by: Jamin Lin Reviewed-by: Nabih Estefan Tested-by: Nabih Estefan --- MAINTAINERS

[PATCH v6 0/6] Support vbootrom for AST2700

2025-04-24 Thread Jamin Lin via
v1: Add initial support for AST27x0 The purpose of vbootrom here is to simulate the work of BootMCU SPL (riscv) in AST2700, because QEMU doesn't support heterogenous architecture yet. ast27x0_bootrom.bin is a simplified, free (Apache 2.0) boot ROM for ASPEED AST27x0 BMC SOC. It currently

[PATCH v6 4/6] tests/functional/aspeed: Add to test vbootrom for AST2700

2025-04-24 Thread Jamin Lin via
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. Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater

[PATCH v6 3/6] hw/arm/aspeed: Add support for loading vbootrom image via "-bios"

2025-04-24 Thread Jamin Lin via
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 t

[PATCH v7 0/1] Support vbootrom for AST2700

2025-04-28 Thread Jamin Lin via
v1: Add initial support for AST27x0 The purpose of vbootrom here is to simulate the work of BootMCU SPL (riscv) in AST2700, because QEMU doesn't support heterogenous architecture yet. ast27x0_bootrom.bin is a simplified, free (Apache 2.0) boot ROM for ASPEED AST27x0 BMC SOC. It currently

[PATCH v7 1/1] pc-bios: Add AST27x0 vBootrom

2025-04-28 Thread Jamin Lin via
The boot ROM is a minimal implementation designed to load an AST27x0 boot image. Its source code is available at: https://github.com/google/vbootrom Commit id: d6e3386709b3e49322a94ffadc2aaab9944ab77b Build Information: ``` Build Date : Apr 29 2025 01:23:18 FW Version : git-d6e3386 ``` Signed-off-

[PATCH v8 1/1] pc-bios: Add AST27x0 vBootrom

2025-04-28 Thread Jamin Lin via
The boot ROM is a minimal implementation designed to load an AST27x0 boot image. Its source code is available at: https://github.com/google/vbootrom Commit id: d6e3386709b3e49322a94ffadc2aaab9944ab77b Build Information: ``` Build Date : Apr 29 2025 01:23:18 FW Version : git-d6e3386 ``` Signed-off-

[PATCH v8 0/1] Support vbootrom for AST2700

2025-04-28 Thread Jamin Lin via
v1: Add initial support for AST27x0 The purpose of vbootrom here is to simulate the work of BootMCU SPL (riscv) in AST2700, because QEMU doesn't support heterogenous architecture yet. ast27x0_bootrom.bin is a simplified, free (Apache 2.0) boot ROM for ASPEED AST27x0 BMC SOC. It currently

[PATCH v4 10/23] hw/intc/aspeed: Add support for multiple output pins in INTC

2025-03-03 Thread Jamin Lin via
Added support for multiple output pins in the INTC controller to accommodate the AST2700 A1. Introduced "num_outpins" to represent the number of output pins. Updated the IRQ handling logic to initialize and connect output pins separately from input pins. Modified the "aspeed_soc_ast2700_realize" f

[PATCH v4 06/23] hw/arm/aspeed: Rename IRQ table and machine name for AST2700 A0

2025-03-03 Thread Jamin Lin via
Currently, AST2700 SoC only supports A0. To support AST2700 A1, rename its IRQ table and machine name. To follow the machine deprecation rule, the initial machine "ast2700-evb" is aliased to "ast2700a0-evb." In the future, we will alias "ast2700-evb" to new SoCs, such as "ast2700a1-evb." Signed-o

[PATCH v4 04/23] hw/intc/aspeed: Introduce helper functions for enable and status registers

2025-03-03 Thread Jamin Lin via
The behavior of the enable and status registers is almost identical between INTC(CPU Die) and INTCIO(IO Die). To reduce duplicated code, adds "aspeed_intc_enable_handler" functions to handle enable register write behavior and "aspeed_intc_status_handler" functions to handle status register write be

[PATCH v4 23/23] docs/specs: Add aspeed-intc

2025-03-03 Thread Jamin Lin via
Add AST2700 INTC design guidance and its block diagram. Signed-off-by: Jamin Lin --- docs/specs/aspeed-intc.rst | 136 + docs/specs/index.rst | 1 + 2 files changed, 137 insertions(+) create mode 100644 docs/specs/aspeed-intc.rst diff --git a/docs/sp

[PATCH v4 20/23] tests/functional/aspeed: Introduce start_ast2700_test API and update hwmon path

2025-03-03 Thread Jamin Lin via
Added a new method "start_ast2700_test" to the "AST2x00MachineSDK" class and this method centralizes the logic for starting the AST2700 test, making it reusable for different test cases. Modified the hwmon path to use a wildcard to handle different SDK versions: "cat /sys/bus/i2c/devices/1-004d/hw

[PATCH v4 05/23] hw/intc/aspeed: Add object type name to trace events for better debugging

2025-03-03 Thread Jamin Lin via
Currently, these trace events only refer to INTC. To simplify the INTC model, both INTC(CPU Die) and INTCIO(IO Die) will share the same helper functions. However, it is difficult to recognize whether these trace events are comes from INTC or INTCIO. To make these trace events more readable, adds o

[PATCH v4 18/23] hw/arm/aspeed_ast27x0: Support two levels of INTC controllers for AST2700 A1

2025-03-03 Thread Jamin Lin via
The design of INTC controllers has significantly changed in AST2700 A1. There are a total of 480 interrupt sources in AST2700 A1. For interrupt numbers from 0 to 127, they can route directly to PSP, SSP, and TSP. Due to the limitation of interrupt numbers of processors, the interrupts are merged e

[PATCH v4 01/23] hw/intc/aspeed: Support setting different memory size

2025-03-03 Thread Jamin Lin via
According to the AST2700 datasheet, the INTC(CPU DIE) controller has 16KB (0x4000) of register space, and the INTCIO (I/O DIE) controller has 1KB (0x400) of register space. Introduced a new class attribute "mem_size" to set different memory sizes for the INTC models in AST2700. Signed-off-by: Jam

[PATCH v4 15/23] hw/intc/aspeed: Add Support for AST2700 INTCIO Controller

2025-03-03 Thread Jamin Lin via
Introduce a new ast2700 INTCIO class to support AST2700 INTCIO. Added new register definitions for INTCIO, including enable and status registers for IRQs GICINT192 through GICINT197. Created a dedicated IRQ array for INTCIO, supporting six input pins and six output pins, aligning with the newly def

[PATCH v4 00/23] Support AST2700 A1

2025-03-03 Thread Jamin Lin via
v1: 1. Refactor INTC model to support both INTC0 and INTC1. 2. Support AST2700 A1. 3. Create ast2700a0-evb machine. v2: To streamline the review process, split the following patch series into three parts. https://patchwork.kernel.org/project/qemu-devel/cover/20250121070424.2465942-1-jam

[PATCH v4 09/23] hw/intc/aspeed: Rename num_ints to num_inpins for clarity

2025-03-03 Thread Jamin Lin via
To support AST2700 A1, some registers of the INTC(CPU Die) support one input pin to multiple output pins. Renamed "num_ints" to "num_inpins" in the INTC controller code for better clarity and consistency in naming conventions. Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater --- include/h

[PATCH v4 07/23] hw/arm/aspeed_ast27x0: Sort the IRQ table by IRQ number

2025-03-03 Thread Jamin Lin via
To improve readability, sort the IRQ table by IRQ number. Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater --- hw/arm/aspeed_ast27x0.c | 50 - 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/hw/arm/aspeed_ast27x0.c b/hw/arm/aspeed_as

[PATCH v4 11/23] hw/intc/aspeed: Refactor INTC to support separate input and output pin indices

2025-03-03 Thread Jamin Lin via
Refactors the INTC to distinguish between input and output pin indices, improving interrupt handling clarity and accuracy. Updated the functions to handle both input and output pin indices. Added detailed logging for input and output pin indices in trace events. These changes ensure that the INTC

[PATCH v4 14/23] hw/intc/aspeed: Add Support for Multi-Output IRQ Handling

2025-03-03 Thread Jamin Lin via
This update introduces support for handling multi-output IRQs in the AST2700 interrupt controller (INTC), specifically for GICINT192_201. GICINT192_201 maps 1:10 to input IRQ 0 and output IRQs 0 to 9. Each status bit corresponds to a specific IRQ. Implemented "aspeed_intc_set_irq_handler_multi_out

[PATCH v4 12/23] hw/intc/aspeed: Introduce AspeedINTCIRQ structure to save the irq index and register address

2025-03-03 Thread Jamin Lin via
The INTC controller supports GICINT128 to GICINT136, mapping 1:1 to input and output IRQs 0 to 8. Previously, the formula "address & 0x0f00" was used to derive the IRQ index numbers. However, the INTC controller also supports GICINT192_201, mapping 1 input IRQ pin to 10 output IRQ pins. The pin nu

<    1   2   3   4   5   6   7   >