17 static unsigned char mac[6] = { 0x70, 0xb3, 0xd5, 0x92, 0xf0, 0x00 };
19 mac[5] |= (
serial >> 0) & 0xff;
20 mac[4] |= (
serial >> 8) & 0xff;
21 mac[3] |= (
serial >> 16) & 0xff;
29 const char *
name =
"local-mac-address";
44 u64 addrs[1], sizes[1];
45 addrs[0] = 0x80000000;
53 const char *
name =
"device_type";
54 const char *
value =
"memory";
77 if (fdt_rom ==
NULL) {
93 printk(
BIOS_ERR,
"Unable to allocate memory for flat device tree\n");
100 for (
int i = 0; i < CONFIG_MAX_CPUS; i++)
size_t sdram_size_mb(void)
static void * cbfs_map(const char *name, size_t *size_out)
#define printk(level,...)
void dt_add_bin_prop(struct device_tree_node *node, const char *name, void *data, size_t size)
uint32_t dt_flat_size(const struct device_tree *tree)
void dt_flatten(const struct device_tree *tree, void *dest)
struct device_tree * fdt_unflatten(const void *blob)
void dt_add_reg_prop(struct device_tree_node *node, u64 *addrs, u64 *sizes, int count, u32 addr_cells, u32 size_cells)
static void do_fixup_mac(struct device_tree_node *node)
static void fixup_memory(struct device_tree_node *parent)
static void fixup_fdt(void *unused)
static void fixup_mac(struct device_tree_node *parent)
BOOT_STATE_INIT_ENTRY(BS_WRITE_TABLES, BS_ON_EXIT, fixup_fdt, NULL)
static void do_fixup_memory(struct device_tree_node *node)
void * malloc(size_t size)
#define list_for_each(ptr, head, member)
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
u32 otp_read_serial(void)
int strcmp(const char *s1, const char *s2)
struct list_node children
struct list_node properties
struct device_tree_node * root