Slashdot Mirror


Writing Protected Mode x86 OSes?

windex asks: "I've been looking recently for information on writing a OS (OS == kernel) from scratch, mainly as a personal science project. I've been looking for information on how to do this, however the only real information I've found is on developer.intel.com and its mostly in Intel-ese, not English. Does anyone know of a good place to start getting the basics of the x86 architecture?" There are probably plenty of x86 ASM books out there that can serve as a good reference for this project, but what about references that discuss writing the portions of the basic OS (memory management in particular)? If you find this question interesting, you might want to check out a previous topic we've done on multiplatform device drivers.

3 of 14 comments (clear)

  1. Flux OS Kit by Anthony · · Score: 2

    You might want to check out. http://www.cs.utah.edu/flux/oskit/

    From the home page:-

    The OSKit is a framework and a set of 31 component libraries oriented to operating systems, together with extensive documentation. By providing in a modular way not only most of the infrastructure "grunge" needed by an OS, but also many higher-level components, the OSKit's goal is to lower the barrier to entry to OS R&D and to lower its costs. The OSKit makes it vastly easier to create a new OS, port an existing OS to the x86 (or in the future, to other architectures supported by the OSkit), or enhance an OS to support a wider range of devices, file system formats, executable formats, or network services. The OSKit also works well for constructing OS-related programs, such as boot loaders or OS-level servers atop a microkernel.

    I haven't used it so I cannot comment personally on its usefulness, but there does seem to be some interesting projects using it.

    --
    Slashdot: Where nerds gather to pool their ignorance
  2. Interesting Stuff by brank · · Score: 2
    These are some books that I found relevent. I didn't include anythin specifically about asm, since the question seemed to ask about OS design more than the language.

    The FreeDOS Kernel is a book about the way the GNU FreeDOS Kernel is designed.

    Of course, you can just skip the book and look at code. You can get a free Unix source license for some older stuff at SCO (not x86) or just download a Linux kernel (for the x86)

    One of my favourite books about OS design: Inside the IBM PC, by Peter Norton. It's been through many, many editions, and some of the older ones are very detailed about the inner workings of DOS.

    Just in general, look at used book stores or the library. You can find some very interesting old books. I seem to remember an old book put out by MS Press, Inside OS/2 or some such, that was pretty good.

    --
    it's green.
  3. My own experience by XoXus · · Score: 3
    The best thing I found was to ignore trying to make the bootloader and the code to get into protected mode. Instead, use GRUB (look on freshmeat) to load your kernel.

    I'd definitely recommend checking out the OS FAQ:

    Here