Luc Verhaegen (libv) wrote,
Luc Verhaegen
libv

  • Location:
  • Mood:
  • Music:

Emergency BIOS update, the easy way.

Jetway sells a cute VX800 mini-itx board which comes with a choice of VIA C7 and Nano cpu's: the JNF76. At the end of last year, i became the proud owner of one of the rare DVI modules for this board, and shortly thereafter there was an ebay auction which got me a brand new board at half the listed price. I now found the time to go and play with this board, to at least give the ebay seller the positive rating he deserves :)

What I found is that this board booted a debian old-stable (etch) just fine, but that debian stable (lenny), opensuse 11.1 and 9.04 ubuntu, all locked up shortly after initialising the ide controller. Some digging around revealed that this was an issue with the processor power state and recent kernels, and that this is only seen with an older bios version, and that version A03 and higher would fix this. Upon reboot, it was indeed confirmed that this was an old version, namely, A02.

Since sadly, the network controller on this board is not supported by the old-stable kernel, i had to use a usb stick. So I stuffed the latest bios and a copy of flashrom master on the stick, and stuck it in the jetway board. As i already had the libpci-dev package installed, a simple run of make got me a working flashrom binary. I then used flashrom -r jnf76.old.bios to dump the current bios, as a precaution. And then i ran flashrom -w on the new image.

When running flashrom, there is a relatively high probability (50% is my current estimate, but will improve to about 30% soon) that it will not work. Motherboard makers like to provide an extra bit of protection for their bios images, and often use a gpio line from either the southbridge or the superio chip to set write protection on the flash chip.

In flashrom, we keep a list of special board enables, which today mostly map which io line to set, and Michael Karcher and I spend quite a bit of our time digging out bioses for users to map this. So in this case, before i had tried to write to this chip, i had already done my 5 minute magic (which i will explain at the coreboot devroom at FOSDEM) and found out that there was no special protection present.

Flashrom then erased the chip correctly, and then subsequently wrote and verified the image. And i was then able to reboot into any of the installed distributions painlessly.

If there was protection present, (and we didn't handle it yet in flashrom) then this would've made the erase fail at the first byte that isn't 0xFF, and then nothing was lost. There is also another type of protection only found on LPC/FWH/Parallel chips, where the boot block can be locked, and this has the same effect, but only on the boot block part, where you just need to restore all other pages to be able to continue working. We will then happily help create the board enable with you on the flashrom mailing list, so that you still can get your bios updated correctly (now, and in future).

In any case, this was one of the easiest emergency bios updates i had ever done. No messing around with dos images and what not. I had already identified a working linux kernel when trying to nail down the issue, and then just needed to run flashrom to live happily ever after :)
Tags: bios, coreboot, flashrom, fosdem
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments