Reserve initial thread frame space in AP startup stack
This commit is contained in:
@@ -463,7 +463,7 @@ ApEnterLongMode:
|
||||
movl %edi, %edi
|
||||
|
||||
/* Load dedicated Stack for AP */
|
||||
movq PROCESSOR_START_BLOCK_Stack(%rdi), %rsp
|
||||
movq PROCESSOR_START_BLOCK_InitialStack(%rdi), %rsp
|
||||
|
||||
/* Save the pointer to PROCESSOR_START_BLOCK */
|
||||
movq %rdi, %rcx
|
||||
|
||||
@@ -311,7 +311,7 @@ ApEnterProtectedMode:
|
||||
movl %eax, %cr0
|
||||
|
||||
/* Load dedicated Stack for AP */
|
||||
movl PROCESSOR_START_BLOCK_Stack(%edi), %esp
|
||||
movl PROCESSOR_START_BLOCK_InitialStack(%edi), %esp
|
||||
|
||||
/* Save the pointer to PROCESSOR_START_BLOCK */
|
||||
movl %edi, %ecx
|
||||
|
||||
@@ -174,6 +174,7 @@ HL::Cpu::StartAllProcessors(VOID)
|
||||
StartBlock->Cr3 = AR::CpuFunctions::ReadControlRegister(3);
|
||||
StartBlock->Cr4 = AR::CpuFunctions::ReadControlRegister(4);
|
||||
StartBlock->EntryPoint = (PVOID)&KE::KernelInit::BootstrapApplicationProcessor;
|
||||
StartBlock->InitialStack = (PVOID)((ULONG_PTR)StartBlock->Stack - KTHREAD_STACK_INITIAL_RESERVE);
|
||||
StartBlock->ProcessorStructures = CpuStructures;
|
||||
StartBlock->Started = FALSE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user