crash.c (980621daf368f2b9aa69c7ea01baa654edb7577b) crash.c (3c88c692c28746473791276f8b42d2c989d6cbe6)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Architecture specific (i386/x86_64) functions for kexec based crash dumps.
4 *
5 * Created by: Hariprasad Nellitheertha (hari@in.ibm.com)
6 *
7 * Copyright (C) IBM Corporation, 2004. All rights reserved.
8 * Copyright (C) Red Hat Inc., 2014. All rights reserved.

--- 59 unchanged lines hidden (view full) ---

68 do_vmclear_operation();
69 rcu_read_unlock();
70}
71
72#if defined(CONFIG_SMP) && defined(CONFIG_X86_LOCAL_APIC)
73
74static void kdump_nmi_callback(int cpu, struct pt_regs *regs)
75{
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Architecture specific (i386/x86_64) functions for kexec based crash dumps.
4 *
5 * Created by: Hariprasad Nellitheertha (hari@in.ibm.com)
6 *
7 * Copyright (C) IBM Corporation, 2004. All rights reserved.
8 * Copyright (C) Red Hat Inc., 2014. All rights reserved.

--- 59 unchanged lines hidden (view full) ---

68 do_vmclear_operation();
69 rcu_read_unlock();
70}
71
72#if defined(CONFIG_SMP) && defined(CONFIG_X86_LOCAL_APIC)
73
74static void kdump_nmi_callback(int cpu, struct pt_regs *regs)
75{
76#ifdef CONFIG_X86_32
77 struct pt_regs fixed_regs;
78
79 if (!user_mode(regs)) {
80 crash_fixup_ss_esp(&fixed_regs, regs);
81 regs = &fixed_regs;
82 }
83#endif
84 crash_save_cpu(regs, cpu);
85
86 /*
87 * VMCLEAR VMCSs loaded on all cpus if needed.
88 */
89 cpu_crash_vmclear_loaded_vmcss();
90
91 /* Disable VMX or SVM if needed.

--- 284 unchanged lines hidden (view full) ---

376 walk_iomem_res_desc(IORES_DESC_ACPI_TABLES, flags, 0, -1, &cmd,
377 memmap_entry_callback);
378
379 /* Add ACPI Non-volatile Storage */
380 cmd.type = E820_TYPE_NVS;
381 walk_iomem_res_desc(IORES_DESC_ACPI_NV_STORAGE, flags, 0, -1, &cmd,
382 memmap_entry_callback);
383
76 crash_save_cpu(regs, cpu);
77
78 /*
79 * VMCLEAR VMCSs loaded on all cpus if needed.
80 */
81 cpu_crash_vmclear_loaded_vmcss();
82
83 /* Disable VMX or SVM if needed.

--- 284 unchanged lines hidden (view full) ---

368 walk_iomem_res_desc(IORES_DESC_ACPI_TABLES, flags, 0, -1, &cmd,
369 memmap_entry_callback);
370
371 /* Add ACPI Non-volatile Storage */
372 cmd.type = E820_TYPE_NVS;
373 walk_iomem_res_desc(IORES_DESC_ACPI_NV_STORAGE, flags, 0, -1, &cmd,
374 memmap_entry_callback);
375
384 /* Add e820 reserved ranges */
385 cmd.type = E820_TYPE_RESERVED;
386 flags = IORESOURCE_MEM;
387 walk_iomem_res_desc(IORES_DESC_RESERVED, flags, 0, -1, &cmd,
388 memmap_entry_callback);
389
390 /* Add crashk_low_res region */
391 if (crashk_low_res.end) {
392 ei.addr = crashk_low_res.start;
393 ei.size = crashk_low_res.end - crashk_low_res.start + 1;
394 ei.type = E820_TYPE_RAM;
395 add_e820_entry(params, &ei);
396 }
397

--- 94 unchanged lines hidden ---
376 /* Add crashk_low_res region */
377 if (crashk_low_res.end) {
378 ei.addr = crashk_low_res.start;
379 ei.size = crashk_low_res.end - crashk_low_res.start + 1;
380 ei.type = E820_TYPE_RAM;
381 add_e820_entry(params, &ei);
382 }
383

--- 94 unchanged lines hidden ---