Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\machine_kexec_32.c Create Date:2022-07-28 08:36:52
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Do not allocate memory (or fail in any way) in machine_kexec().* We are past the point of no return, committed to rebooting now.

Proto:void machine_kexec(struct kimage *image)

Type:void

Parameter:

TypeParameterName
struct kimage *image
178  asmlinkage unsigned long( * relocate_kernel_ptr)(unsigned long indirection_page, unsigned long control_page, unsigned long start_address, unsigned int has_pae, unsigned int preserve_context)
190  save_ftrace_enabled = Ftrace disable/restore without lock. Some synchronization mechanism* must be used to prevent ftrace_enabled to be changed between* disable/restore.
193  local_irq_disable()
194  hw_breakpoint_disable()
196  If preserve_context Then control_page = page_address(control_code_page)
210  memcpy(control_page, relocate_kernel, KEXEC_CONTROL_CODE_MAX_SIZE)
212  relocate_kernel_ptr = control_page
213  page_list[PA_CONTROL_PAGE] = __pa(control_page)
214  page_list[VA_CONTROL_PAGE] = control_page
215  page_list[PA_PGD] = __pa(pgd)
217  If Flags to indicate special processing == KEXEC_TYPE_DEFAULT Then page_list[PA_SWAP_PAGE] = page_to_pfn(swap_page) << PAGE_SHIFT determines the page size
231  load_segments()
236  dt_invalidate - Invalidate interrupt descriptor table*@addr: The virtual address of the 'invalid' IDT
237  set_gdt(phys_to_virt - map physical address to virtual*@address: address to remap* The returned virtual address is a current CPU mapping for* the memory address given. It is only valid to use this function on* addresses that have a kernel mapping, 0)
240  start = relocate_kernel_ptr((unsignedlong)head, (unsignedlong)page_list, start, boot_cpu_has(Physical Address Extensions ), preserve_context)
251  __ftrace_enabled_restore(save_ftrace_enabled)
Caller
NameDescribe
kernel_kexecMove into place and start executing a preloaded standalone* executable. If nothing was preloaded return an error.