Attention is currently required from: Arthur Heymans, Martin L Roth, Michał Żygowski, Patrick Rudolph.
Benjamin Doron has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/70378?usp=email )
Change subject: drivers/smm_payload_interface: Add initial support for SMM payload ......................................................................
Patch Set 14:
(1 comment)
File src/drivers/smm_payload_interface/ramstage.c:
https://review.coreboot.org/c/coreboot/+/70378/comment/421c5024_a453a48a : PS14, Line 114: static void perform_save(void *unused) : { : uint32_t reg32; : : // Payload does not enable sleep SMI : reg32 = inl(ACPI_BASE_ADDRESS + SMI_EN); : reg32 &= ~SLP_SMI_EN; : outl(reg32, ACPI_BASE_ADDRESS + SMI_EN); : : // Enable SCI mode when there's no 'ACPI enable' SMI handler : reg32 = inl(ACPI_BASE_ADDRESS + PM1_CNT); : reg32 |= SCI_EN; : outl(reg32, ACPI_BASE_ADDRESS + PM1_CNT); : : clear_s3_save_region(); : } : : static void perform_s3_restore(void *unused) : { : uint32_t reg32; : : // Payload does not enable sleep SMI : reg32 = inl(ACPI_BASE_ADDRESS + SMI_EN); : reg32 &= ~SLP_SMI_EN; : outl(reg32, ACPI_BASE_ADDRESS + SMI_EN); : : // Enable SCI mode when there's no 'ACPI enable' SMI handler : reg32 = inl(ACPI_BASE_ADDRESS + PM1_CNT); : reg32 |= SCI_EN; : outl(reg32, ACPI_BASE_ADDRESS + PM1_CNT); : : trigger_payload_swsmi(); : } : If we're already informing the payload where some registers are, maybe make it do this. Especially the "SLP_SMI_EN", that's highly implementation-specific. And creating these SMI handlers isn't a bad idea - depending on whether the payload can handle the interrupts as SMIs, or they should always go through ACPI instead.