Replace hardcoded stack count with architecture specific constant
All checks were successful
Builds / ExectOS (amd64, debug) (push) Successful in 41s
Builds / ExectOS (amd64, release) (push) Successful in 40s
Builds / ExectOS (i686, release) (push) Successful in 36s
Builds / ExectOS (i686, debug) (push) Successful in 37s

This commit is contained in:
2026-03-28 20:53:50 +01:00
parent a608b26fde
commit e9aaeab982
3 changed files with 5 additions and 1 deletions

View File

@@ -128,7 +128,9 @@ MM::KernelPool::AllocateProcessorStructures(IN ULONG CpuNumber,
/* Align address to page size boundary and find a space for processor block */
Address = ROUND_UP((UINT_PTR)ProcessorStructures, MM_PAGE_SIZE);
ProcessorBlock = (PKPROCESSOR_BLOCK)((PUCHAR)Address + (2 * KERNEL_STACK_SIZE) + (GDT_ENTRIES * sizeof(KGDTENTRY)));
ProcessorBlock = (PKPROCESSOR_BLOCK)((PUCHAR)Address +
(KERNEL_STACKS * KERNEL_STACK_SIZE) +
(GDT_ENTRIES * sizeof(KGDTENTRY)));
/* Store processor number in the processor block */
ProcessorBlock->CpuNumber = CpuNumber;