diff options
author | Ollie Lho <ollie@sis.com.tw> | 2004-03-18 19:40:07 +0000 |
---|---|---|
committer | Ollie Lho <ollie@sis.com.tw> | 2004-03-18 19:40:07 +0000 |
commit | cf29de879843ec2293483eeb609191a834a4863c (patch) | |
tree | 17ed4f4c1e385338b6470fa3d2974668d6b8b5fc /flash_rom.c | |
parent | cec287936c8e00039f634cbfeb2cc64b457f2da0 (diff) | |
download | ast2050-flashrom-cf29de879843ec2293483eeb609191a834a4863c.zip ast2050-flashrom-cf29de879843ec2293483eeb609191a834a4863c.tar.gz |
Fix 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.c | 5 |
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); |