|
28 | 28 | * the first 128 E820 memory entries in boot_params.e820_table and the remaining
|
29 | 29 | * (if any) entries of the SETUP_E820_EXT nodes. We use this to:
|
30 | 30 | *
|
31 |
| - * - inform the user about the firmware's notion of memory layout |
32 |
| - * via /sys/firmware/memmap |
33 |
| - * |
34 | 31 | * - the hibernation code uses it to generate a kernel-independent CRC32
|
35 | 32 | * checksum of the physical memory layout of a system.
|
36 | 33 | *
|
37 | 34 | * - 'e820_table_kexec': a slightly modified (by the kernel) firmware version
|
38 | 35 | * passed to us by the bootloader - the major difference between
|
39 |
| - * e820_table_firmware[] and this one is that, the latter marks the setup_data |
40 |
| - * list created by the EFI boot stub as reserved, so that kexec can reuse the |
41 |
| - * setup_data information in the second kernel. Besides, e820_table_kexec[] |
42 |
| - * might also be modified by the kexec itself to fake a mptable. |
| 36 | + * e820_table_firmware[] and this one is that e820_table_kexec[] |
| 37 | + * might be modified by the kexec itself to fake an mptable. |
43 | 38 | * We use this to:
|
44 | 39 | *
|
45 | 40 | * - kexec, which is a bootloader in disguise, uses the original E820
|
46 | 41 | * layout to pass to the kexec-ed kernel. This way the original kernel
|
47 | 42 | * can have a restricted E820 map while the kexec()-ed kexec-kernel
|
48 | 43 | * can have access to full memory - etc.
|
49 | 44 | *
|
| 45 | + * Export the memory layout via /sys/firmware/memmap. kexec-tools uses |
| 46 | + * the entries to create an E820 table for the kexec kernel. |
| 47 | + * |
| 48 | + * kexec_file_load in-kernel code uses the table for the kexec kernel. |
| 49 | + * |
50 | 50 | * - 'e820_table': this is the main E820 table that is massaged by the
|
51 | 51 | * low level x86 platform code, or modified by boot parameters, before
|
52 | 52 | * passed on to higher level MM layers.
|
@@ -1117,9 +1117,9 @@ void __init e820__reserve_resources(void)
|
1117 | 1117 | res++;
|
1118 | 1118 | }
|
1119 | 1119 |
|
1120 |
| - /* Expose the bootloader-provided memory layout to the sysfs. */ |
1121 |
| - for (i = 0; i < e820_table_firmware->nr_entries; i++) { |
1122 |
| - struct e820_entry *entry = e820_table_firmware->entries + i; |
| 1120 | + /* Expose the kexec e820 table to the sysfs. */ |
| 1121 | + for (i = 0; i < e820_table_kexec->nr_entries; i++) { |
| 1122 | + struct e820_entry *entry = e820_table_kexec->entries + i; |
1123 | 1123 |
|
1124 | 1124 | firmware_map_add_early(entry->addr, entry->addr + entry->size, e820_type_to_string(entry));
|
1125 | 1125 | }
|
|
0 commit comments