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:13
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__e820__range_update

Proto:static u64 __init __e820__range_update(struct e820_table *table, u64 start, u64 size, enum e820_type old_type, enum e820_type new_type)

Type:u64

Parameter:

TypeParameterName
struct e820_table *table
u64start
u64size
enum e820_typeold_type
enum e820_typenew_type
453  real_updated_size = 0
455  BUG_ON(old_type == new_type)
457  If size > ULLONG_MAX - start Then size = ULLONG_MAX - start
460  end = start + size
461  printk(debug-level messages "e820: update [mem %#010Lx-%#010Lx] ", start, end - 1)
462  e820_print_type(old_type)
463  Like KERN_CONT, pr_cont() should only be used when continuing* a line with no newline ('\n') enclosed. Otherwise it defaults* back to KERN_DEFAULT.(" ==> ")
464  e820_print_type(new_type)
465  Like KERN_CONT, pr_cont() should only be used when continuing* a line with no newline ('\n') enclosed. Otherwise it defaults* back to KERN_DEFAULT.("\n")
467  When i < nr_entries cycle
468  entry = entries[i]
472  If type != old_type Then Continue
475  entry_end = addr + size
478  If addr >= start && entry_end <= end Then
479  type = new_type
481  Continue
485  If addr < start && entry_end > end Then
488  size = start - addr
490  Continue
494  final_start = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(start, addr)
495  final_end = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(end, entry_end)
496  If final_start >= final_end Then Continue
499  Add a memory region to the kernel E820 map.
501  real_updated_size += final_end - final_start
507  size -= final_end - final_start
508  If addr < final_start Then Continue
511  addr = final_end
513  Return real_updated_size
Caller
NameDescribe
e820__range_update
e820__range_update_kexec