Attention is currently required from: Angel Pons, Felix Held, Paul Menzel, Varshit Pandya.
Máté Kukri has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/81529?usp=email )
Change subject: mb/dell/optiplex_9020: Implement late HWM initialization ......................................................................
Patch Set 10:
(2 comments)
File src/mainboard/dell/optiplex_9020/mainboard.c:
https://review.coreboot.org/c/coreboot/+/81529/comment/bcf2419c_853701e7 : PS9, Line 296: static uint8_t get_temp_target(void) : { : uint8_t val = rdmsr(0x1a2).lo >> 8 & 0xff; : if (!val) : val = 20; : return 0x95 - val; : } : : static uint16_t get_pkg_power(void) : { : uint8_t rapl_power_unit = rdmsr(0x606).lo & 0xf; : if (rapl_power_unit) : rapl_power_unit = 2 << (rapl_power_unit - 1); : uint16_t pkg_power_info = rdmsr(0x614).lo & 0x7fff; : if (pkg_power_info / rapl_power_unit > 0x41) : return 32; : else : return 16; : }
looks to me that those aren't mainboard-specific, but soc-specific. […]
Ack.
More than SOC specific, more likely common to many Intel generations. At least the registers are, the derived values are Dell EC specific.
I have a WIP OptiPlex 3050 (Kaby Lake) port that uses a similar EC initialization sequence and both this and the mailbox protocol will be factored out alongside that.
File src/mainboard/dell/optiplex_9020/sch5555_ec.c:
https://review.coreboot.org/c/coreboot/+/81529/comment/5ee2293e_70219757 : PS9, Line 8: ec_read
sch555x_mbox_read is better and more descriptive name than what i suggested
Done