1 IMPLEMENTATION[ia32,ux,amd64]:
6 #include "jdb_screen.h"
10 Jdb_kern_info_cpu::show_f_bits(unsigned features, const char *const *table,
11 unsigned first_pos, unsigned &last_pos,
16 for (i = count = 0; *table != (char *)-1; i++, table++)
17 if ((features & (1 << i)) && *table)
19 int slen = strlen(*table);
20 if (last_pos+colon + slen > 78)
24 printf("\n%*s", first_pos, "");
26 printf ("%s%s", colon ? ", " : "", *table);
27 last_pos += slen + colon;
34 Jdb_kern_info_cpu::show_features()
36 static const char *const simple[] =
39 "vme (virtual-8086 mode enhancements)",
40 "de (I/O breakpoints)",
42 "tsc (rdtsc instruction)",
43 "msr (rdmsr/rdwsr instructions)",
44 "pae (physical address extension)",
45 "mce (machine check exception #18)",
46 "cx8 (cmpxchg8 instruction)",
47 "apic (on-chip APIC)",
49 "sep (sysenter/sysexit instructions)",
50 "mtrr (memory type range registers)",
52 "mca (machine check architecture)",
53 "cmov (conditional move instructions)",
54 "pat (page attribute table)",
55 "pse36 (32-bit page size extension)",
56 "psn (processor serial number)",
57 "clfsh (flush cache line instruction)",
59 "ds (debug store to memory)",
60 "acpi (thermal monitor and soft controlled clock)",
61 "mmx (MMX technology)",
62 "fxsr (fxsave/fxrstor instructions)",
63 "sse (SSE extensions)",
64 "sse2 (SSE2 extensions)",
65 "ss (self snoop of own cache structures)",
66 "htt (hyper-threading technology)",
67 "tm (thermal monitor)",
69 "pbe (pending break enable)",
72 static const char *const extended[] =
74 "pni (prescott new instructions)",
76 "monitor (monitor/mwait instructions)",
77 "dscpl (CPL qualified debug store)",
78 "vmx (virtual machine technology)",
80 "est (enhanced speedstep technology)",
81 "tm2 (thermal monitor 2)",
83 "cid (L1 context id)",
86 "xtpr (send task priority messages)",
87 NULL, NULL, NULL, NULL,
91 "aes", "xsave", "osxsave",
95 static const char *const ext_81_ecx[] =
97 NULL, NULL, "svm (secure virtual machine)", NULL, NULL,
98 "abm (adv bit manipulation)", "SSE4A", NULL,
99 NULL, "OSVW (OS visible workaround)", NULL, NULL,
100 "SKINIT", "WDT (watchdog timer support)", NULL,
101 "lwp", "fmaa", NULL, NULL, "nodeid", NULL, "tbm", "topext",
104 static const char *const ext_81_edx[] =
106 NULL, NULL, NULL, NULL,
107 NULL, NULL, NULL, NULL,
109 "syscall (syscall/sysret instructions)",
110 NULL, NULL, NULL, NULL,
113 "nx (no-execute page protection)",
115 "mmxext (AMD extensions to MMX)",
117 "fxsr_opt (FXSR optimizations)",
122 "3dnowext (AMD 3DNow! extenstion)",
123 "3dnow (3DNow! instructions)",
127 unsigned position = 5, colon = 0;
128 putstr("CPU features:\n ");
129 show_f_bits (Cpu::boot_cpu()->features(), simple, 5, position, colon);
130 show_f_bits (Cpu::boot_cpu()->ext_features(), extended, 5, position, colon);
131 show_f_bits (Cpu::boot_cpu()->ext_8000_0001_ecx(), ext_81_ecx, 5, position, colon);
132 show_f_bits (Cpu::boot_cpu()->ext_8000_0001_edx(), ext_81_edx, 5, position, colon);
135 PRIVATE inline NEEDS["jdb_screen.h"]
137 Jdb_kern_info_misc::show_pdir()
139 Mem_space *s = current_mem_space();
140 printf("%s" L4_PTR_FMT "\n",
141 Jdb_screen::Root_page_table, (Address)s->dir());