x86: fsp: Adjust calculations for MTRR range and DRAM top
authorSimon Glass <sjg@chromium.org>
Wed, 4 Nov 2020 16:57:43 +0000 (09:57 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Fri, 6 Nov 2020 01:51:33 +0000 (09:51 +0800)
commitd46c0932a9d4b2fcd8064f4567436f5143526147
tree2f6671099b494477adaec075059b1bb6430b0e4d
parentdd27cd6dab40765797962df500bda8eab6e665f5
x86: fsp: Adjust calculations for MTRR range and DRAM top

At present the top of available DRAM is the same as the top of the range
of the low-memory MTRR.

In fact, U-Boot is allowed to use memory up until the start of the FSP
reserved memory. Use that value for low_end, since it makes more memory
available.

Keep the same calculation as before for mtrr_top, i.e. the top of
reserved memory.

A side-effect of this change is that the E820 tables have a single entry
that extends from the bottom of the memory used by U-Boot to the bottom
of the FSP reserved memory. This includes the bloblist, if ACPI tables
are placed there.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/lib/fsp/fsp_dram.c