u-boot-brain/arch
Bin Meng 5ae5aa9310 x86: acpi: Fix Windows S3 resume failure
U-Boot sets up the real mode interrupt handler stubs starting from
address 0x1000. In most cases, the first 640K (0x00000 - 0x9ffff)
system memory is reported as system RAM in E820 table to the OS.
(see install_e820_map() implementation for each platform). So OS
can use these memories whatever it wants.

If U-Boot is in an S3 resume path, care must be taken not to corrupt
these memorie otherwise OS data gets lost. Testing shows that, on
Microsoft Windows 10 on Intel Baytrail its wake up vector happens to
be installed at the same address 0x1000. While on Linux its wake up
vector does not overlap this memory range, but after resume kernel
checks low memory range per config option CONFIG_X86_RESERVE_LOW
which is 64K by default to see whether a memory corruption occurs
during the suspend/resume (it's harmless, but warnings are shown
in the kernel dmesg logs).

We cannot simply mark the these memory as reserved in E820 table
because such configuration makes GRUB complain: unable to allocate
real mode page. Hence we choose to back up these memories to the
place where we reserved on our stack for our S3 resume work.
Before jumping to OS wake up vector, we need restore the original
content there.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Stefan Roese <sr@denx.de>
2017-05-17 17:11:46 +08:00
..
arc board_f: Rename initdram() to dram_init() 2017-04-13 09:40:57 -04:00
arm Merge branch 'master' of git://git.denx.de/u-boot-mmc 2017-05-16 08:10:50 -04:00
avr32 Remove various unused interrupt related code 2017-04-06 20:42:18 -04:00
m68k spi: Zap cf_qspi driver and related code 2017-01-15 18:29:04 +01:00
microblaze spl: make image arg or fdt blob address reconfigurable 2017-05-08 11:38:40 -04:00
mips boston: Setup memory ranges in FDT provided to Linux 2017-05-12 13:29:50 +02:00
nds32 Remove various unused interrupt related code 2017-04-06 20:42:18 -04:00
nios2 fdt: Move fdt_fixup_ethernet to a common place 2017-05-01 09:11:59 -04:00
powerpc Merge branch 'master' of git://git.denx.de/u-boot-i2c 2017-05-15 13:01:26 -04:00
sandbox dm: test: Add tests for the generic PHY uclass 2017-05-09 12:14:16 -06:00
sh sh: generate position independent code for all platforms 2016-12-02 21:32:54 -05:00
x86 x86: acpi: Fix Windows S3 resume failure 2017-05-17 17:11:46 +08:00
xtensa board_f: Rename initdram() to dram_init() 2017-04-13 09:40:57 -04:00
.gitignore .gitignore: drop include/asm/proc from ignore pattern 2014-06-19 11:18:54 -04:00
Kconfig Kconfig: USB: Migrate CONFIG_USB_EHCI_HCD users to Kconfig 2017-05-15 13:00:21 -04:00