diff --git a/libpfr/inc/pfr.hpp b/libpfr/inc/pfr.hpp
index 730e6eb..6ae6d60 100644
--- a/libpfr/inc/pfr.hpp
+++ b/libpfr/inc/pfr.hpp
@@ -42,7 +42,8 @@
 
 std::string toHexString(const uint8_t val);
 std::string getFirmwareVersion(const ImageType& imgType);
-int getProvisioningStatus(bool& ufmLocked, bool& ufmProvisioned);
+int getProvisioningStatus(bool& ufmLocked, bool& ufmProvisioned,
+                          bool& ufmSupport);
 int readCpldReg(const ActionType& action, uint8_t& value);
 int setBMCBootCheckpoint(const uint8_t checkPoint);
 
diff --git a/libpfr/src/pfr.cpp b/libpfr/src/pfr.cpp
index 536abe9..1058197 100644
--- a/libpfr/src/pfr.cpp
+++ b/libpfr/src/pfr.cpp
@@ -370,14 +370,17 @@
     }
 }
 
-int getProvisioningStatus(bool& ufmLocked, bool& ufmProvisioned)
+int getProvisioningStatus(bool& ufmLocked, bool& ufmProvisioned,
+                          bool& ufmSupport)
 {
     try
     {
         I2CFile cpldDev(i2cBusNumber, i2cSlaveAddress, O_RDWR | O_CLOEXEC);
         uint8_t provStatus = cpldDev.i2cReadByteData(provisioningStatus);
+        uint8_t pfrRoT = cpldDev.i2cReadByteData(pfrROTId);
         ufmLocked = (provStatus & ufmLockedMask);
         ufmProvisioned = (provStatus & ufmProvisionedMask);
+        ufmSupport = (pfrRoT & pfrRoTValue);
         return 0;
     }
     catch (const std::exception& e)
diff --git a/service/inc/pfr_mgr.hpp b/service/inc/pfr_mgr.hpp
index 13091d7..6f55eb9 100644
--- a/service/inc/pfr_mgr.hpp
+++ b/service/inc/pfr_mgr.hpp
@@ -37,6 +37,7 @@
 static constexpr const char* versionStr = "Version";
 static constexpr const char* ufmProvisionedStr = "UfmProvisioned";
 static constexpr const char* ufmLockedStr = "UfmLocked";
+static constexpr const char* ufmSupportStr = "UfmSupport";
 
 class PfrVersion
 {
@@ -80,6 +81,7 @@
 
     bool ufmProvisioned;
     bool ufmLocked;
+    bool ufmSupport;
 };
 
 } // namespace pfr
diff --git a/service/src/pfr_mgr.cpp b/service/src/pfr_mgr.cpp
index 4d77c0e..479cf5f 100644
--- a/service/src/pfr_mgr.cpp
+++ b/service/src/pfr_mgr.cpp
@@ -116,7 +116,10 @@
     pfrCfgIface = server.add_interface("/xyz/openbmc_project/pfr",
                                        "xyz.openbmc_project.PFR.Attributes");
 
-    getProvisioningStatus(ufmLocked, ufmProvisioned);
+    ufmLocked = false;
+    ufmProvisioned = false;
+    ufmSupport = false;
+    getProvisioningStatus(ufmLocked, ufmProvisioned, ufmSupport);
 
     pfrCfgIface->register_property(ufmProvisionedStr, ufmProvisioned,
                                    // Override set
@@ -148,6 +151,21 @@
                                        return 0;
                                    });
 
+    pfrCfgIface->register_property(ufmSupportStr, ufmSupport,
+                                   // Override set
+                                   [this](const bool req, bool propertyValue) {
+                                       if (internalSet)
+                                       {
+                                           if (req != propertyValue)
+                                           {
+                                               ufmSupport = req;
+                                               propertyValue = req;
+                                               return 1;
+                                           }
+                                       }
+                                       return 0;
+                                   });
+
     pfrCfgIface->initialize();
 
     associationIface =
@@ -163,10 +181,12 @@
     {
         bool lockVal = false;
         bool provVal = false;
-        getProvisioningStatus(lockVal, provVal);
+        bool supportVal = false;
+        getProvisioningStatus(lockVal, provVal, supportVal);
         internalSet = true;
         pfrCfgIface->set_property(ufmProvisionedStr, provVal);
         pfrCfgIface->set_property(ufmLockedStr, lockVal);
+        pfrCfgIface->set_property(ufmSupportStr, supportVal);
         internalSet = false;
     }
     return;
