summaryrefslogtreecommitdiff
path: root/util/cbfstool/cbfstool.h
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@gmail.com>2009-05-16 23:05:20 +0000
committerRonald G. Minnich <rminnich@gmail.com>2009-05-16 23:05:20 +0000
commit56ae8fcb6fe545557c6b5a3ffb72f54bd3b53ddc (patch)
tree9f7211f81edcc80576a73058c340ad2338ee9aa5 /util/cbfstool/cbfstool.h
parentd12acea520840b64804ec7f2d1b9fba423ed194e (diff)
downloadcoreboot-56ae8fcb6fe545557c6b5a3ffb72f54bd3b53ddc.tar.xz
This patch implements a "flash friendly" value for initialized areas of flash.
It makes the write part of flashrom dramatically faster with small payloads like filo; and it also eliminates unnecessary wear on flash by not writing zeros (it's unlikely this really matters; let me know next time you flash a BIOS flash 100,000 times!). More importantly, it allows for future partial flash upgrades with cbfs. Note that uninitialized_flash_value is a global that can, if we ever need it, be set by an argument in main. Assuming we ever see a flash where the "erased" value is 0, not 0xff. At the same time, "erased" value has been "1" on every EEPROM or FLASH I've used for some time now. Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4290 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/cbfstool/cbfstool.h')
-rw-r--r--util/cbfstool/cbfstool.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/cbfstool/cbfstool.h b/util/cbfstool/cbfstool.h
index dc52bfb16b..5804fdef50 100644
--- a/util/cbfstool/cbfstool.h
+++ b/util/cbfstool/cbfstool.h
@@ -56,6 +56,7 @@ struct rom {
/* Function prototypes */
/* util.c */
+void flashinit(void *ptr, size_t len);
int open_rom(struct rom *rom, const char *filename);
int create_rom(struct rom *rom, const unsigned char *filename, int size,
const char *bootblockname, int bootblocksize,