Deleted Added
full compact
26c26
< * $Id: biosdisk.c,v 1.22 1999/01/24 06:03:44 msmith Exp $
---
> * $Id: biosdisk.c,v 1.23 1999/01/25 23:07:02 rnordier Exp $
749a750,778
> * Return the BIOS geometry of a given "fixed drive" in a format
> * suitable for the legacy bootinfo structure. Since the kernel is
> * expecting raw int 0x13/0x8 values for N_BIOS_GEOM drives, we
> * prefer to get the information directly, rather than rely on being
> * able to put it together from information already maintained for
> * different purposes and for a probably different number of drives.
> *
> * For valid drives, the geometry is expected in the format (31..0)
> * "000000cc cccccccc hhhhhhhh 00ssssss"; and invalid drives are
> * indicated by returning the geometry of a "1.2M" PC-format floppy
> * disk. And, incidentally, what is returned is not the geometry as
> * such but the highest valid cylinder, head, and sector numbers.
> */
> u_int32_t
> bd_getbigeom(int bunit)
> {
>
> v86.ctl = V86_FLAGS;
> v86.addr = 0x13;
> v86.eax = 0x800;
> v86.edx = 0x80 + bunit;
> v86int();
> if (v86.efl & 0x1)
> return 0x4f010f;
> return ((v86.ecx & 0xc0) << 18) | ((v86.ecx & 0xff00) << 8) |
> (v86.edx & 0xff00) | (v86.ecx & 0x3f);
> }
>
> /*