x86: Support MTRRs of 4GB on 32-bit machines

Use the 64-bit function to detect a power-of-two. This allows use of
a full 4GB MTRR on 32-bit machines.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-02-16 06:47:11 -07:00
parent 3b3607e577
commit 2b5821219d

View File

@@ -195,7 +195,7 @@ int mtrr_add_request(int type, uint64_t start, uint64_t size)
if (!gd->arch.has_mtrr)
return -ENOSYS;
if (!is_power_of_2(size))
if (!is_power_of_2_u64(size))
return -EINVAL;
if (gd->arch.mtrr_req_count == MAX_MTRR_REQUESTS)