From 27d6299d51744bda549b7764b8fde909ad812e33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Tue, 24 May 2022 20:25:58 +0300 Subject: device/resource: Add _kb postfix for resource allocators MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/64658 Reviewed-by: Werner Zeh Reviewed-by: Arthur Heymans Tested-by: build bot (Jenkins) --- src/northbridge/intel/pineview/northbridge.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/northbridge/intel/pineview') diff --git a/src/northbridge/intel/pineview/northbridge.c b/src/northbridge/intel/pineview/northbridge.c index 9e272235d2..4a5a91823d 100644 --- a/src/northbridge/intel/pineview/northbridge.c +++ b/src/northbridge/intel/pineview/northbridge.c @@ -35,8 +35,8 @@ static void add_fixed_resources(struct device *dev, int index) | IORESOURCE_STORED | IORESOURCE_ASSIGNED; - mmio_resource(dev, index++, legacy_hole_base_k, (0xc0000 / KiB) - legacy_hole_base_k); - reserved_ram_resource(dev, index++, 0xc0000 / KiB, (0x100000 - 0xc0000) / KiB); + mmio_resource_kb(dev, index++, legacy_hole_base_k, (0xc0000 / KiB) - legacy_hole_base_k); + reserved_ram_resource_kb(dev, index++, 0xc0000 / KiB, (0x100000 - 0xc0000) / KiB); } static void mch_domain_read_resources(struct device *dev) @@ -98,12 +98,12 @@ static void mch_domain_read_resources(struct device *dev) printk(BIOS_DEBUG, "Unused RAM between cbmem_top and TOMK: 0x%xK\n", delta_cbmem); /* Report the memory regions */ - ram_resource(dev, index++, 0, 0xa0000 / KiB); - ram_resource(dev, index++, 1 * MiB / KiB, tomk - 1 * MiB / KiB); - mmio_resource(dev, index++, tseg_basek, tseg_sizek); - mmio_resource(dev, index++, gtt_basek, gsm_sizek); - mmio_resource(dev, index++, igd_basek, gms_sizek); - reserved_ram_resource(dev, index++, cbmem_topk, delta_cbmem); + ram_resource_kb(dev, index++, 0, 0xa0000 / KiB); + ram_resource_kb(dev, index++, 1 * MiB / KiB, tomk - 1 * MiB / KiB); + mmio_resource_kb(dev, index++, tseg_basek, tseg_sizek); + mmio_resource_kb(dev, index++, gtt_basek, gsm_sizek); + mmio_resource_kb(dev, index++, igd_basek, gms_sizek); + reserved_ram_resource_kb(dev, index++, cbmem_topk, delta_cbmem); /* * If > 4GB installed then memory from TOLUD to 4GB @@ -111,7 +111,7 @@ static void mch_domain_read_resources(struct device *dev) */ touud >>= 10; /* Convert to KB */ if (touud > top32memk) { - ram_resource(dev, index++, top32memk, touud - top32memk); + ram_resource_kb(dev, index++, top32memk, touud - top32memk); printk(BIOS_INFO, "Available memory above 4GB: %lluM\n", (touud - top32memk) / KiB); } -- cgit v1.2.3