Page 1 of 1

who knows details about grub?

Posted: Sat Oct 24, 2009 10:44 pm
by JohnWaken
Hi, everyone!
I am using grub0.97 to load my own kernel.
So I wanna know the status of the cpu after grub executes.

What's the value of eax, ebx, ecx, edx, esi, edi, esp and ebp ?
What's the value of cs, ds, ss, es, gs and fs ?
And the content of gdt and idt ?

The most important, where grub load my kernerl, namely, what's the physical address of my own kernel ?

anybody can throw light upon things above ? thanks.

Re: who knows details about grub?

Posted: Sat Oct 24, 2009 10:53 pm
by Love4Boobies
Do your homework before asking questions like these. Not to mention that you don't boot your kenrel using GRUB as you claim if you can't answer that yourself.

GRUB follows the Multiboot specification.

Re: who knows details about grub?

Posted: Sat Oct 24, 2009 11:49 pm
by JohnWaken
Love4Boobies wrote:Do your homework before asking questions like these. Not to mention that you don't boot your kenrel using GRUB as you claim if you can't answer that yourself.

GRUB follows the Multiboot specification.
I really have read that specification, and know something.
Sorry, maybe I asked too much.
What I want to make sure is the physical address of the kernel.
It's decided by GRUB or by ld script ?

Re: who knows details about grub?

Posted: Sat Oct 24, 2009 11:52 pm
by Love4Boobies
Read it again - it's right there, you can't miss it.

Re: who knows details about grub?

Posted: Sun Oct 25, 2009 12:00 am
by JohnWaken
Love4Boobies wrote:Read it again - it's right there, you can't miss it.
OK, thanks.

Re: who knows details about grub?

Posted: Sun Oct 25, 2009 12:06 am
by Love4Boobies
Good, I trust you've found the answer - you decide what the physical address at which to boot loader should load the kernel is by either putting it down in the header of the executable image (which the boot loader must be able to interpret) - this is indeed a decision made at linking, or by passing it in the address fields of the Multiboot header.