Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/63953 )
Change subject: soc/intel/cmn/blk/pmc: API to inform PMC about PCI enumeration done ......................................................................
soc/intel/cmn/blk/pmc: API to inform PMC about PCI enumeration done
This patch sends an IPC to PMC to inform about PCI enumeration.
BUG=b:211954778 TEST=Able to build and boot google/redrix to OS.
Signed-off-by: Subrata Banik subratabanik@google.com Change-Id: I77d428f9501feaccab8bb431090d10ce8d3af9b2 Reviewed-on: https://review.coreboot.org/c/coreboot/+/63953 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Eric Lai eric_lai@quanta.corp-partner.google.com Reviewed-by: Werner Zeh werner.zeh@siemens.com Reviewed-by: Lean Sheng Tan sheng.tan@9elements.com --- M src/soc/intel/common/block/include/intelblocks/pmclib.h M src/soc/intel/common/block/pmc/pmclib.c 2 files changed, 19 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Werner Zeh: Looks good to me, approved Lean Sheng Tan: Looks good to me, approved Eric Lai: Looks good to me, but someone else must approve
diff --git a/src/soc/intel/common/block/include/intelblocks/pmclib.h b/src/soc/intel/common/block/include/intelblocks/pmclib.h index fc65a08..62f27a9 100644 --- a/src/soc/intel/common/block/include/intelblocks/pmclib.h +++ b/src/soc/intel/common/block/include/intelblocks/pmclib.h @@ -28,6 +28,9 @@ */ enum pch_pmc_xtal pmc_get_xtal_freq(void);
+/* pmc_send_pci_enum_done() - send PMC IPC to inform PCI enumeration is done. */ +void pmc_send_pci_enum_done(void); + /* Forward declare the power state struct here */ struct chipset_power_state;
diff --git a/src/soc/intel/common/block/pmc/pmclib.c b/src/soc/intel/common/block/pmc/pmclib.c index a733920..0f1da72 100644 --- a/src/soc/intel/common/block/pmc/pmclib.c +++ b/src/soc/intel/common/block/pmc/pmclib.c @@ -10,6 +10,7 @@ #include <cpu/x86/smm.h> #include <console/console.h> #include <halt.h> +#include <intelblocks/pmc_ipc.h> #include <intelblocks/pmclib.h> #include <intelblocks/gpio.h> #include <intelblocks/tco.h> @@ -21,6 +22,9 @@ #include <string.h> #include <timer.h>
+#define PMC_IPC_BIOS_RST_COMPLETE 0xd0 +#define PMC_IPC_BIOS_RST_SUBID_PCI_ENUM_DONE 0 + static struct chipset_power_state power_state;
/* List of Minimum Assertion durations in microseconds */ @@ -785,3 +789,15 @@ return XTAL_UNKNOWN_FREQ; } } + +void pmc_send_pci_enum_done(void) +{ + struct pmc_ipc_buffer req = { 0 }; + struct pmc_ipc_buffer rsp; + uint32_t cmd; + + cmd = pmc_make_ipc_cmd(PMC_IPC_BIOS_RST_COMPLETE, + PMC_IPC_BIOS_RST_SUBID_PCI_ENUM_DONE, 0); + if (pmc_send_ipc_cmd(cmd, &req, &rsp) != CB_SUCCESS) + printk(BIOS_ERR, "PMC: Failed sending PCI Enumeration Done Command\n"); +}