Hi Cédric, > Subject: Re: aspeed: Split the machine definition into individual source files > > On 10/16/25 04:30, Jamin Lin wrote: > > Hi all > > > >> Subject: aspeed: Split the machine definition into individual source > >> files > >> > >> Hi, > >> > >> This is a follow up of a private discussion with Patrick. > >> > >> Aspeed modeling started nearly 10y ago with the palmetto-bmc machine. > >> We now have 5 SoCs and 25 machines which are mostly defined in in a > >> single aspeed.c file. Multi SoC machines, fby35 and ast2700fc, are > >> defined in fby35.c and aspeed_ast27x0-fc.c respectively. > >> > >> Since we started separating the SoCs : > >> > >> hw/arm/aspeed_ast10x0.c > >> hw/arm/aspeed_ast2400.c > >> hw/arm/aspeed_ast2600.c > >> hw/arm/aspeed_ast27x0.c > >> hw/arm/aspeed_ast27x0-ssp.c > >> hw/arm/aspeed_ast27x0-tsp.c > >> > >> We could do the same for the machines keeping an 'aspeed_ast<rev>' > >> prefix (and maybe avoid the 'bmc' suffix). I think this would ease > >> introduction of new machines. We would be able to get rid of > >> aspeed_eeprom.[ch] and move machine custom data in the machine source > file. Which seems cleaner. > >> > >> Timing is about right for code reshuffling, still 3w before soft > >> freeze, no important changes inflight, but if we start doing this > >> conversion, we should do it for all. See the list below for the brave. > >> > >> Comments ? > >> > >> Thanks, > >> > >> C. > >> > >> > >> > >> * AST2400 > >> > >> palmetto-bmc > >> quanta-q71l-bmc > >> supermicrox11-bmc > >> > >> * AST2500 > >> > >> ast2500-evb > >> romulus-bmc > >> sonorapass-bmc > >> witherspoon-bmc > >> yosemitev2-bmc > >> supermicro-x11spi-bmc > >> fp5280g2-bmc > >> g220a-bmc > >> tiogapass-bmc > >> > >> * AST2600 > >> > >> ast2600-evb > >> qcom-dc-scm-v1-bmc > >> qcom-firework-bmc > >> rainier-bmc > >> fuji-bmc > >> bletchley-bmc > >> fby35-bmc (fby35.c should rename to > >> aspeed_ast2600-fby35.c) > >> > >> * AST2700 > >> > >> ast2700a0-evb > >> ast2700a1-evb > >> ast2700fc (aspeed_ast27x0-fc.c) > >> > >> * AST1030 > >> > >> ast1030-evb > > > > > > I’ve started working on this refactoring and have sent the first patch for > > the > AST1030: > > https://patchwork.kernel.org/project/qemu-devel/patch/20251015081219.2 > > [email protected]/ > > I’m doing this because I plan to add a new machine for the AST1060, and it > seems like a good opportunity to perform this cleanup first. > > I just want to make sure I’m moving in the right direction — could you > > please > help review it? > > > > If you agree with the following plan, I’ll create a new patch series to move > all existing machines into separate aspeed_ast<rev>_boards.c files: > > > Planned structure > > Create aspeed_ast10x0_boards.c > > ast1030-evb > > > > Create aspeed_ast2400_boards.c > > palmetto-bmc > > quanta-q71l-bmc > > supermicrox11-bmc > > > > Create aspeed_ast2500_boards.c > > (Or should these be grouped with aspeed_ast2400_boards.c? — I’d > > appreciate your thoughts.) > > no. I'd prefer keeping a consistent 'aspeed_ast<rev>' prefix. > > > ast2500-evb > > romulus-bmc > > sonorapass-bmc > > witherspoon-bmc > > yosemitev2-bmc > > supermicro-x11spi-bmc > > fp5280g2-bmc > > g220a-bmc > > tiogapass-bmc > > > > Create aspeed_ast2600_boards.c > > ast2600-evb > > qcom-dc-scm-v1-bmc > > qcom-firework-bmc > > rainier-bmc > > fuji-bmc > > bletchley-bmc > > > > Rename > > fby35.c -> aspeed_ast2600-fby35.c > > fby35-bmc > > > > Create aspeed_ast27x0_board.c > > ast2700a0-evb > > ast2700a1-evb > > > > Keep > > aspeed_ast27x0-fc.c > > ast2700fc > > > > > > One last question > > Do you think it’s better to: > > Create one commit per SoC generation (e.g. one for all AST2500-based > > machines), or Create one commit per board (e.g. one for ast2500-evb, > > one for romulus-bmc, etc.)? > > One per machine/board please. > > Initially, I thought we would introduce one 'aspeed_ast<rev>_<board>.c' > file per machine/board but that might be too intrusive. At the same time, it > would provide a clear view of how many boards QEMU models for each SoC > revision. What do you think ? > > > Eventually, file 'aspeed_eeprom.c' would be removed, so would file 'aspeed.c'. > 'aspeed_coprocessor_common.c' should probably be renamed. > File 'aspeed_soc_common.c' should become 'aspeed_common.c' probably. >
I plan to submit the following patch series to implement these changes. Patch series 1 hw/arm/aspeed_ast1030_evb.c (ast1030-evb) ---> or hw/arm/aspeed_ast10x0_evb.c, then we can place (ast1030-evb and ast1060-evb) hw/arm/aspeed_ast27x0_evb.c (ast2700a0-evb, ast2700a1-evb) Patch series 2 hw/arm/aspeed_ast2400_palmetto.c (palmetto-bmc) hw/arm/aspeed_ast2400_quanta-q71l.c (quanta-q71l-bmc) hw/arm/aspeed_ast2400_supermicrox11.c (supermicrox11-bmc) Patch series 3 hw/arm/aspeed_ast2500_evb.c (ast2500-evb) hw/arm/aspeed_ast2500_romulus.c (romulus-bmc) hw/arm/aspeed_ast2500_sonorapass.c (sonorapass-bmc) hw/arm/aspeed_ast2500_witherspoon.c (witherspoon-bmc) hw/arm/aspeed_ast2500_yosemitev2.c (yosemitev2-bmc) hw/arm/aspeed_ast2500_supermicro-x11spi.c (supermicro-x11spi-bmc) hw/arm/aspeed_ast2500_fp5280g2.c (fp5280g2-bmc) hw/arm/aspeed_ast2500_g220a.c (g220a-bmc) hw/arm/aspeed_ast2500_tiogapass.c (tiogapass-bmc) Patch series 4 hw/arm/aspeed_ast2600_evb.c (ast2600-evb) hw/arm/aspeed_ast2600_qcom-dc-scm-v1.c (qcom-dc-scm-v1-b mc) hw/arm/aspeed_ast2600_qcom-firework-bmc.c (qcom-firework-bmc) hw/arm/aspeed_ast2600_rainier.c (rainier-bmc) hw/arm/aspeed_ast2600_fuji.c (fuji-bmc) hw/arm/aspeed_ast2600_bletchley.c (bletchley-bmc) hw/arm/aspeed_ast2600_ fby35.c (fby35-bmc) For the FBY35 platform, since it includes both AST1030 and AST2600, we may consider renaming the file to: hw/arm/aspeed_ast1030_ast2600_fby35.c (hw/arm/fby35.c) We will keep the following file as is: hw/arm/aspeed_ast27x0-fc.c (ast2700fc) Thanks, Jamin > > Thanks, > > C. >
