MCPcopy Create free account
hub / github.com/coreboot/coreboot / do_name

Function do_name

payloads/coreinfo/cpuinfo_module.c:136–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136static void do_name(WINDOW *win, int row)
137{
138 char name[49], *p;
139 uint32_t eax, ebx, ecx, edx;
140 int t;
141
142 p = name;
143
144 for (uint32_t i = 0x80000002; i <= 0x80000004; i++) {
145 docpuid(i, &eax, &ebx, &ecx, &edx);
146
147 if (eax == 0)
148 break;
149
150 for (t = 0; t < 4; t++)
151 *p++ = eax >> (8 * t);
152 for (t = 0; t < 4; t++)
153 *p++ = ebx >> (8 * t);
154 for (t = 0; t < 4; t++)
155 *p++ = ecx >> (8 * t);
156 for (t = 0; t < 4; t++)
157 *p++ = edx >> (8 * t);
158 }
159
160 mvwprintw(win, row, 1, "Processor: %s", name);
161}
162
163static int cpuinfo_module_redraw(WINDOW *win)
164{

Callers 1

cpuinfo_module_redrawFunction · 0.85

Calls 1

mvwprintwFunction · 0.50

Tested by

no test coverage detected