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

implement a new context switch #240

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Freax13
Copy link
Member

@Freax13 Freax13 commented Jun 29, 2022

This pr reimplements the context switch in such a way that we don't need to map any of the bootloader's memory into the kernel's address space (see #239 for more info). This pr also makes the GDT base address configurable instead of identity mapping it into the kernel's address space.

Depends on rust-osdev/x86_64#385
Closes #239

@phil-opp
Copy link
Member

Thanks a lot for implementing this! Unfortunately, I don't have much time right now, but I try my best to review this as soon as possible.

@Freax13
Copy link
Member Author

Freax13 commented Jul 10, 2022

Thanks a lot for implementing this! Unfortunately, I don't have much time right now, but I try my best to review this as soon as possible.

No worries, take your time!

@Freax13 Freax13 force-pushed the new-cleaner-context-switch branch from 57dde98 to cad88ac Compare October 29, 2022 08:40
@Freax13
Copy link
Member Author

Freax13 commented Oct 29, 2022

Just rebased onto the latest next branch.

@phil-opp
Copy link
Member

Thanks a lot! I'm really sorry for the delay in reviewing.

Given that this changes a critical part of the boot process, I think we should get #232 merged and released first since many people tested that version already. This change would then become v0.11.1, which would make it easier to compare the behavior and detect possible regressions. Would that be ok for you?

@Freax13
Copy link
Member Author

Freax13 commented Nov 13, 2022

Sure, sounds good to me!

@phil-opp phil-opp added this to the v0.11.1 milestone Nov 13, 2022
@phil-opp phil-opp deleted the branch rust-osdev:main November 13, 2022 20:06
@phil-opp phil-opp closed this Nov 13, 2022
@Freax13
Copy link
Member Author

Freax13 commented Nov 13, 2022

Why was this PR closed? Couldn't we just have switched the target branch to main?

@bjorn3
Copy link
Contributor

bjorn3 commented Nov 13, 2022

Given that the delection of the target branch and the closing of this PR happened at the same time I thinl github auto-closed it.

@phil-opp
Copy link
Member

Oh wow, looks like a race condition on GitHub's side. Normally, it just changes the base branch in this case (and it did so for #282), but apparently it handled the "branch deleted" action first for this PR.

@phil-opp phil-opp reopened this Nov 13, 2022
@phil-opp phil-opp changed the base branch from next to main November 13, 2022 20:45
@phil-opp
Copy link
Member

Ok, restoring the branch allowed me to reopen this PR. I now changed the base branch manually.

@Freax13
Copy link
Member Author

Freax13 commented Nov 13, 2022

Thanks!

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.

don't leave parts of the bootloader in the kernel's address space
3 participants