You need to change LME (Long Mode Enable) in the EFER MSR and then enable paging, which sets the LMA (Long Mode Active) flag. If you try to directly set or clear LMA an exception (GPF?) occurs.Sly wrote:I heard that you can get to long mode by changing a bit in a MSR.
Long Mode
-
- Member
- Posts: 524
- Joined: Sun Nov 09, 2008 2:55 am
- Location: Pennsylvania, USA
Re: Long Mode
Re: Long Mode
I heard your soul can be saved by donating to your local church. I also heard 9-11 is a government conspiracy. I also heard the Earth is only 6000 years old. I also heard China is doing Tibet a favour. I also heard yellow is the new pink. I also heard a continuous beeping noice noone else can hear. You get the point. If not: your remark is completely useless without substantiating where you heard it and giving further information. This is not a gossip forum.Sly wrote:I heard that you can get to long mode by changing a bit in a MSR.
JAL
Re: Long Mode
That was the most pointless and unnecessary post I've seen here in a while.jal wrote:I heard your soul can be saved by donating to your local church. I also heard 9-11 is a government conspiracy. I also heard the Earth is only 6000 years old. I also heard China is doing Tibet a favour. I also heard yellow is the new pink. I also heard a continuous beeping noice noone else can hear. You get the point. If not: your remark is completely useless without substantiating where you heard it and giving further information. This is not a gossip forum.Sly wrote:I heard that you can get to long mode by changing a bit in a MSR.
JAL
Sly: yes, you need to modify a MSR value in order to enter Long Mode.
this should be all you need though for that: (look up the actual info about the MSR in the Intel Manuals)
Code: Select all
mov ecx,0xC0000080 ; set MSR address
rdmsr ; read MSR
or ax, 0x0100 ; set long mode bit
wrmsr ; write MSR
Website: https://joscor.com
Re: Long Mode
However, that is not the only step that is required to get in to long mode. Sly's post seemed to suggest he heard somewhere that there is a way to enter long mode by simply toggling a bit in some MSR, without any of the other necessary steps.01000101 wrote: Sly: yes, you need to modify a MSR value in order to enter Long Mode.
this should be all you need though for that: (look up the actual info about the MSR in the Intel Manuals)Code: Select all
mov ecx,0xC0000080 ; set MSR address rdmsr ; read MSR or ax, 0x0100 ; set long mode bit wrmsr ; write MSR
Re: Long Mode
Well, at least the most pointless and unnecessary post by me. Must've been in a bad mood. Still, it is rather silly to behave like you're in on some secret, when the secret is actually only part of a well known truth.01000101 wrote:That was the most pointless and unnecessary post I've seen here in a while.
JAL