Hi everyone,
Lately we've been looking into reverse
PCI<http://flashrom.org/trac/flashrom/changeset/1232>and
MMIO <http://patchwork.coreboot.org/patch/2331/> writes, along with the
shutdown callback mechanism.
The main usage case for Flashrom makes this a pretty simple matter, since
most users only worry about a single programmer being used. However, when
external devices are used which depend on internal programmer settings,
things can get messy.
Consider the case of a laptop with an x86 southbridge and an EC -- To
communicate with the EC thru the LPC/FWH interface, some register settings
in the southbridge might need to be changed. The code flow should be:
1. Set up SB, use rpci_* and rmmio_* to register reverse PCI and MMIO
callbacks wherever necessary.
2. Set up EC.
3. Run code.
4. Call EC shutdown routine.
5. Reverse SB PCI/MMIO writes.
However, the current code calls the programmer shutdown routine in step 4 *
after* doing all shutdown callbacks in step 5. This causes southbridge
registers to be reverted before the EC's shutdown routine is called,
potentially making the EC unreachable.
The attached patch addresses this by using programmer shutdown functions the
same as any other shutdown callback. The internal_shutdown function is
registered early in the internal_init() function so that newly discovered
external programmers (ie SuperIO/EC LPC -> SPI bridges) can be discovered
and have their shutdown callbacks added in the correct order.
If this seems useful, we should make necessary changes to other programmers
as well before committing this patch.
Signed-off-by: David Hendricks <dhendrix(a)google.com>
--
David Hendricks (dhendrix)
Systems Software Engineer, Google Inc.
Hi,
After this patch applied:
http://patchwork.coreboot.org/patch/2452/
And finnaly added " -p internal:boardenable=force" to the command
line. It says VERIFIED, I think everything went well using the MSI
848P Neo-V motherboard.
server-pc:/home/melroy# flashrom -p internal:boardenable=force -w A6788IMS.610
flashrom v0.9.3-r1247 on Linux 2.6.26-2-686 (i686), built with libpci
3.0.0, GCC 4.3.2, little endian
flashrom is free software, get the source code at http://www.flashrom.org
Calibrating delay loop... OK.
No coreboot table found.
Found chipset "Intel ICH5/ICH5R", enabling flash write... OK.
This chipset supports the following protocols: FWH.
NOTE: Running an untested board enable procedure.
Please report success/failure to flashrom(a)flashrom.org
with your board name and SUCCESS or FAILURE in the subject.
Disabling flash write protection for board "MSI MS-6788-040 (848P NeoV)"... OK.
Found chip "Winbond W39V040FA" (512 KB, FWH) at physical address 0xfff80000.
===
This flash part has status UNTESTED for operations: WRITE
The test status of this chip may have been updated in the latest development
version of flashrom. If you are running the latest development version,
please email a report to flashrom(a)flashrom.org if any of the above operations
work correctly for you with this flash part. Please include the flashrom
output with the additional -V option for all operations you tested (-V, -Vr,
-Vw, -VE), and mention which mainboard or programmer you tested.
Please mention your board in the subject line. Thanks for your help!
Flash image seems to be a legacy BIOS. Disabling checks.
Erasing and writing flash chip... Done.
Verifying flash... VERIFIED.
The (latest) BIOS can be found at the MSI website.
--
Kind regards,
Melroy van den Berg
Hello
Its a boardenable patch based on Michael's work for MSI MS-6788-04.
--
Maciej Pijanka
I don't fear computers, I fear lack of them -- Isaac Asimov