x86: print out the Guest PA width during boot
I wanted this info when debugging the IPT.
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
diff --git a/kern/arch/x86/cpuinfo.c b/kern/arch/x86/cpuinfo.c
index 1594252..8837b76 100644
--- a/kern/arch/x86/cpuinfo.c
+++ b/kern/arch/x86/cpuinfo.c
@@ -141,6 +141,8 @@
printk("\n");
cpuid(0x80000008, 0x0, &eax, &ebx, &ecx, &edx);
cprintf("Physical Address Bits: %d\n", eax & 0x000000FF);
+ printk("Guest Physical Address Bits: %d\n",
+ eax & 0x00ff0000 ?: eax & 0xff);
msr_val = read_msr(IA32_APIC_BASE);
if (!(msr_val & MSR_APIC_ENABLE))
panic("Local APIC Disabled!!");