mirror of
https://github.com/reactos/reactos.git
synced 2024-07-14 08:26:08 +00:00
- Fix Ki386InitializeTss to use dynamic GDT calculated from KiGetMachineBootPointers instead of static internal address. Now NTLDR boots us all the way to HalInitializeProcessor.
svn path=/trunk/; revision=24337
This commit is contained in:
parent
7c753a339a
commit
ebafbecc80
|
@ -61,7 +61,8 @@ VOID
|
||||||
FASTCALL
|
FASTCALL
|
||||||
Ki386InitializeTss(
|
Ki386InitializeTss(
|
||||||
IN PKTSS Tss,
|
IN PKTSS Tss,
|
||||||
IN PKIDTENTRY Idt
|
IN PKIDTENTRY Idt,
|
||||||
|
IN PKGDTENTRY Gdt
|
||||||
);
|
);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
|
|
|
@ -552,12 +552,13 @@ KiInitializeTSS(IN PKTSS Tss)
|
||||||
VOID
|
VOID
|
||||||
FASTCALL
|
FASTCALL
|
||||||
Ki386InitializeTss(IN PKTSS Tss,
|
Ki386InitializeTss(IN PKTSS Tss,
|
||||||
IN PKIDTENTRY Idt)
|
IN PKIDTENTRY Idt,
|
||||||
|
IN PKGDTENTRY Gdt)
|
||||||
{
|
{
|
||||||
PKGDTENTRY TssEntry, TaskGateEntry;
|
PKGDTENTRY TssEntry, TaskGateEntry;
|
||||||
|
|
||||||
/* Initialize the boot TSS. */
|
/* Initialize the boot TSS. */
|
||||||
TssEntry = &KiBootGdt[KGDT_TSS / sizeof(KGDTENTRY)];
|
TssEntry = &Gdt[KGDT_TSS / sizeof(KGDTENTRY)];
|
||||||
TssEntry->HighWord.Bits.Type = I386_TSS;
|
TssEntry->HighWord.Bits.Type = I386_TSS;
|
||||||
TssEntry->HighWord.Bits.Pres = 1;
|
TssEntry->HighWord.Bits.Pres = 1;
|
||||||
TssEntry->HighWord.Bits.Dpl = 0;
|
TssEntry->HighWord.Bits.Dpl = 0;
|
||||||
|
@ -587,7 +588,7 @@ Ki386InitializeTss(IN PKTSS Tss,
|
||||||
Tss->Ds = KGDT_R3_DATA | RPL_MASK;
|
Tss->Ds = KGDT_R3_DATA | RPL_MASK;
|
||||||
|
|
||||||
/* Setup the Double Trap TSS entry in the GDT */
|
/* Setup the Double Trap TSS entry in the GDT */
|
||||||
TssEntry = &KiBootGdt[KGDT_DF_TSS / sizeof(KGDTENTRY)];
|
TssEntry = &Gdt[KGDT_DF_TSS / sizeof(KGDTENTRY)];
|
||||||
TssEntry->HighWord.Bits.Type = I386_TSS;
|
TssEntry->HighWord.Bits.Type = I386_TSS;
|
||||||
TssEntry->HighWord.Bits.Pres = 1;
|
TssEntry->HighWord.Bits.Pres = 1;
|
||||||
TssEntry->HighWord.Bits.Dpl = 0;
|
TssEntry->HighWord.Bits.Dpl = 0;
|
||||||
|
@ -616,7 +617,7 @@ Ki386InitializeTss(IN PKTSS Tss,
|
||||||
Tss->Ds = KGDT_R3_DATA | RPL_MASK;
|
Tss->Ds = KGDT_R3_DATA | RPL_MASK;
|
||||||
|
|
||||||
/* And its associated TSS Entry */
|
/* And its associated TSS Entry */
|
||||||
TssEntry = &KiBootGdt[KGDT_NMI_TSS / sizeof(KGDTENTRY)];
|
TssEntry = &Gdt[KGDT_NMI_TSS / sizeof(KGDTENTRY)];
|
||||||
TssEntry->HighWord.Bits.Type = I386_TSS;
|
TssEntry->HighWord.Bits.Type = I386_TSS;
|
||||||
TssEntry->HighWord.Bits.Pres = 1;
|
TssEntry->HighWord.Bits.Pres = 1;
|
||||||
TssEntry->HighWord.Bits.Dpl = 0;
|
TssEntry->HighWord.Bits.Dpl = 0;
|
||||||
|
|
|
@ -318,7 +318,7 @@ KiSystemStartup(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
||||||
KiGetMachineBootPointers(&Gdt, &Idt, &Pcr, &Tss);
|
KiGetMachineBootPointers(&Gdt, &Idt, &Pcr, &Tss);
|
||||||
|
|
||||||
/* Setup the TSS descriptors and entries */
|
/* Setup the TSS descriptors and entries */
|
||||||
Ki386InitializeTss(Tss, Idt);
|
Ki386InitializeTss(Tss, Idt, Gdt);
|
||||||
|
|
||||||
/* Initialize the PCR */
|
/* Initialize the PCR */
|
||||||
RtlZeroMemory(Pcr, PAGE_SIZE);
|
RtlZeroMemory(Pcr, PAGE_SIZE);
|
||||||
|
|
Loading…
Reference in a new issue