Add APIs for parsing BIOS configuration JSON

1) Add API to get the BIOS strings from the JSON configuration files.
2) Add API to parse the config file and setup the lookup data structures
   for the BIOS attribute table and BIOS attribute value table.
3) Add API to get the possible values and the default values for the BIOS
   enumeration type.
4) Add API to get the current value of the BIOS enumeration attribute.
5) BIOS attributes can be configured by JSON configuration files which have
   information to build the BIOS string table, attribute table and attribute
   value table.

Change-Id: I747dd3cfc0801f8262ffafe2d516ae7f4ddeb7a2
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
diff --git a/libpldmresponder/examples/bios/enum_attrs.json b/libpldmresponder/examples/bios/enum_attrs.json
new file mode 100644
index 0000000..01f8526
--- /dev/null
+++ b/libpldmresponder/examples/bios/enum_attrs.json
@@ -0,0 +1,53 @@
+# This is a sample JSON configuration file for BIOS enumeration type
+{
+   "entries":[
+      {
+         "attribute_name" : "HMCManagedState",
+         "possible_values" : [ "On", "Off" ],
+         "default_values" : [ "On" ],
+         "object_path" : "/xyz/abc/def",
+         // This BIOS attribute has a D-Bus property as backend. 
+         "dbus":
+            {
+               "interface" : "xyz.openbmc_project.HMCManaged.State",
+               "property_name" : "State",
+               "property_type" : "string",
+               # Number of property_values should match to the number of possible values.
+               # Each is entry in the possible_values is mapped to entry in property_values. 
+               "property_values" : ["xyz.openbmc_project.State.On", "xyz.openbmc_project.State.Off"]
+            }
+      },
+      {
+         "attribute_name" : "FWBootSide",
+         "possible_values" : [ "Perm", "Temp" ],
+         "default_values" : [ "Perm" ],
+         "dbus":
+            {
+               "object_path" : "/xyz/abc/def",
+               "interface" : "xyz.openbmc.FWBoot.Side",
+               "property_name" : "Side",
+               "property_type" : "bool",
+               "property_values" : [true, false]
+            }
+      },
+      {
+         "attribute_name" : "InbandCodeUpdate",
+         "possible_values" : [ "Allowed", "NotAllowed" ],
+         "default_values" : [ "Allowed" ],
+         "dbus":
+            {
+               "object_path" : "/xyz/abc/def",
+               "interface" : "xyz.openbmc.InBandCodeUpdate",
+               "property_name" : "Policy",
+               "property_type" : "uint8_t",
+               "property_values" : [0, 1]
+            }
+      },
+      {
+         # This is an example of BIOS Enumeration Read only attribute
+         "attribute_name" : "CodeUpdatePolicy",
+         "possible_values" : [ "Concurrent", "Disruptive" ],
+         "default_values" : [ "Concurrent" ]
+      }
+    ]
+}