Relative Memory Addresses
Posted: Fri May 11, 2012 10:54 pm
Hi,
A quick question about how the kernel sees memory.
I have a custom written boot loader, which loads an executable (the kernel, written in C) to 0x100000. The boot loader is responsible for entering protected mode, and setting up the GDT.
I'm looking at getting the boot loader to get some information from interrupts before entering protected mode. For example, the memory map. I would then like to get the Kernel to read this from memory (I'll figure that part out later).
As the Kernel knows it's running at 0x100000, does it see memory addresses as relative to that position or not? For example, if I store my memory map at 50:3500 in real mode, can the kernel just read from 0x3a00 in protected mode?).
Thank you
A quick question about how the kernel sees memory.
I have a custom written boot loader, which loads an executable (the kernel, written in C) to 0x100000. The boot loader is responsible for entering protected mode, and setting up the GDT.
I'm looking at getting the boot loader to get some information from interrupts before entering protected mode. For example, the memory map. I would then like to get the Kernel to read this from memory (I'll figure that part out later).
As the Kernel knows it's running at 0x100000, does it see memory addresses as relative to that position or not? For example, if I store my memory map at 50:3500 in real mode, can the kernel just read from 0x3a00 in protected mode?).
Thank you