Multiboot/GRUB Question
Posted: Sun Jul 14, 2013 6:12 am
Hi,
I've just started writing my kernel, and actually put effort into it. I decided to use GRUB2 as a bootloader as it is far easier to do that than to write a bootloader too. The problem, or rather the challenge is that I need to get the multiboot info passed by GRUB.
The multiboot specification says that GRUB passes the address of this structure in the ebx register. I got the value in the register, but now I need to access this structure. I need to copy it to the c representation of the same structure.
I am newish to c and asm, and very new to gcc, how would I create a copy of that structure so I can use the various things in it. What is the best/easies way to do it. This really seems like a simple problem, but I just can't get it to work.
I don't even know if the address I get is correct, when ii boot my kernel using GRUB on real hardware, the value in the register is returned as 0x10000. Is this correct? It does seem to be exactly the same every time I boot so it ssems right.
Thanks.
Archangel
I've just started writing my kernel, and actually put effort into it. I decided to use GRUB2 as a bootloader as it is far easier to do that than to write a bootloader too. The problem, or rather the challenge is that I need to get the multiboot info passed by GRUB.
The multiboot specification says that GRUB passes the address of this structure in the ebx register. I got the value in the register, but now I need to access this structure. I need to copy it to the c representation of the same structure.
I am newish to c and asm, and very new to gcc, how would I create a copy of that structure so I can use the various things in it. What is the best/easies way to do it. This really seems like a simple problem, but I just can't get it to work.
I don't even know if the address I get is correct, when ii boot my kernel using GRUB on real hardware, the value in the register is returned as 0x10000. Is this correct? It does seem to be exactly the same every time I boot so it ssems right.
Thanks.
Archangel