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

Function est_identify

freebsd/x86/cpufreq/est.c:916–952  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

914}
915
916static void
917est_identify(driver_t *driver, device_t parent)
918{
919 device_t child;
920
921 /*
922 * Defer to hwpstate if it is present. This priority logic
923 * should be replaced with normal newbus probing in the
924 * future.
925 */
926 intel_hwpstate_identify(NULL, parent);
927 if (device_find_child(parent, "hwpstate_intel", -1) != NULL)
928 return;
929
930 /* Make sure we're not being doubly invoked. */
931 if (device_find_child(parent, "est", -1) != NULL)
932 return;
933
934 /* Check that CPUID is supported and the vendor is Intel.*/
935 if (cpu_high == 0 || (cpu_vendor_id != CPU_VENDOR_INTEL &&
936 cpu_vendor_id != CPU_VENDOR_CENTAUR))
937 return;
938
939 /*
940 * Check if the CPU supports EST.
941 */
942 if (!(cpu_feature2 & CPUID2_EST))
943 return;
944
945 /*
946 * We add a child for each CPU since settings must be performed
947 * on each CPU in the SMP case.
948 */
949 child = BUS_ADD_CHILD(parent, 10, "est", -1);
950 if (child == NULL)
951 device_printf(parent, "add est child failed\n");
952}
953
954static int
955est_probe(device_t dev)

Callers

nothing calls this directly

Calls 3

intel_hwpstate_identifyFunction · 0.85
device_find_childFunction · 0.85
device_printfFunction · 0.85

Tested by

no test coverage detected