Attention is currently required from: Michał Żygowski, Michał Kopeć. Maxim Polyakov 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 1:
(12 comments)
Patchset:
PS1: Thank you for this work!
File util/intelp2m/description.md:
https://review.coreboot.org/c/coreboot/+/63403/comment/9619df3d_c17756e1 PS1, Line 39: CPU PCH
https://review.coreboot.org/c/coreboot/+/63403/comment/573fbd6e_c00cff8d PS1, Line 39: AlderLake-H Please, could you clarify how the pads in the H variant differ from other platforms of the Alder Lake family?
File util/intelp2m/main.go:
https://review.coreboot.org/c/coreboot/+/63403/comment/1aa94a60_422cd1ff PS1, Line 72: CPU PCH
File util/intelp2m/platforms/adl_h/macro.go:
PS1: It seems to me that this platform is more like Cannon Lake than Sunrise PCH. In that case, then I suggest defining this interface to use the functions for the Canon Lake platform - * Steps 1, 2, 3 *.
Please repeat the TEST after the changes and compare with the previous result.
Currently, this solution is used against code duplication. I plan to start working on a global code update in a few months and maybe rework it.
https://review.coreboot.org/c/coreboot/+/63403/comment/16447c96_29d42892 PS1, Line 1: adl_h For golang, it is preferable not to use the underscore in the package name. Use "adlh" here and in the package file path too.
https://review.coreboot.org/c/coreboot/+/63403/comment/c742a4bc_7c9daeb6 PS1, Line 22: step 1: Let's add functions to the interface that have a common code with Cannon Lake.
https://review.coreboot.org/c/coreboot/+/63403/comment/f24b2e69_9c409a91 PS1, Line 23: type InheritanceMacro interface { : GpoMacroAdd() : NativeFunctionMacroAdd() : NoConnMacroAdd() : } type InheritanceMacro interface { GpoMacroAdd() NativeFunctionMacroAdd() NoConnMacroAdd() Pull() GpiMacroAdd() }
(step 1)
https://review.coreboot.org/c/coreboot/+/63403/comment/3c6ef90a_5e0c8f8a PS1, Line 67: func (PlatformSpecific) Pull() { func (platform PlatformSpecific) Pull() { platform.InheritanceMacro.Pull() }
(step 2)
https://review.coreboot.org/c/coreboot/+/63403/comment/822f6e5a_d286f1a8 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
https://review.coreboot.org/c/coreboot/+/63403/comment/07f5a594_f6ac2c84 PS1, Line 142: func (PlatformSpecific) GpiMacroAdd() { func (platform PlatformSpecific) GpiMacroAdd() { platform.InheritanceMacro.GpiMacroAdd() }
(step 2)
https://review.coreboot.org/c/coreboot/+/63403/comment/1c143f74_e1127f90 PS1, Line 204: snr.PlatformSpecific{} cnl.PlatformSpecific{}
(step 3)