函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:quick_pit_calibrate

函数原型:static unsigned long quick_pit_calibrate(void)

返回类型:unsigned long

参数:

525  如果非has_legacy_pic()则返回:0
529  Basic port I/O
540  Basic port I/O
543  Basic port I/O
544  Basic port I/O
552  This reads the current MSB of the PIT counter, and* checks if we are running on sufficiently fast and* non-virtualized hardware
554  如果pit_expect_msb(0xff, & tsc, & d1)则
555 i小于等于MAX_QUICK_PIT_ITERATIONS循环
556  如果非pit_expect_msb(0xff - i, & delta, & d2)则退出
559  delta减等于tsc
565  如果i恒等于1且d1d2大于等于deltaMAX_QUICK_PIT_ITERATIONS右移11位则返回:0
572  如果d1d2大于等于delta右移11位则继续下一循环
584  转到:success
587  打印信息("Fast TSC calibration failed\n")
588  返回:0
590  success :
604  delta乘等于The clock frequency of the i8253/i8254 PIT
605  do_div() is NOT a C function(delta, i * 256 * 1000)
606  打印信息("Fast TSC calibration using PIT\n")
607  返回:delta
调用者
名称描述
native_calibrate_cpu_earlyative_calibrate_cpu_early - can calibrate the cpu early in boot