From a75816168d7324124fc5c585623fca71dd8b3fba Mon Sep 17 00:00:00 2001 From: hailfinger Date: Fri, 5 Jun 2009 18:32:07 +0000 Subject: Sometimes we want to read/write more than 4 bytes of chip content at once. Add chip_{read,write}n to the external flasher infrastructure which read/write n bytes at once. Fix a few places where the code used memcpy/memcmp although that is strictly impossible with external flashers. Place a FIXME in the layout.c code because usage is not totally clear and needs to be fixed to support external flashers. As a nice side benefit, we get a noticeable speedup for builtin flash reading which is now a memcpy() of the full flash area instead of a series of single-byte reads. Signed-off-by: Carl-Daniel Hailfinger Acked-by: Urja Rannikko Acked-by: Uwe Hermann git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@579 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- layout.c | 1 + 1 file changed, 1 insertion(+) (limited to 'layout.c') diff --git a/layout.c b/layout.c index 4326aea..68684a7 100644 --- a/layout.c +++ b/layout.c @@ -220,6 +220,7 @@ int handle_romentries(uint8_t *buffer, uint8_t *content) if (rom_entries[i].included) continue; + /* FIXME: Adapt to the external flasher infrastructure. */ memcpy(buffer + rom_entries[i].start, content + rom_entries[i].start, rom_entries[i].end - rom_entries[i].start); -- cgit v1.2.1