![]() |
Max OS 0.3
|
Defines Central Processing Unit (CPU) structures and functions for managing CPU state and features. More...
#include <cpuid.h>#include <cstddef>#include <cstdint>#include <system/gdt.h>#include <hardwarecommunication/acpi.h>#include <hardwarecommunication/apic.h>#include <memory/physical.h>Go to the source code of this file.
Classes | |
| struct | MaxOS::system::CPUStatus |
| Structure representing the CPU state during an interrupt. More... | |
| struct | MaxOS::system::TaskStateSegment |
| Structure representing the Task State Segment (TSS) More... | |
| struct | MaxOS::system::StackFrame |
| A snapshot of the a frame in the call stack. More... | |
| struct | MaxOS::system::CoreBootInfo |
| Information needed when booting a core. More... | |
| class | MaxOS::system::Core |
| Represents a CPU core in the system. More... | |
| class | MaxOS::system::CPU |
| Manages the CPU and its cores. More... | |
Typedefs | |
| typedef struct PACKED MaxOS::system::CPUStatus | MaxOS::system::cpu_status_t |
| Alias for CPUStatus struct. | |
| typedef struct PACKED MaxOS::system::TaskStateSegment | MaxOS::system::tss_t |
| Alias for TaskStateSegment struct. | |
| typedef struct PACKED MaxOS::system::StackFrame | MaxOS::system::stack_frame_t |
| Alias for StackFrame struct. | |
| typedef struct PACKED MaxOS::system::CoreBootInfo | MaxOS::system::core_boot_info_t |
| Alias for CoreBootInfo struct. | |
Enumerations | |
| enum class | MaxOS::system::CPU_FEATURE_ECX : int32_t { SSE3 = 1 << 0 , PCLMUL = 1 << 1 , DTES64 = 1 << 2 , MONITOR = 1 << 3 , DS_CPL = 1 << 4 , VMX = 1 << 5 , SMX = 1 << 6 , EST = 1 << 7 , TM2 = 1 << 8 , SSSE3 = 1 << 9 , CID = 1 << 10 , SDBG = 1 << 11 , FMA = 1 << 12 , CX16 = 1 << 13 , XTPR = 1 << 14 , PDCM = 1 << 15 , PCID = 1 << 17 , DCA = 1 << 18 , SSE4_1 = 1 << 19 , SSE4_2 = 1 << 20 , X2APIC = 1 << 21 , MOVBE = 1 << 22 , POPCNT = 1 << 23 , TSC = 1 << 24 , AES = 1 << 25 , XSAVE = 1 << 26 , OSXSAVE = 1 << 27 , AVX = 1 << 28 , F16C = 1 << 29 , RDRAND = 1 << 30 , HYPERVISOR = 1 << 31 } |
| CPU features indicated by the ECX register after calling CPUID with EAX = 1. More... | |
| enum class | MaxOS::system::CPU_FEATURE_EDX : int32_t { FPU = 1 << 0 , VME = 1 << 1 , DE = 1 << 2 , PSE = 1 << 3 , TSC = 1 << 4 , MSR = 1 << 5 , PAE = 1 << 6 , MCE = 1 << 7 , CX8 = 1 << 8 , APIC = 1 << 9 , SEP = 1 << 11 , MTRR = 1 << 12 , PGE = 1 << 13 , MCA = 1 << 14 , CMOV = 1 << 15 , PAT = 1 << 16 , PSE36 = 1 << 17 , PSN = 1 << 18 , CLFLUSH = 1 << 19 , DS = 1 << 21 , ACPI = 1 << 22 , MMX = 1 << 23 , FXSR = 1 << 24 , SSE = 1 << 25 , SSE2 = 1 << 26 , SS = 1 << 27 , HTT = 1 << 28 , TM = 1 << 29 , IA64 = 1 << 30 , PBE = 1 << 31 } |
| CPU features indicated by the EDX register after calling CPUID with EAX = 1. More... | |
Variables | |
| constexpr size_t | MaxOS::system::BOOT_STACK_SIZE = 16384 |
| The size of the stack allocated for booting a core (should align with the startup assembly code for the kernel) | |
Defines Central Processing Unit (CPU) structures and functions for managing CPU state and features.
Definition in file cpu.h.
|
strong |
CPU features indicated by the ECX register after calling CPUID with EAX = 1.
Definition at line 100 of file cpu.h.
|
strong |
CPU features indicated by the EDX register after calling CPUID with EAX = 1.
Definition at line 140 of file cpu.h.
|
constexpr |
The size of the stack allocated for booting a core (should align with the startup assembly code for the kernel)
Definition at line 205 of file cpu.h.
Referenced by MaxOS::system::Core::init_tss(), and MaxOS::system::Core::wake_up().