Page 1 of 1

Some kernel dev questions from a newbie

Posted: Mon Aug 25, 2003 11:00 pm
by Neo
I'm a newbie to OS programming and want to develop a kernel using C and ASM. I have already written a FAT12 bootloader which loads a secondary, the secondary jumps to p-mode etc. Now I would like to know where exactly the boot loader ends its job and where the kernel start its job.(or rather what exactly are the jobs of the kernel).
The target architecture is intel 486/Pentium and above. I do not know its architecture in detail i.e. i can't understand the GDT,IDT etc and how to load them up as well as how they work etc. also how do i determine the processor? What about the memory layout of a PC which is just booted-up? is there any relevant information available anywhere or can i just use the memory without caring about overwriting any important info? I would reaally appreciate any help with these.Thanx in advance to all you folks.
And by the way i noticed in <a href="http://osdev.neopages.net/tutorials/brunmar/tutorial_02.php">Gregor Brunmar's Pmode tutorial</a> that he jumps to pmode without enabling the A20 line. is it necessary that it is enabled first or can i do the same?
And what about this invalid opcode stuff. If i execute a CPUID instruction the literature says that it would give me a "INVALID OPCODE" error on unsupported processors. How do i check this error?

RE:Some kernel dev questions from a newbie

Posted: Mon Aug 25, 2003 11:00 pm
by SquattyDog
If you're a beginner then I would suggest "mastering" real mode before moving on to PMODE.  I tried PMODE with my first OS and I failed miserably.  If you HAVE TO write a PMODE OS then try using GRUB as your boot loader instead of writing your own.  Best of luck with your OS!
- SquattyDog *

RE:Some kernel dev questions from a newbie

Posted: Tue Aug 26, 2003 11:00 pm
by Neo
Thanx i'm am using GRUB right now but was thinking of writing my own bootloader later on. What about the other question anyone?? Thanx

RE:Some kernel dev questions from a newbie

Posted: Wed Sep 10, 2003 11:00 pm
by bubach
look at the docs here:
http://osdev.neopages.net/

and here:
http://loonix.technigga.net/osdev.php

and here (for some memory spec.):
http://atrevida.comprenica.com/atrtut04.html

if you spent some nights on the net, u will find what you need.. =)
hope this heled some..

/Christoffer

RE:Some kernel dev questions from a newbie

Posted: Wed Sep 10, 2003 11:00 pm
by bubach
it should be "helped"...

/Christoffer