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

Add process page table #454

Merged
merged 12 commits into from
Nov 18, 2023
Merged

Add process page table #454

merged 12 commits into from
Nov 18, 2023

Conversation

vinc
Copy link
Owner

@vinc vinc commented Dec 12, 2022

For now the process page table is just a copy of the kernel page table, but this PR adds code to switch to the new page table during the spawn syscall and switch back to the previous page table during the exit syscall.

@vinc
Copy link
Owner Author

vinc commented Nov 16, 2023

There was an alloc error on the first call of a program in userspace at address 0x44444563b190 which is process.code_addr + process.entry_point_addr:

~
> print hello
DEBUG: Could not map Page[4KiB](0x44444563b000) to PhysFrame[4KiB](0x1480000)
Error: Could not allocate address 0x44444563b190

~
> print hello
hello

Which was fixed by allocating a page at code_address without waiting for the first page fault that would allocate it.

@vinc vinc marked this pull request as ready for review November 17, 2023 09:14
@vinc vinc merged commit bcdfd71 into trunk Nov 18, 2023
1 check passed
@vinc vinc deleted the feature/process-page-table branch November 18, 2023 08:35
@vinc
Copy link
Owner Author

vinc commented Nov 18, 2023

This PR was closed just one day short of its first anniversary 🎉

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.

1 participant