summaryrefslogtreecommitdiffstats
path: root/flash_rom.c
diff options
context:
space:
mode:
authorOllie Lho <ollie@sis.com.tw>2004-03-18 19:40:07 +0000
committerOllie Lho <ollie@sis.com.tw>2004-03-18 19:40:07 +0000
commit55bd16c263222494321766810039aa9e7bc0ddb8 (patch)
tree17ed4f4c1e385338b6470fa3d2974668d6b8b5fc /flash_rom.c
parent29dbba09011d9487e2d0573c3f2bd32010fedc48 (diff)
downloadflashrom-55bd16c263222494321766810039aa9e7bc0ddb8.zip
flashrom-55bd16c263222494321766810039aa9e7bc0ddb8.tar.gz
Fixed 32bit vs 64bit long int arithematics
Corresponding to flashrom svn r8 and coreboot v2 svn r1434.
Diffstat (limited to 'flash_rom.c')
-rw-r--r--flash_rom.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/flash_rom.c b/flash_rom.c
index b8ffeb0..13bb182 100644
--- a/flash_rom.c
+++ b/flash_rom.c
@@ -115,8 +115,7 @@ struct flashchip * probe_flash(struct flashchip * flash)
flash->total_size * 1024, (unsigned long)size);
}
bios = mmap (0, size, PROT_WRITE | PROT_READ, MAP_SHARED,
- //fd_mem, (off_t) (0x100000000-size));
- fd_mem, (off_t) (0xffffffff-size+1));
+ fd_mem, (off_t) (0xffffffff - size + 1));
if (bios == MAP_FAILED) {
perror("Error MMAP /dev/mem");
exit(1);
@@ -126,7 +125,7 @@ struct flashchip * probe_flash(struct flashchip * flash)
if (flash->probe(flash) == 1) {
printf ("%s found at physical address: 0x%lx\n",
- flash->name, (0 - size));
+ flash->name, (0xffffffff - size + 1));
return flash;
}
munmap ((void *) bios, size);
OpenPOWER on IntegriCloud