Theseus icon indicating copy to clipboard operation
Theseus copied to clipboard

Add pci I/O bar access and use bitfields

Open hecatia-elegua opened this issue 2 years ago • 2 comments

  • edition update/clippy as well

I added some TODOs because I'm not done with pci, will do more PRs. I actually stated a question there too: Do we / does the device author always know what kind of address a determine_mem_base call returns? I can look that up in a pci spec, just asking if anybody knows.

hecatia-elegua avatar Jan 25 '23 15:01 hecatia-elegua

To answer your question:

Do we / does the device author always know what kind of address a determine_mem_base call returns?

Yes, but we should verify that by actually checking the PCI BAR content. Your approach in the network device drivers of returning an error if it's not a memory space BAR is correct.

kevinaboos avatar Mar 27 '23 17:03 kevinaboos

Thanks for the comments, I'll think about this some more when I'm stuck on my main tasks. I do think that your version is more readable, though.

hecatia-elegua avatar Mar 27 '23 17:03 hecatia-elegua