Detecting Model-Specific Registers
Posted: Fri Jan 03, 2025 2:32 pm
When setting up paging I decided to utilize the No-eXecute feature if available. To do so I first check if the cpuid instruction is available. If so, I use it to check for the MSR feature (CPUID.01h:EDX[bit 5]). This give me information of whether MSRs are supported at all, but it doesnt give me a specific overview of which registers are available on the current CPU. In order to check if EFER is supported I use cpuid again (CPUID.01h:EDX[bit 20]) this time to see if NX is enabled.
I was wondering, whether there is some way to list the available MSRs of the current CPU or if it is only described in online specifications, therefore making a check with cpuid (like for NX and EFER) needed.
Thanks for the support!
I was wondering, whether there is some way to list the available MSRs of the current CPU or if it is only described in online specifications, therefore making a check with cpuid (like for NX and EFER) needed.
Thanks for the support!