aspeed: Add multi-SoC machine
Get series with b4
b4 am [email protected]Versions newest first
- v2 Latest8 patches 11 repliesIn review
Changes in v2 from the cover letter
- Rebased on upstream/master + v2 of Cedric's DRAM mapping change:
https://patchwork.ozlabs.org/project/qemu-devel/patch/[email protected]/
- Got rid of all the sysbus patches, not needed (I can send the dead code cleanup separately).
- Changed "system-memory" to "memory".
- Moved SoC unimplemented devices into AspeedSoCState, initialized and mapped them like normal peripheral devices.
- Added one more patch that removes 1 qemu_get_cpu call in aspeed_ast2600.c
- Kept the aspeed_board_init_flashes change: if you'd like, feel free to drop that patch and the one after it, I can work on refactoring them more to avoid that.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | aspeed: Set CPU memory property explicitlyhw/ hw/ | +4 | 3 replies | |
| 2/8 | aspeed: Add memory property to Aspeed SoChw/ hw/ hw/ +2 more | +17 | 1 reply | |
| 3/8 | aspeed: Remove usage of sysbus_mmio_maphw/ hw/ hw/ +1 more | +69 | 1 reply | |
| 4/8 | aspeed: Map unimplemented devices in SoC memoryhw/ hw/ hw/ +1 more | +56 | 1 reply | |
| 5/8 | aspeed: Remove use of qemu_get_cpuhw/ | +1 | 1 reply | |
| 6/8 | aspeed: Add fby35 skeletonMAINTAINERS hw/ hw/ | +57 | 1 reply | |
| 7/8 | aspeed: Make aspeed_board_init_flashes publichw/ hw/ include/ | +28 | 1 reply | |
| 8/8 | aspeed: Add AST2600 (BMC) to fby35hw/ | +39 | 2 replies |
Reviews trailers per patch
6 of 8 patches have a Reviewed-by or Acked-by.
| Patch | Cédric Le Goater |
|---|---|
| 1/8 | |
| 2/8 | R-b |
| 3/8 | R-b |
| 4/8 | R-b |
| 5/8 | R-b |
| 6/8 | R-b |
| 7/8 | R-b |
| 8/8 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/8] aspeed: Add multi-SoC machine
v2:
- Rebased on upstream/master + v2 of Cedric's DRAM mapping change:
https://patchwork.ozlabs.org/project/qemu-devel/patch/[email protected]/
- Got rid of all the sysbus patches, not needed (I can send the dead code cleanup separately).
- Changed "system-memory" to "memory".
- Moved SoC unimplemented devices into AspeedSoCState, initialized and mapped them like normal peripheral devices.
- Added one more patch that removes 1 qemu_get_cpu call in aspeed_ast2600.c
- Kept the aspeed_board_init_flashes change: if you'd like, feel free to drop that patch and the one after it, I can work on refactoring them more to avoid that.
A few problems I still have before I can add the additional SoC and fix the boot rom initialization:
1.
We want to use '-device loader' to load firmware into 0x0000_0000, but that's not really how the SoC works. The SoC reads from SPI flash. It would be great if I could do '-device loader,file=firmware,addr=0x2000_0000', and 0x2000_0000 is the firmware controller's mmio region and it would store the file into the SPI flash device and the boot ROM (0x0000_0000) automatically, but I don't think that's possible right?
It seems like what I'll need to do is make '-drive' the source of truth, and initialize the boot rom from that, similar to the existing code in aspeed.c with "write_boot_rom".
2.
Right now the SoC doesn't initialize the boot rom memory region, the machine does it. Perhaps I should fix that, like the DRAM change Cedric made?
3.
Each SoC creates its own SRAM memory with "memory_region_init_ram", so the machine doesn't know the name of it.
Memory regions like that need to have a unique name for vm migration, but each SoC just gives it a generic one, "aspeed.sram". If you try to run multiple SoC's, the names collide.
How is an SoC supposed to produce a unique name for each memory region it has, so that it doesn't collide with other SoC's?
Should the machine provide the SRAM region and select a name that doesn't collide with other SoC's in the machine?
That seems weird, because the SRAM is internal to the SoC. It has a size and mmio address that's internal to the SoC.
4.
Lastly, I don't know a good way to allocate serial devices to the SoC UART's.
Perhaps I can make each serial device specify the UART it should connect to? Like "-serial stdio,uart=bmc.uart5".
Maybe I can create a subclass of the normal serial devices for this?
I'm also not sure how the naming scheme would work. Probably just decided by the machine?
Note: I've reduced the number of emails cc'd in this series because I was having trouble with the mail filter at work. Hopefully this goes through properly.
Thanks,
Peter
Peter Delevoryas (8):
aspeed: Set CPU memory property explicitly
aspeed: Add memory property to Aspeed SoC
aspeed: Remove usage of sysbus_mmio_map
aspeed: Map unimplemented devices in SoC memory
aspeed: Remove use of qemu_get_cpu
aspeed: Add fby35 skeleton
aspeed: Make aspeed_board_init_flashes public
aspeed: Add AST2600 (BMC) to fby35
MAINTAINERS | 1 + hw/arm/aspeed.c | 29 ++-------- hw/arm/aspeed_ast10x0.c | 46 ++++++++------- hw/arm/aspeed_ast2600.c | 84 +++++++++++++++------------ hw/arm/aspeed_soc.c | 110 +++++++++++++++++++++++++++--------- hw/arm/fby35.c | 93 ++++++++++++++++++++++++++++++ hw/arm/meson.build | 3 +- include/hw/arm/aspeed_soc.h | 13 +++++ 8 files changed, 269 insertions(+), 110 deletions(-) create mode 100644 hw/arm/fby35.c
Signature · 1 line
2.30.2