Passing system information from GRUB to your kernel
Posted: Wed Jun 22, 2005 11:03 am
Hi all, I finished Bran's Kernel Development Tutorial and stuck right after. The memory manager. I read about the memory manager form Bonafide and all that. So I edited the linker script adding Virt and the rest of it. (Problem 1) Don't really know how to make the kernel link to 0xC0000000 altho it complied no problem.
But GRUB give me Error#28. So I found that adding *rodata can solve it, so i did and its fine, but it reboots. So i had to use the simple version linker script. So I tried other things. Any clues...?
I read the wiki for "Memory management the howto " from here. Looked at the Multiboot data structure for GRUB.
So I thought at last...something clue for memory manager. I try to read system information from GRUB.
(Problem 2)But I don't understand how to use it with my existing kernel. I am using .asm code whereas the multiboot specification is gas code from here:
http://www.gnu.org/software/grub/manual ... %20systems
Then I tried the code from GRUB tutorial. They use asm code. But I don't know how it worked.
http://www.openbg.net/sto/os/xml/grub.html
Also can anyone tell me what to do to read information from GRUB please?
And how can i make the kernel locate at 0xC0000000 but loaded at 0x100000 without encounter error#28?
Sorry if I am talking rubbish, not get to the point, being stupid etc...Still, can anyone give me some pointers please. Been stuck for few days now.
Thanks in advance.
But GRUB give me Error#28. So I found that adding *rodata can solve it, so i did and its fine, but it reboots. So i had to use the simple version linker script. So I tried other things. Any clues...?
I read the wiki for "Memory management the howto " from here. Looked at the Multiboot data structure for GRUB.
So I thought at last...something clue for memory manager. I try to read system information from GRUB.
(Problem 2)But I don't understand how to use it with my existing kernel. I am using .asm code whereas the multiboot specification is gas code from here:
http://www.gnu.org/software/grub/manual ... %20systems
Then I tried the code from GRUB tutorial. They use asm code. But I don't know how it worked.
http://www.openbg.net/sto/os/xml/grub.html
Also can anyone tell me what to do to read information from GRUB please?
And how can i make the kernel locate at 0xC0000000 but loaded at 0x100000 without encounter error#28?
Sorry if I am talking rubbish, not get to the point, being stupid etc...Still, can anyone give me some pointers please. Been stuck for few days now.
Thanks in advance.