phosphor-bmc-code-mgmt: revise JedFileParser to support LCMXO3 series

checking UFM and ensure checksum calculated correctly.

sync code from:
[1] https://github.com/facebook/openbmc/commit/7c656105a7e36b76adb1a1b5a3eed98b0ada43a2

Tested on YV5 POC:
'''
ken@ken-All-Series:~$ curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/
{
  "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory",
  "@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection",
  "Members": [
    {
      "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/6116e97d"
    },
    {
      "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/YV5_SCM_CPLD_9224"
    }
  ],
  "Members@odata.count": 2,
  "Name": "Software Inventory Collection"
}

ken@ken-All-Series:~$curl -k ${creds} -H "Content-Type:multipart/form-data" -X POST -F UpdateParameters="{\"Targets\":[\"/redfish/v1/UpdateService/FirmwareInventory/YV5_SCM_CPLD_9224\"],\"@Redfish.OperationApplyTime\":\"Immediate\"};type=application/json"   -F "UpdateFile=@${fwpath};type=application/octet-stream"   https://${bmc}/redfish/v1/UpdateService/update-multipart
{
  "@odata.id": "/redfish/v1/TaskService/Tasks/0",
  "@odata.type": "#Task.v1_4_3.Task",
  "HidePayload": false,
  "Id": "0",
  "Messages": [
    {
      "@odata.type": "#Message.v1_1_1.Message",
      "Message": "The task with Id '0' has started.",
      "MessageArgs": [
        "0"
      ],
      "MessageId": "TaskEvent.1.0.TaskStarted",
      "MessageSeverity": "OK",
      "Resolution": "None."
    }
  ],
  "Name": "Task 0",
  "Payload": {
    "HttpHeaders": [],
    "HttpOperation": "POST",
    "TargetUri": "/redfish/v1/UpdateService/update-multipart"
  },
  "PercentComplete": 0,
  "StartTime": "2025-07-09T07:09:41+00:00",
  "TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/0",
  "TaskState": "Running",
  "TaskStatus": "OK"
}
'''

Change-Id: I4cb953e25e9c09eee2fa511c787b57bfa787e78e
Signed-off-by: Ken Chen <Ken.Chen@quantatw.com>
diff --git a/cpld/lattice/lattice.hpp b/cpld/lattice/lattice.hpp
index 3c06461..2c11952 100644
--- a/cpld/lattice/lattice.hpp
+++ b/cpld/lattice/lattice.hpp
@@ -18,12 +18,14 @@
      {"LCMXO3LF-2100C", {0x61, 0x2b, 0xb0, 0x43}}},
     {"LatticeLCMXO3LF_4300CFirmware",
      {"LCMXO3LF-4300C", {0x61, 0x2b, 0xc0, 0x43}}},
+    {"LatticeLCMXO3D_4300Firmware", {"LCMXO3D-4300", {0x01, 0x2e, 0x20, 0x43}}},
+    {"LatticeLCMXO3D_9400Firmware", {"LCMXO3D-9400", {0x21, 0x2e, 0x30, 0x43}}},
 };
 
 struct cpldI2cInfo
 {
-    unsigned long int QF; // Quantity of Fuses
-    unsigned int* UFM;    // User Flash Memory
+    unsigned long int QF;
+    unsigned int* UFM;
     unsigned int version;
     unsigned int checksum;
     std::vector<uint8_t> cfgData;
@@ -52,6 +54,7 @@
     size_t imageSize;
     std::string chip;
     std::string target;
+    std::vector<uint8_t> sumOnly;
     bool isLCMXO3D = false;
     bool debugMode = false;
     phosphor::i2c::I2C i2cInterface;