Create pci_routing::Pin::from_pci_interrupt_pin convenience fn. - #359
Conversation
Tested on QEMU q35.
|
Good idea in principle, although I think your code could have explained this a bit more:
Which is why I suggest the extra function in my comment. |
| } | ||
|
|
||
| #[derive(Debug, Clone, Copy)] | ||
| pub struct InvalidPciInterruptPinError(pub u8); |
There was a problem hiding this comment.
I'm of two minds about this. I feel like it should be a "true" error (impl Error) for similar reasons to those in this article, but I also see that AmlError doesn't do this.
It's probably fine to leave as it is, but @IsaacWoods, any thoughts?
There was a problem hiding this comment.
I think the reason for this is purely me ignoring Error while it was std-only for a long while and then me being out of date! I definitely don't see any reason we shouldn't be implementing it for both errors like this and very likely for AmlError.
Doesn't necessarily need to block this PR, but up to you.
There was a problem hiding this comment.
👍 Quite happy to leave it and reconsider if (when!) we think about errors a bit more
martin-hughes
left a comment
There was a problem hiding this comment.
Nice, thanks for the updates! I'm happy to merge. I'll give Isaac a bit of time to reply, but I think I'm happy to leave these error types and to consider error-handling again later.
Closes #358
Tested on QEMU q35.