Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\hygon.c Create Date:2022-07-28 07:58:41
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:cpu_detect_tlb_hygon

Proto:static void cpu_detect_tlb_hygon(struct cpuinfo_x86 *c)

Type:void

Parameter:

TypeParameterName
struct cpuinfo_x86 *c
359  mask = 0xfff
361  If Max extended CPUID function supported: < 0x80000006 Then Return
364  cpuid(0x80000006, & eax, & ebx, & ecx, & edx)
366  tlb_lld_4k[ENTRIES] = ebx >> 16 & mask
367  tlb_lli_4k[ENTRIES] = ebx & mask
370  If Not ( eax >> 16 & mask) Then tlb_lld_2m[ENTRIES] = CPUID functions returning a single datum >> 16 & 0xff
372  Else tlb_lld_2m[ENTRIES] = eax >> 16 & mask
376  tlb_lld_4m[ENTRIES] = tlb_lld_2m[ENTRIES] >> 1
379  If Not (eax & mask) Then
380  cpuid(0x80000005, & eax, & ebx, & ecx, & edx)
381  tlb_lli_2m[ENTRIES] = eax & 0xff
382  Else tlb_lli_2m[ENTRIES] = eax & mask
385  tlb_lli_4m[ENTRIES] = tlb_lli_2m[ENTRIES] >> 1