[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [RFC PATCH v1] imagebuilder: Add a script to check the sanity of device tree
Hi Michal, On 01/09/2025 14:17, Orzel, Michal wrote: On 01/09/2025 14:31, Ayan Kumar Halder wrote:Xen gives a panic if certain nodes are not present in the device tree. In order to prevent this panic, scripts/dt_sanity.py is written so that it checks if the node/s are present. If the node/s are not present, the script gives an error. User is expected to run the script against the device tree before booting Xen with dtb.I would expect the script to know what to look for in a passed dtb. Otherwise it's just a script that searches for the list of specified compatibilities by the user. In other words, a simple grep would also do the job. I agree. The main idea is to check that a dt node with 'compatible="arm,gic-v3"' property is present. We can enhance the script as we go forward. Compatibility is not everything, there are other things that would prevent Xen from booting. Agreed. The rationale here is to shift the responsibility to the system integrator to run some validation so that Xen does not catch these errors. We wish to provide some sample tools to achieve this aim.Another category of errors are the unsupported register configurations. For eg gicv3_info.nr_lrs can be supported with a max value of 16. So if we have a baremetal program that user can execute before running Xen, then the user can catch these errors. If we are able to catch these errors outside of Xen, then we can claim such panic() will not be triggered in Xen. There will be certain assumptions to make like .... Also, often times the dtb is modified by the bootloader before passing control over to Xen (i.e. it may differ from the base dtb). bootloader is not expected to modify the nodes which are sanitised by the external tool. - Ayan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |