opentitanlib/ownership/
mod.rs1use std::sync::atomic::{AtomicBool, Ordering};
6
7mod application_key;
8mod flash;
9mod flash_info;
10mod misc;
11pub mod owner;
12mod rescue;
13
14pub use application_key::{ApplicationKeyDomain, OwnerApplicationKey};
15pub use flash::{FlashFlags, OwnerFlashConfig, OwnerFlashRegion};
16pub use flash_info::{OwnerFlashInfoConfig, OwnerInfoPage};
17pub use misc::{KeyMaterial, OwnershipKeyAlg, TlvHeader, TlvTag};
18pub use owner::{OwnerBlock, OwnerConfigItem, SramExecMode};
19pub use rescue::{CommandTag, OwnerRescueConfig, RescueType};
20
21pub struct GlobalFlags;
22
23static DEBUG: AtomicBool = AtomicBool::new(false);
24
25impl GlobalFlags {
26 pub fn set_debug(v: bool) {
29 DEBUG.store(v, Ordering::Relaxed);
30 }
31
32 pub fn not_debug<T>(_: &T) -> bool {
34 !DEBUG.load(Ordering::Relaxed)
35 }
36}