aboutsummaryrefslogtreecommitdiffstats
path: root/flash.h
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-02-02 11:09:03 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-02-02 11:09:03 +0000
commitbaaffe083141823923833524f643343b8358e101 (patch)
tree2cb824d732d5628895b9256907cef0b678cbf363 /flash.h
parentba7c9228d32da0c080dcb74a526127efeacc137f (diff)
downloadflashrom-baaffe083141823923833524f643343b8358e101.tar.gz
flashrom-baaffe083141823923833524f643343b8358e101.tar.bz2
flashrom-baaffe083141823923833524f643343b8358e101.zip
Create a physical memory mapping function which requests cached readonly memory
This should take care of picky Linux kernels which do not allow uncached mappings to cached areas. Handle mapping failure gracefully (no forced exit()) if the caller specifies it. Such cached areas which can handle mapping failure are DMI tables and coreboot tables. On failure we just ignore those tables. That is not perfect, but a lot better than aborting flashrom due to an error in nonessential functionality. This should fix flashrom on a sizable number of machines where it currently aborts early. Yes, I could have exploited a Linux kernel bug to "solve" this, but relying on such bugs is not exactly the best idea. Corresponding to flashrom svn r889. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Vincent Pelletier <plr.vincent@gmail.com>
Diffstat (limited to 'flash.h')
-rw-r--r--flash.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/flash.h b/flash.h
index 3d31d44f..d8f02bbe 100644
--- a/flash.h
+++ b/flash.h
@@ -343,6 +343,7 @@ int chipset_flash_enable(void);
/* physmap.c */
void *physmap(const char *descr, unsigned long phys_addr, size_t len);
+void *physmap_try_ro(const char *descr, unsigned long phys_addr, size_t len);
void physunmap(void *virt_addr, size_t len);
int setup_cpu_msr(int cpu);
void cleanup_cpu_msr(void);