Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 May 2007 10:50:03 +0200
From:      des@des.no (Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?=)
To:        "Die Gestalt" <die.gestalt@gmail.com>
Cc:        freebsd-drivers@freebsd.org
Subject:   Re: Generic int 13h driver
Message-ID:  <86veetgnk4.fsf@dwp.des.no>
In-Reply-To: <5bf3e10d0705150724q3f0fd25fq89094bd02d8f9d29@mail.gmail.com> (Die Gestalt's message of "Tue\, 15 May 2007 16\:24\:52 %2B0200")
References:  <5bf3e10d0705150724q3f0fd25fq89094bd02d8f9d29@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
"Die Gestalt" <die.gestalt@gmail.com> writes:
> As the subject implies I'm currently doing the most unholy thing ever. I'm
> writing a driver that accesses hard disks through BIOS int13h. The reasons
> why I'm doing this are many, but mainly I will be in a situation where I
> will not be able to update my kernel and where I want to support as much
> devices as possible. I know this will be slow and I know this will only w=
ork
> on the i386 platform, I accept that.

It won't work nearly as universally as you intend; for some devices
(particularly USB devices), the BIOS tries to enter protected mode when
servicing requests.

> So far so good, I have a skeleton which is able to query the drive
> parameters and some basic stuff. But when I want to read, this doesn't wo=
rk,
> except in QEmu (http://www.qemu.org). I've tried on a VMWare and a real
> machine, what I get is a stall for maybe 10 s (sometimes not) and the
> operations returns saying it's successful but my buffer is actually left
> untouched. I get no kernel message.

Have you verified that the buffer you write from or read into is mapped
correctly in virtual 8086 mode, and that you pass the correct address to
the BIOS?

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86veetgnk4.fsf>