Kernel start address
How can I programatically obtain the kernel code segment start address and the end address ?
[Do not wish to use System.map as its not protected]
Facts I've gathered:
- For 32 bit machine it starts at c0000000...which is stored in PAGE_OFFSET. Before using the physical address...the linear address is supposed get subtracted by this number....
So does that mean kernel starts from 0 ?? But from what Ive read...the first 1MB the BIOS collected info is stored.
-_KERNEL_CS is the address loaded in CS to go to the code segment. But not known how translation is done.
Is this the segment selector ? Is there any tabel like GDT for the kernel data itself ?
- Does the PAGE_OFFSET reflect the start for even 64 bit machines?
Thanks in advance