Skip to content

Commit 47fe916

Browse files
cpu: add support for DIT detection
Change-Id: I9f0991da9684ebd297e40a754e34130c418c34d0 Reviewed-on: https://go-review.googlesource.com/c/sys/+/597377 Reviewed-by: Ian Lance Taylor <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent 4cafe5c commit 47fe916

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

cpu/cpu.go

+1
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ var ARM64 struct {
105105
HasSVE bool // Scalable Vector Extensions
106106
HasSVE2 bool // Scalable Vector Extensions 2
107107
HasASIMDFHM bool // Advanced SIMD multiplication FP16 to FP32
108+
HasDIT bool // Data Independent Timing support
108109
_ CacheLinePad
109110
}
110111

cpu/cpu_arm64.go

+5
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ func parseARM64SystemRegisters(isar0, isar1, pfr0 uint64) {
168168

169169
parseARM64SVERegister(getzfr0())
170170
}
171+
172+
switch extractBits(pfr0, 48, 51) {
173+
case 1:
174+
ARM64.HasDIT = true
175+
}
171176
}
172177

173178
func parseARM64SVERegister(zfr0 uint64) {

0 commit comments

Comments
 (0)