soc/intel/common/block/p2sb: Add SSDT function for SoC-specific features
Add weak function to fill SSDT for SoC-specific P2SB extensions. SoCs can implement this function to fill additional P2SB-related ACPI objects. For instance, a SoC might include the IOST ACPI interface that uses P2SB and enable it via SSDT for debug purposes at the OS level. BUG=none TEST=This change cannot be tested in isolation as it only adds an empty weak function. Testing requires SoCs to implement the function. Add the necessary code with the same function name in the SoC to generate ACPI objects and examine the SSDT for changes after boot. Signed-off-by: Cliff Huang <cliff.huang@intel.com> Change-Id: I352f13b9b05dc4b61608a33c76946883bf0d3de3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/90691 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com> Reviewed-by: Alicja Michalska <ahplka19@gmail.com>
This commit is contained in:
parent
96b4754c35
commit
d62764df87
2 changed files with 16 additions and 0 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#ifndef SOC_INTEL_COMMON_BLOCK_P2SB_H
|
||||
#define SOC_INTEL_COMMON_BLOCK_P2SB_H
|
||||
|
||||
#include <device/device.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
|
@ -68,4 +69,11 @@ void p2sb_set_ioapic_bdf(union p2sb_bdf bdf);
|
|||
*/
|
||||
void p2sb_soc_get_sb_mask(uint32_t *ep_mask, size_t count);
|
||||
|
||||
/*
|
||||
* SoC might define this function to fill additional P2SB-related ACPI objects.
|
||||
* For instance, the SoC might include the IOST ACPI interface to use P2SB and
|
||||
* enable it via SSDT for debug purposes at the OS level.
|
||||
*/
|
||||
void soc_fill_p2sb_ssdt(const struct device *dev);
|
||||
|
||||
#endif /* SOC_INTEL_COMMON_BLOCK_P2SB_H */
|
||||
|
|
|
|||
|
|
@ -130,10 +130,18 @@ static void read_resources(struct device *dev)
|
|||
mmio_range(dev, PCI_BASE_ADDRESS_0, P2SB_BAR, P2SB_SIZE);
|
||||
}
|
||||
|
||||
__weak void soc_fill_p2sb_ssdt(const struct device *dev)
|
||||
{
|
||||
/* no-op */
|
||||
}
|
||||
|
||||
const struct device_operations p2sb_ops = {
|
||||
.read_resources = read_resources,
|
||||
.set_resources = noop_set_resources,
|
||||
.ops_pci = &pci_dev_ops_pci,
|
||||
#if CONFIG(HAVE_ACPI_TABLES)
|
||||
.acpi_fill_ssdt = soc_fill_p2sb_ssdt,
|
||||
#endif
|
||||
};
|
||||
|
||||
static const unsigned short pci_device_ids[] = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue