Attention is currently required from: Michał Żygowski, Michał Kopeć, Angel Pons. Maxim Polyakov has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/63403 )
Change subject: util/intelp2m: Add support for Alder Lake macro generation ......................................................................
Patch Set 4:
(1 comment)
File util/intelp2m/parser/parser.go:
https://review.coreboot.org/c/coreboot/+/63403/comment/eb36233f_0b7cbadf PS4, Line 152: cnl.PlatformSpecific{} snr.PlatformSpecific{} in the previous patch was right
An interface in go is a pointer that will be null if you don't initialize it. If so, we have an attempt to dereference a null pointer here - https://github.com/coreboot/coreboot/blob/master/util/intelp2m/platforms/cnl... and here https://github.com/coreboot/coreboot/blob/master/util/intelp2m/platforms/cnl...
The PlatformSpecific structure for the "cnl" package includes two such pointers, one of which you initialized in util/intelp2m/platforms/adl/macro.go. The second interface for reusing KeywordCheck() is initialized here
config.AlderType: adl.PlatformSpecific{ InheritanceTemplate: cnl.PlatformSpecific{ InheritanceTemplate: snr.PlatformSpecific{}, }, },
But this makes no sense, since both "cnl" and "snr" use the same KeywordCheck() function. Therefore, for the cleanliness of the code, we use KeywordCheck() from the "snr" package.
config.AlderType: adl.PlatformSpecific{ InheritanceTemplate: snr.PlatformSpecific{}, },
snr.PlatformSpecific{} doesn't have these interfaces, because it does not use code from another platform - https://github.com/coreboot/coreboot/blob/master/util/intelp2m/platforms/snr...
intelp2m$ make go version go version go1.18 linux/amd64 GO111MODULE=off go build -v -o intelp2m
intelp2m$ ./intelp2m -file inteltool-examples/inteltool-adl.log -iiii -fld cb -p adl -o gpio_adl_h.h Info level: Use level 4! Log file: inteltool-examples/inteltool-adl.log Output generated file: gpio_adl_h.h Parse IntelTool Log File... ...done!