-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add capabilities mailbox command to RT
- Loading branch information
1 parent
d6182be
commit 2c16173
Showing
8 changed files
with
93 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/*++ | ||
Licensed under the Apache-2.0 license. | ||
File Name: | ||
capabilities.rs | ||
Abstract: | ||
File contains Capabilities mailbox command. | ||
--*/ | ||
|
||
use caliptra_common::{ | ||
capabilities::Capabilities, | ||
mailbox_api::{CapabilitiesResp, MailboxResp, MailboxRespHeader}, | ||
}; | ||
use caliptra_error::CaliptraResult; | ||
|
||
pub struct CapabilitiesCmd; | ||
impl CapabilitiesCmd { | ||
pub(crate) fn execute() -> CaliptraResult<MailboxResp> { | ||
let mut capabilities = Capabilities::default(); | ||
capabilities |= Capabilities::RT_BASE; | ||
|
||
Ok(MailboxResp::Capabilities(CapabilitiesResp { | ||
hdr: MailboxRespHeader::default(), | ||
capabilities: capabilities.to_bytes(), | ||
})) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters