Add option to skip p2a bridge disable
Add a new constructor for P2aDataHandler with skipBridgeDisable bool to
enable an option to skip disableBridge() in AspeedPciBridge and
NuvotonPciBridge.
Signed-off-by: Willy Tu <wltu@google.com>
Change-Id: I439bbaa2b7295adc54a8aa98157db60a7e820837
diff --git a/tools/main.cpp b/tools/main.cpp
index 3876844..f749e3b 100644
--- a/tools/main.cpp
+++ b/tools/main.cpp
@@ -44,13 +44,14 @@
#define IPMILPC "ipmilpc"
#define IPMIPCI "ipmipci"
+#define IPMIPCI_SKIP_BRIDGE_DISABLE "ipmipci-skip-bridge-disable"
#define IPMIBT "ipmibt"
#define IPMINET "ipminet"
namespace
{
-const std::vector<std::string> interfaceList = {IPMINET, IPMIBT, IPMILPC,
- IPMIPCI};
+const std::vector<std::string> interfaceList = {
+ IPMINET, IPMIBT, IPMILPC, IPMIPCI, IPMIPCI_SKIP_BRIDGE_DISABLE};
} // namespace
void usage(const char* program)
@@ -254,6 +255,12 @@
handler = std::make_unique<host_tool::P2aDataHandler>(&blob, &pci,
&progress);
}
+ else if (interface == IPMIPCI_SKIP_BRIDGE_DISABLE)
+ {
+ auto& pci = host_tool::PciAccessImpl::getInstance();
+ handler = std::make_unique<host_tool::P2aDataHandler>(
+ &blob, &pci, &progress, true);
+ }
if (!handler)
{