On 15/01/2018 18:27, Jean-Christophe Dubois wrote: > Le 2018-01-15 14:45, Jean-Christophe Dubois a écrit : >> >> Note: For now I am not so much interested in the AMBA discovery as the >> type of software platform I am thinking about is embedded where the >> hardware is well known ahead of time. This discovery capability would >> make sense for more generic OS like linux or such. We cannot require >> all embedded OS to implement the AMBA discovery process. > > For the configurability of Qemu, I was thinking of using something similar to > the Qemu provided by Xilinx (http://www.wiki.xilinx.com/QEMU). Basically, you > provide a DTB file as a Qemu command line argument and Qemu will build the > various devices (including addresses and interrupts) based on the content of > this file. Then when running an OS, it can provide the DTB file (for example > to Linux) that match exactly the emulated platform. > > This should allow to build "any" variation of the platform and to add devices > as you need them. This makes sense for Xilinx (their customer are building > custom platforms) and it would also make sense for LEON as the CPU core is > usually integrated inside a custom SOC/FPGA. >
Makes sense, another intermediate solution is to add an argument to the function leon3_generic_hw_init(), A struct that specifies the address of the peripherals. That way it will be easy to add more machine definition without bringing more maintenance burden.