X86_MSR_XCALL(9) | Kernel Developer's Manual (x86) | X86_MSR_XCALL(9) |
struct msr_rw_info { int msr_read; int msr_type; uint64_t msr_value; uint64_t msr_mask; };
This structure must be filled prior to the call. Two fields are compulsory: msr_type is used as the address of the MSR and msr_value is the value to be written. If msr_read is not zero, x86_msr_xcall() will first read from msr_type and then clear the mask specified in msr_mask before the write operation.
struct msr_rw_info msr; uint64_t xc; msr.msr_value = 0; msr.msr_read = true; msr.msr_type = MSR_THERM_CONTROL; msr.msr_mask = 0x1e; xc = xc_broadcast(0, (xcfunc_t)x86_msr_xcall, &msr, NULL); xc_wait(xc);
October 25, 2011 | NetBSD 6.1 |