Ronald G Minnich <[EMAIL PROTECTED]> writes:
> this keeps coming up.
>
> so:
> typedef unsigned char uc;
>
> struct cmos {
> uc desired_image; // the FLASH/DoC image we want to boot
> uc last_booted_image; // The last one to successfully boot
> uc unused[7];
> uc ethernet_mac[6]; // Ethernet mac address
> uc unused2[242];
> };
>
> Ok, add as desired.
Ron I keep thinking a table describing the CMOS is a little more
sane. Somethine like:
struct cmos_entry {
unsigned start_bit;
unsigned bits;
char *label;
int type;
#define CMOS_TYPE_ENUMERATION 1
#define CMOS_TYPE_MAC_ADDRESS 2
int value_count;
char *values[0];
};
With values like:
{
start_bit: BASE
bits: 4
label: "CPU Speed"
type: CMOS_TYPE_ENUMERATION
values_count: 16
values: { "X8", "X9", "X10", "X11", "X12", "X13", "X14", "X15", "X16", "X17",
"X18", "X19", "X20", "X21", "X22", "X23" }
}
{
start_bit: BASE2
bits: 48
label: "Mac Address"
type: CMOS_TYPE_MAC_ADDRESS
values_count: 0
}
{
start_bit: BASE3
bits: 1
label: "Desired Boot Image"
type: CMOS_TYPE_ENUMERATION
values_count: 2
values: { "Fallback Image", "Primary Image" }
}
{
start_bit: BASE4
bits: 1
label: "Last Boot Image"
type: CMOS_TYPE_ENUMERATION
values_count: 2
values: { "Fallback Image", "Primary Image" }
}
Specing this up is on my todo list for later this week before I take
off on vacation, until next year.. Of course if someone objects I'll refactor
a little.
Eric