x86: Set the DRAM banks to reflect real location
authorSimon Glass <sjg@chromium.org>
Sat, 7 Dec 2019 04:42:11 +0000 (21:42 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Sun, 15 Dec 2019 03:44:15 +0000 (11:44 +0800)
commitea4e97a511483dfd61b1417f935a7ed97e5565f9
treeb6a97a608ae8abf4986a686a0262b1fe245d2076
parent22e0de355196f809d74bdc0c6e0e2c689caa515b
x86: Set the DRAM banks to reflect real location

At present with fsp a single DRAM bank is added which extends to the
whole size of memory. However there is typically only 2GB of memory
available below the 4GB boundary, and this is what is used by U-Boot while
running in 32-bit mode.

Scan the tables to set the banks correct. The first bank is set to memory
below 4GB, and the rest of memory is put into subsequent banks.

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