task manager and major memory stability fixes

This commit is contained in:
boreddevnl
2026-03-10 18:12:57 +01:00
parent 1639b09cb5
commit 6a41be2437
31 changed files with 567 additions and 50 deletions

View File

@@ -51,3 +51,21 @@ uint64_t v2p(uint64_t virt) {
}
return virt;
}
void platform_get_cpu_model(char *model) {
uint32_t brand[12];
uint32_t eax, ebx, ecx, edx;
for (uint32_t i = 0; i < 3; i++) {
asm volatile("cpuid" : "=a"(eax), "=b"(ebx), "=c"(ecx), "=d"(edx) : "a"(0x80000002 + i));
brand[i * 4 + 0] = eax;
brand[i * 4 + 1] = ebx;
brand[i * 4 + 2] = ecx;
brand[i * 4 + 3] = edx;
}
char *p = (char *)brand;
for (int i = 0; i < 48; i++) {
model[i] = p[i];
}
model[48] = '\0';
}