I have an embedded system running Linux where I need to write to a specific MSR register at boot time, in order to fix a hardware issue.
Writing a kernel module is an obvious option, however there are several kernel versions around (all of them 2.6.xx) and the insmod/modprobe utils in the system do not have support for the -f flag. Thus I would need to compile and distribute a bunch of versions of the module, even when they are not using any kernel API. I would like to avoid this if possible.
Are there any options I may be overlooking?
Thanks!
msrtool reads MSRs via
/dev/cpu/%d/msr; as documented inman 4 msr, the same path can be used to write them too.