Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\kexec_file.c Create Date:2022-07-28 11:04:21
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:kexec_add_buffer - place a buffer in a kexec segment*@kbuf: Buffer contents and memory parameters.* This function assumes that kexec_mutex is held.* On successful return, @kbuf->mem will have the physical address of* the buffer in memory.

Proto:int kexec_add_buffer(struct kexec_buf *kbuf)

Type:int

Parameter:

TypeParameterName
struct kexec_buf *kbuf
668  If Not If set, we are using file mode kexec syscall Then Return -EINVAL
671  If nr_segments >= The artificial cap on the number of segments passed to kexec_load. Then Return -EINVAL
681  If Not list_empty - tests whether a list is empty*@head: the list to test. Then
682  WARN_ON(1)
683  Return -EINVAL
687  memsz = @a is a power of 2 value (memsz, PAGE_SIZE)
688  buf_align = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(buf_align, PAGE_SIZE)
691  ret = kexec_locate_mem_hole - find free memory for the purgatory or the next kernel*@kbuf: Parameters for the memory search.* On success, kbuf->mem will have the start address of the memory region found.* Return: 0 on success, negative errno on error.
692  If ret Then Return ret
696  ksegment = segment[nr_segments]
697  kbuf = buffer
698  bufsz = bufsz
699  mem = mem
700  memsz = memsz
701  nr_segments++
702  Return 0
Caller
NameDescribe
bzImage64_load
kexec_elf_loadkexec_elf_load - load ELF executable image*@lowest_load_addr: On return, will be the address where the first PT_LOAD* section will be loaded in memory.* Return:* 0 on success, negative value on failure.