2
votes

I'm not really programming any OS or boot loader, but i was reading about Oses and i was intrigued byt the ability for a bootloader to work without bios systems calls, what's more if i understand correctly for large disk bootup in systems without UEFI you can access all disk and there for boot from all partitions or support GPT.

So anyone can say how can i bypass int 13h and access the disk controller directly a (to work with LBA and resolve the right partition myself) Can anyone tell me who maps the B8000 address to the video card and does that still works in protected mode ? does protected mode still exist ? who the hell needs the backward compatibility these days ? how do i bypass int 16h (dunno if i really want to but if you know, WTH :-) why not...) and work with the keyboard controller directly ?

1

1 Answers

2
votes

1) BIOSes now support LBA access (AH=42h AH=43h Extended_Read_Sectors_From_Drive, Extended Write Sectors to Drive). You can bypass BIOS directly as all modern OSes do and program the IDE controller directly . You can refer to the Boch BIOS source code for examples http://bochs.sourceforge.net/cgi-bin/lxr/source/bios/rombios.c . It should be simpler and less abstracted, than say Linux kernel. For example the code to write sectors is around line 6512. You are interested in the outb calls.

2) B8000 is perhaps mapped by the modesetting code in VGA bios, but that is a implementation detail you need not care about. It works in protected mode, because it is not mapped by a processor (using the virtual memory) but by the IO subsystem. Protected mode of course still exists.

3) Who needs backward compatibility? If it was useless, it would have been cut off by Intel to save space on the chip.