schemas: add firmware schema for TPM
Introduce a TPM firmware schema to expose relevant attributes such as
Type, and FirmwareInfoDef, allowing the TPM Code Updater [1] to manage
TPM firmware.
[1] https://gerrit.openbmc.org/c/openbmc/phosphor-bmc-code-mgmt/+/82417
Tested:
Tested with dummy configuration.
Change-Id: Icbb244135993c0bfb052217667c62db56d978ded
Signed-off-by: Kevin Tung <kevin.tung.openbmc@gmail.com>
diff --git a/schemas/exposes_record.json b/schemas/exposes_record.json
index e79c67c..ead34d8 100644
--- a/schemas/exposes_record.json
+++ b/schemas/exposes_record.json
@@ -151,6 +151,9 @@
"$ref": "firmware.json#/$defs/EEPROMDeviceFirmware"
},
{
+ "$ref": "firmware.json#/$defs/TPMFirmware"
+ },
+ {
"$ref": "firmware.json#/$defs/BIOS"
},
{
diff --git a/schemas/firmware.json b/schemas/firmware.json
index 01c2777..4fab42f 100644
--- a/schemas/firmware.json
+++ b/schemas/firmware.json
@@ -145,6 +145,29 @@
"FirmwareDevice",
"FirmwareInfo"
]
+ },
+ "TPMFirmware": {
+ "description": "Required information to complete the TPM firmware update process",
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "Name": {
+ "description": "Unique identifier or label for the TPM device",
+ "type": "string"
+ },
+ "TPMIndex": {
+ "description": "The index of the TPM device",
+ "type": "number"
+ },
+ "Type": {
+ "description": "The type of configuration object",
+ "enum": ["TPM2Firmware"]
+ },
+ "FirmwareInfo": {
+ "$ref": "#/$defs/FirmwareInfoDef"
+ }
+ },
+ "required": ["Name", "TPMIndex", "Type", "FirmwareInfo"]
}
}
}