-----Original Message----- From: Udit Kumar [mailto:udit.kumar@nxp.com] Sent: Wednesday, May 02, 2018 12:26 PM To: Chang, Abner (HPS SW/FW Technologist) abner.chang@hpe.com; Alexander Graf agraf@suse.de; William Mills wmills@ti.com Cc: boot-architecture@lists.linaro.org; nd@arm.com; Rod Dorris rod.dorris@nxp.com; arm.ebbr-discuss@arm.com Subject: RE: DT handling, [Ref Linux-Efi]
We probably don't need to provide a genetic DT driver in UEFI U-Boot, instead, we will have to mention how SoC/platform vendors publish DTB/DTBO in EBBR spec. For example, The EFI_CONFIGURATION_TABLE in EFI System table could be used to publish the pointer to DTB and DTBO. Declare two GUIDs in EBBR, one for DTB another for DTBO. OS boot loader is responsible to merge DTB/DTBO according DTB/DTBO discovered in EFI Configuration Table. To read DT from EFI variable into memory, memory map to DT in EEPROM or other mechanisms is platform implementation. No matter which approach, DT producer has to create configuration table in EFI system table follow the data structure defined in EBBR. Another way instead of using GUID in configuration table is to publish DTB/DTBO in EFI device path, this way is more UEFI oriented IMO. However, we have to defined corresponding device path node in UEFI spec for DT. Similar to using system configuration table. DT producer has to install EFI device path for either DTB or DTBO. Then OS boot loaders locate those EFI device paths of DTB and DTBO and merge it.
We are adding a requirement on OS boot loaders to merge it. IMO, merging should be done by firmware itself. In case, we want to host multiple distribution at same time, then this is likely to go with OS boot loaders
That is fine to merge DT by firmware, we still can standardize how UBoot merges DT in EBBR. For example, SoC and other platform UBoot drivers produce their DT or DTO in their own drivers. UBoot provides a centralized EFI DT driver to collect DT/DTO from either EFI system configuration table or EFI device path. Then this centralized EFI DT driver produces the pointer to point to final DT in EFI system configuration table. OS boot loader cab just check EFI system configuration table to retrieve DT, something like this.
Abner