u-boot-brain/arch/x86/include/asm
Simon Glass 65dd74a674 x86: ivybridge: Implement SDRAM init
Implement SDRAM init using the Memory Reference Code (mrc.bin) provided in
the board directory and the SDRAM SPD information in the device tree. This
also needs the Intel Management Engine (me.bin) to work. Binary blobs
everywhere: so far we have MRC, ME and microcode.

SDRAM init works by setting up various parameters and calling the MRC. This
in turn does some sort of magic to work out how much memory there is and
the timing parameters to use. It also sets up the DRAM controllers. When
the MRC returns, we use the information it provides to map out the
available memory in U-Boot.

U-Boot normally moves itself to the top of RAM. On x86 the RAM is not
generally contiguous, and anyway some RAM may be above 4GB which doesn't
work in 32-bit mode. So we relocate to the top of the largest block of
RAM we can find below 4GB. Memory above 4GB is accessible with special
functions (see physmem).

It would be possible to build U-Boot in 64-bit mode but this wouldn't
necessarily provide any more memory, since the largest block is often below
4GB. Anyway U-Boot doesn't need huge amounts of memory - even a very large
ramdisk seldom exceeds 100-200MB. U-Boot has support for booting 64-bit
kernels directly so this does not pose a limitation in that area. Also there
are probably parts of U-Boot that will not work correctly in 64-bit mode.
The MRC is one.

There is some work remaining in this area. Since memory init is very slow
(over 500ms) it is possible to save the parameters in SPI flash to speed it
up next time. Suspend/resume support is not fully implemented, or at least
it is not efficient.

With this patch, link boots to a prompt.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-11-21 07:34:15 +01:00
..
arch-coreboot x86: ivybridge: Add support for early GPIO init 2014-11-21 07:34:14 +01:00
arch-ivybridge x86: ivybridge: Implement SDRAM init 2014-11-21 07:34:15 +01:00
video x86: Rename i386 to x86 2011-04-13 19:43:28 +10:00
bitops.h x86: Add ilog2 to bitops 2012-11-28 11:40:03 -08:00
bootm.h x86: Move kernel boot function to arch/x86/lib/bootm.c 2014-10-28 20:43:58 -06:00
bootparam.h x86: Rename i386 to x86 2011-04-13 19:43:28 +10:00
byteorder.h x86: Rename i386 to x86 2011-04-13 19:43:28 +10:00
cache.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
config.h x86: ivybridge: Implement SDRAM init 2014-11-21 07:34:15 +01:00
control_regs.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cpu.h x86: Replace fill_processor_name() with cpu_get_name() 2014-11-21 07:24:12 +01:00
e820.h x86: Rename i386 to x86 2011-04-13 19:43:28 +10:00
errno.h x86: Rename i386 to x86 2011-04-13 19:43:28 +10:00
global_data.h x86: ivybridge: Implement SDRAM init 2014-11-21 07:34:15 +01:00
gpio.h x86: ivybridge: Add support for early GPIO init 2014-11-21 07:34:14 +01:00
i8254.h x86: Add quick TSC calibration via PIT 2014-11-21 07:24:10 +01:00
i8259.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
ibmpc.h dm: x86: Convert coreboot serial to use driver model 2014-10-23 19:45:45 -06:00
init_helpers.h x86: Remove unnecessary find_fdt(), prepare_fdt() functions 2014-11-21 07:24:12 +01:00
interrupt.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
io.h x86: Add clr/setbits functions 2014-11-21 07:34:13 +01:00
ioctl.h x86: Rename i386 to x86 2011-04-13 19:43:28 +10:00
ist.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
lapic_def.h x86: ivybridge: Add LAPIC support 2014-11-21 07:34:15 +01:00
lapic.h x86: ivybridge: Add LAPIC support 2014-11-21 07:34:15 +01:00
msr-index.h x86: Bring in msr-index.h from linux 3.8 2014-10-28 20:42:53 -06:00
msr.h x86: Add msr read/write functions that use a structure 2014-11-21 07:34:13 +01:00
mtrr.h x86: chromebook_link: Implement CAR support (cache as RAM) 2014-11-21 07:34:11 +01:00
pci.h x86: pci: Allow configuration before relocation 2014-11-21 07:34:12 +01:00
posix_types.h x86: Rename i386 to x86 2011-04-13 19:43:28 +10:00
post.h x86: ivybridge: Implement SDRAM init 2014-11-21 07:34:15 +01:00
processor-flags.h x86: Rename i386 to x86 2011-04-13 19:43:28 +10:00
processor.h x86: ivybridge: Perform initial CPU setup 2014-11-21 07:34:13 +01:00
ptrace.h x86: Rename i386 to x86 2011-04-13 19:43:28 +10:00
relocate.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
sections.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
string.h x86: Import glibc memcpy implementation 2012-01-02 03:58:46 +11:00
types.h Provide option to avoid defining a custom version of uintptr_t. 2014-10-27 11:04:01 -04:00
u-boot-x86.h x86: ivybridge: Implement SDRAM init 2014-11-21 07:34:15 +01:00
u-boot.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
unaligned.h x86: Rename i386 to x86 2011-04-13 19:43:28 +10:00
zimage.h x86: Move kernel boot function to arch/x86/lib/bootm.c 2014-10-28 20:43:58 -06:00