Change the entity type for system

In the current pldm code, we are using a number 11521 for
representing a system and this value is not in the Spec
and is vendor defined(OEM).

Changing it to Logical Chassis (32813), so the BMC tree
would start with logical chassis as a parent , and under
that we would have physical chassis.

Tested By :
1. Entity Association PDR
{
    "nextRecordHandle": 73,
    "responseCount": 26,
    "recordHandle": 72,
    "PDRHeaderVersion": 1,
    "PDRType": "Entity Association PDR",
    "recordChangeNumber": 0,
    "dataLength": 16,
    "containerID": 1,
    "associationType": "Physical",
    "containerEntityType": "[Logical] System chassis (main enclosure)",
    "containerEntityInstanceNumber": 1,
    "containerEntityContainerID": 0,
    "containedEntityCount": 1,
    "containedEntityType[1]": "[Physical] System chassis (main enclosure)",
    "containedEntityInstanceNumber[1]": 1,
    "containedEntityContainerID[1]": 1
}

2. FRU Record PDR
{
    "nextRecordHandle": 2,
    "responseCount": 20,
    "recordHandle": 1,
    "PDRHeaderVersion": 1,
    "PDRType": "FRU Record Set PDR",
    "recordChangeNumber": 0,
    "dataLength": 10,
    "PLDMTerminusHandle": 0,
    "FRURecordSetIdentifier": 1,
    "entityType": "[Logical] System chassis (main enclosure)",
    "entityInstanceNumber": 1,
    "containerID": 0
}

Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: I0a2aa5a9e3da4ea860bb3fa43322e8889e666d2f
diff --git a/configurations/fru_master.json b/configurations/fru_master.json
index 92f3843..c3b3417 100644
--- a/configurations/fru_master.json
+++ b/configurations/fru_master.json
@@ -15,6 +15,6 @@
                         "xyz.openbmc_project.Inventory.Item.Bmc": 137,
                         "xyz.openbmc_project.Inventory.Item.Connector": 185,
                         "xyz.openbmc_project.Inventory.Item.PCIeSlot": 186,
-                        "xyz.openbmc_project.Inventory.Item.System": 11521
+                        "xyz.openbmc_project.Inventory.Item.System": 32813
            }
 }
diff --git a/libpldm/entity.h b/libpldm/entity.h
index 9bc50eb..9e657c1 100644
--- a/libpldm/entity.h
+++ b/libpldm/entity.h
@@ -137,9 +137,6 @@
 	PLDM_ENTITY_PLUG = 189,
 	PLDM_ENTITY_SOCKET = 190,
 
-	/* Logical */
-	PLDM_ENTITY_SYSTEM_LOGICAL = 11521,
-
 	/* OEM ranges */
 	PLDM_OEM_ENTITY_TYPE_START = 24576,
 	PLDM_OEM_ENTITY_TYPE_END = 32767,
diff --git a/libpldmresponder/fru.cpp b/libpldmresponder/fru.cpp
index f0c2214..ce0121b 100644
--- a/libpldmresponder/fru.cpp
+++ b/libpldmresponder/fru.cpp
@@ -174,8 +174,10 @@
             try
             {
                 pldm::responder::dbus::Value propValue;
-                if (entity.entity_type == PLDM_ENTITY_SYSTEM_LOGICAL &&
-                    prop == "Version")
+
+                // Assuming that 0 container Id is assigned to the System (as
+                // that should be the top most container as per dbus hierarchy)
+                if (entity.entity_container_id == 0 && prop == "Version")
                 {
                     propValue = populatefwVersion();
                 }
diff --git a/pldmtool/pldm_platform_cmd.cpp b/pldmtool/pldm_platform_cmd.cpp
index de93a54..a0e5ac2 100644
--- a/pldmtool/pldm_platform_cmd.cpp
+++ b/pldmtool/pldm_platform_cmd.cpp
@@ -298,7 +298,6 @@
         {PLDM_ENTITY_INTERCONNECT, "Interconnect"},
         {PLDM_ENTITY_PLUG, "Plug"},
         {PLDM_ENTITY_SOCKET, "Socket"},
-        {PLDM_ENTITY_SYSTEM_LOGICAL, "System (Logical)"},
     };
 
     const std::map<uint16_t, std::string> stateSet = {