diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2021-06-28 21:43:31 +0300 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-07-05 13:08:34 +0000 |
commit | 0a18d64d00a9fcfd096c14f28e7b4d62bca0a829 (patch) | |
tree | c6574f70b348b215850e49f97236cd6038e31985 /src/soc/intel/common | |
parent | e0ddbbb0d2f14300eb08561a508d767d92a6201a (diff) |
nb,soc/intel: Handle upper RAM boundary
Change-Id: I2d99523647dfb43265db8f2701b525afd1870fc5
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55929
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/soc/intel/common')
-rw-r--r-- | src/soc/intel/common/block/systemagent/systemagent.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/soc/intel/common/block/systemagent/systemagent.c b/src/soc/intel/common/block/systemagent/systemagent.c index 04580c2569..1fbd8aa7f0 100644 --- a/src/soc/intel/common/block/systemagent/systemagent.c +++ b/src/soc/intel/common/block/systemagent/systemagent.c @@ -186,7 +186,7 @@ static void sa_get_mem_map(struct device *dev, uint64_t *values) */ static void sa_add_dram_resources(struct device *dev, int *resource_count) { - uintptr_t base_k, touud_k; + uintptr_t base_k; size_t size_k; uint64_t sa_map_values[MAX_MAP_ENTRIES]; uintptr_t top_of_ram; @@ -212,11 +212,7 @@ static void sa_add_dram_resources(struct device *dev, int *resource_count) mmio_resource_kb(dev, index++, base_k / KiB, size_k / KiB); /* 4GiB -> TOUUD */ - base_k = 4 * (GiB / KiB); /* 4GiB */ - touud_k = sa_map_values[SA_TOUUD_REG] / KiB; - size_k = touud_k - base_k; - if (touud_k > base_k) - ram_resource_kb(dev, index++, base_k, size_k); + upper_ram_end(dev, index++, sa_map_values[SA_TOUUD_REG]); /* * Reserve everything between A segment and 1MB: |