coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
Go to the source code of this file.
Macros | |
#define | res_printk(depth, str, ...) printk(BIOS_DEBUG, "%*c"str, depth, ' ', __VA_ARGS__) |
Functions | |
static resource_t | round (resource_t val, unsigned long pow) |
Round a number up to an alignment. More... | |
static const char * | resource2str (const struct resource *res) |
static bool | dev_has_children (const struct device *dev) |
static void | update_bridge_resource (const struct device *bridge, struct resource *bridge_res, unsigned long type_match, int print_depth) |
static void | compute_bridge_resources (const struct device *bridge, unsigned long type_match, int print_depth) |
static void | compute_domain_resources (const struct device *domain) |
static unsigned char | get_alignment_by_resource_type (const struct resource *res) |
static bool | is_resource_invalid (const struct resource *res) |
static void | initialize_domain_io_resource_memranges (struct memranges *ranges, const struct resource *res, unsigned long memrange_type) |
static void | initialize_domain_mem_resource_memranges (struct memranges *ranges, const struct resource *res, unsigned long memrange_type) |
static void | initialize_domain_memranges (struct memranges *ranges, const struct resource *res, unsigned long memrange_type) |
static void | initialize_bridge_memranges (struct memranges *ranges, const struct resource *res, unsigned long memrange_type) |
static void | print_resource_ranges (const struct device *dev, const struct memranges *ranges) |
static void | allocate_child_resources (struct bus *bus, struct memranges *ranges, unsigned long type_mask, unsigned long type_match) |
static void | update_constraints (struct memranges *ranges, const struct device *dev, const struct resource *res) |
static void | avoid_fixed_resources (struct memranges *ranges, const struct device *dev, unsigned long mask_match) |
static void | constrain_domain_resources (const struct device *domain, struct memranges *ranges, unsigned long type) |
static void | setup_resource_ranges (const struct device *dev, const struct resource *res, unsigned long type, struct memranges *ranges) |
static void | cleanup_resource_ranges (const struct device *dev, struct memranges *ranges, const struct resource *res) |
static void | allocate_bridge_resources (const struct device *bridge) |
static const struct resource * | find_domain_resource (const struct device *domain, unsigned long type) |
static void | allocate_domain_resources (const struct device *domain) |
void | allocate_resources (const struct device *root) |
#define res_printk | ( | depth, | |
str, | |||
... | |||
) | printk(BIOS_DEBUG, "%*c"str, depth, ' ', __VA_ARGS__) |
Definition at line 37 of file resource_allocator_v4.c.
Definition at line 511 of file resource_allocator_v4.c.
References allocate_child_resources(), bridge, bus::children, cleanup_resource_ranges(), dev_has_children(), resource::flags, IORESOURCE_BRIDGE, IORESOURCE_PREFETCH, IORESOURCE_TYPE_MASK, resource::next, setup_resource_ranges(), device::sibling, and resource::size.
Referenced by allocate_domain_resources().
|
static |
Definition at line 365 of file resource_allocator_v4.c.
References resource::align, resource::base, BIOS_DEBUG, BIOS_ERR, dev_path(), resource::flags, resource::index, IORESOURCE_ASSIGNED, largest_resource(), resource::limit, memranges_steal(), NULL, printk, resource2str(), and resource::size.
Referenced by allocate_bridge_resources(), and allocate_domain_resources().
Definition at line 569 of file resource_allocator_v4.c.
References allocate_bridge_resources(), allocate_child_resources(), bus::children, cleanup_resource_ranges(), dev_has_children(), find_domain_resource(), IORESOURCE_ABOVE_4G, IORESOURCE_IO, IORESOURCE_MEM, IORESOURCE_TYPE_MASK, device::link_list, setup_resource_ranges(), and device::sibling.
Referenced by allocate_resources().
Definition at line 658 of file resource_allocator_v4.c.
References allocate_domain_resources(), BIOS_INFO, bus::children, compute_domain_resources(), dev_path(), DEVICE_PATH_DOMAIN, device::link_list, NULL, device::path, post_log_path(), printk, device::sibling, and device_path::type.
|
static |
Definition at line 417 of file resource_allocator_v4.c.
References bus::children, bus::dev, resource::flags, device::link_list, resource::next, NULL, device::resource_list, device::sibling, and update_constraints().
Referenced by constrain_domain_resources().
|
static |
Definition at line 488 of file resource_allocator_v4.c.
References resource::align, resource::base, BIOS_DEBUG, bus::dev, dev_path(), resource::gran, resource::limit, memranges_teardown(), printk, resource2str(), and resource::size.
Referenced by allocate_bridge_resources(), and allocate_domain_resources().
|
static |
Definition at line 151 of file resource_allocator_v4.c.
References bridge, bus::children, dev_has_children(), resource::flags, IORESOURCE_BRIDGE, IORESOURCE_PREFETCH, IORESOURCE_TYPE_MASK, resource::next, device::sibling, and update_bridge_resource().
Referenced by compute_domain_resources().
Definition at line 197 of file resource_allocator_v4.c.
References bus::children, compute_bridge_resources(), dev_has_children(), IORESOURCE_IO, IORESOURCE_MEM, IORESOURCE_PREFETCH, device::link_list, NULL, and device::sibling.
Referenced by allocate_resources().
|
static |
Definition at line 438 of file resource_allocator_v4.c.
References avoid_fixed_resources(), IORESOURCE_FIXED, IORESOURCE_IO, memranges_create_hole(), and type.
Referenced by setup_resource_ranges().
Definition at line 31 of file resource_allocator_v4.c.
References bus::children, bus::dev, and device::link_list.
Referenced by allocate_bridge_resources(), allocate_domain_resources(), compute_bridge_resources(), and compute_domain_resources().
|
static |
Definition at line 542 of file resource_allocator_v4.c.
References resource::flags, IORESOURCE_FIXED, IORESOURCE_TYPE_MASK, resource::next, NULL, device::resource_list, and type.
Referenced by allocate_domain_resources().
Definition at line 218 of file resource_allocator_v4.c.
References die(), resource::flags, IORESOURCE_IO, and IORESOURCE_MEM.
Referenced by initialize_bridge_memranges(), and initialize_domain_memranges().
|
static |
Definition at line 330 of file resource_allocator_v4.c.
References resource::base, get_alignment_by_resource_type(), is_resource_invalid(), resource::limit, memranges_init_empty_with_alignment(), memranges_insert(), and NULL.
Referenced by setup_resource_ranges().
|
static |
Definition at line 237 of file resource_allocator_v4.c.
References resource::base, resource::limit, and memranges_insert().
Referenced by initialize_domain_memranges().
|
static |
Definition at line 244 of file resource_allocator_v4.c.
References resource::base, IORESOURCE_ABOVE_4G, resource::limit, memranges_insert(), and MIN.
Referenced by initialize_domain_memranges().
|
static |
Definition at line 302 of file resource_allocator_v4.c.
References resource::flags, get_alignment_by_resource_type(), initialize_domain_io_resource_memranges(), initialize_domain_mem_resource_memranges(), IORESOURCE_IO, is_resource_invalid(), memranges_init_empty_with_alignment(), and NULL.
Referenced by setup_resource_ranges().
Definition at line 232 of file resource_allocator_v4.c.
References resource::flags, IORESOURCE_ASSIGNED, and NULL.
Referenced by initialize_bridge_memranges(), and initialize_domain_memranges().
|
static |
Definition at line 343 of file resource_allocator_v4.c.
References BIOS_INFO, dev_path(), memranges_each_entry, memranges_is_empty(), printk, range_entry_base(), range_entry_size(), and range_entry_tag().
Referenced by setup_resource_ranges().
|
static |
Definition at line 20 of file resource_allocator_v4.c.
References resource::flags, IORESOURCE_IO, IORESOURCE_MEM, and IORESOURCE_PREFETCH.
Referenced by allocate_child_resources(), cleanup_resource_ranges(), setup_resource_ranges(), update_bridge_resource(), and update_constraints().
|
static |
Round a number up to an alignment.
val | The starting value. |
pow | Alignment as a power of two. |
Definition at line 15 of file resource_allocator_v4.c.
References ALIGN_UP, POWER_OF_2, and val.
Referenced by update_bridge_resource().
|
static |
Definition at line 471 of file resource_allocator_v4.c.
References resource::align, resource::base, BIOS_DEBUG, constrain_domain_resources(), bus::dev, dev_path(), DEVICE_PATH_DOMAIN, resource::gran, initialize_bridge_memranges(), initialize_domain_memranges(), resource::limit, device::path, print_resource_ranges(), printk, resource2str(), resource::size, device_path::type, and type.
Referenced by allocate_bridge_resources(), and allocate_domain_resources().
|
static |
Definition at line 50 of file resource_allocator_v4.c.
References resource::align, base, bridge, dev_path(), resource::flags, resource::gran, resource::index, IORESOURCE_ABOVE_4G, IORESOURCE_PREFETCH, IORESOURCE_TYPE_MASK, largest_resource(), resource::limit, NULL, res_printk, resource2str(), round(), and resource::size.
Referenced by compute_bridge_resources().
|
static |
Definition at line 395 of file resource_allocator_v4.c.
References resource::base, BIOS_DEBUG, dev_path(), resource::index, memranges_create_hole(), printk, resource2str(), and resource::size.
Referenced by avoid_fixed_resources().