Enable firmware transport mechanisms
build: Allow configuring transport mechanisms
firmware: Support receiving this currently unused information.
Change-Id: If6d83ef5fe00eabd7fd7fc932a579657c0b0a0ab
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/main.cpp b/main.cpp
index 0ec159f..4012a0e 100644
--- a/main.cpp
+++ b/main.cpp
@@ -3,6 +3,7 @@
#include "firmware_handler.hpp"
#include <blobs-ipmid/manager.hpp>
+#include <cstdint>
#include <memory>
#include <phosphor-logging/log.hpp>
@@ -17,13 +18,24 @@
#endif
};
+std::uint32_t supportedTransports =
+ static_cast<std::uint32_t>(FirmwareUpdateFlags::bt);
+
void setupFirmwareHandler() __attribute__((constructor));
void setupFirmwareHandler()
{
+#ifdef ENABLE_PCI_BRIDGE
+ supportedTransports |= static_cast<std::uint32_t>(FirmwareUpdateFlags::p2a);
+#endif
+#ifdef ENABLE_LPC_BRIDGE
+ supportedTransports |= static_cast<std::uint32_t>(FirmwareUpdateFlags::lpc);
+#endif
+
auto* manager = getBlobManager();
if (!manager->registerHandler(
- FirmwareBlobHandler::CreateFirmwareBlobHandler(supportedFirmware)))
+ FirmwareBlobHandler::CreateFirmwareBlobHandler(
+ supportedFirmware, supportedTransports)))
{
log<level::ERR>("Failed to register Firmware Handler");
}