Kernel: Make Processor structure default to zero
This moves processor info to bss instead of having it in data section
This commit is contained in:
@@ -209,7 +209,7 @@ namespace Kernel
|
||||
static vaddr_t s_shared_page_vaddr;
|
||||
|
||||
ProcessorID m_id { 0 };
|
||||
uint8_t m_index { 0xFF };
|
||||
uint8_t m_index { 0 };
|
||||
|
||||
vaddr_t m_thread_syscall_stack;
|
||||
|
||||
|
||||
@@ -60,8 +60,13 @@ namespace Kernel
|
||||
Kernel::panic("Trying to initialize invalid processor {}", id.m_id);
|
||||
|
||||
if (id == s_bsp_id)
|
||||
{
|
||||
for (auto& processor : s_processors)
|
||||
{
|
||||
processor.m_id = PROCESSOR_NONE;
|
||||
processor.m_index = 0xFF;
|
||||
}
|
||||
}
|
||||
|
||||
auto& processor = s_processors[id.m_id];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user