Filip Lewiński has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/81916?usp=email )
Change subject: util/intelp2m: MTL support WIP ......................................................................
util/intelp2m: MTL support WIP
Change-Id: Iaebd51d587507e68c6f263b92dc61cb6c0411bf8 Signed-off-by: Filip Lewiński filip.lewinski@3mdeb.com --- M util/intelp2m/config/config.go M util/intelp2m/main.go M util/intelp2m/parser/parser.go A util/intelp2m/platforms/mtl/macro.go A util/intelp2m/platforms/mtl/template.go 5 files changed, 33 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/81916/1
diff --git a/util/intelp2m/config/config.go b/util/intelp2m/config/config.go index 62242b9..051c580 100644 --- a/util/intelp2m/config/config.go +++ b/util/intelp2m/config/config.go @@ -31,6 +31,7 @@ TigerType uint8 = 4 AlderType uint8 = 5 JasperType uint8 = 6 + MeteorType uint8 = 7 )
var key uint8 = SunriseType @@ -43,6 +44,7 @@ "tgl": TigerType, "adl": AlderType, "jsl": JasperType, + "mtl": MeteorType, } func PlatformSet(name string) int { if platformType, valid := platform[name]; valid { @@ -75,6 +77,9 @@ func IsPlatformAlderLakeH() bool { return IsPlatform(AlderType) } +func IsPlatformMeteorLake() bool { + return IsPlatform(MeteorType) +}
var InputRegDumpFile *os.File = nil var OutputGenFile *os.File = nil diff --git a/util/intelp2m/main.go b/util/intelp2m/main.go index 64db9fee..dc78778 100644 --- a/util/intelp2m/main.go +++ b/util/intelp2m/main.go @@ -72,7 +72,8 @@ "\tcnl - CannonLake-LP or Whiskeylake/Coffeelake/Cometlake-U SoC\n"+ "\ttgl - TigerLake-H SoC\n"+ "\tadl - AlderLake PCH\n"+ - "\tjsl - Jasper Lake SoC\n") + "\tjsl - Jasper Lake SoC\n"+ + "\tmtl - MeteorLake SoC\n")
fieldstyle := flag.String("fld", "none", "set fields macros style:\n"+ "\tcb - use coreboot style for bit fields macros\n"+ diff --git a/util/intelp2m/parser/parser.go b/util/intelp2m/parser/parser.go index a6fa315..b7b4141 100644 --- a/util/intelp2m/parser/parser.go +++ b/util/intelp2m/parser/parser.go @@ -14,6 +14,7 @@ "review.coreboot.org/coreboot.git/util/intelp2m/platforms/tgl" "review.coreboot.org/coreboot.git/util/intelp2m/platforms/adl" "review.coreboot.org/coreboot.git/util/intelp2m/platforms/jsl" + "review.coreboot.org/coreboot.git/util/intelp2m/platforms/mtl" "review.coreboot.org/coreboot.git/util/intelp2m/config" )
@@ -154,6 +155,7 @@ config.TigerType : tgl.PlatformSpecific{}, config.AlderType : adl.PlatformSpecific{}, config.JasperType : jsl.PlatformSpecific{}, + config.MeteorType : mtl.PlatformSpecific{}, } parser.platform = platform[config.PlatformGet()] } diff --git a/util/intelp2m/platforms/mtl/macro.go b/util/intelp2m/platforms/mtl/macro.go new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/util/intelp2m/platforms/mtl/macro.go diff --git a/util/intelp2m/platforms/mtl/template.go b/util/intelp2m/platforms/mtl/template.go new file mode 100644 index 0000000..5963f28 --- /dev/null +++ b/util/intelp2m/platforms/mtl/template.go @@ -0,0 +1,24 @@ +package tgl + +import "review.coreboot.org/coreboot.git/util/intelp2m/platforms/common" + +// GroupNameExtract - This function extracts the group ID, if it exists in a row +// line : string from the configuration file +// return +// bool : true if the string contains a group identifier +// string : group identifier +func (PlatformSpecific) GroupNameExtract(line string) (bool, string) { + return common.KeywordsCheck(line, + "GPP_V", "GPP_C", "GPP_A", "GPP_E", "GPP_H", "GPP_F", "GPP_S", + "GPP_B", "GPP_D", "GPD", + ) + +} + +// KeywordCheck - This function is used to filter parsed lines of the configuration file and +// returns true if the keyword is contained in the line. +// line : string from the configuration file +func (PlatformSpecific) KeywordCheck(line string) bool { + isIncluded, _ := common.KeywordsCheck(line, "GPP_", "GPD", "VGPIO") + return isIncluded +}