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(flash): use mmap to create the io space #623

Merged
merged 1 commit into from
Nov 1, 2024
Merged

Conversation

poemonsense
Copy link
Member

The flash device is registered when add_mmio_map is called with the space pointer. The space pointer is fixed after this registration. However, there is a wrong new_space call when flash_img is not defined, which updates the flash space pointer. The flash contents are thus incorrectly loaded to the new pointer. However, the IO device table still uses the legacy pointer.

This commits fix it by using the mmap allocator and the fixed flash_base pointer.

The flash device is registered when `add_mmio_map` is called with
the space pointer. The space pointer is fixed after this registration.
However, there is a wrong `new_space` call when `flash_img` is not
defined, which updates the flash space pointer. The flash contents
are thus incorrectly loaded to the new pointer. However, the IO device
table still uses the legacy pointer.

This commits fix it by using the mmap allocator and the fixed flash_base
pointer.
@lewislzh lewislzh merged commit ab7e079 into master Nov 1, 2024
7 checks passed
@lewislzh lewislzh deleted the fix-flash-pointer branch November 1, 2024 03:12
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