summaryrefslogtreecommitdiff
path: root/util/autoport/log_reader.go
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2019-01-12 17:43:14 +0800
committerNico Huber <nico.h@gmx.de>2024-07-14 09:58:34 +0000
commit3f0bb2fb0741d81327184489656e375d7190a852 (patch)
treef2b5d83ff5943316e2c47ae84372ef2e42922271 /util/autoport/log_reader.go
parent779f3c06f8abf66461c66caa287d17733feab1d9 (diff)
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 <mytbk920423@gmail.com> Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/30890 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'util/autoport/log_reader.go')
-rw-r--r--util/autoport/log_reader.go15
1 files changed, 15 insertions, 0 deletions
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, "= ")
}