[prev in list] [next in list] [prev in thread] [next in thread]
List: freebsd-hackers
Subject: Re: (mainly CMOS) - howto?
From: Michael Smith <msmith () atrad ! adelaide ! edu ! au>
Date: 1997-07-31 8:58:56
[Download RAW message or body]
Simon Shapiro stands accused of saying:
>
> I need to have the followinf struct filled up with sane information.
"sane" or "correct"?
> Other than inb and outb to the BIOS registers, how do I get this data?
>
> typedef struct dpt_sysinfo {
> u_int8_t drive0CMOS; /* CMOS Drive 0 Type */
> u_int8_t drive1CMOS; /* CMOS Drive 1 Type */
Uhh, are you _NUTS_? Or if you don't care, just set them to 1, or 47.
> u_int8_t numDrives; /* 0040:0075 contents */
Uhm. This isn't a constant. Is '2' good enough?
> u_int8_t processorFamily; /* i386 vs. Alpha, etc. */
sysctl_byname on hw.machine will tell you sys.
> u_int8_t processorType; /* {3,4,5,6}86 */
There's a global cpu_class (in the kernel) which is set for this.
sysctl_byname on hw.model can be used to obtain it too.
> u_int8_t osMajorVersion;
> u_int8_t osMinorVersion; /* The OS version */
> u_int8_t osRevision;
> u_int8_t osSubRevision;
Parse the results of sysctl_byname on kern.osrelease / kern.osrevision
for this.
Care to explain the context? It might make guessing the "right" answers
a little easier 8)
--
]] Mike Smith, Software Engineer msmith@gsoft.com.au [[
]] Genesis Software genesis@gsoft.com.au [[
]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[
]] realtime instrument control. (ph) +61-8-8267-3493 [[
]] Unix hardware collector. "Where are your PEZ?" The Tick [[
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic