diff --git a/redfish-core/lib/processor.hpp b/redfish-core/lib/processor.hpp
index ec24735..e510768 100644
--- a/redfish-core/lib/processor.hpp
+++ b/redfish-core/lib/processor.hpp
@@ -160,16 +160,26 @@
                     aResp->res.jsonValue["TotalThreads"] = *value;
                 }
             }
-            else if (property.first == "Family")
+            else if (property.first == "EffectiveFamily")
             {
-                const std::string* value =
-                    std::get_if<std::string>(&property.second);
+                const uint16_t* value = std::get_if<uint16_t>(&property.second);
                 if (value != nullptr)
                 {
                     aResp->res.jsonValue["ProcessorId"]["EffectiveFamily"] =
-                        *value;
+                        "0x" + intToHexString(*value);
                 }
             }
+            else if (property.first == "EffectiveModel")
+            {
+                const uint16_t* value = std::get_if<uint16_t>(&property.second);
+                if (value == nullptr)
+                {
+                    messages::internalError(aResp->res);
+                    return;
+                }
+                aResp->res.jsonValue["ProcessorId"]["EffectiveModel"] =
+                    "0x" + intToHexString(*value);
+            }
             else if (property.first == "Id")
             {
                 const uint64_t* value = std::get_if<uint64_t>(&property.second);
@@ -180,6 +190,28 @@
                         "0x" + intToHexString(*value);
                 }
             }
+            else if (property.first == "Microcode")
+            {
+                const uint32_t* value = std::get_if<uint32_t>(&property.second);
+                if (value == nullptr)
+                {
+                    messages::internalError(aResp->res);
+                    return;
+                }
+                aResp->res.jsonValue["ProcessorId"]["MicrocodeInfo"] =
+                    "0x" + intToHexString(*value);
+            }
+            else if (property.first == "Step")
+            {
+                const uint16_t* value = std::get_if<uint16_t>(&property.second);
+                if (value == nullptr)
+                {
+                    messages::internalError(aResp->res);
+                    return;
+                }
+                aResp->res.jsonValue["ProcessorId"]["Step"] =
+                    "0x" + intToHexString(*value);
+            }
         }
     }
 
