summaryrefslogtreecommitdiff
path: root/Kernel/Arch/x86/CPU.h
AgeCommit message (Collapse)Author
2021-07-03Kernel: Fix struct forward declared as classDaniel Bertalan
2021-07-01Kernel: Add support for 64-bit unaligned Mem-opsHendiadyoin1
Also let the compiler enforce the size and type restrictions
2021-06-24Kernel: Move special sections into Sections.hHendiadyoin1
This also removes a lot of CPU.h includes infavor for Sections.h
2021-06-24Kernel: Remove PAGE_SIZE from CPU.hHendiadyoin1
We have that information in LibC, lets use that instead
2021-06-24Kernel: Pull apart CPU.hHendiadyoin1
This does not add any functional changes
2021-06-18Kernel: Detect support for CPUID FXSRJean-Baptiste Boric
The fxsave and fxrstor instructions are available only if the FXSR feature is present.
2021-05-20Kernel: Use the Function class for smp_broadcast()/smp_unicast()Gunnar Beutner
This avoids allocations for smp_broadcast() and smp_unicast() by using the Function class.
2021-05-20Kernel: Use the Function class for deferred_call_queue()Gunnar Beutner
This avoids allocations for deferred_call_queue().
2021-05-20Kernel: Remove s_processor_lock by making s_processors statically sizedBrian Gianforcaro
Currently in SMP mode we hard code support for up to only 8 processors. There is no reason for this to be a dynamic allocation that needs to be guarded by a spinlock. Instead use a Array<T* with inline storage of 8, allowing each processor to initialize it self in place, avoiding all the need for locks.
2021-05-16AK+Kernel+LibELF: Remove the need for `IteratorDecision::Continue`Nicholas Baron
By constraining two implementations, the compiler will select the best fitting one. All this will require is duplicating the implementation and simplifying for the `void` case. This constraining also informs both the caller and compiler by passing the callback parameter types as part of the constraint (e.g.: `IterationFunction<int>`). Some `for_each` functions in LibELF only take functions which return `void`. This is a minimal correctness check, as it removes one way for a function to incompletely do something. There seems to be a possible idiom where inside a lambda, a `return;` is the same as `continue;` in a for-loop.
2021-05-05Kernel: Add Processor::is_bootstrap_processor() function, and use it. (#6871)Brian Gianforcaro
The variety of checks for Processor::id() == 0 could use some assistance in the readability department. This change adds a new function to represent this check, and replaces the comparison everywhere it's used.
2021-05-04Kernel: Store whether a thread is the idle thread in Thread directlyTom
This solves a problem where checking whether a thread is an idle thread may require iterating all processors if it is not the idle thread of the current processor.
2021-04-29Kernel: Enable building the kernel with -fltoGunnar Beutner
GCC with -flto is more aggressive when it comes to inlining and discarding functions which is why we must mark some of the functions as NEVER_INLINE (because they contain asm labels which would be duplicated in the object files if the compiler decides to inline the function elsewhere) and __attribute__((used)) for others so that GCC doesn't discard them.
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-18Kernel: Add debug register handlingFalseHonesty
This patch adds functions to read/write from the debug registers, and implements storing/loading them across context switches.
2021-04-06Kernel/PCI + CPU: Allow to access unaligned dataLiav A
2021-03-21Kernel::CPU: Move headers into common directoryHendiadyoin1
Alot of code is shared between i386/i686/x86 and x86_64 and a lot probably will be used for compatability modes. So we start by moving the headers into one Directory. We will probalby be able to move some cpp files aswell.