mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:27:35 +00:00
Kernel: Add x2APIC support
This allows addressing all cores on more modern processors. For now, we still have a hardcoded limit of 64 due to s_processors being a static array.
This commit is contained in:
parent
123087e235
commit
8a258edfd6
5 changed files with 108 additions and 48 deletions
|
@ -102,9 +102,9 @@ struct DeferredCallEntry {
|
|||
};
|
||||
|
||||
class Processor;
|
||||
// Note: We only support 8 processors at most at the moment,
|
||||
// so allocate 8 slots of inline capacity in the container.
|
||||
using ProcessorContainer = Array<Processor*, 8>;
|
||||
// Note: We only support 64 processors at most at the moment,
|
||||
// so allocate 64 slots of inline capacity in the container.
|
||||
using ProcessorContainer = Array<Processor*, 64>;
|
||||
|
||||
class Processor {
|
||||
friend class ProcessorInfo;
|
||||
|
@ -190,6 +190,8 @@ public:
|
|||
s_idle_cpu_mask.fetch_and(~(1u << m_cpu), AK::MemoryOrder::memory_order_relaxed);
|
||||
}
|
||||
|
||||
static Processor& by_id(u32);
|
||||
|
||||
static u32 count()
|
||||
{
|
||||
// NOTE: because this value never changes once all APs are booted,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue