diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2022-05-24 20:25:58 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2022-06-22 12:30:15 +0000 |
commit | 27d6299d51744bda549b7764b8fde909ad812e33 (patch) | |
tree | c30a57ff78e57c9c79a74c4b27cc6e5dfbc94a49 /src/mainboard/emulation/qemu-i440fx | |
parent | 37b161fb96c602765fef9f64415f809830b915a4 (diff) |
device/resource: Add _kb postfix for resource allocators
There is a lot of going back-and-forth with the KiB arguments, start
the work to migrate away from this.
Change-Id: I329864d36137e9a99b5640f4f504c45a02060a40
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64658
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/emulation/qemu-i440fx')
-rw-r--r-- | src/mainboard/emulation/qemu-i440fx/mainboard.c | 2 | ||||
-rw-r--r-- | src/mainboard/emulation/qemu-i440fx/northbridge.c | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/mainboard/emulation/qemu-i440fx/mainboard.c b/src/mainboard/emulation/qemu-i440fx/mainboard.c index a7c6b32598..13f0766f53 100644 --- a/src/mainboard/emulation/qemu-i440fx/mainboard.c +++ b/src/mainboard/emulation/qemu-i440fx/mainboard.c @@ -37,7 +37,7 @@ static void qemu_nb_read_resources(struct device *dev) if (CONFIG(ARCH_RAMSTAGE_X86_64)) { /* Reserve page tables in DRAM. FIXME: Remove once x86_64 page tables reside in CBMEM */ - reserved_ram_resource(dev, 0, CONFIG_ARCH_X86_64_PGTBL_LOC / KiB, + reserved_ram_resource_kb(dev, 0, CONFIG_ARCH_X86_64_PGTBL_LOC / KiB, (6 * 0x1000) / KiB); } } diff --git a/src/mainboard/emulation/qemu-i440fx/northbridge.c b/src/mainboard/emulation/qemu-i440fx/northbridge.c index b55ace0986..708e3a66ce 100644 --- a/src/mainboard/emulation/qemu-i440fx/northbridge.c +++ b/src/mainboard/emulation/qemu-i440fx/northbridge.c @@ -65,10 +65,10 @@ static void cpu_pci_domain_read_resources(struct device *dev) list[i].address, list[i].length); if (list[i].address == 0) { tomk = list[i].length / 1024; - ram_resource(dev, idx++, 0, 640); - ram_resource(dev, idx++, 768, tomk - 768); + ram_resource_kb(dev, idx++, 0, 640); + ram_resource_kb(dev, idx++, 768, tomk - 768); } else { - ram_resource(dev, idx++, + ram_resource_kb(dev, idx++, list[i].address / 1024, list[i].length / 1024); } @@ -99,10 +99,10 @@ static void cpu_pci_domain_read_resources(struct device *dev) printk(BIOS_DEBUG, "QEMU: cmos: %lu MiB RAM above 4G.\n", high / 1024); /* Report the memory regions. */ - ram_resource(dev, idx++, 0, 640); - ram_resource(dev, idx++, 768, tomk - 768); + ram_resource_kb(dev, idx++, 0, 640); + ram_resource_kb(dev, idx++, 768, tomk - 768); if (high) - ram_resource(dev, idx++, 4 * 1024 * 1024, high); + ram_resource_kb(dev, idx++, 4 * 1024 * 1024, high); } /* Reserve I/O ports used by QEMU */ @@ -119,10 +119,10 @@ static void cpu_pci_domain_read_resources(struct device *dev) } /* A segment is legacy VGA region */ - mmio_resource(dev, idx++, 0xa0000 / KiB, (0xc0000 - 0xa0000) / KiB); + mmio_resource_kb(dev, idx++, 0xa0000 / KiB, (0xc0000 - 0xa0000) / KiB); /* C segment to 1MB is reserved RAM (low tables) */ - reserved_ram_resource(dev, idx++, 0xc0000 / KiB, (1 * MiB - 0xc0000) / KiB); + reserved_ram_resource_kb(dev, idx++, 0xc0000 / KiB, (1 * MiB - 0xc0000) / KiB); if (q35 && ((tomk * 1024) < 0xb0000000)) { /* |