summaryrefslogtreecommitdiffstats
path: root/layout.c
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-06-05 18:32:07 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-06-05 18:32:07 +0000
commit0bd2a2bdc10720776fe50b96d24d30323ec24c09 (patch)
tree1348763e5fa6f4ea9d13a5b84d63999dcf132749 /layout.c
parentca8bfc6c22196e5d16c6d2625c65d6b50c04daaf (diff)
downloadast2050-flashrom-0bd2a2bdc10720776fe50b96d24d30323ec24c09.zip
ast2050-flashrom-0bd2a2bdc10720776fe50b96d24d30323ec24c09.tar.gz
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. Corresponding to flashrom svn r579. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Urja Rannikko <urjaman@gmail.com> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
Diffstat (limited to 'layout.c')
-rw-r--r--layout.c1
1 files changed, 1 insertions, 0 deletions
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);
OpenPOWER on IntegriCloud