diff options
Diffstat (limited to 'util/autoport/sandybridge.go')
-rw-r--r-- | util/autoport/sandybridge.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/util/autoport/sandybridge.go b/util/autoport/sandybridge.go index bd7f0f0c30..29b57b46ef 100644 --- a/util/autoport/sandybridge.go +++ b/util/autoport/sandybridge.go @@ -1,10 +1,19 @@ package main import "fmt" +import "strings" type sandybridgemc struct { } +func MakeSPDMap(ctx Context) string { + var values []string + for _, addr := range GuessSPDMap(ctx) { + values = append(values, fmt.Sprintf("0x%02x", addr)) + } + return "{"+strings.Join(values, ", ")+"}" +} + func (i sandybridgemc) Scan(ctx Context, addr PCIDevData) { inteltool := ctx.InfoSource.GetInteltool() @@ -33,6 +42,7 @@ func (i sandybridgemc) Scan(ctx Context, addr PCIDevData) { "gpu_cpu_backlight": FormatHex32(inteltool.IGD[0x48254]), "gpu_pch_backlight": FormatHex32((inteltool.IGD[0xc8254] >> 16) * 0x10001), "gfx": fmt.Sprintf("GMA_STATIC_DISPLAYS(%d)", (inteltool.IGD[0xc6200] >> 12) & 1), + "spd_addresses": MakeSPDMap(ctx)+"\" # FIXME: Put proper SPD map here", }, Children: []DevTreeNode{ { |