Allow !no-map GPU reserved ranges and map them#432
Merged
Conversation
bbe0b29 to
4763a75
Compare
This is set in the device trees anyway, but a future kernel release may rely on this being *not* set. Signed-off-by: Asahi Lina <lina@asahilina.net>
4763a75 to
3fbaf47
Compare
jannau
reviewed
Jan 20, 2025
Member
jannau
left a comment
There was a problem hiding this comment.
Have you tested if u-boot still works with this?
src/kboot.c
Outdated
| { | ||
| const char *name = fdt_get_name(dt, node, NULL); | ||
| const char *status = fdt_getprop(dt, node, "status", NULL); | ||
| if (status && !strcmp(status, "disabled")) |
Member
There was a problem hiding this comment.
I'm surprised libfdt misses a function for this
3fbaf47 to
9ebc75b
Compare
This is the same thing U-Boot does for the EFI mem map, and means these ranges get a `struct page` in the kernel. Signed-off-by: Asahi Lina <lina@asahilina.net>
9ebc75b to
8493456
Compare
Contributor
Author
It seems to work fine. I think u-boot just merges everything together into its own memory map. The DT still contains a subset of memory ranges (main + the map ones this adds), and u-boot still reports all reserved-memory ranges (including no-map) in the EFI mem map to the kernel. |
This file contains hidden or 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
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 should make the behavior with and without u-boot (mostly) consistent. I think u-boot also adds mem ranges for
no-mapreserved ranges (then the kernel doesn't map them as requested), but that shouldn't make much of a difference.