i2c-vr: mps: extend MPS image parser to support multiple formats
Different MPS VR modules use varying image formats. This change
enhances the common MPS image parser to handle multiple image types,
improving its flexibility and reusability.
- Add support for 7-column ATE images without write/read command info.
- Add support for 8-column ATE images with write/read command info,
which specifying byte, word, block, or process call operations.
Tested successfully by updating Yosemite5 VRs.
Change-Id: I9b60634c3a051c30ab2f56b895c2ef8db047ad13
Signed-off-by: Kevin Tung <kevin.tung.openbmc@gmail.com>
diff --git a/i2c-vr/mps/mp5998.cpp b/i2c-vr/mps/mp5998.cpp
index 85939a5..5e189e7 100644
--- a/i2c-vr/mps/mp5998.cpp
+++ b/i2c-vr/mps/mp5998.cpp
@@ -57,7 +57,7 @@
sdbusplus::async::task<bool> MP5998::verifyImage(const uint8_t* image,
size_t imageSize)
{
- if (!co_await parseImage(image, imageSize))
+ if (!co_await parseImage(image, imageSize, MPSImageType::type1))
{
error("Image verification failed: image parsing failed");
co_return false;