MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ucode_release

Function ucode_release

freebsd/x86/x86/ucode.c:234–262  ·  view source on GitHub ↗

* Release any memory backing unused microcode blobs back to the system. * We copy the selected update and free the entire microcode file. */

Source from the content-addressed store, hash-verified

232 * We copy the selected update and free the entire microcode file.
233 */
234static void
235ucode_release(void *arg __unused)
236{
237 char *name, *type;
238 caddr_t file;
239 int release;
240
241 if (early_ucode_data == NULL)
242 return;
243 release = 1;
244 TUNABLE_INT_FETCH("debug.ucode.release", &release);
245 if (!release)
246 return;
247
248restart:
249 file = 0;
250 for (;;) {
251 file = preload_search_next_name(file);
252 if (file == 0)
253 break;
254 type = (char *)preload_search_info(file, MODINFO_TYPE);
255 if (type == NULL || strcmp(type, "cpu_microcode") != 0)
256 continue;
257
258 name = preload_search_info(file, MODINFO_NAME);
259 preload_delete_name(name);
260 goto restart;
261 }
262}
263SYSINIT(ucode_release, SI_SUB_SMP + 1, SI_ORDER_ANY, ucode_release, NULL);
264
265void

Callers

nothing calls this directly

Calls 4

preload_search_next_nameFunction · 0.85
preload_search_infoFunction · 0.85
strcmpFunction · 0.85
preload_delete_nameFunction · 0.85

Tested by

no test coverage detected