Add support for reserved regions to resources and coreboot tables.
Signed-off-by: Myles Watson <mylesgw@gmail.com> Acked-by: Myles Watson <mylesgw@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5795 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
@@ -488,6 +488,20 @@ static struct lb_memory *build_lb_mem(struct lb_header *head)
|
||||
return mem;
|
||||
}
|
||||
|
||||
static void lb_add_rsvd_range(void *gp, struct device *dev, struct resource *res)
|
||||
{
|
||||
struct lb_memory *mem = gp;
|
||||
lb_add_memory_range(mem, LB_MEM_RESERVED, res->base, res->size);
|
||||
}
|
||||
|
||||
static void add_lb_reserved(struct lb_memory *mem)
|
||||
{
|
||||
/* Add reserved ranges */
|
||||
search_global_resources(
|
||||
IORESOURCE_MEM | IORESOURCE_RESERVE, IORESOURCE_MEM | IORESOURCE_RESERVE,
|
||||
lb_add_rsvd_range, mem);
|
||||
}
|
||||
|
||||
#if CONFIG_WRITE_HIGH_TABLES == 1
|
||||
extern uint64_t high_tables_base, high_tables_size;
|
||||
#endif
|
||||
@@ -562,6 +576,9 @@ unsigned long write_coreboot_table(
|
||||
high_tables_base, high_tables_size);
|
||||
#endif
|
||||
|
||||
/* Add reserved regions */
|
||||
add_lb_reserved(mem);
|
||||
|
||||
#if (CONFIG_HAVE_MAINBOARD_RESOURCES == 1)
|
||||
add_mainboard_resources(mem);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user