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.
Having been involved into OS development for almost a week now, I have finally reached the memory management part )
Parts present (thanks to the well-known tutorial) : GDT, IDT, IRQ0-1, simple shell, bootloader - GRUB.
The question is : how can I locate the start and the end of the kernel?
Linker source:
Is there a way to pass variables from linker to kernel? Would x=phys+SIZEOF(.text)+SIZEOF(.data)+SIZEOF(.bss) contain the address of the end of the kernel part?
just on the last line on kernel.asm add KERNEL_END: and after ORG add KERNEL_START, so just mov eax, KERNEL_START mov ebx, KERNEL_END and sub ebx, eax and EBX contains size of the kernel in bytes
i hope you keep to the convention/prototype of main int main(int argc, char * argv[]), though it strictly not required it is nicer and deadmutex his method should also do the trick then again if it works it works.