version 1.1.1.1, 2008/06/03 10:38:50 |
version 1.1.1.1.2.1, 2008/08/13 17:12:42 |
|
|
printf("\33[2J"); |
printf("\33[2J"); |
|
|
printf("CPU voltage monitor\n"); |
printf("CPU voltage monitor\n"); |
device_ioctl(cpu_dev, CPUIOC_GET_INFO, (u_long)&cpu_info); |
device_ioctl(cpu_dev, CPUIOC_GET_INFO, &cpu_info); |
if (cpu_info.clock_ctrl == 0) |
if (cpu_info.clock_ctrl == 0) |
panic("DVS not supported by cpu"); |
panic("DVS not supported by cpu"); |
if (cpu_info.speed == 0 || cpu_info.power == 0) |
if (cpu_info.speed == 0 || cpu_info.power == 0) |
|
|
* Wait next period |
* Wait next period |
*/ |
*/ |
timer_waitperiod(); |
timer_waitperiod(); |
device_ioctl(cpu_dev, CPUIOC_GET_STAT, (u_long)&cpu_stat); |
device_ioctl(cpu_dev, CPUIOC_GET_STAT, &cpu_stat); |
if (cpu_stat.speed != last_mhz) { |
if (cpu_stat.speed != last_mhz) { |
printf("\33[s"); /* save cursor */ |
printf("\33[s"); /* save cursor */ |
|
|