On 07/20/2013 05:44 AM, Stefan Tauner wrote:
On Fri, 09 Apr 2010 19:08:21 +0400 vadimgirlin at gmail.com (Vadim Girlin) wrote:
On 04/09/2010 04:18 PM, Carl-Daniel Hailfinger wrote:
Hi Vadim,
thanks for your mail. I have added the flashrom mailing list in CC: because we should develop a generic way to handle DualBIOS and similar techniques.
On 09.04.2010 08:12, Vadim Girlin wrote:
I'm going to try coreboot on Gigabyte GA-MA770-UD3. It's AMD 770 (RX780 / SB700).
My motherboard supports hardware dual bios - with two chips on it. I'm going to try flashing backup chip and boot from it. It seems to be possible - I've tested it (flashing at least). Chips on this board could be switched by changing bit 0 at undocumented register EF on LDN 7 of IT8720. I can use slightly patched flashrom for accessing any chip I want without any problems. And this is tested many times.
My idea is to use backup chip for debugging - that always keeps my chance to reboot from main bios chip. And removes the need for desoldering etc.
And second problem is that original bios is checking second chip - and trying to recover it by flashing the bios from main chip on reboot? rewriting coreboot. AFAICS this could be solved by including some signatures etc. It seems to be easy to find out. May be someone is working on this?
BTW I can send the patch for flashrom - but I think that with information I mentioned above somebody could make it much better than my ugly hack. I hope the regs should be the same for all latest Gigabyte MBs using IT8720/18
It would be great if you could send that patch. It will help us make a flashrom design decision that works for all boards with multiple flash chips.
OK, I'm sending the patch for flashrom - but it is based on RE and needs careful testing. It works fine on GA-MA770-UD3 (rev 1.0) but should be tested with other MBs. Anyway I hope it should work for all latest Gigabyte MBs with dual bios chips connected through IT8720/18. I think it's not ready for inclusion in flashrom - it probably should be done in more safe and generic way. Probably it should check for default values in regs etc.
It may be used as following:
flashrom -p it87spi:gbdualindex=0 ... flashrom -p it87spi:gbdualindex=1 ...
This value needs to be set only once and further ops on selected chip can be performed without parameters.
Index: it87spi.c
--- it87spi.c (revision 992) +++ it87spi.c (working copy) @@ -155,6 +155,28 @@ sio_write(port, 0x65, (flashport & 0xff)); free(portpos); }
portpos = extract_param(&programmer_param,
"gbdualindex=", ",:");
if (portpos) {
int chip_index = strtol(portpos, (char **)NULL, 0);
if ((chip_index!=0) && (chip_index!=1)) {
msg_perr("Dual bios: Invalid chip index requested: %d\n",chip_index);
flashport=0;
} else {
tmp=sio_read(port,0xEF);
msg_pinfo("Dual bios: Current chip : %d\n",tmp&1);
if (chip_index!=(tmp&1)) {
sio_write(port,0xEF,(tmp&0xFE)|chip_index);
tmp=sio_read(port,0xEF)&1;
if (tmp!=chip_index) {
msg_perr("Dual bios: Chip selection failed.\n");
flashport=0;
} else msg_pinfo("Dual bios: Selected chip: %d\n",tmp&1);
}
}
free(portpos);
} exit_conf_mode_ite(port); break;}
Hello Vadim!
Someone has tested a refinement of your patch with an ITE 8728 and it (still) worked fine. I'd like to request a sign-off from you in case we want to eventually integrate it. (see http://www.coreboot.org/Development_Guidelines#Sign-off_Procedure for details). Thanks!
Hi Stefan!
Signed-off-by: Vadim Girlin vadimgirlin@gmail.com
Is it sufficient to add it here or do I need to resend the patch with sign-off?
Vadim