From patchwork Fri Jan 8 05:11:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pete Smith X-Patchwork-Id: 1423955 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.helo=coreboot.org (client-ip=78.46.105.101; helo=coreboot.org; envelope-from=flashrom-bounces@flashrom.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=flashrom.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=protonmail.com header.i=@protonmail.com header.a=rsa-sha256 header.s=protonmail header.b=YnNKzRR2; dkim-atps=neutral Received: from coreboot.org (coreboot.org [78.46.105.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DCFyG6HMsz9sW4 for ; Sat, 9 Jan 2021 08:06:12 +1100 (AEDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id 3728A10C0C68; Fri, 8 Jan 2021 21:06:05 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id 0967010C0A70 for ; Fri, 8 Jan 2021 05:11:40 +0000 (UTC) Date: Fri, 08 Jan 2021 05:11:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1610082700; bh=eMaTCRvkrIr6RmmQYYxMHdeQcYbnptvlukoF70lNQZU=; h=Date:To:From:Reply-To:Subject:From; b=YnNKzRR28Y9fW3e511lJ6HoU+lpe6x9PZp8HCV7aJHYYneeH9rQV8di1qm75QPZmk jzWVOz434mJS/nd14aOoZ6EOCoBybgH56hJFbQYdMvjjoIbw8gAFH5XH6xGTt4Ks7N 19feZDi+y20eflXwCfD9ZCyexNJ8PiAtZZuTNOok= To: "flashrom@flashrom.org" Message-ID: MIME-Version: 1.0 X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-MailFrom: zailawee@protonmail.com X-Mailman-Rule-Hits: member-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address Message-ID-Hash: 2PKWANYZRX5QPLEV6QTYOE26XGQPJ2N4 X-Message-ID-Hash: 2PKWANYZRX5QPLEV6QTYOE26XGQPJ2N4 X-Mailman-Approved-At: Fri, 08 Jan 2021 21:05:55 +0000 X-Mailman-Version: 3.3.2b1 Precedence: list Subject: [flashrom] Opinions on it87spi.c hack to support IT8686E? List-Id: flashrom discussion and development mailing list Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-Patchwork-Original-From: Pete Smith via flashrom From: Pete Smith Reply-To: Pete Smith Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=flashrom-bounces@flashrom.org X-Spamd-Bar: -- Hi, I have a a GIGABYTE GA-H270N-WIFI motherboard with DualBIOS feature. Flashrom 1.2 is unable to select between the two flash chips with dualbiosindex parameter, as the Super I/O chip (ITE IT8686E) is unsupported: "Super I/O ID 0x8686 is not on the list of flash-capable controllers." In a naive attempt, I just tried to add the chip ID to the list: This modification made flashrom able to select between the flash chips: # flashrom -p internal:dualbiosindex= DualBIOS: Selected chip: 0 # flashrom -p internal:dualbiosindex=1 DualBIOS: Selected chip: 1 # flashrom -p internal:dualbiosindex= DualBIOS: Selected chip: 1 Reading the flash content also seems to work: # flashrom -p internal:dualbiosindex=0 -r M_BIOS.bin Enabling flash write... SPI Configuration is locked down. Enabling hardware sequencing because some important opcode is locked. OK. DualBIOS: Selected chip: 0 Found Programmer flash chip "Opaque flash chip" (16384 kB, Programmer-specific) mapped at physical address 0x0000000000000000. Reading flash... done. # flashrom -p internal:dualbiosindex=1 -r B_BIOS.bin Enabling flash write... SPI Configuration is locked down. Enabling hardware sequencing because some important opcode is locked. OK. DualBIOS: Selected chip: 1 Found Programmer flash chip "Opaque flash chip" (16384 kB, Programmer-specific) mapped at physical address 0x0000000000000000. Reading flash... done. Comparing the two firmware dumps, I find the only difference is that M_BIOS.bin contains my current BIOS settings which B_BIOS.bin does not, so I'm quite sure that these dumps are actually from two different flash chips. However, if enabling verbose (-VV) output while reading flash, I also see this message, which I don't know if normal or not: "No IT87* serial flash segment enabled." I have not yet tried writing to any of the flash chips, as I would really appreciate if someone with more experience than me could comment on this modification first, and maybe highlight problems I'm not currently aware of? Thanks in advance. Best regards, Pete Smith --- a/it87spi.c +++ b/it87spi.c @@ -256,6 +256,7 @@ int init_superio_ite(void) case 0x8718: case 0x8720: case 0x8728: + case 0x8686: ret |= it87spi_probe(superios[i].port); break; default: