Clean up physmap, fix unaligned mapping problems

Convert all physmaps in dmi.c to use aligned readonly maps.
Convert all physmaps in cbtable.c to use unaligned readonly maps.
Make physunmap() a generic architecture-independent wrapper.
Add physunmap_unaligned() to complement physmap*_unaligned().

Corresponding to flashrom svn r1765.

Signed-off-by: Carl-Daniel Hailfinger <>
Acked-by: Stefan Tauner <>
diff --git a/dmi.c b/dmi.c
index ef7ae2c..25a4957 100644
--- a/dmi.c
+++ b/dmi.c
@@ -153,7 +153,7 @@
 	int i = 0, j = 0;
-	uint8_t *dmi_table_mem = physmap_round("DMI Table", base, len);
+	uint8_t *dmi_table_mem = physmap_ro("DMI Table", base, len);
 	if (dmi_table_mem == NULL) {
 		msg_perr("Unable to access DMI Table\n");