1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-09 00:00:03 +01:00

dump the value of the MSR register IA32_MISC_ENABLE

This commit is contained in:
Stefan Lankes 2015-11-10 15:44:57 +01:00
parent d13e3a4432
commit f6324d7a90
2 changed files with 4 additions and 0 deletions

View file

@ -193,6 +193,8 @@ extern "C" {
/// SwapGS GS shadow
#define MSR_KERNEL_GS_BASE 0xc0000102
#define MSR_IA32_MISC_ENABLE 0x000001a0
// MSR EFER bits
#define EFER_SCE (1 << 0)
#define EFER_LME (1 << 8)

View file

@ -414,6 +414,8 @@ int cpu_detection(void) {
if (first_time) {
kprintf("CR0 0x%llx, CR4 0x%llx\n", read_cr0(), read_cr4());
kprintf("size of xsave_t: %d\n", sizeof(xsave_t));
if (has_msr())
kprintf("IA32_MISC_ENABLE 0x%llx\n", rdmsr(MSR_IA32_MISC_ENABLE));
}
return 0;