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

Function decode_flags

payloads/coreinfo/cpuinfo_module.c:77–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75static unsigned int cpu_khz;
76
77static void decode_flags(WINDOW *win, unsigned long reg, const char **flags,
78 int *row)
79{
80 int i;
81 int lrow = *row;
82
83 wmove(win, lrow, 2);
84
85 for (i = 0; i < 32; i++) {
86 if (flags[i] == NULL)
87 continue;
88
89 if (reg & (1 << i))
90 wprintw(win, "%s ", flags[i]);
91
92 if (i && (i % 16) == 0) {
93 lrow++;
94 wmove(win, lrow, 2);
95 }
96 }
97
98 *row = lrow;
99}
100
101static void get_features(WINDOW *win, int *row)
102{

Callers 1

get_featuresFunction · 0.85

Calls 2

wmoveFunction · 0.50
wprintwFunction · 0.50

Tested by

no test coverage detected