Hello,
Does flashrom support writing the second flash devices connected to LPC bus?
In my system I have one built-in flash device and the second one which is connected to the same LPC bus. I can also change device ID[3:0] pins, so I'm able to choose from which flash the system should be run.
In this case I would like to write the flash device which is not bootable, but unfortunately the flashrom application detects only the boot device (under 0xFFF0 0000) - no matter from which flash device system is run.
Is there any possibility to choose FWH device for flashrom?
Thank you in advance for engagement,
Hi Piotr,
On 01.02.2010 12:43, Piotr Piwko wrote:
Does flashrom support writing the second flash devices connected to LPC bus?
Not yet, but it is easy to add (maybe 5 lines of code).
In my system I have one built-in flash device and the second one which is connected to the same LPC bus. I can also change device ID[3:0] pins, so I'm able to choose from which flash the system should be run.
In this case I would like to write the flash device which is not bootable, but unfortunately the flashrom application detects only the boot device (under 0xFFF0 0000) - no matter from which flash device system is run.
Is there any possibility to choose FWH device for flashrom?
Choosing the FWH device happens by adjusting the probe address.
You have to modify the calls to programmer_map_flash_region() in map_flash_registers() and in probe_flash(). 0xffffffff has to be changed to the last byte of the address space of your secondary flash chip.
That's it. I plan to write a patch which allows you to set that stuff from the command line (-p internal:flashtop=0xffefffff), but that may not happen before end of March.
Regards, Carl-Daniel
2010/2/1 Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net:
You have to modify the calls to programmer_map_flash_region() in map_flash_registers() and in probe_flash(). 0xffffffff has to be changed to the last byte of the address space of your secondary flash chip.
It works perfectly! Now, I can read/write every FWH devices connected to LPC bus.
That's it. I plan to write a patch which allows you to set that stuff from the command line (-p internal:flashtop=0xffefffff), but that may not happen before end of March.
I am going to add this kind of option, because I need to have this possibility in my current project. When I do it, I will post my result here (I suppose that it will not be written in flashrom coding style, but I don't have enough time to get familiarize with it).
Thank you for help!
I enclosed the patch for flashrom.c file, which adds a possibility to define the FWH device address. I hope it will be useful for someone.
I used 0.9.1-r770 flashrom version.