CBMEM: Clarify CBMEM_TOP_BACKUP function usage
The deprecated LATE_CBMEM_INIT function is renamed: set_top_of_ram -> set_late_cbmem_top Obscure term top_of_ram is replaced: backup_top_of_ram -> backup_top_of_low_cacheable get_top_of_ram -> restore_top_of_low_cacheable New function that always resolves to CBMEM top boundary, with or without SMM, is named restore_cbmem_top(). Change-Id: I61d20f94840ad61e9fd55976e5aa8c27040b8fb7 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/19377 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com>
This commit is contained in:
@@ -92,7 +92,7 @@ static void pci_domain_set_resources(device_t dev)
|
||||
(remaplimitk + 64*1024) - remapbasek);
|
||||
}
|
||||
|
||||
set_top_of_ram(tolmk * 1024);
|
||||
set_late_cbmem_top(tolmk * 1024);
|
||||
}
|
||||
assign_resources(dev->link_list);
|
||||
}
|
||||
|
@@ -1892,10 +1892,10 @@ void e7505_mch_init(const struct mem_controller *memctrl)
|
||||
sdram_enable(memctrl);
|
||||
}
|
||||
|
||||
unsigned long get_top_of_ram(void)
|
||||
uintptr_t restore_top_of_low_cacheable(void)
|
||||
{
|
||||
u32 tolm = (pci_read_config16(MCHDEV, TOLM) & ~0x7ff) << 16;
|
||||
return (unsigned long) tolm;
|
||||
return tolm;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -119,7 +119,7 @@ static void pci_domain_set_resources(device_t dev)
|
||||
(remaplimitk + 64*1024) - remapbasek);
|
||||
}
|
||||
|
||||
set_top_of_ram(tolmk * 1024);
|
||||
set_late_cbmem_top(tolmk * 1024);
|
||||
}
|
||||
assign_resources(dev->link_list);
|
||||
}
|
||||
|
@@ -67,7 +67,7 @@ static void i440bx_domain_set_resources(device_t dev)
|
||||
ram_resource(dev, idx++, 0, 640);
|
||||
ram_resource(dev, idx++, 768, tolmk - 768);
|
||||
|
||||
set_top_of_ram(tomk * 1024);
|
||||
set_late_cbmem_top(tomk * 1024);
|
||||
}
|
||||
assign_resources(dev->link_list);
|
||||
}
|
||||
|
@@ -107,7 +107,7 @@ static void mc_read_resources(device_t dev)
|
||||
resource->flags = IORESOURCE_MEM | IORESOURCE_RESERVE |
|
||||
IORESOURCE_FIXED | IORESOURCE_STORED | IORESOURCE_ASSIGNED;
|
||||
|
||||
set_top_of_ram(tolm);
|
||||
set_late_cbmem_top(tolm);
|
||||
}
|
||||
|
||||
static struct pci_operations intel_pci_ops = {
|
||||
|
@@ -118,7 +118,7 @@ static void pci_domain_set_resources(device_t dev)
|
||||
ram_resource(dev, idx++, 768, tomk - 768);
|
||||
uma_resource(dev, idx++, uma_memory_base >> 10, uma_memory_size >> 10);
|
||||
|
||||
set_top_of_ram(tomk_stolen * 1024);
|
||||
set_late_cbmem_top(tomk_stolen * 1024);
|
||||
|
||||
assign_resources(dev->link_list);
|
||||
}
|
||||
|
@@ -87,7 +87,7 @@ static void pci_domain_set_resources(device_t dev)
|
||||
|
||||
assign_resources(dev->link_list);
|
||||
|
||||
set_top_of_ram(tomk_stolen * 1024);
|
||||
set_late_cbmem_top(tomk_stolen * 1024);
|
||||
}
|
||||
|
||||
static struct device_operations pci_domain_ops = {
|
||||
|
@@ -101,7 +101,7 @@ static void pci_domain_set_resources(device_t dev)
|
||||
/* ram_resource(dev, idx++, 1024, tolmk - 1024); */
|
||||
ram_resource(dev, idx++, 768, tolmk - 768);
|
||||
|
||||
set_top_of_ram(tomk * 1024);
|
||||
set_late_cbmem_top(tomk * 1024);
|
||||
}
|
||||
assign_resources(dev->link_list);
|
||||
}
|
||||
|
Reference in New Issue
Block a user