summaryrefslogtreecommitdiffstats
path: root/hw/pflash_cfi02.c
diff options
context:
space:
mode:
authorbellard2006-07-04 11:46:31 +0200
committerbellard2006-07-04 11:46:31 +0200
commit99ba31b4fe905e6781e2c99c1e686370acc40ec6 (patch)
treee244d94fca92fab3f70319375994bc3d04473c31 /hw/pflash_cfi02.c
parentdisable unimplemented C+ mode (aka windows xp 64 fix) (diff)
downloadqemu-99ba31b4fe905e6781e2c99c1e686370acc40ec6.tar.gz
qemu-99ba31b4fe905e6781e2c99c1e686370acc40ec6.tar.xz
qemu-99ba31b4fe905e6781e2c99c1e686370acc40ec6.zip
flash device fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2033 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/pflash_cfi02.c')
-rw-r--r--hw/pflash_cfi02.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/hw/pflash_cfi02.c b/hw/pflash_cfi02.c
index 1f0cbe2f9a..ee2f63a1a0 100644
--- a/hw/pflash_cfi02.c
+++ b/hw/pflash_cfi02.c
@@ -42,9 +42,6 @@
#ifdef PFLASH_DEBUG
#define DPRINTF(fmt, args...) \
do { \
- if (loglevel) \
- fprintf(logfile, "PFLASH: " fmt , ##args); \
- else \
printf("PFLASH: " fmt , ##args); \
} while (0)
#else
@@ -213,7 +210,7 @@ static void pflash_write (pflash_t *pfl, target_ulong offset, uint32_t value,
/* WARNING: when the memory area is in ROMD mode, the offset is a
ram offset, not a physical address */
if (pfl->wcycle == 0)
- offset -= pfl->off;
+ offset -= (target_ulong)(long)pfl->storage;
else
offset -= pfl->base;