tools: add configuration to enable PPC host memory access
Tested: Successfully updated on a Zaius (PPC platform) using ipmilpc
Change-Id: Ic744f6e0ca40df7aa3d5f914e2baef58114fa71b
Signed-off-by: Rui Zhang <ruizhan@google.com>
diff --git a/tools/main.cpp b/tools/main.cpp
index 9746a6d..207fcdd 100644
--- a/tools/main.cpp
+++ b/tools/main.cpp
@@ -210,7 +210,12 @@
auto ipmi = ipmiblob::IpmiHandler::CreateIpmiHandler();
ipmiblob::BlobHandler blob(std::move(ipmi));
+#ifdef ENABLE_PPC
+ const std::string ppcMemPath = "/sys/kernel/debug/powerpc/lpc/fw";
+ host_tool::PpcMemDevice devmem(ppcMemPath);
+#else
host_tool::DevMemDevice devmem;
+#endif
host_tool::PciUtilImpl pci;
host_tool::ProgressStdoutIndicator progress;