Add IPMI OEM command LinuxBootDone
Add a new OEM command for LinuxBoot to notify the BMC when it is about
to kexec into the OS. This is intended to give the BMC a chance to
prepare for an untrusted OS, e.g. disable any interfaces it doesn't want
the OS to have access to.
Tested:
Exercised the new OEM command using ipmitool
$ ipmitool raw 0x2e 0x32 0x79 0x2b 0x00 0x11
79 2b 00 11
Change-Id: Ica76d77cdde48cebfbced32d8e7e860b559074e8
Signed-off-by: John Wedig <johnwedig@google.com>
diff --git a/ipmi.cpp b/ipmi.cpp
index 636cfa5..8e47c45 100644
--- a/ipmi.cpp
+++ b/ipmi.cpp
@@ -24,6 +24,7 @@
#include "google_accel_oob.hpp"
#include "handler.hpp"
#include "host_power_off.hpp"
+#include "linux_boot_done.hpp"
#include "machine_name.hpp"
#include "pcie_bifurcation.hpp"
#include "pcie_i2c.hpp"
@@ -83,6 +84,8 @@
return accelOobWrite(data, handler);
case SysPCIeSlotBifurcation:
return pcieBifurcation(data, handler);
+ case SysLinuxBootDone:
+ return linuxBootDone(data, handler);
default:
std::fprintf(stderr, "Invalid subcommand: 0x%x\n", cmd);
return ::ipmi::responseInvalidCommand();