-
Notifications
You must be signed in to change notification settings - Fork 11
[manifest] Initial parser for the PCD #134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG. I added some comments mainly for me to understand the assumptions of the implementation.
} | ||
|
||
/// Returns total number of flash ports on this RoT. | ||
pub fn flash_ports(&self) -> usize { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is a flash_port
? Is it a spi_flash
interface or something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea. I'm just taking a stab in the dark based off of the doc I read.
} | ||
|
||
/// Returns the total number of component RoTs connected to this RoT. | ||
pub fn components(&self) -> usize { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is a component an aggregation of endpoints connected via I2C and SPI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Presumably, but Cerberus doesn't currently define any endpoints connected over SPI. What I've implemented is basically what is written down today as a starting point.
DualFiltered, | ||
SingleFiltered, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure what DualFiltered
and SingleFiltered
map to. I assume it is a pluton's specific hardware feature.
There is also Quad support which may be available in some implementations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea either. I'm just blindly copying names for us to document later.
/// This setting describes what to do with a port's reset line when the flash | ||
/// is being verified with respect to a PFM. | ||
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] | ||
pub enum SpiResetPolicy { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find this name a bit confusing because I read it as the SPI flash reset policy, whereas in reality it is the policy of the SPI host attached to the SPI flash device. Maybe SpiHostDeviceResetPolicy
? Anyway, I think the docstring refers to it as a port
. I wonder if this assumes that there is MUX or something between the host and the device...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure. My read was that this is what you're supposed to do to the flash device's reset line? This is my guess from like, three bullet points describing these policies, which are more-or-less copied down as the docstrings below.
Signed-off-by: Miguel Young de la Sota <[email protected]>
Note: this CL is layered on top of #133.
Unit tests and a
manifest::owned
implementation still pending.