Loading the kernel from CD
Posted: Wed Mar 13, 2013 2:48 pm
Uhm, I'm writing my own bootloader and now I've came up to this point where I need to load my kernel. At the beginning I saw only one option: writing ATAPI driver, because my laptop, on which I'll be testing my OS, is using it. I started reading ATAPI's docs, and it's so long, hard and boring, that I didn't have enough will to read it a few times. So I started searching for another solution and I came up with V86. But after a short research it became clear, that V86 is sometimes trouble maker and I should use it when it's really neccessary. And at the end, I still found out two solutions:
1. I'm not sure how fast it is, but some people do something like:
I. Load a piece of kernel using BIOS interrupts.
II. Jump to protected mode and copy it.
III. Jump back to real mode and do everything again, until you load it.
This seems kind of slow, but at least it works.
2. And... another one solution. I've never seen someone using it, but I hope at least someone heard about this method (or even used it) and could tell me if it works. The idea is simple: I could use unreal mode with A20 line enabled. Unreal mode consist of breaking the '64Kb' limit of real mode segments, but still keeping 16 bits instruction and segment*16+offset address formation by tweaking the descriptor caches. So I could use BIOS interrupts and load the kernel above 1MB and then go back to protected mode.
So, guys, if anyone has ever used or heard of these methods, please, tell me your opinion about them, which one is better, what have you heard/experienced with them and if it's worth using one of them.
1. I'm not sure how fast it is, but some people do something like:
I. Load a piece of kernel using BIOS interrupts.
II. Jump to protected mode and copy it.
III. Jump back to real mode and do everything again, until you load it.
This seems kind of slow, but at least it works.
2. And... another one solution. I've never seen someone using it, but I hope at least someone heard about this method (or even used it) and could tell me if it works. The idea is simple: I could use unreal mode with A20 line enabled. Unreal mode consist of breaking the '64Kb' limit of real mode segments, but still keeping 16 bits instruction and segment*16+offset address formation by tweaking the descriptor caches. So I could use BIOS interrupts and load the kernel above 1MB and then go back to protected mode.
So, guys, if anyone has ever used or heard of these methods, please, tell me your opinion about them, which one is better, what have you heard/experienced with them and if it's worth using one of them.