From owner-freebsd-hardware@FreeBSD.ORG Wed Mar 10 15:35:29 2004 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BAC1A16A4CE for ; Wed, 10 Mar 2004 15:35:29 -0800 (PST) Received: from mail55.messagelabs.com (mail55.messagelabs.com [216.82.240.35]) by mx1.FreeBSD.org (Postfix) with SMTP id 56C0A43D2F for ; Wed, 10 Mar 2004 15:35:29 -0800 (PST) (envelope-from jason.dictos@yosemitetech.com) X-VirusChecked: Checked X-Env-Sender: jason.dictos@yosemitetech.com X-Msg-Ref: server-14.tower-55.messagelabs.com!1078961725!1175261 X-StarScan-Version: 5.1.15; banners=yosemitetech.com,-,- Received: (qmail 12074 invoked from network); 10 Mar 2004 23:35:25 -0000 Received: from mail.tapeware.com (HELO yt-internet.tapeware.com) (4.21.59.10) by server-14.tower-55.messagelabs.com with SMTP; 10 Mar 2004 23:35:25 -0000 Received: by mail.tapeware.com with Internet Mail Service (5.5.2657.72) id ; Wed, 10 Mar 2004 15:38:35 -0800 Message-ID: From: Jason Dictos To: 'John Baldwin' , Jason Dictos Date: Wed, 10 Mar 2004 15:38:34 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: text/plain cc: "'freebsd-hardware@freebsd.org'" Subject: RE: How to use int 13 while BSD is running X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Mar 2004 23:35:30 -0000 So there are two basic goals that I am trying to achomplish here: 1. Read data from the disc we booted off of without worrying about having the right drivers running (in most cases this will be a ide cdrom image, or a tape drive emulating a cdrom [hp obdr]). 2. Write and modify the hosts boot disk (could be scsi, could be ide, must be bios addressable), once again without having to worry about having the right drivers running. 3. Do all this in a fully multi threaded 32 bit bsd environment. Are there any bios drivers for BSD that simply ensure a bios disk will be detected in a readable/writeable fassion? -Jason -----Original Message----- From: John Baldwin [mailto:jhb@FreeBSD.org] Sent: Wednesday, March 10, 2004 2:30 PM To: Jason Dictos Cc: 'freebsd-hardware@freebsd.org' Subject: Re: How to use int 13 while BSD is running On Wednesday 10 March 2004 01:22 pm, Jason Dictos wrote: > Thanks for the reply, however I'm looking for a more DMPI style > interface while in protected mode. If we didn't need to be in > protected mode, then I'd just leave it the way it is-us booting into > DR DOS and using inline assembly to access int 13. However what we're > trying to do is move to a 32 bit kernel environment, while still > retaining access to realmode interrupts. The loader runs in protected mode. Basically, BTX is a small kernel that allows for a single protected mode task. That task can make BIOS calls, the real mode interrupt handlers are still used for device interrupts, etc. For example, see src/sys/boot/i386/libi386/biosdisk.c to see how it uses int13 to talk to the disks but from within a 32-bit protected mode app written in C. > -Jason > > -----Original Message----- > From: John Baldwin [mailto:jhb@FreeBSD.org] > Sent: Wednesday, March 10, 2004 7:52 AM > To: Jason Dictos > Cc: 'freebsd-hardware@freebsd.org' > Subject: Re: How to use int 13 while BSD is running > > On Tuesday 09 March 2004 04:24 pm, Jason Dictos wrote: > > Hello, > > > > I'm investigating what resources are out there for accessing bios > > addressable devices while BSD is up and running. The situation is > > this, currently we licenses Caldera DOS for a program we wrote which > > uses the > > int13 extensions to manipulate the systems hard drive (i.e. to > > recover partition tables and what not). This forces our application > > to be written in 16 bit mode, but it does allows us to not have to > > worry about loading any driver which would be hardware specific to > > access the hard drive. Is there any way to write a driver for BSD > > which would put the processor into real mode, therefore allowing us > > to use the int > > 13 api of the bios to read and write hard drives? That way we could > > package a stripped down BSD kernel which loaded our driver and gave > > our application access to hard disks without having to load any > > device > > driver. > > > Apologies in advance if this is the wrong mailing list, > > Look at the loader in src/sys/boot. It is a 32-bit C app that uses BIOS > calls to access the disk. It uses a psuedo-kernel called BTX to > manage interrupts in vm86 mode and run BIOS code in vm86 mode. You > can probably port your software to being a custom loader that uses > boot2 to boot off of a floppy. You can also use cdboot to boot a > loader off of a CD or pxeboot to boot a loader image over the network. > The loader uses libstand which provides several useful things like > malloc/free, some basic filesystem support, etc. > > -- > John Baldwin <>< http://www.FreeBSD.org/~jhb/ > "Power Users Use the Power to Serve" = http://www.FreeBSD.org > > ______________________________________________________________________ > This email has been scanned by the MessageLabs Email Security System. > For more information please visit http://www.messagelabs.com/email > ______________________________________________________________________ > > ______________________________________________________________________ > This email has been scanned by the MessageLabs Email Security System. > For more information please visit http://www.messagelabs.com/email > ______________________________________________________________________ -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________