diff --git a/doc/device-tree/ibm,opal/secvar/binding.rst b/doc/device-tree/ibm,opal/secvar/binding.rst index bc86fb2b08f2..0956e49c15f3 100644 --- a/doc/device-tree/ibm,opal/secvar/binding.rst +++ b/doc/device-tree/ibm,opal/secvar/binding.rst @@ -42,6 +42,25 @@ Properties: all further images to require signature validations. See the "On Enforcing Secure Mode" section below. + This property also contains a generic "ibm,secvar-backend" compatible, + which defines the basic-level compatibility of the secvar implementation. + This includes the basic behavior of the API (excluding the data format), + and the expected device tree properties contained in this node. + +- format + + Usage: + required + Value type: + string + + This property defines the format of data passed in and out of the secvar + API. In most cases, this should be the same string as the backend-specific + string in compatible. + + The format defined by this string should be documented by the corresponding + backend. + - status Usage: @@ -119,7 +138,7 @@ Example .. code-block:: dts /ibm,opal/secvar { - compatible = "ibm,edk2-compat-v1"; + compatible = "ibm,secvar-backend" "ibm,edk2-compat-v1"; status = "okay"; max-var-size = <0x1000>; diff --git a/libstb/secvar/secvar_devtree.c b/libstb/secvar/secvar_devtree.c index 5489db76ca46..4bff13921c9f 100644 --- a/libstb/secvar/secvar_devtree.c +++ b/libstb/secvar/secvar_devtree.c @@ -37,7 +37,8 @@ void secvar_init_devnode(const char *compatible) secvar_node = dt_new(sb_root, "secvar"); - dt_add_property_string(secvar_node, "compatible", compatible); + dt_add_property_strings(secvar_node, "compatible", "ibm,secvar-backend", compatible); + dt_add_property_string(secvar_node, "format", compatible); dt_add_property_u64(secvar_node, "max-var-size", secvar_storage.max_var_size); dt_add_property_u64(secvar_node, "max-var-key-len", SECVAR_MAX_KEY_LEN); }