Something about entering the long mode

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
xtricman
Posts: 16
Joined: Wed Mar 12, 2014 9:52 pm

Something about entering the long mode

Post by xtricman »

Does GRUB2 x86-64 work in true long mode?I want use GRUB2 as payload of coreboot,

If GRUB2 works in true long mode,I can just re-set the page tables(PML4T,PDPT,PDT,PT),CR3,and the IDT,no need to worry about how to enter true long mode.

Am I right?
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: Something about entering the long mode

Post by Brendan »

Hi,
xtricman wrote:Am I right?
I'd assume (I don't know) that GRUB2 is capable of running in long mode (e.g. to support 64-bit UEFI systems properly); will use the kernel's 64-bit entry point if the Linux boot protocol is being used; and will switch back to protected mode if multi-boot was used.


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.
User avatar
sortie
Member
Member
Posts: 931
Joined: Wed Mar 21, 2012 3:01 pm
Libera.chat IRC: sortie

Re: Something about entering the long mode

Post by sortie »

It doesn't matter how GRUB works internally, only what formats it can load. It can load 64-bit kernels, for instance 64-bit Linux, though I don't know much about that. Multiboot is a 32-bit format, there is no usable 64-bit multiboot counterpart last I checked.
Post Reply