BIOS: support readonly attributes
Since the P10 system has BMC to manager the BIOS attributes,
and the BMC side does not know the attribute values of the BIOS,
it should allow the OOB interface(Host) to be able to set BIOS
readOnly attributes, while still preventing the redfish-doPATCH
operation on it.
Tested: if the readOnly attribute of the pvm_system_name is true,
so we can use `pldmtool` to update the BIOS attributes.
pldmtool bios SetBIOSAttributeCurrentValue -a pvm_system_name -d XXX
{
"Response": "SUCCESS"
}
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Iabcb5c2400eb0a5c208cc76180d4b07e02457f44
diff --git a/libpldmresponder/bios_config.cpp b/libpldmresponder/bios_config.cpp
index 10ec89c..57e2dc9 100644
--- a/libpldmresponder/bios_config.cpp
+++ b/libpldmresponder/bios_config.cpp
@@ -636,6 +636,7 @@
switch (attrType)
{
case PLDM_BIOS_ENUMERATION:
+ case PLDM_BIOS_ENUMERATION_READ_ONLY:
{
auto value =
table::attribute_value::decodeEnumEntry(attrValueEntry);
@@ -652,6 +653,7 @@
return PLDM_SUCCESS;
}
case PLDM_BIOS_INTEGER:
+ case PLDM_BIOS_INTEGER_READ_ONLY:
{
auto value =
table::attribute_value::decodeIntegerEntry(attrValueEntry);
@@ -667,6 +669,7 @@
return PLDM_SUCCESS;
}
case PLDM_BIOS_STRING:
+ case PLDM_BIOS_STRING_READ_ONLY:
{
auto stringConf = table::attribute::decodeStringEntry(attrEntry);
auto value =