projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a1968d7
)
fixed case where ram < 16 MB
author
bellard
<bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 26 Jun 2004 15:53:17 +0000
(15:53 +0000)
committer
bellard
<bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 26 Jun 2004 15:53:17 +0000
(15:53 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@976
c046a42c
-6fe2-441c-8c8c-
71466251a162
hw/pc.c
patch
|
blob
|
history
diff --git
a/hw/pc.c
b/hw/pc.c
index f5783250b791de5b5687cb7b0b2d9c81d1611a45..11b28279218629980e04ec6b94b69e4eba01aa3e 100644
(file)
--- a/
hw/pc.c
+++ b/
hw/pc.c
@@
-136,7
+136,10
@@
static void cmos_init(int ram_size, int boot_device)
rtc_set_memory(s, 0x30, val);
rtc_set_memory(s, 0x31, val >> 8);
- val = (ram_size / 65536) - ((16 * 1024 * 1024) / 65536);
+ if (ram_size > (16 * 1024 * 1024))
+ val = (ram_size / 65536) - ((16 * 1024 * 1024) / 65536);
+ else
+ val = 0;
if (val > 65535)
val = 65535;
rtc_set_memory(s, 0x34, val);