Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:cpu_detect_tlb_amd

Proto:static void cpu_detect_tlb_amd(struct cpuinfo_x86 *c)

Type:void

Parameter:

TypeParameterName
struct cpuinfo_x86 *c
1013  mask = 0xfff
1015  If CPU family < 0xf Then Return
1018  If Max extended CPUID function supported: < 0x80000006 Then Return
1021  cpuid(0x80000006, & eax, & ebx, & ecx, & edx)
1023  tlb_lld_4k[ENTRIES] = ebx >> 16 & mask
1024  tlb_lli_4k[ENTRIES] = ebx & mask
1030  If CPU family == 0xf Then
1031  cpuid(0x80000005, & eax, & ebx, & ecx, & edx)
1032  mask = 0xff
1036  If Not ( eax >> 16 & mask) Then tlb_lld_2m[ENTRIES] = CPUID functions returning a single datum >> 16 & 0xff
1038  Else tlb_lld_2m[ENTRIES] = eax >> 16 & mask
1042  tlb_lld_4m[ENTRIES] = tlb_lld_2m[ENTRIES] >> 1
1045  If Not (eax & mask) Then
1047  If CPU family == 0x15 && x86_model <= 0x1f Then
1048  tlb_lli_2m[ENTRIES] = 1024
1049  Else
1050  cpuid(0x80000005, & eax, & ebx, & ecx, & edx)
1051  tlb_lli_2m[ENTRIES] = eax & 0xff
1053  Else tlb_lli_2m[ENTRIES] = eax & mask
1056  tlb_lli_4m[ENTRIES] = tlb_lli_2m[ENTRIES] >> 1