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

Function efi_map_sysctl_handler

freebsd/amd64/amd64/machdep.c:1988–2004  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1986 "Raw BIOS SMAP data");
1987
1988static int
1989efi_map_sysctl_handler(SYSCTL_HANDLER_ARGS)
1990{
1991 struct efi_map_header *efihdr;
1992 caddr_t kmdp;
1993 uint32_t efisize;
1994
1995 kmdp = preload_search_by_type("elf kernel");
1996 if (kmdp == NULL)
1997 kmdp = preload_search_by_type("elf64 kernel");
1998 efihdr = (struct efi_map_header *)preload_search_info(kmdp,
1999 MODINFO_METADATA | MODINFOMD_EFI_MAP);
2000 if (efihdr == NULL)
2001 return (0);
2002 efisize = *((uint32_t *)efihdr - 1);
2003 return (SYSCTL_OUT(req, efihdr, efisize));
2004}
2005SYSCTL_PROC(_machdep, OID_AUTO, efi_map,
2006 CTLTYPE_OPAQUE | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0,
2007 efi_map_sysctl_handler, "S,efi_map_header",

Callers

nothing calls this directly

Calls 2

preload_search_by_typeFunction · 0.85
preload_search_infoFunction · 0.85

Tested by

no test coverage detected