Source file
src/internal/cpu/cpu_arm64_openbsd.go
1
2
3
4
5
6
7 package cpu
8
9 const (
10
11 _CTL_MACHDEP = 7
12
13
14 _CPU_ID_AA64ISAR0 = 2
15 _CPU_ID_AA64ISAR1 = 3
16 _CPU_ID_AA64PFR0 = 8
17 )
18
19
20 func sysctlUint64(mib []uint32) (uint64, bool)
21
22 func osInit() {
23
24 isar0, ok := sysctlUint64([]uint32{_CTL_MACHDEP, _CPU_ID_AA64ISAR0})
25 if !ok {
26 return
27 }
28
29 pfr0, ok := sysctlUint64([]uint32{_CTL_MACHDEP, _CPU_ID_AA64PFR0})
30 if !ok {
31 return
32 }
33
34 parseARM64SystemRegisters(isar0, pfr0)
35 }
36
View as plain text