Hi
I'm working on a bootloader and want it to load kernel at physical address 0x01000000 (16mb), because DMA will use the first 16mb later. How is this done? I was thinking something like:
(maybe put all this in a 2nd stage bootloader)
1. Enable A20
2. Switch to unreal mode
3. Locate kernel on disk
4. Set es:bx to a buffer <1mb mem area and use int13,2 (read sectors)
5. Move kernel from <1mb area to 0x01000000 (16mb)
6. Setup p-mode
7. Execute kernel
Think this will work, but I find it ugly that the kernel first have to be read to area below 1mb and then moved. How is a kernel 'normally' loaded into higher memory area?
Thanks!
How to place kernel in high memory area
- matthias
- Member
- Posts: 158
- Joined: Fri Oct 22, 2004 11:00 pm
- Location: Vlaardingen, Holland
- Contact:
You'll also have to increment the base address if your kernel, also with paging you could copy your kernel your kernel in another location and assign the virutal 1mb to physical 16 MB, so you won't have to change your base address, you now have full acces to the first 16 MB.
The source of my problems is in the source.