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

Function tmx86_get_longrun_status

freebsd/i386/i386/longrun.c:114–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114static u_int
115tmx86_get_longrun_status(u_int * frequency, u_int * voltage, u_int * percentage)
116{
117 register_t saveintr;
118 u_int regs[4];
119
120 saveintr = intr_disable();
121
122 do_cpuid(0x80860007, regs);
123 *frequency = regs[0];
124 *voltage = regs[1];
125 *percentage = regs[2];
126
127 intr_restore(saveintr);
128 return (1);
129}
130
131static u_int
132tmx86_set_longrun_mode(u_int mode)

Callers 2

tmx86_status_sysctlFunction · 0.85
setup_tmx86_longrunFunction · 0.85

Calls 3

intr_disableFunction · 0.50
do_cpuidFunction · 0.50
intr_restoreFunction · 0.50

Tested by

no test coverage detected