From 3f0bb2fb0741d81327184489656e375d7190a852 Mon Sep 17 00:00:00 2001 From: Iru Cai Date: Sat, 12 Jan 2019 17:43:14 +0800 Subject: autoport: Add support for Haswell-Lynx Point platform Tested with the following devices (not exhaustive): - Dell Latitude E7240 - Dell Precision M6800 and M4800 - Asrock Z87E-ITX - Asrock Z87M OC Formula - Asrock Fatal1ty Z87 Professional Change-Id: I4f6e8c97b5122101de2f36bba8ba9f8ddd5b813a Signed-off-by: Iru Cai Signed-off-by: Nicholas Chin Reviewed-on: https://review.coreboot.org/c/coreboot/+/30890 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons Reviewed-by: Nico Huber --- util/autoport/log_reader.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'util/autoport/log_reader.go') diff --git a/util/autoport/log_reader.go b/util/autoport/log_reader.go index b144804c28..b0518d25f4 100644 --- a/util/autoport/log_reader.go +++ b/util/autoport/log_reader.go @@ -180,7 +180,10 @@ func (l *LogDevReader) GetInteltool() (ret InteltoolData) { paragraph := "" ret.GPIO = map[uint16]uint32{} ret.RCBA = map[uint16]uint32{} + ret.IOBP = map[uint32]uint32{} ret.IGD = map[uint32]uint32{} + ret.MCHBAR = map[uint16]uint32{} + ret.PMBASE = map[uint16]uint32{} for scanner.Scan() { line := scanner.Text() switch { @@ -188,10 +191,18 @@ func (l *LogDevReader) GetInteltool() (ret InteltoolData) { addr, value := 0, 0 fmt.Sscanf(line, "0x%x: 0x%x", &addr, &value) ret.RCBA[uint16(addr)] = uint32(value) + case len(line) > 11 && line[0] == '0' && line[1] == 'x' && line[10] == ':' && paragraph == "IOBP": + addr, value := 0, 0 + fmt.Sscanf(line, "0x%x: 0x%x", &addr, &value) + ret.IOBP[uint32(addr)] = uint32(value) case len(line) > 9 && line[0] == '0' && line[1] == 'x' && line[8] == ':' && paragraph == "IGD": addr, value := 0, 0 fmt.Sscanf(line, "0x%x: 0x%x", &addr, &value) ret.IGD[uint32(addr)] = uint32(value) + case len(line) > 7 && line[0] == '0' && line[1] == 'x' && line[6] == ':' && paragraph == "MCHBAR": + addr, value := 0, 0 + fmt.Sscanf(line, "0x%x: 0x%x", &addr, &value) + ret.MCHBAR[uint16(addr)] = uint32(value) case strings.Contains(line, "DEFAULT"): continue case strings.Contains(line, "DIFF"): @@ -200,6 +211,10 @@ func (l *LogDevReader) GetInteltool() (ret InteltoolData) { addr, value := 0, 0 fmt.Sscanf(line, "gpiobase+0x%x: 0x%x", &addr, &value) ret.GPIO[uint16(addr)] = uint32(value) + case strings.HasPrefix(line, "pmbase"): + addr, value := 0, 0 + fmt.Sscanf(line, "pmbase+0x%x: 0x%x", &addr, &value) + ret.PMBASE[uint16(addr)] = uint32(value) case strings.HasPrefix(line, "============="): paragraph = strings.Trim(line, "= ") } -- cgit v1.2.3