2005-01-27 16:19:23

by Rahul Karnik

[permalink] [raw]
Subject: Flashing BIOS of a PCI IDE card (IT8212F)

Hello,

I was just wondering if it is possible to flash the BIOS of a PCI IDE
card from within Linux. I have an OEM IT8212 card with a really old
BIOS which the vendor does not support with a BIOS flashing tool. ITE
Tech's flashing tool appears to work, but it fails to verify that the
flash was successful and indeed the ROM is unchanged.

How is the BIOS on such cards different from the firmware on other
cards? Is it possible to use the kernel firmware loader to load a
different image at runtime?

Thanks for the help,
Rahul


2005-01-27 16:48:00

by linux-os (Dick Johnson)

[permalink] [raw]
Subject: Re: Flashing BIOS of a PCI IDE card (IT8212F)

On Thu, 27 Jan 2005, Rahul Karnik wrote:

> Hello,
>
> I was just wondering if it is possible to flash the BIOS of a PCI IDE
> card from within Linux. I have an OEM IT8212 card with a really old
> BIOS which the vendor does not support with a BIOS flashing tool. ITE
> Tech's flashing tool appears to work, but it fails to verify that the
> flash was successful and indeed the ROM is unchanged.
>
> How is the BIOS on such cards different from the firmware on other
> cards? Is it possible to use the kernel firmware loader to load a
> different image at runtime?
>
> Thanks for the help,
> Rahul
> -

Simple answer: forget it.

But... If you know the part number of the flash-RAM,
it is possible to use one of the flash-RAM writers
that may exist in your version of the kernel or to
write your own. Basically you write some unlock codes
at specified offsets (0x55, 0xaa, etc.), then you
write a command-code, then some data at its offset.

Writing to flash requires erasing it first. Therefore
if the write fails, you are in deep dodo. Typically
flash RAM exists in 64k pages. Something as small as
a BIOS probably uses only one 64k page, but you
need to know what one inside the chip is actually
used.

There are other types of flash (micro-wire) that
are accessed only one bit at a time. There is such
code in several of the Ethernet Controllers. Although
writing code to read/erase/write any of these devices
is not difficult, you need to be able to experiment
to get it right. Because of different implementation
details, some flash can only be accessed in 32-bit
longs, some in 16-bit shorts, etc. Some single-bit
flash requires you to write an unused bit, with
some, the extra bit goes on the end, some it
goes first. Some require 16 bits written backwards,
etc. Without a spare device to experiment with, you
are in a world of hurt if your initial guess of
the implementation details is wrong.

Cheers,
Dick Johnson
Penguin : Linux version 2.6.10 on an i686 machine (5537.79 BogoMips).
Notice : All mail here is now cached for review by Dictator Bush.
98.36% of all statistics are fiction.

2005-01-30 16:44:30

by Alan

[permalink] [raw]
Subject: Re: Flashing BIOS of a PCI IDE card (IT8212F)

On Iau, 2005-01-27 at 16:19, Rahul Karnik wrote:
> card from within Linux. I have an OEM IT8212 card with a really old
> BIOS which the vendor does not support with a BIOS flashing tool. ITE
> Tech's flashing tool appears to work, but it fails to verify that the
> flash was successful and indeed the ROM is unchanged.

Not every vendor bothers to make the flash writable from the PCI card,
and if the ROM is unchanged that seems likely.

Note that with the 2.6.10-ac kernels if you have a BIOS in raid mode you
can force it out of raid mode with a boot option. You cannot however do
the same in the other direction.