Unverified Commit bedc498b authored by PhoeniX's avatar PhoeniX

Fix CPU info

parent 8a00f5a3
......@@ -5,8 +5,8 @@
#include "kernlib.hpp"
#include "heap.hpp"
char CPU::vendor[13] = "";
char CPU::brandString[49] = "";
char CPU::vendor[16] = "";
char CPU::brandString[52] = "";
uint64_t CPU::features = 0;
uint64_t CPU::features_ext = 0;
uint64_t CPU::ext_features = 0;
......@@ -105,7 +105,7 @@ uint64_t CPU::getFeatures() {
asm volatile("cpuid" :
"=a"(eax), "=c"(ecx), "=d"(edx) :
"a"(eax) :"ebx");
features = (uint64_t(edx) << 32) | uint64_t(ecx);
features = (uint64_t(ecx) << 32) | uint64_t(edx);
struct CPUID_INFO {
uint32_t stepping:3;
uint32_t model:4;
......
......@@ -184,13 +184,13 @@ struct cpu_info {
class CPU {
private:
static char vendor[13];
static char vendor[16];
static uint64_t features;
static uint64_t features_ext;
static uint64_t ext_features;
static struct cpu_info info;
static uint32_t maxCPUID;
static char brandString[49];
static char brandString[52];
public:
static char* getVendor();
static uint64_t getFeatures();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment