函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\e820.c Create Date:2022-07-27 08:42:55
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:e820__update_table

函数原型:int __init e820__update_table(struct e820_table *table)

返回类型:int

参数:

类型参数名称
struct e820_table *table
310  entries等于entries
311  max_nr_entries等于ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(entries)
318  如果nr_entries小于2则返回:负1
321  BUG_ON(nr_entries > max_nr_entries)
324 i小于nr_entries循环
325  如果addrsize小于addr则返回:负1
330 i小于2乘nr_entries循环change_point[i]等于change_point_list[i]
337  chg_idx等于0
338 i小于nr_entries循环
339  如果size不等于0则
346  chg_nr等于chg_idx
349  sort(change_point, chg_nr, change_point的长度, cpcompare, NULL)
352  overlap_entries等于0
353  new_nr_entries等于0
354  last_type等于0
355  last_addr等于0
358 chg_idx小于chg_nr循环
360  如果Address for this change point: 恒等于addr
363  否则
365 i小于overlap_entries循环
369  overlap_entries自减
376  current_type等于0
377 i小于overlap_entries循环
378  如果type大于current_typecurrent_type等于type
383  如果current_type不等于last_typecurrent_type恒等于E820_TYPE_PRAM
384  如果last_type不等于0则
387  如果size不等于0则如果new_nr_entries先自加大于等于max_nr_entries
390  退出
392  如果current_type不等于0则
397  last_type等于current_type
402  memcpy(entries, new_entries, new_nr_entries * entries的长度)
403  nr_entries等于new_nr_entries
405  返回:0
调用者
名称描述
setup_arch平台相关启动
e820__update_table_print
e820__update_table_kexec
e820__memory_setup_extendedBecause of the small fixed size of struct boot_params, only the first* 128 E820 memory entries are passed to the kernel via boot_params.e820_table,* the remaining (if any) entries are passed via the SETUP_E820_EXT node of
e820__reserve_setup_dataReserve all entries from the bootloader's extensible data nodes list,* because if present we are going to use it later on to fetch e820* entries from it:
e820__finish_early_paramsCalled after parse_early_param(), after early parameters (such as mem=)* have been processed, in which case we already have an E820 table filled in* via the parameter callback function(s), but it's not sorted and printed yet:
e820__memory_setup_defaultPass the firmware (bootloader) E820 map to the kernel and process it:
intel_graphics_stolen
trim_bios_range