mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:37:36 +00:00
Kernel: Fix Processor::features_string() stopping too early and detect more features
The exit condition for the loop was sizeof(m_features) * 8, which was 32. Presumably this was supposed to mean 32 bits, but it actually made it stop as soon as it reached the 6th bit. Also add detection for more SIMD CPU features.
This commit is contained in:
parent
259f8541fc
commit
8a2fd0e436
2 changed files with 35 additions and 4 deletions
|
@ -591,6 +591,7 @@ private:
|
|||
SplitQword m_start;
|
||||
};
|
||||
|
||||
// FIXME: This can't hold every CPU feature as-is.
|
||||
enum class CPUFeature : u32 {
|
||||
NX = (1 << 0),
|
||||
PAE = (1 << 1),
|
||||
|
@ -603,7 +604,13 @@ enum class CPUFeature : u32 {
|
|||
TSC = (1 << 8),
|
||||
UMIP = (1 << 9),
|
||||
SEP = (1 << 10),
|
||||
SYSCALL = (1 << 11)
|
||||
SYSCALL = (1 << 11),
|
||||
MMX = (1 << 12),
|
||||
SSE2 = (1 << 13),
|
||||
SSE3 = (1 << 14),
|
||||
SSSE3 = (1 << 15),
|
||||
SSE4_1 = (1 << 16),
|
||||
SSE4_2 = (1 << 17)
|
||||
};
|
||||
|
||||
class Thread;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue