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)",
89 static const char *const ext_81_ecx[] =
91 NULL, NULL, "svm (secure virtual machine)", NULL, NULL,
92 "abm (adv bit manipulation)", "SSE4A", NULL,
93 NULL, "OSVW (OS visible workaround)", NULL, NULL,
94 "SKINIT", "WDT (watchdog timer support)",
97 static const char *const ext_81_edx[] =
99 NULL, NULL, NULL, NULL,
100 NULL, NULL, NULL, NULL,
102 "syscall (syscall/sysret instructions)",
103 NULL, NULL, NULL, NULL,
106 "nx (no-execute page protection)",
108 "mmxext (AMD extensions to MMX)",
110 "fxsr_opt (FXSR optimizations)",
115 "3dnowext (AMD 3DNow! extenstion)",
116 "3dnow (3DNow! instructions)",
120 unsigned position = 5, colon = 0;
121 putstr("CPU features:\n ");
122 show_f_bits (Cpu::boot_cpu()->features(), simple, 5, position, colon);
123 show_f_bits (Cpu::boot_cpu()->ext_features(), extended, 5, position, colon);
124 show_f_bits (Cpu::boot_cpu()->ext_8000_0001_ecx(), ext_81_ecx, 5, position, colon);
125 show_f_bits (Cpu::boot_cpu()->ext_8000_0001_edx(), ext_81_edx, 5, position, colon);
128 PRIVATE inline NEEDS["jdb_screen.h"]
130 Jdb_kern_info_misc::show_pdir()
132 Mem_space *s = current_mem_space();
133 // printf ("%s"L4_PTR_FMT" (taskno=%x, chief=%x)\n",
134 // Jdb_screen::Root_page_table,
135 // (Address) s->dir(),
136 // unsigned (s->id()),
137 // unsigned (s->chief()));
138 printf ("%s"L4_PTR_FMT"\n",
139 Jdb_screen::Root_page_table,