Writing a BIOS bootloader for 64-bit mode from scratch
1–10 of 82 posts
Re: Writing a BIOS bootloader for 64-bit mode from scratch
#2Re: Writing a BIOS bootloader for 64-bit mode from scratch
#3How old is UEFI now? Pity nobody deprecated BIOS alongside long mode.
Deprecated doesn't mean deleted, it just means "no longer updated/developed with a goal towards removal".
Re: Writing a BIOS bootloader for 64-bit mode from scratch
#4https://wiki.osdev.org/Entering_Long_Mode_Directly
i've had a bootloader for a small 64-bit kernel based on this that fit comfortably into the bootsector, including loading the kernel from disk and setting up vesa modes, no stage2 required.
Re: Writing a BIOS bootloader for 64-bit mode from scratch
#5note that you can switch to long mode directly, without going into protected mode first, with way less code: https://wiki.osdev.org/Entering_Long_Mode_Directly i've had a bootloader for a small 64-bit kernel based on this that fit comfortably into the bootsector, including loading the kernel from disk and setting up vesa modes, no stage2 required.
Re: Writing a BIOS bootloader for 64-bit mode from scratch
#6Re: Writing a BIOS bootloader for 64-bit mode from scratch
#7note that you can switch to long mode directly, without going into protected mode first, with way less code: https://wiki.osdev.org/Entering_Long_Mode_Directly i've had a bootloader for a small 64-bit kernel based on this that fit comfortably into the bootsector, including loading the kernel from disk and setting up vesa modes, no stage2 required.
How in the world do you fit all that in 512 bytes? I'm guessing you don't have a real-world filesystem (that allows the kernel to be anywhere on the disk just as a normal file)? Because just dealing with file fragmentation should bump you way over 512 bytes I would imagine.
Re: Writing a BIOS bootloader for 64-bit mode from scratch
#8note that you can switch to long mode directly, without going into protected mode first, with way less code: https://wiki.osdev.org/Entering_Long_Mode_Directly i've had a bootloader for a small 64-bit kernel based on this that fit comfortably into the bootsector, including loading the kernel from disk and setting up vesa modes, no stage2 required.
> i've had a bootloader for a small 64-bit kernel based on this that fit comfortably into the bootsector, including loading the kernel from disk and setting up vesa modes, no stage2 required. How in the world do you fit all that in 512 bytes? I'm guessing you don't have a real-world filesystem (that allows the kernel to be anywhere on the disk just as a normal file)? Because just dealing with file fragmentation shoul…
the whole boot disk image was generated during build, which is common for small systems.
Re: Writing a BIOS bootloader for 64-bit mode from scratch
#9Re: Writing a BIOS bootloader for 64-bit mode from scratch
#10How old is UEFI now? Pity nobody deprecated BIOS alongside long mode.
BIOS is deprecated. All of its functionality on new motherboards is basically emulated via the UEFI; and it's certainly not being extended upon. Deprecated doesn't mean deleted, it just means "no longer updated/developed with a goal towards removal".