Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Initialize the registers found in all CPUs, CR0 and CR4:

Proto:static void fpu__init_cpu_generic(void)

Type:void

Parameter:Nothing

20  cr4_mask = 0
22  If boot_cpu_has(FXSAVE/FXRSTOR, CR4.OSFXSR ) Then cr4_mask |= X86_CR4_OSFXSR
24  If boot_cpu_has("sse" ) Then cr4_mask |= X86_CR4_OSXMMEXCPT
26  If cr4_mask Then Set in this cpu's CR4.
29  cr0 = read_cr0()
30  cr0 &= ~(X86_CR0_TS | X86_CR0_EM)
31  If Not boot_cpu_has(Onboard FPU ) Then cr0 |= X86_CR0_EM
33  write_cr0(cr0)
41  asm volatile
Caller
NameDescribe
fpu__init_cpuEnable all supported FPU features. Called when a CPU is brought online: