函数逻辑报告 |
Source Code:arch\x86\kernel\cpu\mce\core.c |
Create Date:2022-07-27 09:01:22 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:The actual machine check handler. This only handles real* exceptions when something got corrupted coming in through int 18.* This is executed in NMI context not subject to normal locking rules. This* implies that most kernel services cannot be safely used
函数原型:void do_machine_check(struct pt_regs *regs, long error_code)
返回类型:void
参数:
类型 | 参数 | 名称 |
---|---|---|
struct pt_regs * | regs | |
long | error_code |
1231 | DECLARE_BITMAP(valid_banks, Maximum banks number.* This is the limit of the current register layout on* Intel CPUs.) |
1232 | DECLARE_BITMAP(toclear, Maximum banks number.* This is the limit of the current register layout on* Intel CPUs.) |
1235 | msg等于"Unknown" |
1237 | worst等于0 |
1243 | order等于负1 |
1249 | no_way_out等于0 |
1255 | kill_it等于0 |
1261 | lmce等于1 |
1271 | CPU time stamp counter 等于dtsc() - returns the current TSC without ordering constraints* rdtsc() returns the result of RDTSC as a 64-bit integer |
1273 | final等于this_cpu_ptr( & mces_seen) |
1276 | memset(valid_banks, 0, valid_banks的长度) |
1277 | no_way_out等于Do a quick check if any of the events requires a panic.* This decides if we keep the events around or clear them. |
1286 | 如果非Machine Check Global Status MSR 按位与start ip valid 的值则kill_it等于1 |
1293 | 如果Kernel's X86_VENDOR enum 恒等于X86_VENDOR_INTEL或Kernel's X86_VENDOR enum 恒等于X86_VENDOR_ZHAOXIN则lmce等于Machine Check Global Status MSR 按位与LMCE signaled |
1304 | 如果lmce则 |
1305 | 如果no_way_out则mce_panic("Fatal local machine check", & m, msg) |
1307 | 否则 |
1311 | __mc_scan_banks( & m, final, toclear, valid_banks, no_way_out, & worst) |
1313 | 如果非no_way_out则mce_clear_state(toclear) |
1320 | 如果非lmce则 |
1323 | 否则 |
1332 | 如果worst大于等于MCE_PANIC_SEVERITY且tolerant小于3则 |
1344 | 否则如果no_way_out则mce_panic("Fatal machine check on current CPU", & m, msg) |
1347 | 如果worst大于0则irq_work_queue( & mce_irq_work) |
1350 | mce_wrmsrl(MSR_IA32_MCG_STATUS, 0) |
1354 | 如果worst不等于MCE_AR_SEVERITY且非kill_it则转到:out_ist |
1358 | 如果Code segment 按位与3的值恒等于3则 |
1366 | 否则 |
1367 | 如果非fixup_exception(regs, X86_TRAP_MC, error_code, 0)则mce_panic("Failed kernel mode recovery", & m, NULL) |
1371 | out_ist : |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |