Re: Using int 13 while BSD is running

2004-03-11 Thread Dan Nelson
In the last episode (Mar 11), Sergey 'DoubleF' Zaharchenko said:
> > However in dos we have garanteed hard drive support via int13 (Well
> > almost garanteed, but if an os can boot of the computer, we can
> > access the disk),
> 
> The hard disk is not the only device you can boot off. Consider
> floppies, CDROMS, etc. etc. So your access to the disk is only
> guaranteed when you can read the disk, which seems like a tautology
> to me:).
> 
> > and I'm looking for the same sorta garantee in BSD.
> 
> You are stating that the BIOS has better hardware support that
> FreeBSD. Can you give any examples?

I've seen lots of work go into the ata driver recently to support new
ATA and SATA chipsets (take a look at the commits to ata-chipset.c
since its creation just a year ago).  If I were to put a kernel into
some product, I would probably not want to have to keep releasing
updates to it every time SiS, Promise, or Via releases a new chipset.

-- 
Dan Nelson
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Using int 13 while BSD is running

2004-03-11 Thread Sergey 'DoubleF' Zaharchenko
On Wed, 10 Mar 2004 11:14:03 -0500 (EST)
Jerry McAllister <[EMAIL PROTECTED]> probably wrote:

> Gee whiz, just let dd(1) do it for you.   It can seek to any position
> and read any number of bytes of a disk.

That's what I meant by `shellscript':).

> If it gets ornery, set the
> block size to 1 byte - a little slow and inefficient, but then it won't
> have trouble with other block arrangements.

The minimum blocksize is 512 bytes (at least on ATA drives; 2048 on
data CDROMS). You get an `invalid argument' error if you try using a
size which is not a multiple of 512. But after dd'ing, you can use
head(1)/tail(1) to get only the necessary info, right to the single
byte.

-- 
DoubleF
My mother loved children -- she would have given anything if I had been
one.
-- Groucho Marx


pgp0.pgp
Description: PGP signature


Re: Using int 13 while BSD is running

2004-03-11 Thread Sergey 'DoubleF' Zaharchenko
On Wed, 10 Mar 2004 08:49:17 -0800
Jason Dictos <[EMAIL PROTECTED]> probably wrote:

>  
> 
> > To Jason: take care not to *write* anything to the disk via int 13h.
> > I still don't think I understand why you are using FreeBSD for this
> > specific purpose. Why if you just spend time escaping from the OS?
> 
> We actually _like_ protected mode, it allows us to be more flexible
> and our code doesn't have to be bastardized with 16 dos compilers ;).

What are those sixteen compilers that are bastardizing you?:)

[Open]Watcom seems to be up for the job (you can create 32-bit DOS
programs with it).

> However in dos
> we have garanteed hard drive support via int13 (Well almost garanteed,
> but if an os can boot of the computer, we can access the disk),

The hard disk is not the only device you can boot off. Consider
floppies, CDROMS, etc. etc. So your access to the disk is only
guaranteed when you can read the disk, which seems like a tautology to
me:).

> and I'm looking for the same sorta garantee in BSD.

You are stating that the BIOS has better hardware support that
FreeBSD. Can you give any examples?

> People will be using this with raid
> controllers, scsi hard disks, and ide drives (Server recovery), so
> there will be many times when the hardware running the hd requires
> specific support, which BSD may or may not have, point is we dont'
> want to manage that.

May I paraphrase: `If we have a disk which is unsupported by BIOS, we
can just wash hands as we can't change the BIOS. If we have a disk
which might be supported by FreeBSD but which we don't know the driver
name for, we feel guilty, so we don't want that'. Is my understanding
correct? There are not so many HDD drivers for FreeBSD out there.

-- 
DoubleF
Critic, n.:
A person who boasts himself hard to please because nobody tries
to please him.
-- Ambrose Bierce, "The Devil's Dictionary"


pgp0.pgp
Description: PGP signature


RE: Using int 13 while BSD is running

2004-03-10 Thread Jason Dictos
Point well taken.

-Jason 

-Original Message-
From: Erik Trulsson [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 10, 2004 9:24 AM
To: Jason Dictos
Cc: 'Sergey 'DoubleF' Zaharchenko'; Dan Nelson;
''[EMAIL PROTECTED]' '
Subject: Re: Using int 13 while BSD is running

On Wed, Mar 10, 2004 at 08:49:17AM -0800, Jason Dictos wrote:
>  
> 
> > To Jason: take care not to *write* anything to the disk via int 13h.
> > I still don't think I understand why you are using FreeBSD for this
> specific purpose. Why if you just >spend time escaping from the OS?
> 
> We actually _like_ protected mode, it allows us to be more flexible 
> and our code doesn't have to be bastardized with 16 dos compilers ;). 
> However in dos we have garanteed hard drive support via int13 (Well 
> almost garanteed, but if an os can boot of the computer, we can access 
> the disk), and I'm looking for the same sorta garantee in BSD. People 
> will be using this with raid controllers, scsi hard disks, and ide 
> drives (Server recovery), so there will be many times when the 
> hardware running the hd requires specific support, which BSD may or 
> may not have, point is we dont' want to manage that.
> 
> Make sense?

Just because you can boot from the disk does not mean that the BIOS can read
the whole disk.

As an example I have an old computer running FreeBSD with a 1GB disk.
The BIOS in this computer cannot handle disks larger than 512MB (which was a
quite common limitation in older BIOSs).  I can however boot from this disk
since all the files needed for booting reside below the 512MB mark.  Once I
have booted FreeBSD I can access the whole disk precisely because FreeBSD
does *not* use the BIOS, but use its own routines.




--

Erik Trulsson
[EMAIL PROTECTED]

__
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 
__
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Using int 13 while BSD is running

2004-03-10 Thread Erik Trulsson
On Wed, Mar 10, 2004 at 08:49:17AM -0800, Jason Dictos wrote:
>  
> 
> > To Jason: take care not to *write* anything to the disk via int 13h.
> > I still don't think I understand why you are using FreeBSD for this
> specific purpose. Why if you just >spend time escaping from the OS?
> 
> We actually _like_ protected mode, it allows us to be more flexible and our
> code doesn't have to be bastardized with 16 dos compilers ;). However in dos
> we have garanteed hard drive support via int13 (Well almost garanteed, but
> if an os can boot of the computer, we can access the disk), and I'm looking
> for the same sorta garantee in BSD. People will be using this with raid
> controllers, scsi hard disks, and ide drives (Server recovery), so there
> will be many times when the hardware running the hd requires specific
> support, which BSD may or may not have, point is we dont' want to manage
> that.
> 
> Make sense?

Just because you can boot from the disk does not mean that the BIOS can
read the whole disk.

As an example I have an old computer running FreeBSD with a 1GB disk.
The BIOS in this computer cannot handle disks larger than 512MB (which
was a quite common limitation in older BIOSs).  I can however boot from
this disk since all the files needed for booting reside below the 512MB
mark.  Once I have booted FreeBSD I can access the whole disk precisely
because FreeBSD does *not* use the BIOS, but use its own routines.




-- 

Erik Trulsson
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: Using int 13 while BSD is running

2004-03-10 Thread Jason Dictos
 

> To Jason: take care not to *write* anything to the disk via int 13h.
> I still don't think I understand why you are using FreeBSD for this
specific purpose. Why if you just >spend time escaping from the OS?

We actually _like_ protected mode, it allows us to be more flexible and our
code doesn't have to be bastardized with 16 dos compilers ;). However in dos
we have garanteed hard drive support via int13 (Well almost garanteed, but
if an os can boot of the computer, we can access the disk), and I'm looking
for the same sorta garantee in BSD. People will be using this with raid
controllers, scsi hard disks, and ide drives (Server recovery), so there
will be many times when the hardware running the hd requires specific
support, which BSD may or may not have, point is we dont' want to manage
that.

Make sense?

-Jason

-Original Message-
From: Sergey 'DoubleF' Zaharchenko [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 10, 2004 5:51 AM
To: Jason Dictos
Cc: Dan Nelson; ''[EMAIL PROTECTED]' '
Subject: Re: Using int 13 while BSD is running

On Tue, 9 Mar 2004 22:12:31 -0800
Jason Dictos <[EMAIL PROTECTED]> probably wrote:

> Aren't the nodes "/dev/ad[0-9] (ide) or /dev/da[0-9] (scsi/usb)" 
> created by their device drivers, i.e. protected mode device drives? 
> That would mean that I would have to make sure that the hardware is 
> supported by a device driver, whereas if I had raw int 13 access I 
> would be garanteed access to the drive the system booted from, and any 
> other bios addressable device, without having to load any driver for the
hardware.
> 
> -Jason

Argh, I didn't get your point first. I thought your hardware wasn't
supported by int 13h, and you were trying to get FreeBSD drivers to work for
you in real mode...

Any real HDD's out there not supported by FreeBSD but supported by BIOS'en?

Somewere around then Dan Nelson <[EMAIL PROTECTED]> probably
replied:

> I guess it's possible, since you have to use the bios to make VESA 
> video calls, and they work.  /sys/i386/isa/vesa.c has most of the 
> stuff you would need.  Also see the i386_vm86() userland function; you 
> may not even need to mess around inside the kernel.

That's v86 mode, not real mode. Sometimes it makes a difference. It depends
on how that particular BIOS was written.

To Jason: take care not to *write* anything to the disk via int 13h.
I still don't think I understand why you are using FreeBSD for this specific
purpose. Why if you just spend time escaping from the OS?

--
DoubleF
All I ask is a chance to prove that money can't make me happy.

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: Using int 13 while BSD is running

2004-03-10 Thread Jason Dictos
DD's great and all, but I'm not talking about which method to use, I'm
talking about a guaranteed way to access a device without having to rely on
any device drivers. 

Take a look at this: http://sourceforge.net/projects/lrmi/

This provides a dpmi style interface for linux and bsd, thats exactly what I
was looking for.

Thanks,
-Jason

-Original Message-
From: Jerry McAllister [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 10, 2004 8:14 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Using int 13 while BSD is running

> 
> --Signature=_Wed__10_Mar_2004_08_12_00_+0300_m3U9Vu7vS=cMcNXd
> Content-Type: text/plain; charset=US-ASCII
> Content-Disposition: inline
> Content-Transfer-Encoding: 7bit
> 
> On Tue, 9 Mar 2004 14:03:34 -0800
> Jason Dictos <[EMAIL PROTECTED]> probably wrote:
> 
> > 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.
> 
> Through the /dev/ad[0-9] (ide) or /dev/da[0-9] (scsi/usb) you can get 
> access to any byte in you harddrive. They `look like' ordinary files 
> to most programs. Just seek the appropriate number of bytes and read 
> what you want (0-512 is the mbr, for example). You don't even need to 
> write a line in assembly for that, just plain C (or even shell-script, 
> if you prefer that).

Gee whiz, just let dd(1) do it for you.   It can seek to any position
and read any number of bytes of a disk.If it gets ornery, set the
block size to 1 byte - a little slow and efficient, but then it won't have
trouble with other block arrangements.

jerry

> 
> > 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?
> 
> Putting the cpu back into real mode is kind of perversion. And I don't 
> think FreeBSD provides any real mode interface. Whatever you would see 
> in real mode, you can bet it isn't a FreeBSD driver for your harddrive.
> 
> --
> DoubleF
> Romeo wasn't bilked in a day.
>   -- Walt Kelly, "Ten Ever-Lovin' Blue-Eyed Years With
>  Pogo"
> 
> --Signature=_Wed__10_Mar_2004_08_12_00_+0300_m3U9Vu7vS=cMcNXd
> Content-Type: application/pgp-signature
> 
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.2.4 (FreeBSD)
> 
> iD8DBQFATqOrwo7hT/9lVdwRAinPAJ9rsC9Tzum5970w88Ze0o+skKwbTgCbBE0S
> 6bUkIwtlJePcYTsq1Ja/0gU=
> =F4fi
> -END PGP SIGNATURE-
> 
> --Signature=_Wed__10_Mar_2004_08_12_00_+0300_m3U9Vu7vS=cMcNXd--
> 
> 


__
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 
__
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: Using int 13 while BSD is running

2004-03-10 Thread Jason Dictos
The goal here is simply this: To be able to write to a systems hard drive
with just bios support. I dont' want to have to deal with bundling every
known ide/scsi/raid adapter driver in a bsd kernel.

Here's something that I found though that may be exactly what I have been
looking for:
http://sourceforge.net/projects/lrmi/

I'll be doing some tests with this to see how it works out.

Thanks,
-Jason 

-Original Message-
From: Sergey 'DoubleF' Zaharchenko [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 10, 2004 5:51 AM
To: Jason Dictos
Cc: Dan Nelson; ''[EMAIL PROTECTED]' '
Subject: Re: Using int 13 while BSD is running

On Tue, 9 Mar 2004 22:12:31 -0800
Jason Dictos <[EMAIL PROTECTED]> probably wrote:

> Aren't the nodes "/dev/ad[0-9] (ide) or /dev/da[0-9] (scsi/usb)" 
> created by their device drivers, i.e. protected mode device drives? 
> That would mean that I would have to make sure that the hardware is 
> supported by a device driver, whereas if I had raw int 13 access I 
> would be garanteed access to the drive the system booted from, and any 
> other bios addressable device, without having to load any driver for the
hardware.
> 
> -Jason

Argh, I didn't get your point first. I thought your hardware wasn't
supported by int 13h, and you were trying to get FreeBSD drivers to work for
you in real mode...

Any real HDD's out there not supported by FreeBSD but supported by BIOS'en?

Somewere around then Dan Nelson <[EMAIL PROTECTED]> probably
replied:

> I guess it's possible, since you have to use the bios to make VESA 
> video calls, and they work.  /sys/i386/isa/vesa.c has most of the 
> stuff you would need.  Also see the i386_vm86() userland function; you 
> may not even need to mess around inside the kernel.

That's v86 mode, not real mode. Sometimes it makes a difference. It depends
on how that particular BIOS was written.

To Jason: take care not to *write* anything to the disk via int 13h.
I still don't think I understand why you are using FreeBSD for this specific
purpose. Why if you just spend time escaping from the OS?

--
DoubleF
All I ask is a chance to prove that money can't make me happy.

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Using int 13 while BSD is running

2004-03-10 Thread Jerry McAllister
> 
> --Signature=_Wed__10_Mar_2004_08_12_00_+0300_m3U9Vu7vS=cMcNXd
> Content-Type: text/plain; charset=US-ASCII
> Content-Disposition: inline
> Content-Transfer-Encoding: 7bit
> 
> On Tue, 9 Mar 2004 14:03:34 -0800 
> Jason Dictos <[EMAIL PROTECTED]> probably wrote:
> 
> > 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.
> 
> Through the /dev/ad[0-9] (ide) or /dev/da[0-9] (scsi/usb) you can get
> access to any byte in you harddrive. They `look like' ordinary files to
> most programs. Just seek the appropriate number of bytes and read what
> you want (0-512 is the mbr, for example). You don't even need to write a
> line in assembly for that, just plain C (or even shell-script, if you
> prefer that).

Gee whiz, just let dd(1) do it for you.   It can seek to any position
and read any number of bytes of a disk.If it gets ornery, set the
block size to 1 byte - a little slow and efficient, but then it won't
have trouble with other block arrangements.

jerry

> 
> > 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?
> 
> Putting the cpu back into real mode is kind of perversion. And I don't
> think FreeBSD provides any real mode interface. Whatever you would see
> in real mode, you can bet it isn't a FreeBSD driver for your harddrive.
> 
> -- 
> DoubleF
> Romeo wasn't bilked in a day.
>   -- Walt Kelly, "Ten Ever-Lovin' Blue-Eyed Years With
>  Pogo"
> 
> --Signature=_Wed__10_Mar_2004_08_12_00_+0300_m3U9Vu7vS=cMcNXd
> Content-Type: application/pgp-signature
> 
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.2.4 (FreeBSD)
> 
> iD8DBQFATqOrwo7hT/9lVdwRAinPAJ9rsC9Tzum5970w88Ze0o+skKwbTgCbBE0S
> 6bUkIwtlJePcYTsq1Ja/0gU=
> =F4fi
> -END PGP SIGNATURE-
> 
> --Signature=_Wed__10_Mar_2004_08_12_00_+0300_m3U9Vu7vS=cMcNXd--
> 
> 

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Using int 13 while BSD is running

2004-03-10 Thread Sergey 'DoubleF' Zaharchenko
On Tue, 9 Mar 2004 22:12:31 -0800 
Jason Dictos <[EMAIL PROTECTED]> probably wrote:

> Aren't the nodes "/dev/ad[0-9] (ide) or /dev/da[0-9] (scsi/usb)" created by
> their device drivers, i.e. protected mode device drives? That would mean
> that I would have to make sure that the hardware is supported by a device
> driver, whereas if I had raw int 13 access I would be garanteed access to
> the drive the system booted from, and any other bios addressable device,
> without having to load any driver for the hardware. 
> 
> -Jason

Argh, I didn't get your point first. I thought your hardware wasn't
supported by int 13h, and you were trying to get FreeBSD drivers to
work for you in real mode...

Any real HDD's out there not supported by FreeBSD but supported by
BIOS'en?

Somewere around then Dan Nelson <[EMAIL PROTECTED]> probably
replied:

> I guess it's possible, since you have to use the bios to make VESA
> video calls, and they work.  /sys/i386/isa/vesa.c has most of the stuff
> you would need.  Also see the i386_vm86() userland function; you may not
> even need to mess around inside the kernel.

That's v86 mode, not real mode. Sometimes it makes a difference. It
depends on how that particular BIOS was written.

To Jason: take care not to *write* anything to the disk via int 13h.
I still don't think I understand why you are using FreeBSD for this
specific purpose. Why if you just spend time escaping from the OS?

-- 
DoubleF
All I ask is a chance to prove that money can't make me happy.


pgp0.pgp
Description: PGP signature


Re: Using int 13 while BSD is running

2004-03-09 Thread Dan Nelson
In the last episode (Mar 09), Jason Dictos said:
> 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.

I guess it's possible, since you have to use the bios to make VESA
video calls, and they work.  /sys/i386/isa/vesa.c has most of the stuff
you would need.  Also see the i386_vm86() userland function; you may not
even need to mess around inside the kernel.

Alternatively, have you taken a look at FreeDOS?  You can probably use
your exisitng code unchanged on it, or use either DJGPP or OpenWatcom
to build 32-bit executables that run under a DOS extender.

www.freedos.org
www.delorie.com
www.openwatcom.org

-- 
Dan Nelson
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: Using int 13 while BSD is running

2004-03-09 Thread Jason Dictos
Aren't the nodes "/dev/ad[0-9] (ide) or /dev/da[0-9] (scsi/usb)" created by
their device drivers, i.e. protected mode device drives? That would mean
that I would have to make sure that the hardware is supported by a device
driver, whereas if I had raw int 13 access I would be garanteed access to
the drive the system booted from, and any other bios addressable device,
without having to load any driver for the hardware. 

-Jason

-Original Message-
From: Sergey 'DoubleF' Zaharchenko
To: Jason Dictos
Cc: '[EMAIL PROTECTED]'
Sent: 3/9/2004 9:12 PM
Subject: Re: Using int 13 while BSD is running

On Tue, 9 Mar 2004 14:03:34 -0800 
Jason Dictos <[EMAIL PROTECTED]> probably wrote:

> 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.

Through the /dev/ad[0-9] (ide) or /dev/da[0-9] (scsi/usb) you can get
access to any byte in you harddrive. They `look like' ordinary files to
most programs. Just seek the appropriate number of bytes and read what
you want (0-512 is the mbr, for example). You don't even need to write a
line in assembly for that, just plain C (or even shell-script, if you
prefer that).

> 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?

Putting the cpu back into real mode is kind of perversion. And I don't
think FreeBSD provides any real mode interface. Whatever you would see
in real mode, you can bet it isn't a FreeBSD driver for your harddrive.

-- 
DoubleF
Romeo wasn't bilked in a day.
-- Walt Kelly, "Ten Ever-Lovin' Blue-Eyed Years With
   Pogo"

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Using int 13 while BSD is running

2004-03-09 Thread Sergey 'DoubleF' Zaharchenko
On Tue, 9 Mar 2004 14:03:34 -0800 
Jason Dictos <[EMAIL PROTECTED]> probably wrote:

> 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.

Through the /dev/ad[0-9] (ide) or /dev/da[0-9] (scsi/usb) you can get
access to any byte in you harddrive. They `look like' ordinary files to
most programs. Just seek the appropriate number of bytes and read what
you want (0-512 is the mbr, for example). You don't even need to write a
line in assembly for that, just plain C (or even shell-script, if you
prefer that).

> 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?

Putting the cpu back into real mode is kind of perversion. And I don't
think FreeBSD provides any real mode interface. Whatever you would see
in real mode, you can bet it isn't a FreeBSD driver for your harddrive.

-- 
DoubleF
Romeo wasn't bilked in a day.
-- Walt Kelly, "Ten Ever-Lovin' Blue-Eyed Years With
   Pogo"


pgp0.pgp
Description: PGP signature


RE: Using int 13 while BSD is running

2004-03-09 Thread Jason Dictos
Hello again,

I did a some googling and I found this source forge
project which strives to emulate a DPMI style interface
for linux/bsd. Here's a link:

http://sourceforge.net/projects/lrmi/

Anyone know if this thing works? I'm going to try it and
find out.

Thanks,
-Jason 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jason Dictos
Sent: Tuesday, March 09, 2004 2:04 PM
To: '[EMAIL PROTECTED]'
Subject: Using int 13 while BSD is running

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,

-Jason

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
__
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

__
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 
__
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"