summaryrefslogtreecommitdiff
path: root/drivers/firmware/efi/fdtparams.c
AgeCommit message (Collapse)AuthorFilesLines
2020-02-23efi/arm: Rewrite FDT param discovery routinesArd Biesheuvel1-121/+89
The efi_get_fdt_params() routine uses the early OF device tree traversal helpers, that iterate over each node in the DT and invoke a caller provided callback that can inspect the node's contents and look for the required data. This requires a special param struct to be passed around, with pointers into param enumeration structs that contain (and duplicate) property names and offsets into yet another struct that carries the collected data. Since we know the data we look for is either under /hypervisor/uefi or under /chosen, it is much simpler to use the libfdt routines, and just try to grab a reference to either node directly, and read each property in sequence. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2020-02-23efi/arm: Move FDT specific definitions into fdtparams.cArd Biesheuvel1-7/+23
Push the FDT params specific types and definition into fdtparams.c, and instead, pass a reference to the memory map data structure and populate it directly, and return the system table address as the return value. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2020-02-23efi/arm: Move FDT param discovery code out of efi.cArd Biesheuvel1-0/+142
On ARM systems, we discover the UEFI system table address and memory map address from the /chosen node in the device tree, or in the Xen case, from a similar node under /hypervisor. Before making some functional changes to that code, move it into its own file that only gets built if CONFIG_EFI_PARAMS_FROM_FDT=y. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>