BIOS INT13h AH=42h with BOCHS

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Exodus86
Posts: 2
Joined: Sun Jul 19, 2015 1:03 pm

BIOS INT13h AH=42h with BOCHS

Post by Exodus86 »

Hello guys,

I'm new to OSDev.org and I'm also new to OS development. I got some practice with BOCHS and x86 assembly but I still got a lot to learn. My question is:

I got trouble with my bootloader code. I try to use the INT 13h AH=42h: "Extended Read Sectors From Drive" BIOS function of version 3.0 (EDD-3.0) with BOCHS to copy my kernel code from a hard disk image to a memory location above 0x100000 in real mode.

When I use the INT13 AH=41h BX=55AAh function to check for support of EDD-3.0 I get a positive result. I'm using BOCHS 2.6.8.

Code: Select all

Disk Address Packet:
db  0x18    ; size of packet
db  0x00    ; reserved
db  0x04    ; # blocks to transfer
db  0x00    ; reserved
dw  0xFFFF  ; offset
dw  0xFFFF  ; segment
dq  0x1     ; starting absolute block number (LBA)
dq  0x100000; 64-bit flat target address
I use this DAP. What BOCHS does is copy 4 blocks from disk to FFFF:FFFF mod 100000h = FFEFh. What am I doing wrong? I use Ralf Brown's Interrupt List (http://www.ctyme.com/intr/rb-0708.htm) as reference.
Octocontrabass
Member
Member
Posts: 5588
Joined: Mon Mar 25, 2013 7:01 pm

Re: BIOS INT13h AH=42h with BOCHS

Post by Octocontrabass »

Bochs (or rather, the BIOS you're using) does not support that extension.

RBIL says it should be supported, but RBIL isn't always the most accurate source - it could very well be based on a draft that was never officially accepted as standard. At least one draft says function 41h returns a bit in CX that indicates whether the 64-bit flat addresses are supported or not. Going by that draft, Bochs is correct.
Exodus86
Posts: 2
Joined: Sun Jul 19, 2015 1:03 pm

Re: BIOS INT13h AH=42h with BOCHS

Post by Exodus86 »

Thx for your fast reply, Octocontrabass

You are right. I searched the web for the specification of EDD-3.0 and found a draft but I didnt check the exact definition of INT13h AH=41h BX=55AAh. The draft differs from what RBIL says :? I didnt expect that.
RBIL isn't the bible, good to know #-o

I will find another solution...
Post Reply