x86-64

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
pskyboy

x86-64

Post by pskyboy »

Hey,

After a long two year break i decided to dig deep into the deeps off my hard drive and pull my OS out. After all this time i was wondering if anyone had managed to get a bootloader jumping into longmode yet as this is the key to my operating system.

Cheers
Peter
AR

Re:x86-64

Post by AR »

You'll have to write your own bootloader, or at least an intermediate bootloader between GRUB and your kernel to initalise longmode for you.

I am currently writing a bootloader that will do pretty much the same stuff as GRUB but will support longmode kernels but I can't tell you how long it will take before it's finished (probably quite some time).
pskyboy

Re:x86-64

Post by pskyboy »

I already have a bootloader for P-Mode i was just wondering if anyone had figured out how to get into Long mode and if so could i have a look at there code.
AR

Re:x86-64

Post by AR »

I think Brendan's OS has a 64bit kernel, there was also someone called "kernel64" on the boards but other than that your best source would be the official docs from AMD.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re:x86-64

Post by Brendan »

Hi,
AR wrote:I think Brendan's OS has a 64bit kernel, there was also someone called "kernel64" on the boards but other than that your best source would be the official docs from AMD.
Sorry, mine supports just about everything except 64 bit - it'll detect CPU/s capable of 64 bit and attempt to find 64 bit setup code and a 64 bit kernel within the boot image, but these don't exist so it defaults to 32 bit code :).


Cheers,

Brendan
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.
Dex4u

Re:x86-64

Post by Dex4u »

Basically you start in realmode then go to pmode and then long mode.
Here is some code to do it.
Hope this helps.
pskyboy

Re:x86-64

Post by pskyboy »

Cheers

What i really needed was a NASM compatible assembler supporting x86-64 which is YASM. Just what i was looking for, hopefully i can get it running in LMODE now.

Pete
Post Reply