Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:parse_memmap_one

Proto:static int __init parse_memmap_one(char *p)

Type:int

Parameter:

TypeParameterName
char *p
909  If Not p Then Return -EINVAL
912  If Not strncmp(p, "exactmap", 8) Then
921  nr_entries = 0
922  userdef = 1
923  Return 0
926  oldp = p
927  mem_size = memparse - parse a string with mem suffixes into a number*@ptr: Where parse begins*@retptr: (output) Optional pointer to next char after parse completes* Parses a string into a number. The number stored at @ptr is
928  If p == oldp Then Return -EINVAL
931  userdef = 1
932  If p == '@' Then
933  start_at = memparse - parse a string with mem suffixes into a number*@ptr: Where parse begins*@retptr: (output) Optional pointer to next char after parse completes* Parses a string into a number. The number stored at @ptr is
934  e820__range_add(start_at, mem_size, E820_TYPE_RAM)
935  Else if p == '#' Then
936  start_at = memparse - parse a string with mem suffixes into a number*@ptr: Where parse begins*@retptr: (output) Optional pointer to next char after parse completes* Parses a string into a number. The number stored at @ptr is
937  e820__range_add(start_at, mem_size, E820_TYPE_ACPI)
938  Else if p == '$' Then
939  start_at = memparse - parse a string with mem suffixes into a number*@ptr: Where parse begins*@retptr: (output) Optional pointer to next char after parse completes* Parses a string into a number. The number stored at @ptr is
940  e820__range_add(start_at, mem_size, E820_TYPE_RESERVED)
941  Else if p == '!' Then
942  start_at = memparse - parse a string with mem suffixes into a number*@ptr: Where parse begins*@retptr: (output) Optional pointer to next char after parse completes* Parses a string into a number. The number stored at @ptr is
943  e820__range_add(start_at, mem_size, E820_TYPE_PRAM)
944  Else if p == '%' Then
945  from = 0 , to = 0
947  start_at = memparse - parse a string with mem suffixes into a number*@ptr: Where parse begins*@retptr: (output) Optional pointer to next char after parse completes* Parses a string into a number. The number stored at @ptr is
948  If p == '-' Then from = simple_strtoull - convert a string to an unsigned long long*@cp: The start of the string*@endp: A pointer to the end of the parsed string will be placed here*@base: The number base to use* This function is obsolete. Please use kstrtoull instead.
950  If p == '+' Then to = simple_strtoull - convert a string to an unsigned long long*@cp: The start of the string*@endp: A pointer to the end of the parsed string will be placed here*@base: The number base to use
952  If p != '\0' Then Return -EINVAL
954  If from && to Then e820__range_update(start_at, mem_size, from, to)
956  Else if to Then e820__range_add(start_at, mem_size, to)
958  Else if from Then Remove a range of memory from the E820 table:
960  Else Remove a range of memory from the E820 table:
962  Else
963  Remove a range of memory from the E820 table:
966  Return If p == '\0' Then 0 Else -EINVAL
Caller
NameDescribe
parse_memmap_opt