Initialize first byte in IPMI cache file
In the IPMI cache file, the first byte of this file was always
essentially random, because it was in a structure that had this field
uninitialized. Fixing it, by arbitrarily choosing the value 0x01.
Added a new constant "mdrDirVersion" for this, and also added a similar
constant for "smbiosDirVersion" (which was being initialized, but to a
magic number directly in the code, not a constant).
Tested: Cache files now appear consistently.
Change-Id: I1f13ae973965b1a7105e2ac054ae30c52f45e2a9
Signed-off-by: Josh Lehan <krellan@google.com>
diff --git a/include/smbios_mdrv2.hpp b/include/smbios_mdrv2.hpp
index 0b4638a..e77abf4 100644
--- a/include/smbios_mdrv2.hpp
+++ b/include/smbios_mdrv2.hpp
@@ -32,10 +32,12 @@
constexpr uint32_t mdr2SMSize = 0x00100000;
constexpr uint32_t mdr2SMBaseAddress = 0x9FF00000;
+constexpr uint8_t mdrDirVersion = 1;
constexpr uint8_t mdrTypeII = 2;
constexpr uint8_t mdr2Version = 2;
constexpr uint8_t smbiosAgentVersion = 1;
+constexpr uint8_t smbiosDirVersion = 1;
constexpr uint32_t pageMask = 0xf000;
constexpr int smbiosDirIndex = 0;