[coreboot] flashrom: Can't mmap memory
ron minnich
rminnich at gmail.com
Sun Feb 8 18:22:07 CET 2009
I have not seen a patch for this one so here is mine. Untested. Not signed off.
Thanks
ron
Index: util/flashrom/flashrom.c
===================================================================
--- util/flashrom/flashrom.c (revision 3930)
+++ util/flashrom/flashrom.c (working copy)
@@ -122,6 +122,13 @@
}
base = flashbase ? flashbase : (0xffffffff - size + 1);
+ /* this part might be much larger than the last part.
+ * If so, we have to ignore the flashbase value
+ */
+ if (flashbase && (base + size) < flashbase)
+ base = 0xffffffff - size + 1;
+
flash->virtual_memory = bios = physmap("flash chip", base, size);
More information about the coreboot
mailing list