fw update: spi device code updater
This code updater is for updating spi flash devices.
It can for example update the host firmware on different server boards
and has following features:
- power down the host before update
- set mux gpios to access spi flash
- (very limited) communication with ME (Management Engine)
- use flashrom to utilize fw with IFD (Intel Flash Descriptor)
- otherwise directly write to the flash chip.
The behavior of this code updater can be configured via EM.
Tested: on Tyan S5549 Board
Change-Id: I27803b7fded71af2364c2f55fad841a410603dec
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/bios-spi/spi_device_code_updater.hpp b/bios-spi/spi_device_code_updater.hpp
new file mode 100644
index 0000000..fbe39f9
--- /dev/null
+++ b/bios-spi/spi_device_code_updater.hpp
@@ -0,0 +1,23 @@
+#pragma once
+
+#include "common/include/software_manager.hpp"
+#include "sdbusplus/async/context.hpp"
+
+#include <sdbusplus/async.hpp>
+
+const std::string configTypeSPIDevice = "SPIFlash";
+
+class SPIDeviceCodeUpdater : public SoftwareManager
+{
+ public:
+ SPIDeviceCodeUpdater(sdbusplus::async::context& ctx, bool isDryRun,
+ bool debug);
+
+ sdbusplus::async::task<> getInitialConfigurationSingleDevice(
+ const std::string& service, const std::string& path,
+ DeviceConfig& config) final;
+
+ bool debug;
+
+ private:
+};