summaryrefslogtreecommitdiff
path: root/src/soc/amd/mendocino
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/amd/mendocino')
-rw-r--r--src/soc/amd/mendocino/root_complex.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/soc/amd/mendocino/root_complex.c b/src/soc/amd/mendocino/root_complex.c
index 5e1e11a431..cc21592e9e 100644
--- a/src/soc/amd/mendocino/root_complex.c
+++ b/src/soc/amd/mendocino/root_complex.c
@@ -163,28 +163,25 @@ static void read_resources(struct device *dev)
fixed_io_range_reserved(dev, idx++, PCI_IO_CONFIG_INDEX, PCI_IO_CONFIG_PORT_COUNT);
/* 0x0 - 0x9ffff */
- ram_resource_kb(dev, idx++, 0, 0xa0000 / KiB);
+ ram_range(dev, idx++, 0, 0xa0000);
/* 0xa0000 - 0xbffff: legacy VGA */
- mmio_resource_kb(dev, idx++, VGA_MMIO_BASE / KiB, VGA_MMIO_SIZE / KiB);
+ mmio_range(dev, idx++, VGA_MMIO_BASE, VGA_MMIO_SIZE);
/* 0xc0000 - 0xfffff: Option ROM */
- reserved_ram_resource_kb(dev, idx++, 0xc0000 / KiB, 0x40000 / KiB);
+ reserved_ram_from_to(dev, idx++, 0xc0000, 1 * MiB);
/* 1MiB - bottom of DRAM reserved for early coreboot usage */
- ram_resource_kb(dev, idx++, (1 * MiB) / KiB,
- (early_reserved_dram_start - (1 * MiB)) / KiB);
+ ram_from_to(dev, idx++, 1 * MiB, early_reserved_dram_start);
/* DRAM reserved for early coreboot usage */
- reserved_ram_resource_kb(dev, idx++, early_reserved_dram_start / KiB,
- (early_reserved_dram_end - early_reserved_dram_start) / KiB);
+ reserved_ram_from_to(dev, idx++, early_reserved_dram_start, early_reserved_dram_end);
/*
* top of DRAM consumed early - low top usable RAM
* cbmem_top() accounts for low UMA and TSEG if they are used.
*/
- ram_resource_kb(dev, idx++, early_reserved_dram_end / KiB,
- (mem_usable - early_reserved_dram_end) / KiB);
+ ram_from_to(dev, idx++, early_reserved_dram_end, mem_usable);
mmconf_resource(dev, idx++);
@@ -207,9 +204,9 @@ static void read_resources(struct device *dev)
continue; /* Done separately */
if (res->type == EFI_RESOURCE_SYSTEM_MEMORY)
- ram_resource_kb(dev, idx++, res->addr / KiB, res->length / KiB);
+ ram_range(dev, idx++, res->addr, res->length);
else if (res->type == EFI_RESOURCE_MEMORY_RESERVED)
- reserved_ram_resource_kb(dev, idx++, res->addr / KiB, res->length / KiB);
+ reserved_ram_range(dev, idx++, res->addr, res->length);
else
printk(BIOS_ERR, "Failed to set resources for type %d\n",
res->type);