From: Gordon Matzigkeit <[EMAIL PROTECTED]>
Subject: Re: geometry
Date: 10 Mar 1999 09:37:30 -0600
> Let's give it even more structure... something like this:
>
> typedef enum
> {
> GEOMETRY_MODE_LINEAR = 0, /* Direct sector-numbered addressing. */
> GEOMETRY_MODE_CHS, /* Cylinder/Head/Sector addressing. */
> } GeometryMode;
>
> typedef unsigned long long GeometryLinear;
> typedef struct _GeometryCHS GeometryCHS;
> typedef struct _Geometry Geometry;
>
> typedef struct _GeometryCHS
> {
> unsigned long cylinders;
> unsigned long heads;
> unsigned long sectors;
> } GeometryCHS;
>
> struct _Geometry
> {
> GeometryMode mode;
> union
> {
> GeometryLinear linear;
> GeometryCHS chs;
> } max;
> };
Why GeometryLinear is required? GRUB needs to know only CHS. In LBA
mode, CHS is given by INT 13H AH=48h.
----------------------------------------------------------------------
OKUJI Yoshinori <[EMAIL PROTECTED]> ^o-o^
http://duff.kuicr.kyoto-u.ac.jp/~okuji (in English) m /