Page 1 of 1

Understanding Grub' internals

Posted: Wed Sep 05, 2007 3:10 pm
by jerryleecooper
I want my operating system, or what will be an operating system (2 more weeks and version 0.01 will be released) to boot from my laptop. But being a turion, then a 64 bit architecture, the engineers treated low memory for low memory. The himem (more than 1mb) memory that 286 era people were talking about is no more. In this world of multicore, multigigahertz machine with multigigabytes of ram to spare, memore below 16 meg is low memory.
But how to keep my kernel lighweight on lowend systems as my new aptiva and be compatible with my "highend" laptop.
THe answer: grub. But I DON'T want to USE grub!
Don't worry, just study the code. But it's boring :shock:
There's an interrupt to read the ram partitioning, so I could use that.

edit. OK, I think I have found something.

Posted: Wed Sep 05, 2007 3:23 pm
by jerryleecooper
Grub use some memory at 0x68000:

Code: Select all

#define GRUB_MEMORY_MACHINE_SCRATCH_ADDR	0x68000
Is it safe if I put my kernel there, and call the bios int to catch the memory map?