Board Enable

From flashrom
Revision as of 00:06, 20 December 2009 by MKarcher (talk | contribs) (created page: Intro + Adding a match)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Intro

The term "board enable" describes mainboard specific code to make flash rom write access possible on this mainboard. Usually this means programming some directly programmable output pin (usually called general purpose I/O or GPIO for short) of the chipset that is connect to a write protect input of the BIOS ROM chip to release write protection.

How to find the board enable procedure on your board

Try & Error method on GPIO pins

Reverse Engineering your BIOS

How to add the board enable to flashrom

First, find out whether the board enable method you found out is already used for another mainboard. In the case that it is just raising or lowering one GPIO pin, it could be quite possible that this is the case. As we don't like code duplication, reuse that function. If it is named something like "board_vendor_model" but really just changes a single pin (board_epox_ep_bx3 is an example in r803), rename it to what it does, which would be intel_piix4_gpo22_raise in this case. Add a comment to the function that it also works on your board.

If you don't find a function that does what you want, write it yourself, also trying to reuse codes for parts of what you have to do. Add a comment mentioning the board name and the involved chips in this case too.

After having written an enable function, you just need to add it to the board enable table (board_pciids_enables). This table maps PCI IDs found on the board to the correct enabling functions. Be sure to write a good match (which mostly means that you have to choose onboard chips that have vendor-assigned subsystem IDs that are unique for each board that vendor produced). If a unique match is not possible at all, provide vendor and model name (short form, usually lower case only) as "coreboot IDs" for use with the "-m" option, which means that the board won't be autodetected but can be selected by hand. The board name and vendor name following the coreboot ID strings are freeform and should disply vendor and model name in their preferred form.