-
Notifications
You must be signed in to change notification settings - Fork 18
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
PCIe/NVMe Driver #283
Draft
midnightveil
wants to merge
60
commits into
main
Choose a base branch
from
pcie_nvme
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
PCIe/NVMe Driver #283
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: Ivan Velickovic <i.velickovic@unsw.edu.au>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
turns out I was setting the "host page size" config bits incorrectly, specifying a required page size alignment of 2^13 (i.e. 0x2000, not 0x1000). the first queue was aligned to that, the second was not and was failing. at some point i tried using the same queu eaddress for creating both queues and that worked; so I went "is this some sort of alignment issue?" and went off diving into u-boot to discover it aligns dma buffers to 32bytes which didn't help since they were both page aligned anyway. anyway so i then just started progressively masking off higher and higher bits until the difference between 0x40283000 and 0x40282000 was that one bit and then i was like ??? wtf went scouring through nvme docs, only alignment i could find was dword aligned... then i realised that was mostly talking about PRP entries (scatter-gather list dma) meanwhile i was using just contiguous dma because easier, which references CC.MPS... which i then looked and i thought just doing PAGE_SIZE >> 12 seemed off cause 0x1000 >> 12 = 0x1 and 2^(12 + CC.MPS) is 2^13. and i realised it wanted a log2 value not a shifted value Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
https://metebalci.com/blog/a-quick-tour-of-nvm-express-nvme/ Signed-off-by: julia <git.ts@trainwit.ch>
this traps with unimp :( Signed-off-by: julia <git.ts@trainwit.ch>
.. or being entirely optimised out https://cerberus.cl.cam.ac.uk/?short/cea8cb this is undefined behaviour. god I love C Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
these are undefined by PCIe/NVMe specs Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
…upt sonce???? even though it should do forever???) https://www.mail-archive.com/qemu-devel@nongnu.org/msg931360.html might be this bug Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Signed-off-by: julia <git.ts@trainwit.ch>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is very draft and a WIP, notably that it doesn't seem to work in RISC-V platforms1. It also doesn't do any PCIe initialisation of which there is a significant amount.
Just creating this so this branch isn't lost.
U-Boot patch for PCI on imx8mm
Footnotes
Infinite stream of interrupts (Star64) or only one interrupt even if not deasserted (QEMU). Not sure what's wrong with QEMU (maybe this?). Need to try figuring out the meaning of the platform-specific device registers for PCIe on the Star64 to see if there's some way of ACKing interrupts there (U-Boot somewhat knows about these) ↩