[NTOS:KE/x64] Fix kernel initialization for SMP#6110
Merged
tkreuzer merged 11 commits intoreactos:masterfrom Dec 8, 2023
Merged
[NTOS:KE/x64] Fix kernel initialization for SMP#6110tkreuzer merged 11 commits intoreactos:masterfrom
tkreuzer merged 11 commits intoreactos:masterfrom
Conversation
JoachimHenze
approved these changes
Dec 3, 2023
Contributor
JoachimHenze
left a comment
There was a problem hiding this comment.
Approved from a pure formal-formatting-reviews perspective. I don't have understanding of that code, but I do highly value the goal of the PR.
HBelusca
reviewed
Dec 3, 2023
ntoskrnl/ke/amd64/kiinit.c
Outdated
| KiInitializePcr(&KiInitialPcr, 0, &KiInitialThread.Tcb, KiP0DoubleFaultStack); | ||
|
|
||
| /* Setup the TSS descriptors and entries */ | ||
| KiInitializeTss(&KiInitialPcr, |
Contributor
There was a problem hiding this comment.
Note: the x86 equivalent code initializes the TSS descriptors before initializing the PCR. Is there a preferrable order of doing these operations?
Contributor
Author
There was a problem hiding this comment.
No, it doesn't matter. Only thing that matters is that the CPU doesn't make use of those before they are initialized.
32e179e to
c80ff78
Compare
HBelusca
approved these changes
Dec 8, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Fix the x64 kernel initialization, so that it works with SMP.
The basic initialization of the PCR and TSS must be independent of the CPU that executes them, so it can be done for the application processors before launching them.
I intentionally split the changes into small commits, so each of them is easy to review.
Proposed changes
Tests
https://reactos.org/testman/compare.php?ids=91633,91634,91638,91640,91641