Skip to content

Commit 50b145c

Browse files
committed
Tweaks.
1 parent cac570b commit 50b145c

4 files changed

Lines changed: 9 additions & 3 deletions

File tree

cpuid.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ import (
1515
"strings"
1616
)
1717

18+
// AMD refererence: https://www.amd.com/system/files/TechDocs/25481.pdf
19+
// and Processor Programming Reference (PPR)
20+
1821
// Vendor is a representation of a CPU vendor.
1922
type Vendor int
2023

@@ -186,7 +189,7 @@ type CPUInfo struct {
186189
L1I int // L1 Instruction Cache (per core or shared). Will be -1 if undetected
187190
L1D int // L1 Data Cache (per core or shared). Will be -1 if undetected
188191
L2 int // L2 Cache (per core or shared). Will be -1 if undetected
189-
L3 int // L3 Instruction Cache (per core or shared). Will be -1 if undetected
192+
L3 int // L3 Cache (per core, per ccx or shared). Will be -1 if undetected
190193
}
191194
SGX SGXSupport
192195
maxFunc uint32

private/cpuid.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ import (
99
"strings"
1010
)
1111

12+
// AMD refererence: https://www.amd.com/system/files/TechDocs/25481.pdf
13+
// and Processor Programming Reference (PPR)
14+
1215
// Vendor is a representation of a CPU vendor.
1316
type vendor int
1417

@@ -180,7 +183,7 @@ type cpuInfo struct {
180183
l1i int // L1 Instruction Cache (per core or shared). Will be -1 if undetected
181184
l1d int // L1 Data Cache (per core or shared). Will be -1 if undetected
182185
l2 int // L2 Cache (per core or shared). Will be -1 if undetected
183-
l3 int // L3 Instruction Cache (per core or shared). Will be -1 if undetected
186+
l3 int // L3 Cache (per core, per ccx or shared). Will be -1 if undetected
184187
}
185188
sgx sgxsupport
186189
maxFunc uint32

testdata/cpuid_data.zip

2.92 KB
Binary file not shown.

testdata/getall.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func main() {
5656
}
5757

5858
func ParseURL(s string, gw *zip.Writer) error {
59-
if strings.Contains(s, "CPUID.txt") {
59+
if strings.HasSuffix(s, "CPUID.txt") {
6060
fmt.Println("Adding", "http://users.atw.hu/instlatx64/"+s)
6161
resp, err := http.Get("http://users.atw.hu/instlatx64/" + s)
6262
if err != nil {

0 commit comments

Comments
 (0)