[coreboot] [PATCH] flashrom: use the read function for verifying
Uwe Hermann
uwe at hermann-uwe.de
Tue Jan 22 16:59:59 CET 2008
On Tue, Jan 22, 2008 at 03:59:28PM +0100, Carl-Daniel Hailfinger wrote:
> Flashrom did not use the read function for verifying, it used direct memory
> access instead. That fails if the flash chip is not mapped completely.
> If the read function is set in struct flashchip, use it for verification
> as well.
>
> This fixes verification of all SPI flash chips >512 kByte behind an
> IT8716F flash translation chip.
>
> Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
>
> Index: flashrom-big/flashrom.c
> ===================================================================
> --- flashrom-big/flashrom.c (Revision 3069)
> +++ flashrom-big/flashrom.c (Arbeitskopie)
> @@ -159,7 +159,11 @@
> {
> int idx;
> int total_size = flash->total_size * 1024;
> - volatile uint8_t *bios = flash->virtual_memory;
> + uint8_t *buf2 = (uint8_t *) calloc(total_size, sizeof(char));
sizeof(char) is 1 per definition in ANSI C, no need for sizeof here.
Uwe.
--
http://www.hermann-uwe.de | http://www.holsham-traders.de
http://www.crazy-hacks.org | http://www.unmaintained-free-software.org
More information about the coreboot
mailing list