函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:init_amd_k6

函数原型:static void init_amd_k6(struct cpuinfo_x86 *c)

返回类型:void

参数:

类型参数名称
struct cpuinfo_x86 *c
120  mbytes等于get_num_physpages()右移20减PAGE_SHIFT determines the page size
122  如果x86_model小于6则
124  如果x86_model恒等于0则
128  返回
131  如果x86_model恒等于6且x86_stepping恒等于1则
132  K6_BUG_LOOP等于1000000
137  打印信息("AMD K6 stepping B detected - ")
144  n等于K6_BUG_LOOP
145  f_vide等于B step AMD K6 before B 9730xxxx have hardware bugs that can cause* misexecution of code under Linux. Owners of such processors should* contact AMD for precise details and a CPU swap.* See http://www.multimania.com/poulot/k6bug.html* and section 2
146  Make the optimizer believe the variable can be manipulated arbitrarily. (f_vide)
147  d等于dtsc() - returns the current TSC without ordering constraints* rdtsc() returns the result of RDTSC as a 64-bit integer
148 n自减循环
149  f_vide()
150  d2等于dtsc() - returns the current TSC without ordering constraints* rdtsc() returns the result of RDTSC as a 64-bit integer
151  d等于d2d
153  如果d大于20乘K6_BUG_LOOP打印标准信息("system stability may be impaired when more than 32 MB are used.\n")
155  否则打印标准信息("probably OK (after B9730xxxx).\n")
160  如果x86_model小于8或x86_model恒等于8且x86_stepping小于8则
163  如果mbytes大于508则mbytes等于508
166  Access to machine-specific registers (available on 586 and better only)* Note: the rd* operations modify the parameters directly (without using* pointer indirection), this allows gcc to optimize better(K6 MSRs , l, h)
167  如果l按位与0x0000FFFF的值恒等于0则
169  l等于1左移0位按位或mbytes除4左移1位
171  wbinvd()
172  wrmsr(K6 MSRs , l, h)
174  打印信息("Enabling old style K6 write allocation for %d Mb\n", mbytes)
177  返回
180  如果x86_model恒等于8且x86_stepping大于7或x86_model恒等于9或x86_model恒等于13则
184  如果mbytes大于4092则mbytes等于4092
187  Access to machine-specific registers (available on 586 and better only)* Note: the rd* operations modify the parameters directly (without using* pointer indirection), this allows gcc to optimize better(K6 MSRs , l, h)
188  如果l按位与0xFFFF0000的值恒等于0则
190  l等于mbytes右移2位左移22位按位或1左移16位
192  wbinvd()
193  wrmsr(K6 MSRs , l, h)
195  打印信息("Enabling new style K6 write allocation for %d Mb\n", mbytes)
199  返回
202  如果x86_model恒等于10则
205  返回
调用者
名称描述
init_amd