soc/intel/broadwell: Allow ME enable/disable to be set via option

Add an option variable 'me_disable' to control the visibility of the
HECI PCI device at runtime. Default to the Kconfig selection if not set.

Change-Id: I6e7c018115780c74f1662948ed8dad3e0559051a
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87386
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Matt DeVillier 2025-04-20 16:05:54 -05:00
commit 5efb54d371

View file

@ -19,6 +19,7 @@
#include <string.h>
#include <delay.h>
#include <elog.h>
#include <option.h>
#include <soc/me.h>
#include <soc/lpc.h>
#include <soc/pch.h>
@ -600,7 +601,7 @@ static void intel_me_finalize(struct device *dev)
if (!mei_base_address || mei_base_address == (u8 *)0xfffffff0)
return;
if (!CONFIG(DISABLE_ME_PCI))
if (!get_uint_option("me_disable", CONFIG(DISABLE_ME_PCI)))
return;
/* Make sure IO is disabled */
@ -1025,7 +1026,7 @@ static void intel_me_init(struct device *dev)
static void intel_me_enable(struct device *dev)
{
/* Avoid talking to the device in S3 path */
if (acpi_is_wakeup_s3() && CONFIG(DISABLE_ME_PCI)) {
if (acpi_is_wakeup_s3() && get_uint_option("me_disable", CONFIG(DISABLE_ME_PCI))) {
dev->enabled = 0;
pch_disable_devfn(dev);
}