On Thu, 20 Feb 2025, Bernhard Beschow wrote:
Am 13. Februar 2025 00:13:24 UTC schrieb BALATON Zoltan <bala...@eik.bme.hu>:
Yes, your DTB based board code is a nice way to create different
machines as the DTB already describes these offsets and irq connections
and your code seems to be quite simple so I think it's a good idea
that's worth pursuing, that could enhance the ppce500 machine and make
it more generic. It could then also drop the separate mpc85xx machine
and put all of these under one ppce500 machine with passing the right
dtb to create the different machines. As long as these are similar
enough and only differ in the devices they have, this could emulate a
lot of these SoCs with the same code.
The existing machines can already be created from a DTB, see the pc-bios
folder which contains the two respective .dts files.
That's why I said that once this is merged we could deprecate the existing
machines in favour of ppc500 with the dts for these machines replacing
them so we can get rid of board codes and can add new machines like p1022
by adding the needed devices and the dts also under ppce500 which can
become a generic machine supporting all of these. One could then use -M
ppce500 -dtb mpc85xx.dtb or p1022.dtb or similar. This would work for all
dtbs that we have devices for and maybe by adding unimplemented device for
unknown ones would allow somewhat booting other machines as long as those
devices are not use. Or if keeping a machine for the -M option for all of
these is desired then we can think of adding some other kind of alias that
can set the dtb for the ppce500 and call that. But in any case this would
reduce the mpc85xx to a trivial wrapper of ppce500 that just sets the dtb
for the machine.
Thanks for your input, I'll look into it closer after my RFC. Right now
I'm quite busy driving the i.MX 8M Plus machine forward, hence my
delayed responses.
What I may contribute is new device emulation for missing parts. I have
some dummy sata that does nothing but allows the Linux driver to pass
detecting no devices, a half working DIU I made in the last few days
that needs more work but I got some image from U-Boot on it and may
look at the DMA controller in the future. Let me know if you're
interested in these or have something for these or other parts I could
use instead. I've tested your SPI flash implementation but it wasn't
working with U-Boot for me and may look at your USB eventually.
Your additions sound promising! And thanks for testing the devices.
I also got distracted with other machines so I've postponed this for now
but want to get back to it eventually.
Regards,
BALATON Zoltan