Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
#include "precompiled.h"
#include "lib/sysdep/arch/x86_x64/apic.h"
#include "lib/bits.h"
#include "lib/module_init.h"
#include "lib/sysdep/cpu.h"
#include "lib/sysdep/os_cpu.h"
#include "lib/sysdep/arch/x86_x64/x86_x64.h"
#include <algorithm>
Functions | |
ApicId | GetApicId () |
static Status | GetAndValidateApicIds () |
static Status | InitApicIds () |
bool | AreApicIdsReliable () |
bool | IsProcessorKnown (ApicId apicId) |
static size_t | IndexFromApicId (const ApicId *apicIds, ApicId apicId) |
size_t | ProcessorFromApicId (ApicId apicId) |
size_t | ContiguousIdFromApicId (ApicId apicId) |
static ApicId | ApicIdFromIndex (const ApicId *apicIds, size_t index) |
ApicId | ApicIdFromProcessor (size_t processor) |
ApicId | ApicIdFromContiguousId (size_t contiguousId) |
Variables | |
static size_t | numIds |
static ApicId | processorApicIds [os_cpu_MaxProcessors] |
static ApicId | sortedApicIds [os_cpu_MaxProcessors] |
static ModuleInitState | apicInitState { 0 } |
ApicId ApicIdFromContiguousId | ( | size_t | contiguousId | ) |
ApicId ApicIdFromProcessor | ( | size_t | processor | ) |
bool AreApicIdsReliable | ( | ) |
size_t ContiguousIdFromApicId | ( | ApicId | apicId | ) |
|
static |
ApicId GetApicId | ( | ) |
rationale: the alternative of accessing the APIC mmio registers is not feasible. We also don't want to interfere with the OS's constant use of the APIC registers.
|
static |
bool IsProcessorKnown | ( | ApicId | apicId | ) |
size_t ProcessorFromApicId | ( | ApicId | apicId | ) |
|
static |
|
static |
|
static |
|
static |