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

Function vprintk

src/console/printk.c:129–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129int vprintk(int msg_level, const char *fmt, va_list args)
130{
131 union log_state state = { .level = msg_level };
132 int i;
133
134 if (CONFIG(SQUELCH_EARLY_SMP) && ENV_ROMSTAGE_OR_BEFORE && !boot_cpu())
135 return 0;
136
137 state.speed = console_log_level(msg_level);
138 if (state.speed < CONSOLE_LOG_FAST)
139 return 0;
140
141 spin_lock(&console_lock);
142
143 console_time_run();
144
145 i = vtxprintf(wrap_putchar, fmt, args, state.as_ptr);
146 if (!LOG_FAST(state))
147 console_tx_flush();
148
149 console_time_stop();
150
151 spin_unlock(&console_lock);
152
153 return i;
154}
155
156int printk(int msg_level, const char *fmt, ...)
157{

Callers 5

printkFunction · 0.70
dieFunction · 0.70
HostDebugServiceFunction · 0.50
HostDebugServiceFunction · 0.50
HostDebugServiceFunction · 0.50

Calls 8

spin_lockFunction · 0.85
console_time_runFunction · 0.85
vtxprintfFunction · 0.85
console_tx_flushFunction · 0.85
console_time_stopFunction · 0.85
spin_unlockFunction · 0.85
console_log_levelFunction · 0.70
boot_cpuFunction · 0.50

Tested by

no test coverage detected