summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/e820
diff options
context:
space:
mode:
authorChen Yu <yu.c.chen@intel.com>2017-07-03 01:07:32 +0800
committerIngo Molnar <mingo@kernel.org>2017-07-05 10:09:02 +0200
commit12df216c61c89e31e27e74146115a9728880ca6f (patch)
tree7d6796254039017f002e28577fc83dd1f5eab09e /arch/x86/include/asm/e820
parenta09bae0f8aa08d4d76d0ebece26062a49ec51ac9 (diff)
downloadlinux-0-day-12df216c61c89e31e27e74146115a9728880ca6f.tar.gz
linux-0-day-12df216c61c89e31e27e74146115a9728880ca6f.tar.xz
x86/boot/e820: Introduce the bootloader provided e820_table_firmware[] table
Add the real e820_tabel_firmware[] that will not be modified by the kernel or the EFI boot stub under any circumstance. In addition to that modify the code so that e820_table_firmwarep[] is exposed via sysfs to represent the real firmware memory layout, rather than exposing the e820_table_kexec[] table. This fixes a hibernation bug/warning, which uses e820_table_kexec[] to check RAM layout consistency across hibernation/resume: The suspend kernel: [ 0.000000] e820: update [mem 0x76671018-0x76679457] usable ==> usable The resume kernel: [ 0.000000] e820: update [mem 0x7666f018-0x76677457] usable ==> usable ... [ 15.752088] PM: Using 3 thread(s) for decompression. [ 15.752088] PM: Loading and decompressing image data (471870 pages)... [ 15.764971] Hibernate inconsistent memory map detected! [ 15.770833] PM: Image mismatch: architecture specific data Actually it is safe to restore these pages because E820_TYPE_RAM and E820_TYPE_RESERVED_KERN are treated the same during hibernation, so the original e820 table provided by the bootloader is used for hibernation MD5 fingerprint checking. The side effect is that, this newly introduced variable might increase the kernel size at compile time. Suggested-by: Ingo Molnar <mingo@redhat.com> Signed-off-by: Chen Yu <yu.c.chen@intel.com> Cc: Dave Young <dyoung@redhat.com> Cc: Len Brown <lenb@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rafael J. Wysocki <rjw@rjwysocki.net> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Xunlei Pang <xlpang@redhat.com> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/e820')
-rw-r--r--arch/x86/include/asm/e820/api.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/e820/api.h b/arch/x86/include/asm/e820/api.h
index a688095421ab7..a504adc661a49 100644
--- a/arch/x86/include/asm/e820/api.h
+++ b/arch/x86/include/asm/e820/api.h
@@ -5,6 +5,7 @@
extern struct e820_table *e820_table;
extern struct e820_table *e820_table_kexec;
+extern struct e820_table *e820_table_firmware;
extern unsigned long pci_mem_start;