Michał Żygowski has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38755 )
Change subject: nb/amd/{agesa,pi}/acpi: include thermal zone ......................................................................
Patch Set 1:
Patch Set 1:
Patch Set 1: Code-Review+1
I can confirm the register compatibility. But... reading thermal_mixin.asl, that code doesn't seem to make much sense. The ThermalZone is only reported as present if HTC (hardware temperature control) is enable, so far so good. But then the limit that would trigger HTC is used as _CRT (immediate shut- down) and (-10K) as _HOT (better power down now). Unless the HTC limit register is configured very wrong, this would force the OS to shut down rather early.
On apu2 it worked well, but I agree that an incorrectly programmed limit can cause trouble. I will look for the bits that enable HTC and program the limit (probably in AGESA) if they exist. If not will add a preceding patch that ensures the correct programming of these bits.
For family 14h HtcEn is set if the limit is not 0: src/vendorcode/amd/agesa/f14/Proc/CPU/Family/0x14/cpuF14SoftwareThermal.c:108
For family 15h tn limit is set via IDS (I think we do not use them): src/vendorcode/amd/agesa/f15tn/Proc/IDS/Family/0x15/TN/IdsF15TnAllService.c:127 HtcEn is set to enabled if limti is not 0 or IDS is set to enable HTC: src/vendorcode/amd/agesa/f15tn/Proc/CPU/Family/0x15/TN/cpuF15TnHtc.c:162 src/vendorcode/amd/agesa/f15tn/Proc/IDS/Family/0x15/TN/IdsF15TnAllService.c:100
For family 16h kb is the same as for family 15h: src/vendorcode/amd/agesa/f16kb/Proc/CPU/Family/0x16/KB/F16KbHtc.c:142 src/vendorcode/amd/agesa/f16kb/Proc/IDS/Family/0x16/KB/IdsF16KbAllService.c:101
BinaryPI is unknown (at least 00730F01 does enable it correctly).
I will explicitly enable the limit and HTC in common bootpath for all these chipsets.