diff options
author | Subrata Banik <subratabanik@google.com> | 2022-04-29 14:19:32 +0530 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-05-05 14:21:17 +0000 |
commit | a3146205c382ffdd440dc9c7ea2cac9b0f577aef (patch) | |
tree | 9758a942f22ea9561c5c0dc691725073c0057610 /src/soc/intel/common | |
parent | f8042458f789a6cb583802319b9bcd49bad66ed7 (diff) |
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>
Diffstat (limited to 'src/soc/intel/common')
-rw-r--r-- | src/soc/intel/common/block/include/intelblocks/pmclib.h | 3 | ||||
-rw-r--r-- | src/soc/intel/common/block/pmc/pmclib.c | 16 |
2 files changed, 19 insertions, 0 deletions
diff --git a/src/soc/intel/common/block/include/intelblocks/pmclib.h b/src/soc/intel/common/block/include/intelblocks/pmclib.h index fc65a089d3..62f27a9d5a 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 { */ 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 a733920139..0f1da72577 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 @@ enum pch_pmc_xtal pmc_get_xtal_freq(void) 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"); +} |