1)what happens when tring to modifiing the Time Stamp Counter or the Performance Counter registers using WRMSR ? , does their bits even change ? , does an exeption is raised ? how can I change their values if I wanted to ?
2)What are the 'MCA Extended State Registers' (index 0x180 - 0x197), are they just another way to access the general perpuse registers?
3)Does modifing the 'mpref' register(Index 0xe7) actually modifing the proccessor's frequency?
Sources:
http://sandpile.org/x86/msr.htm
http://wiki.osdev.org/Model_Specific_Registers
model specific registers's realted questions
model specific registers's realted questions
Restart any PC in the easy way around:
mov eax,cr0
xor al,1
mov cr0,eax
lidt [illegal_idtr]
jmp 0:$
; done:)
mov eax,cr0
xor al,1
mov cr0,eax
lidt [illegal_idtr]
jmp 0:$
; done:)
Re: model specific registers's realted questions
Hi,
Note that all of these are Model Specific Registers, which means that they're model specific, and may not exist and/or may have completely different behaviour on different CPUs.
Also; I'd strongly recommend using Intel's manuals for MSRs on Intel's CPUs and AMD's manuals for MSRs on AMD CPUs; and NOT using recycled information from any other source (sandpile, our wiki) for anything more than a quick introduction.
Cheers,
Brendan
You'd change their values by writing to them (using the WRMSR instruction).elad wrote:1)what happens when tring to modifiing the Time Stamp Counter or the Performance Counter registers using WRMSR ? , does their bits even change ? , does an exeption is raised ? how can I change their values if I wanted to ?
They would contain the values that were in various registers when a machine check exception occurred (e.g. when the last hardware failure occured) and wouldn't contain the values that are currently in those registers.elad wrote:2)What are the 'MCA Extended State Registers' (index 0x180 - 0x197), are they just another way to access the general perpuse registers?
No. For some CPUs (most Intel CPUs?) if you write any value to this MSR the time stamp counter is set to zero (regardless of which value you wrote) and it has no effect on CPU frequency.elad wrote:3)Does modifing the 'mpref' register(Index 0xe7) actually modifing the proccessor's frequency?
Note that all of these are Model Specific Registers, which means that they're model specific, and may not exist and/or may have completely different behaviour on different CPUs.
Also; I'd strongly recommend using Intel's manuals for MSRs on Intel's CPUs and AMD's manuals for MSRs on AMD CPUs; and NOT using recycled information from any other source (sandpile, our wiki) for anything more than a quick introduction.
Cheers,
Brendan
Last edited by nullplan on Sat Oct 26, 2024 10:52 pm, edited 1 time in total.
Reason: Quoted user wished to be anonymized
Reason: Quoted user wished to be anonymized
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.