-
Notifications
You must be signed in to change notification settings - Fork 216
Open
Description
Currently the code to tell if a PCIe link is up looks something like this:
/// Poll the PCIe Dev Info register to determine if the PCIe link with a
/// host is up. Note that this function should only be called when Tofino is
/// in A0, otherwise it may cause the debug port in the mainboard controller
/// to get stuck.
pub fn pcie_link_up(&mut self) -> Result<bool, SeqError> {
// There is no bit description in the documentation available for this
// register, so make use of observed magic values.
Ok(self.debug_port.read_direct(
DirectBarSegment::Bar0,
TofinoBar0Registers::PcieDevInfo,
)? & 0xf
== 0xf)
}
Even if I don't know the meaning of all the bits, when we have cases where two ends disagree if the link is up, it'd be helpful to see if this was 0 or some of the bits are there rather than just false.
Metadata
Metadata
Assignees
Labels
No labels