DDIMM DDR5 size to be in KB
The DDIMM size calculated value is in GB and redfish patrameter needs
it in KB, so need to convert the value to KB
Change-Id: I0ccdb05f8586db346c100260bf31b57a49def9ec
Signed-off-by: Jinu Joy Thomas <jinu.joy.thomas@in.ibm.com>
diff --git a/const.hpp b/const.hpp
index a7c034c..b8499a9 100644
--- a/const.hpp
+++ b/const.hpp
@@ -75,6 +75,7 @@
static constexpr auto SERIAL_NUM_LEN = 12;
static constexpr auto CCIN_LEN = 4;
static constexpr auto CONVERT_MB_TO_KB = 1024;
+static constexpr auto CONVERT_GB_TO_KB = 1024 * 1024;
static constexpr auto SPD_BYTE_2 = 2;
static constexpr auto SPD_BYTE_3 = 3;
diff --git a/vpd-parser/memory_vpd_parser.cpp b/vpd-parser/memory_vpd_parser.cpp
index 1a7d83c..30e44aa 100644
--- a/vpd-parser/memory_vpd_parser.cpp
+++ b/vpd-parser/memory_vpd_parser.cpp
@@ -210,7 +210,7 @@
} while (false);
- return constants::CONVERT_MB_TO_KB * dimmSize;
+ return constants::CONVERT_GB_TO_KB * dimmSize;
}
auto memoryVpdParser::getDdr4BasedDDimmSize(Binary::const_iterator iterator)