Can i load the kernel from disk?

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.
egos
Member
Member
Posts: 612
Joined: Fri Nov 16, 2007 1:59 pm

Post by egos »

JamesM wrote:Not in real mode.
Oye! Try to do it and you can see it.
User avatar
bewing
Member
Member
Posts: 1401
Joined: Wed Feb 07, 2007 1:45 pm
Location: Eugene, OR, US

Post by bewing »

Yes, you can move the IVT around, but there is no point. It has to be in low memory, and the whole point is that you don't want to fragment your low memory by loading things (like the IVT, or your bootsector, or your MBR, or your second stage bootloader) into the MIDDLE of it. If you move the IVT around, you are just going to have to remember where you put it, so you can restore the IDTR any time you need to revert from PMODE to Real Mode (or V86).

Right at bootup, the IVT is in a very good place, since it must exist. It is in one of the two places that does not fragment your memory. Typical MBRs and bootsectors get loaded in a really STUPID place, because they DO fragment your low mem -- and contiguous mem is very important when you are loading great big data blocks off disk (like kernels or compressed kernels or disk allocation tables or large directory structures).
Post Reply