aboutsummaryrefslogtreecommitdiff
path: root/arch/sandbox/cpu/state.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-08-01 14:41:22 -0400
committerTom Rini <trini@konsulko.com>2021-08-01 14:41:22 -0400
commit72ffb41a873722993d89c02bae4743a8ad6f16f9 (patch)
tree2508a115df4604adc9395b4f72e8ec3ec8fff90f /arch/sandbox/cpu/state.c
parent5371593aed56ee11cbb6cc6ac8d058fcd9b8f58c (diff)
parenteec44c7218a3c3ce924a282cc46a59e83feb9de1 (diff)
Merge tag 'dm-pull-1aug21' of https://source.denx.de/u-boot/custodians/u-boot-dm
sandbox TPM-emulator improvements rST documentation and fixes for moveconfig handle empty 'ranges' property in dtoc patman warning for invalid tag clean-ups to 'fdt add' command
Diffstat (limited to 'arch/sandbox/cpu/state.c')
-rw-r--r--arch/sandbox/cpu/state.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/sandbox/cpu/state.c b/arch/sandbox/cpu/state.c
index a4d99bade4..4e822538ba 100644
--- a/arch/sandbox/cpu/state.c
+++ b/arch/sandbox/cpu/state.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <autoboot.h>
#include <bloblist.h>
#include <errno.h>
#include <fdtdec.h>
@@ -378,6 +379,23 @@ void state_reset_for_test(struct sandbox_state *state)
state->next_tag = state->ram_size;
}
+bool autoboot_keyed(void)
+{
+ struct sandbox_state *state = state_get_current();
+
+ return IS_ENABLED(CONFIG_AUTOBOOT_KEYED) && state->autoboot_keyed;
+}
+
+bool autoboot_set_keyed(bool autoboot_keyed)
+{
+ struct sandbox_state *state = state_get_current();
+ bool old_val = state->autoboot_keyed;
+
+ state->autoboot_keyed = autoboot_keyed;
+
+ return old_val;
+}
+
int state_init(void)
{
state = &main_state;