Implement libpayload support and improve life for DOS based flashrom, too

Corresponding to flashrom svn r1181.

Change the physmap* behaviour to use (void*)-1 as error code instead
of NULL. That way, 1:1 mapped memory can be supported properly
because (void*)0 is not a magic pointer anymore.
(void*)-1 on the other hand is a rather unlikely memory offset, so that
should be safe.
  
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
diff --git a/cbtable.c b/cbtable.c
index 8f906d4..9aa9e84 100644
--- a/cbtable.c
+++ b/cbtable.c
@@ -212,7 +212,7 @@
 	start = 0x0;
 #endif
 	table_area = physmap_try_ro("low megabyte", start, BYTES_TO_MAP - start);
-	if (!table_area) {
+	if (ERROR_PTR == table_area) {
 		msg_perr("Failed getting access to coreboot low tables.\n");
 		return -1;
 	}
@@ -228,7 +228,7 @@
 			start &= ~(getpagesize() - 1);
 			physunmap(table_area, BYTES_TO_MAP);
 			table_area = physmap_try_ro("high tables", start, BYTES_TO_MAP);
-			if (!table_area) {
+			if (ERROR_PTR == table_area) {
 				msg_perr("Failed getting access to coreboot "
 					 "high tables.\n");
 				return -1;