coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
fit.h File Reference
#include <stddef.h>
#include <stdint.h>
#include <device_tree.h>
#include <list.h>
#include <program_loading.h>
Include dependency graph for fit.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  fit_image_node
 
struct  fit_config_node
 
struct  fit_overlay_chain
 

Functions

void fit_update_chosen (struct device_tree *tree, const char *cmd_line)
 
void fit_add_compat_string (const char *str)
 
void fit_update_memory (struct device_tree *tree)
 
bool fit_payload_arch (struct prog *payload, struct fit_config_node *config, struct region *kernel, struct region *fdt, struct region *initrd)
 
struct fit_config_nodefit_load (void *fit)
 
void fit_add_ramdisk (struct device_tree *tree, void *ramdisk_addr, size_t ramdisk_size)
 

Function Documentation

◆ fit_add_compat_string()

void fit_add_compat_string ( const char *  str)

Definition at line 322 of file fit.c.

References clean_compat_string(), compat_string_entry::compat_string, compat_strings, list_insert_after(), compat_string_entry::list_node, strdup(), and xzalloc.

Referenced by fit_add_default_compat_strings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fit_add_ramdisk()

void fit_add_ramdisk ( struct device_tree tree,
void ramdisk_addr,
size_t  ramdisk_size 
)

Definition at line 222 of file fit.c.

References dt_add_u64_prop(), dt_find_node(), NULL, and device_tree::root.

Referenced by fit_payload().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fit_load()

◆ fit_payload_arch()

bool fit_payload_arch ( struct prog payload,
struct fit_config_node config,
struct region kernel,
struct region fdt,
struct region initrd 
)

The kernel ARM documentation recommends loading the kernel above 32MiB in order to avoid the need to need to relocate prior to decompression.

The code assumes that bootmem_walk provides a sorted list of memory regions, starting from the lowest address. The order of the calls here doesn't matter, as the placement is enforced in the called functions. For details check code on top.

To ensure the fdt is not overwritten by the kernel decompressor, place the fdt above the 128 MB from the start of RAM, as recommended by the kernel documentation.

The code assumes that bootmem_walk provides a sorted list of memory regions, starting from the lowest address. The order of the calls here doesn't matter, as the placement is enforced in the called functions. For details check code on top.

NOTE: versions prior to v4.6 cannot make use of memory below the physical offset of the Image so it is recommended that the Image be placed as close as possible to the start of system RAM.

For kernel <v4.6 the INITRD and FDT can't be placed below the kernel. In that case set region offset to an address on top of kernel.

Definition at line 30 of file fit_payload.c.

References _dram, arg, BIOS_CRIT, BIOS_DEBUG, BM_MEM_PAYLOAD, bootmem_add_range(), bootmem_dump_ranges(), bootmem_walk(), config, decompress_kernel_header(), fit_place_kernel(), fit_place_mem(), get_kernel_size(), MiB, NULL, region::offset, printk, prog_set_entry(), scratch, and region::size.

Referenced by fit_payload().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fit_update_chosen()

void fit_update_chosen ( struct device_tree tree,
const char *  cmd_line 
)

Definition at line 213 of file fit.c.

References dt_add_string_prop(), dt_find_node(), NULL, and device_tree::root.

Referenced by fit_payload().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fit_update_memory()