Attention is currently required from: Michał Żygowski, Maxim Polyakov. Michał Kopeć has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/63403 )
Change subject: util/intelp2m: Add support for Alder Lake H macro generation ......................................................................
Patch Set 2:
(12 comments)
Patchset:
PS2: Thank you for the review, Maxim! I'm having some problems after applying your suggestions, though.
File util/intelp2m/description.md:
https://review.coreboot.org/c/coreboot/+/63403/comment/dc364ddd_7f9aedd2 PS1, Line 39: CPU
PCH
Done
https://review.coreboot.org/c/coreboot/+/63403/comment/8d18e163_acef94ac PS1, Line 39: AlderLake-H
Please, could you clarify how the pads in the H variant differ from other platforms of the Alder Lak […]
From a quick look at Intel docs #618659 and #627075 The GPIO functions are different, the communities are different and PCH-LP has one more native function per GPIO (7 vs 6 in PCH-H)
File util/intelp2m/main.go:
https://review.coreboot.org/c/coreboot/+/63403/comment/a836f0fd_3f0bdaed PS1, Line 72: CPU
PCH
Done
File util/intelp2m/platforms/adl_h/macro.go:
PS1:
It seems to me that this platform is more like Cannon Lake than Sunrise PCH. […]
I applied your suggestions, but it seems i've run into a new problem - looks like a problem with inheritance in template.go?
``` ./intelp2m -file ~/inteltool.log -iiii -fld cb -p adl-h -o gpio_adl_h.h 1 msi_pro_z690_a/intelp2m_adl!? Info level: Use level 4! Log file: /home/mkopec/inteltool.log Output generated file: gpio_adl_h.h Parse IntelTool Log File... panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x4c2bd8]
goroutine 1 [running]: _/home/mkopec/Development/Dasharo/coreboot/util/intelp2m/platforms/cnl.PlatformSpecific.KeywordCheck(...) /home/mkopec/Development/Dasharo/coreboot/util/intelp2m/platforms/cnl/template.go:23 _/home/mkopec/Development/Dasharo/coreboot/util/intelp2m/platforms/adlh.PlatformSpecific.KeywordCheck(...) /home/mkopec/Development/Dasharo/coreboot/util/intelp2m/platforms/adlh/template.go:24 _/home/mkopec/Development/Dasharo/coreboot/util/intelp2m/parser.(*ParserData).Parse(0xc00007ef10) /home/mkopec/Development/Dasharo/coreboot/util/intelp2m/parser/parser.go:236 +0x7a3 main.main() /home/mkopec/Development/Dasharo/coreboot/util/intelp2m/main.go:137 +0x8c9 ```
https://review.coreboot.org/c/coreboot/+/63403/comment/67e8961a_30799b07 PS1, Line 1: adl_h
For golang, it is preferable not to use the underscore in the package name. […]
Done
https://review.coreboot.org/c/coreboot/+/63403/comment/2fb15c82_56e47c2f PS1, Line 22:
step 1: Let's add functions to the interface that have a common code with Cannon Lake.
Done
https://review.coreboot.org/c/coreboot/+/63403/comment/29187a3d_02c58f78 PS1, Line 23: type InheritanceMacro interface { : GpoMacroAdd() : NativeFunctionMacroAdd() : NoConnMacroAdd() : }
type InheritanceMacro interface { […]
Done
https://review.coreboot.org/c/coreboot/+/63403/comment/4ace51be_a50ca852 PS1, Line 67: func (PlatformSpecific) Pull() {
func (platform PlatformSpecific) Pull() { […]
Done
https://review.coreboot.org/c/coreboot/+/63403/comment/8e2cd1fd_7f278a7d PS1, Line 106: // Generate macro to cause NMI when configured in GPIO input mode : func nmiRoute() bool { : macro := common.GetMacro() : if macro.Register(PAD_CFG_DW0).GetGPIOInputRouteNMI() == 0 { : return false : } : // PAD_CFG_GPI_NMI(GPIO_24, UP_20K, DEEP, LEVEL, INVERT), : macro.Add("_NMI").Add("(").Id().Pull().Rstsrc().Trig().Invert().Add("),") : return true : } : : // Generate macro to cause SCI when configured in GPIO input mode : func sciRoute() bool { : macro := common.GetMacro() : dw0 := macro.Register(PAD_CFG_DW0) : if dw0.GetGPIOInputRouteSCI() == 0 { : return false : } : // PAD_CFG_GPI_SCI(pad, pull, rst, trig, inv) : macro.Add("_SCI").Add("(").Id().Pull().Rstsrc().Trig().Invert().Add("),") : return true : } : : // Generate macro to cause SMI when configured in GPIO input mode : func smiRoute() bool { : macro := common.GetMacro() : dw0 := macro.Register(PAD_CFG_DW0) : if dw0.GetGPIOInputRouteSMI() == 0 { : return false : } : // PAD_CFG_GPI_SMI(pad, pull, rst, trig, inv) : macro.Add("_SMI").Add("(").Id().Pull().Rstsrc().Trig().Invert().Add("),") : return true : }
remove
Done
https://review.coreboot.org/c/coreboot/+/63403/comment/cf947564_2b59caf2 PS1, Line 142: func (PlatformSpecific) GpiMacroAdd() {
func (platform PlatformSpecific) GpiMacroAdd() { […]
Done
https://review.coreboot.org/c/coreboot/+/63403/comment/4f74b319_a321394a PS1, Line 204: snr.PlatformSpecific{}
cnl.PlatformSpecific{} […]
Done