Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:setup_cmdline

Proto:static int setup_cmdline(struct kimage *image, struct boot_params *params, unsigned long bootparams_load_addr, unsigned long cmdline_offset, char *cmdline, unsigned long cmdline_len)

Type:int

Parameter:

TypeParameterName
struct kimage *image
struct boot_params *params
unsigned longbootparams_load_addr
unsigned longcmdline_offset
char *cmdline
unsigned longcmdline_len
72  cmdline_ptr = params + cmdline_offset
73  len = 0
76  If Flags to indicate special processing == KEXEC_TYPE_CRASH Then
77  len = sprintf(cmdline_ptr, "elfcorehdr=0x%lx ", elf_load_addr)
80  memcpy(cmdline_ptr + len, cmdline, cmdline_len)
81  cmdline_len += len
83  cmdline_ptr[cmdline_len - 1] = '\0'
85  pr_debug("Final command line is: %s\n", cmdline_ptr)
86  cmdline_ptr_phys = bootparams_load_addr + cmdline_offset
87  cmdline_low_32 = cmdline_ptr_phys & 0xffffffffUL
88  cmdline_ext_32 = cmdline_ptr_phys >> 32
90  cmd_line_ptr = cmdline_low_32
91  If cmdline_ext_32 Then 0x0c8 = cmdline_ext_32
94  Return 0
Caller
NameDescribe
bzImage64_load