Skip to content

Allow !no-map GPU reserved ranges and map them - #432

Merged
marcan merged 2 commits into
mainfrom
lina/reserved-ranges
Jan 24, 2025
Merged

marcan merged 2 commits into
mainfrom
lina/reserved-ranges

Conversation

@hoshinolina

Copy link
Copy Markdown
Contributor

This should make the behavior with and without u-boot (mostly) consistent. I think u-boot also adds mem ranges for no-map reserved ranges (then the kernel doesn't map them as requested), but that shouldn't make much of a difference.

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>

@jannau jannau left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tested if u-boot still works with this?

Comment thread src/kboot.c Resolved
Comment thread 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"))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised libfdt misses a function for this

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>
@hoshinolina

hoshinolina commented Jan 24, 2025 •

Copy link
Copy Markdown
Contributor Author

Have you tested if u-boot still works with this?

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.

@marcan
marcan merged commit d2956e4 into main Jan 24, 2025
@svenpeter42
svenpeter42 deleted the lina/reserved-ranges branch August 10, 2025 12:47
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.

3 participants