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

fix: patches from kent #25

Closed
wants to merge 1 commit into from
Closed

Conversation

ridale
Copy link

@ridale ridale commented Aug 16, 2021

Patches to fix libethdrivers so they work with Axel-H's changes to the ethdriver system, there is also a patch in util_libs

@axel-h
Copy link
Member

axel-h commented Aug 17, 2021

please rewrite the commit comment:

  • seem this is basically mapping the DMA buffer uncached now?
  • Signed-off-by should be a valid email address

Signed-off-by: ridale <ridale123@outlook.com>
@wom-bat
Copy link
Member

wom-bat commented Aug 9, 2022

You only need to map the buffer uncached if DMA is not coherent with CPU traffic. I.e., on armv7 and some (most?) aarch64. It can be mapped cached for x86, and any other platform that has a PIPT cache. I don't know enough about RISC-V to say if it's needed here.

What I think's needed is a #define that says whether DMA and CPU are cache-coherent, and use that here.

@kent-mcleod
Copy link
Member

What I think's needed is a #define that says whether DMA and CPU are cache-coherent, and use that here.

I'm going to try checking the return code of ps_dma_alloc() after a cached request and if it failed, fall back to an uncached request. The assumption is that the CAmkES configuration will have only defined DMA pools with the right cache attribute for the platform.

@ridale
Copy link
Author

ridale commented Aug 30, 2022

@kent-mcleod If you are prepared to take this over I am happy to close this MR.

It might be handy to leave open for anyone trying to get the ethernet camkes components to work on the aarch64 platforms until a MR with the correct solution is available.

@kent-mcleod
Copy link
Member

@kent-mcleod If you are prepared to take this over I am happy to close this MR.

It might be handy to leave open for anyone trying to get the ethernet camkes components to work on the aarch64 platforms until a MR with the correct solution is available.

This is still a bit hacky, but it would at least still allow x86 platforms to continue to use cached dma mappings: #46

@ridale
Copy link
Author

ridale commented Nov 16, 2022

Closing this in favor of MR #46

@ridale ridale closed this Nov 16, 2022
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

Successfully merging this pull request may close these issues.

4 participants