Skip to content

[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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

mcy
Copy link
Contributor

@mcy mcy commented Oct 13, 2021

Note: this CL is layered on top of #133.

Unit tests and a manifest::owned implementation still pending.

@mcy mcy requested review from cfrantz and moidx as code owners October 13, 2021 20:00
Copy link

@moidx moidx left a 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 {
Copy link

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?

Copy link
Contributor Author

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 {
Copy link

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?

Copy link
Contributor Author

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.

Comment on lines +342 to +343
DualFiltered,
SingleFiltered,
Copy link

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.

Copy link
Contributor Author

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 {
Copy link

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...

Copy link
Contributor Author

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.

@mcy mcy requested a review from moidx October 14, 2021 15:56
Signed-off-by: Miguel Young de la Sota <[email protected]>
@moidx moidx removed their request for review May 3, 2022 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants