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

paddr_t should be larger than 32 bits when CFG_WITH_LPAE is enabled #1172

Closed
glneo opened this issue Nov 9, 2016 · 5 comments
Closed

paddr_t should be larger than 32 bits when CFG_WITH_LPAE is enabled #1172

glneo opened this issue Nov 9, 2016 · 5 comments
Labels

Comments

@glneo
Copy link
Contributor

glneo commented Nov 9, 2016

Like in the Linux kernel, when LPAE support is enabled the type for storing physical addresses should be a >=40 bit type (64 bit). 'paddr_t' is unconditionally typedef'd as 'uintptr_t' making it is 32 bits wide on 32 bit platforms even when LPAE is supported by the platform.

@jenswi-linaro
Copy link
Contributor

Agree, it has always been the intent to have paddr_t as large as needed.
Patches are welcome! :-)

@glneo
Copy link
Contributor Author

glneo commented Nov 11, 2016

Was working on a patch for this, but ran into the issue that if we are a 32-bit core, when OPTEE casts from 'void *' to 'paddr_t' we get a build warning/error (cast from pointer to integer of different size), this is done in a large number of places. I'll find the time for some patches on this here in a little bit. :)

@jbech-linaro
Copy link
Contributor

@glneo , have you been able to look at this? If yes, any updates? (I'm trying to clean up open issues).

@glneo
Copy link
Contributor Author

glneo commented Apr 11, 2017

No, sorry I haven't had any time to look further into this, a quick attempt at a fix lead to further complications as this is used in several places where I do not know what the correct behavior should be, I'll submit an attempt but cannot guarantee correctness.

@github-actions
Copy link

github-actions bot commented Feb 5, 2020

This issue has been marked as a stale issue because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants