diff options
author | Nayna Jain <nayna@linux.ibm.com> | 2020-09-16 11:21:16 -0500 |
---|---|---|
committer | Oliver O'Halloran <oohall@gmail.com> | 2020-10-01 13:44:06 +1000 |
commit | c5c71a51616b6011c5a1ff59feb3618df6beb5b0 (patch) | |
tree | b4194bfaa410996b865ffa4ffca3c7da0879d716 /include | |
parent | b3a13fea4f57df9ce2b0c91f91a30d12af38b358 (diff) | |
download | skiboot-c5c71a51616b6011c5a1ff59feb3618df6beb5b0.zip skiboot-c5c71a51616b6011c5a1ff59feb3618df6beb5b0.tar.gz skiboot-c5c71a51616b6011c5a1ff59feb3618df6beb5b0.tar.bz2 |
secvar: change backend hook interface to take in bank references
Previously, backends were implicitly expected to operate on global
references to the variable and update banks. This patch changes the
interface for this driver to instead take the banks in as an argument.
This removes the implict dependency on these references, makes the
design consistent with the storage driver, and also will simplify unit
testing of these functions.
Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
Signed-off-by: Eric Richter <erichte@linux.ibm.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/secvar.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/include/secvar.h b/include/secvar.h index 7652553..db10395 100644 --- a/include/secvar.h +++ b/include/secvar.h @@ -17,11 +17,23 @@ struct secvar_storage_driver { }; struct secvar_backend_driver { - int (*pre_process)(void); // Perform any pre-processing stuff (e.g. determine secure boot state) - int (*process)(void); // Process all updates - int (*post_process)(void); // Perform any post-processing stuff (e.g. derive/update variables) - int (*validate)(struct secvar *var); // Validate a single variable, return boolean - const char *compatible; // String to use for compatible in secvar node + /* Perform any pre-processing stuff (e.g. determine secure boot state) */ + int (*pre_process)(struct list_head *variable_bank, + struct list_head *update_bank); + + /* Process all updates */ + int (*process)(struct list_head *variable_bank, + struct list_head *update_bank); + + /* Perform any post-processing stuff (e.g. derive/update variables)*/ + int (*post_process)(struct list_head *variable_bank, + struct list_head *update_bank); + + /* Validate a single variable, return boolean */ + int (*validate)(struct secvar *var); + + /* String to use for compatible in secvar node */ + const char *compatible; }; |