diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2023-08-31 18:08:02 +0200 |
---|---|---|
committer | Lean Sheng Tan <sheng.tan@9elements.com> | 2024-01-12 09:46:24 +0000 |
commit | cf6d9ac22f2afd96b6f0b33cb67abb9a7828839d (patch) | |
tree | 457305ef4053449ad56c36c04bb35cd911de1389 /src/device/resource_allocator_v4.c | |
parent | e8cfb88d0c2e38671d41278eea7f3e27a45aea26 (diff) |
device/Kconfig: Add an option to allocate above 4G by default
Historically resource allocation in coreboot was 32bit x86 thing. To
remain compatible with this behavior (e.g. to keep 32bit payloads
happy), resource allocation limits resources to 32 bits unless
explicitly overridden. However this behavior is not always appropriate:
e.g. on non x86 platforms the PCIe mem decode window could be above 4G.
Another case on x86 is where the decode window(s) below 4G are not
adequate for fitting all resources and the payload is 64bit
capable (e.g. Linux).
This adds a Kconfig flag to override the behavior to limit resources to
32bit by default and to allocate resources according to the real
hardware limits.
TEST=intel/archercity CRB
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: I01218a8a3efc4a5f8ba344808949ca6b8898525f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78331
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Diffstat (limited to 'src/device/resource_allocator_v4.c')
-rw-r--r-- | src/device/resource_allocator_v4.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/device/resource_allocator_v4.c b/src/device/resource_allocator_v4.c index 96d44882ed..73ec9c1dba 100644 --- a/src/device/resource_allocator_v4.c +++ b/src/device/resource_allocator_v4.c @@ -84,6 +84,9 @@ static bool dev_has_children(const struct device *dev) static resource_t effective_limit(const struct resource *const res) { + if (CONFIG(ALWAYS_ALLOW_ABOVE_4G_ALLOCATION)) + return res->limit; + /* Always allow bridge resources above 4G. */ if (res->flags & IORESOURCE_BRIDGE) return res->limit; |