Attention is currently required from: Furquan Shaikh, Tim Wawrzynczak, Michael Niewöhner, Patrick Rudolph, Karthik Ramasubramanian. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/56005 )
Change subject: soc/intel/common/block/acpi: Add LPM requirements support to PEPD _DSM ......................................................................
Patch Set 3:
(3 comments)
File src/soc/intel/common/block/acpi/pep.c:
https://review.coreboot.org/c/coreboot/+/56005/comment/dce81902_d8358a49 PS3, Line 32: uint32_t *reg = calloc(LPM_REGISTERS_COUNT, sizeof(uint32_t)); Hmmm, I don't like using dynamically allocating memory when the buffer size is known at compile-time. Given that this is a static function, I would have the array as a local variable in `generate_acpi_power_engine()` and pass it to this function as a parameter.
Another option would be to declare the array in this function as static, and return a pointer to it. This would work because static variables in a function persist after the function returns, but I'm not sure how clean it would be.
https://review.coreboot.org/c/coreboot/+/56005/comment/090287ac_41ca74f5 PS3, Line 183: LPM_REGISTERS_COUNT * sizeof(uint32_t) I'd really like to avoid open-coding the size of this thing.
https://review.coreboot.org/c/coreboot/+/56005/comment/1914a669_4a295979 PS3, Line 197: DSM_UUID(PEP_S0IX_UUID, pep_s0ix, ARRAY_SIZE(pep_s0ix), (void *)reg),
nit: Is there value in exposing this _DSM with 0 supported functions if !SOC_INTEL_COMMON_BLOCK_ACPI […]
+1