@@ -17,11 +17,14 @@ 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
+ int (*pre_process)(struct list_head *variable_bank,
+ struct list_head *update_bank); // Perform any pre-processing stuff (e.g. determine secure boot state)
+ int (*process)(struct list_head *variable_bank,
+ struct list_head *update_bank); // Process all updates
+ int (*post_process)(struct list_head *variable_bank,
+ struct list_head *update_bank); // 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
};
@@ -60,7 +60,7 @@ int secvar_main(struct secvar_storage_driver storage_driver,
secvar_set_status("okay");
if (secvar_backend.pre_process) {
- rc = secvar_backend.pre_process();
+ rc = secvar_backend.pre_process(&variable_bank, &update_bank);
if (rc) {
prlog(PR_ERR, "Error in backend pre_process = %d\n", rc);
/* Early failure state, lock the storage */
@@ -74,7 +74,7 @@ int secvar_main(struct secvar_storage_driver storage_driver,
goto out;
/* Process variable updates from the update bank. */
- rc = secvar_backend.process();
+ rc = secvar_backend.process(&variable_bank, &update_bank);
/* Create and set the ibm,opal/secvar/update-status device tree property */
secvar_set_update_status(rc);
@@ -100,7 +100,7 @@ int secvar_main(struct secvar_storage_driver storage_driver,
secvar_storage.lock();
if (secvar_backend.post_process) {
- rc = secvar_backend.post_process();
+ rc = secvar_backend.post_process(&variable_bank, &update_bank);
if (rc) {
prlog(PR_ERR, "Error in backend post_process = %d\n", rc);
goto out;