bm_instance: Create a new handler
This OEM handler will get properties from tmpfs to serve over IPMI.
Tested:
~# cat /run/bm-instance/asset-tag
12345
~# ipmitool raw 0x2e 0x32 0x79 0x2b 0x00 0x17 0x00
79 2b 00 17 05 31 32 33 34 35
...
...
(Verified this works for all 7 sub commands)
Signed-off-by: Brandon Kim <brandonkim@google.com>
Change-Id: I191b6f4994d91ada49a3332a8e93a3a305561904
diff --git a/ipmi.cpp b/ipmi.cpp
index d8d94e9..5c0b916 100644
--- a/ipmi.cpp
+++ b/ipmi.cpp
@@ -14,6 +14,7 @@
#include "ipmi.hpp"
+#include "bm_instance.hpp"
#include "bmc_mode.hpp"
#include "cable.hpp"
#include "commands.hpp"
@@ -91,6 +92,8 @@
return accelGetVrSettings(ctx, data, handler);
case SysSetAccelVrSettings:
return accelSetVrSettings(ctx, data, handler);
+ case SysGetBMInstanceProperty:
+ return getBMInstanceProperty(data, handler);
default:
stdplus::print(stderr, "Invalid subcommand: {:#x}\n", cmd);
return ::ipmi::responseInvalidCommand();