Skip to content

[lib][fdtwalk] fix unaligned FDT memory reservation#505

Merged
travisg merged 1 commit into
littlekernel:masterfrom
bl4ckhyun:fdtwalk_bug
Apr 16, 2026
Merged

[lib][fdtwalk] fix unaligned FDT memory reservation#505
travisg merged 1 commit into
littlekernel:masterfrom
bl4ckhyun:fdtwalk_bug

Conversation

@bl4ckhyun
Copy link
Copy Markdown
Contributor

Reserve the full page range that covers the FDT byte range.

The previous calculation rounded the base up and the size up separately,
which could miss the first page when the FDT physical address was not
page aligned.

Fix this by rounding the base down to the containing page boundary and
including the resulting offset in the length calculation.

Signed-off-by: bl4ckhyun <wonju345@naver.com>
Copy link
Copy Markdown
Member

@travisg travisg left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@travisg travisg merged commit 8baeb28 into littlekernel:master Apr 16, 2026
120 checks passed
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.

2 participants