Linked by iseyler on Thu 16th Sep 2010 17:16 UTC
OSNews, Generic OSes BareMetal OS v0.4.9 has been released. Newest features are network communication via Ethernet as well as Memory allocation/free functions. BareMetal is an open source 64bit operating system for x86-64 computers. It is written in assembly, and applications can be written in assembly or C/C++. It's aimed at three target segments (high performance computing, embedded applications, and education). The kernel binary is still under 16 KiB as well!
Thread beginning with comment 441466
To view parent comment, click here.
To read all comments associated with this story, please click here.
Member since:


There's "boot code", "initialisation code" and the kernel itself. I'd assume that to make the kernel smaller most of the initialisation code is built into the boot code instead.

For things like the code to initialise paging and enable long mode, this is actually a much smarter way to do it than putting the initialisation code into the kernel itself (and then freeing it after it's used, like Linux does). It makes some things a lot simpler (like linking) because you're not mixing CPU modes and/or virtual addresses in the same binary; and may mean that the kernel itself is isolated from the boot environment - for example, if the OS is ever booted from 64-bit UEFI (where paging is setup and long mode is enabled before any boot code starts) then maybe you can use the exact same kernel binary (with different initialisation code).

Sure. It couldn't possible be that forcing you to use a specific boot loader with your OS is incredibly lame.

I can't think of any generic boot loader that currently supports 64-bit. GRUB2 and "multi-boot" might (or might not) have undocumented support for it, but if it does it'd be a moving target (not something that anyone can actually rely on, yet).

I'd also point out that most OSs do have their own native boot loader; and generic boot loaders (like GRUB) could mimic the native boot loader for BareMetal OS (in the same way that GRUB mimics the native boot loader for Linux, mimics the native boot loader for FreeBSD, etc).

- Brendan

Reply Parent Score: 4

Neolander Member since:

I second that. GRUB can set up identity-mapped segmentation in order to load PMode code on x86, it's just strange that the new releases don't offer the option to set up some kind of identity-mapped paging and turn on long mode on x86_64. That would be the logical continuation of their previous effort. And much better that linking 32-bit and 64-bit code together in a bastard binary as in their current solution (loading ELF64 without activating long mode), and more generally being forced to maintain a 32-bit and a 64-bit codebase and make them work together...

Reply Parent Score: 2