|
|
#include <sys/types.h> #include <sys/ddi.h> #include <sys/ddi_i386at.h>int drv_gethardware(ulong_t parm, void *value_p);
Valid values for parm are:
struct cpuparms { ulong_t cpu_id; /* CPU identification */ ulong_t cpu_step; /* Step (revision) number */ ulong_t cpu_resrvd[2]; /* RESERVED for future expansion */ };/* Valid values for cpu_id */
#define CPU_UNK 0 #define CPU_i386 1 #define CPU_i486 2 #define CPU_i586 3 #define CPU_i686 4 #define CPU_i786 5
/* Valid values for cpu_step */
#define STEP_UNK 0 #define STEP_B1 1 /* if cpu_id == CPU_i386 */
struct bootdev
.
The bootdev
structure is defined as:
struct bootdev { ulong_t bdv_type; /* Type of the boot device */ ulong_t bdv_unit; /* Unit number of the boot device */ ulong_t bdv_resrvd[2]; /* RESERVED for future expansion */ };/* Valid values for bdv_type */
#define BOOT_FLOPPY 1 #define BOOT_DISK 2 #define BOOT_CDROM 3 #define BOOT_NETWORK 4
struct hdparms
.
The driver must specify the hard disk by setting the
``hp_unit'' field of the hdparms
structure pointed to by value_p
to the unit number of the hard disk prior to calling drv_gethardware.
The hdparms
structure is defined as:
struct hdparms { ulong_t hp_unit; /* Hard disk unit number */ ulong_t hp_ncyls; /* Number of cylinders (0 == no disk) */ ulong_t hp_nheads; /* Number of heads */ ulong_t hp_nsects; /* Number of sectors per track */ ushort_t hp_precomp; /* Write precompensation cylinder */ ushort_t hp_lz; /* Landing zone cylinder number */ ulong_t hp_resrvd[2]; /* RESERVED for future expansion */ };