Attention is currently required from: Tim Wawrzynczak, Michael Niewöhner, Angel Pons, Patrick Rudolph, Karthik Ramasubramanian. Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/56004 )
Change subject: soc/intel/common/block/acpi: Move pep.asl to acpigen ......................................................................
Patch Set 3:
(6 comments)
File src/soc/intel/common/block/acpi/pep.c:
https://review.coreboot.org/c/coreboot/+/56004/comment/295def7b_fadcb874 PS3, Line 6: #include <soc/pci_devs.h> Is this required?
https://review.coreboot.org/c/coreboot/+/56004/comment/c9ca62ba_c974b33d PS3, Line 27: 1 << 6 | 1 << 5 | 1 << 1 | 1 << 0 Rather than hardcoding this, can this function be made to calculate it:
``` for (i = 0, fns = 0; i < lpi_s0_helpers; i++) { if (lpi_s0_helpers[i] != lpi_empty) fns |= BIT(i); } ```
https://review.coreboot.org/c/coreboot/+/56004/comment/91a52d37_14c9cd5c PS3, Line 49: ACPI_DEVICE_SLEEP_D0 This should be `0` to indicate device disabled. This field is not really related to D-state.
https://review.coreboot.org/c/coreboot/+/56004/comment/d0511592_a0197c88 PS3, Line 74: acpigen_write_if_cond_ref_of Something to think about for a future change: We ideally don't need the cond_ref_of here if we can provide an infrastructure to allow any drivers/mainboard to add their own hooks for S0ix.
I am thinking something like s0ix_hooks which provide: `entry_fn`, `exit_fn`, `entry_fn_acpi_path`, `exit_fn_acpi_path`. Then lpi_s0ix_entry/lpi_s0ix_exit wouldn't need the hardcoded _HOOK macros as well as cond_ref_of to ensure that the objects actually exist.
https://review.coreboot.org/c/coreboot/+/56004/comment/6a77b251_bda6ebae PS3, Line 124: struct const
https://review.coreboot.org/c/coreboot/+/56004/comment/640ac28d_51439eeb PS3, Line 128: const char *scope = acpi_device_scope(dev); : : acpigen_write_scope(scope); The assumption here is that the caller is passing in PMC device which lives under _SB.PCI and so using the scope of the device is fine. Why not simply hardcode the scope to _SB.PCI here because that is what we really want? You can drop the parameter `dev` to this function completely.