News for hackers. Stuff that matters.
Re:Creating a Bare Bones Bootloader by heywire on Wednesday April 16, 2014 @02:03PM (#7599383)
If this type of thing interests you, check out http://wiki.osdev.org. I cannot recommend this site enough for someone who is interested in writing their own toy OS.
Re:Creating a Bare Bones Bootloader by CocaKoala on Wednesday April 16, 2014 @02:25PM (#7599535)
This looks like exactly what I've been hoping to find after taking an OS course last semester! Thank you very much for sharing this link!
Re:Creating a Bare Bones Bootloader by charlesap on Wednesday April 16, 2014 @09:55AM (#7597739)
You can go all the way to protected mode, enable paging, and then page in the rest of your kernel in just 512 bytes, and without touching the BIOS: https://github.com/charlesap/bootpager/blob/master/oiuboot.a...
Re:Creating a Bare Bones Bootloader by Rusky on Wednesday April 16, 2014 @06:09PM (#7600836)
That's pretty impressive. Unfortunately the BIOS is still required for getting a map of physical memory...
Re:Creating a Bare Bones Bootloader by CocaKoala on Wednesday April 16, 2014 @11:24AM (#7598341)
I'm really digging the systems posts that have been cropping up on HN recently; this and the toy OS post that was floating around are both really interesting.
Re:Creating a Bare Bones Bootloader by zhemao on Wednesday April 16, 2014 @02:02PM (#7599381)
Funny thing is that they both do basically the same thing, except one is done all in assembly and the other in C.

I would have liked this post to actually discuss the things that a bootloader is meant to do, like switching to 32-bit protected mode and loading the next block of code from the disk.

Re:Creating a Bare Bones Bootloader by mmastrac on Wednesday April 16, 2014 @10:29AM (#7597973)
This brings back memories of reading through Norton's programmer's guide to the PC, figuring out how all the various interrupts worked. It was always faster to write to b800:0000 than use int 10h (assuming a color display of course!).
Re:Creating a Bare Bones Bootloader by dugmartin on Wednesday April 16, 2014 @01:46PM (#7599265)
Yep, instead of looping over an interrupt just use "rep movsb" between the data segment and display memory.
Re:Creating a Bare Bones Bootloader by taiki on Wednesday April 16, 2014 @10:52AM (#7598127)
What about for EFI? Does this guide hold up the same?
Re:Creating a Bare Bones Bootloader by emaste on Wednesday April 16, 2014 @11:15AM (#7598279)
No, none of the description in this guide applies to UEFI. The UEFI firmware loads its bootloader as a PE binary from a FAT filesystem, not a binary blob from sector 0, and the CPU is already in 32- or 64-bit mode. The interface for calling firmware routines is also completely different.

This is a decent equivalent guide for UEFI: http://www.rodsbooks.com/efi-programming/hello.html

Re:Creating a Bare Bones Bootloader by good_guy on Wednesday April 16, 2014 @07:30AM (#7597117)
Similar guide to write a small kernel https://news.ycombinator.com/item?id=7588205