util/intelp2m: Add support for Emmitsburg macro generation

Test: Generated GPIO for ASRock Rack SPC741D8-2L2T/BCM.

Change-Id: Ib7ded47fb1c0b87ebb3cecaf3e41319ac552b797
Signed-off-by: Fabian Meyer <fabian.meyer@student.kit.edu>
Co-authored-by: Yussuf Khalil <yussuf.khalil@kit.edu>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82204
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maxim <max.senia.poliak@gmail.com>
This commit is contained in:
Fabian Meyer
2024-05-06 16:54:48 +02:00
committed by Felix Held
parent 2fb6eec811
commit 92e372bb35
5 changed files with 157 additions and 9 deletions

View File

@@ -24,14 +24,15 @@ func TemplateGet() int {
}
const (
SunriseType uint8 = 0
LewisburgType uint8 = 1
ApolloType uint8 = 2
CannonType uint8 = 3
TigerType uint8 = 4
AlderType uint8 = 5
JasperType uint8 = 6
MeteorType uint8 = 7
SunriseType uint8 = 0
LewisburgType uint8 = 1
ApolloType uint8 = 2
CannonType uint8 = 3
TigerType uint8 = 4
AlderType uint8 = 5
JasperType uint8 = 6
MeteorType uint8 = 7
EmmitsburgType uint8 = 8
)
var key uint8 = SunriseType
@@ -45,6 +46,7 @@ var platform = map[string]uint8{
"adl": AlderType,
"jsl": JasperType,
"mtl": MeteorType,
"ebg": EmmitsburgType,
}
func PlatformSet(name string) int {
if platformType, valid := platform[name]; valid {
@@ -80,6 +82,9 @@ func IsPlatformAlderLakeH() bool {
func IsPlatformMeteorLake() bool {
return IsPlatform(MeteorType)
}
func IsPlatformEmmitsburg() bool {
return IsPlatform(EmmitsburgType)
}
var InputRegDumpFile *os.File = nil
var OutputGenFile *os.File = nil