Skip to content
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

Use ECAM for reading PCIe config space #130

Open
crawfxrd opened this issue Dec 13, 2024 · 1 comment
Open

Use ECAM for reading PCIe config space #130

crawfxrd opened this issue Dec 13, 2024 · 1 comment

Comments

@crawfxrd
Copy link
Member

Replace x86-specific port IO access with ECAM for reading PCIe config space.

let address = 0x80000000
| (u32::from(bus) << 16)
| (u32::from(dev) << 11)
| (u32::from(func) << 8)
| u32::from(offset);
Pio::<u32>::new(0xCF8).write(address);
Ok(Pio::<u32>::new(0xCFC).read())

@crawfxrd
Copy link
Member Author

crawfxrd commented Dec 16, 2024

Since the goal is to work on AArch64, might be better to gate implementation per arch?

  • x86_64: Continue using port IO
  • aarch64: Parse devicetree to determine address

I've got not clue how that works though.


We should still do PCIe access using ECAM. But other things like SuperIO and EC would be accessed through devicetree.

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

No branches or pull requests

1 participant