coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
fixup_fdt.c File Reference
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <console/console.h>
#include <soc/otp.h>
#include <soc/sdram.h>
#include <cbfs.h>
#include <device_tree.h>
#include <bootstate.h>
#include <mcall.h>
Include dependency graph for fixup_fdt.c:

Go to the source code of this file.

Functions

static void do_fixup_mac (struct device_tree_node *node)
 
static void fixup_mac (struct device_tree_node *parent)
 
static void do_fixup_memory (struct device_tree_node *node)
 
static void fixup_memory (struct device_tree_node *parent)
 
static void fixup_fdt (void *unused)
 
 BOOT_STATE_INIT_ENTRY (BS_WRITE_TABLES, BS_ON_EXIT, fixup_fdt, NULL)
 

Function Documentation

◆ BOOT_STATE_INIT_ENTRY()

BOOT_STATE_INIT_ENTRY ( BS_WRITE_TABLES  ,
BS_ON_EXIT  ,
fixup_fdt  ,
NULL   
)

◆ do_fixup_mac()

static void do_fixup_mac ( struct device_tree_node node)
static

Definition at line 14 of file fixup_fdt.c.

References dt_add_bin_prop(), otp_read_serial(), and serial.

Referenced by fixup_mac().

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

◆ do_fixup_memory()

static void do_fixup_memory ( struct device_tree_node node)
static

Definition at line 42 of file fixup_fdt.c.

References dt_add_reg_prop(), and sdram_size_mb().

Referenced by fixup_memory().

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

◆ fixup_fdt()

static void fixup_fdt ( void unused)
static

Definition at line 69 of file fixup_fdt.c.

References BIOS_ERR, cbfs_map(), dt_flat_size(), dt_flatten(), fdt_unflatten(), fixup_mac(), fixup_memory(), malloc(), NULL, OTHER_HLS, printk, and device_tree::root.

Here is the call graph for this function:

◆ fixup_mac()

static void fixup_mac ( struct device_tree_node parent)
static

Definition at line 26 of file fixup_fdt.c.

References device_tree_node::children, do_fixup_mac(), list_for_each, name, fdt_property::name, device_tree_property::prop, device_tree_node::properties, and strcmp().

Referenced by fixup_fdt().

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

◆ fixup_memory()

static void fixup_memory ( struct device_tree_node parent)
static

Definition at line 50 of file fixup_fdt.c.

References device_tree_node::children, fdt_property::data, do_fixup_memory(), list_for_each, name, fdt_property::name, device_tree_property::prop, device_tree_node::properties, strcmp(), and value.

Referenced by fixup_fdt().

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