函数逻辑报告 |
Source Code:arch\x86\kernel\cpu\mtrr\cleanup.c |
Create Date:2022-07-27 09:06:53 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:mtrr_trim_uncached_memory - trim RAM not covered by MTRRs*@end_pfn: ending page frame number* Some buggy BIOSes don't setup the MTRRs properly for systems with certain* memory configurations
函数原型:int __init mtrr_trim_uncached_memory(unsigned long end_pfn)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
unsigned long | end_pfn |
879 | highest_pfn等于0 |
889 | 如果非is_cpu(INTEL)或disable_mtrr_trim则返回:0 |
893 | def与等于0xff |
894 | 如果def不等于MTRR memory types, which are defined in SDM 则返回:0 |
898 | memset(range_state, 0, range_state的长度) |
899 | 以i小于num_var_ranges循环 |
907 | 以i小于num_var_ranges循环 |
909 | 如果type不等于MTRR_TYPE_WRBACK则继续下一循环 |
913 | 如果highest_pfn小于base加size则highest_pfn等于base加size |
918 | 如果非highest_pfn则 |
919 | 打印信息("CPU MTRRs all blank - virtualized system.\n") |
920 | 返回:0 |
925 | 以i小于num_var_ranges循环 |
927 | 如果type大于等于MTRR_NUM_TYPES则继续下一循环 |
930 | 如果非size则type等于MTRR_NUM_TYPES |
936 | 如果非num[MTRR_TYPE_WRBACK]则返回:0 |
940 | 如果num[MTRR_TYPE_WRBACK]加num[MTRR memory types, which are defined in SDM ]不等于num_var_ranges减num[MTRR_NUM_TYPES]则返回:0 |
945 | nr_range等于0 |
946 | 如果mtrr_tom2则 |
947 | start等于1ULL左移32减PAGE_SHIFT determines the page size 位 |
949 | 如果highest_pfn小于end则highest_pfn等于end |
951 | nr_range自加 |
953 | nr_range等于x86_get_mtrr_mem_range(range, nr_range, 0, 0) |
956 | total_trim_size等于0 |
957 | 如果start则total_trim_size加等于real_trim_memory(0, start) |
962 | 如果end小于start则total_trim_size加等于real_trim_memory(end, start) |
969 | 如果end小于end_pfn则total_trim_size加等于real_trim_memory(end, end_pfn) |
973 | 如果total_trim_size则 |
974 | 打印警告信息("WARNING: BIOS bug: CPU MTRRs don't cover all of memory, losing %lluMB of RAM.\n", total_trim_size >> 20) |
977 | 如果非changed_by_mtrr_cleanup则WARN_ON(1) |
980 | 打印信息("update e820 for mtrr\n") |
981 | e820__update_table_print() |
983 | 返回:1 |
986 | 返回:0 |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |