diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-06-26 15:53:17 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-06-26 15:53:17 +0000 |
commit | 9da98861213c8e5e675a8544019dd1c763a20922 (patch) | |
tree | 696dfaa97b589a247f429bc1c97b1a4729c0fdec /hw | |
parent | a1968d719648b7406076f921ca6410c805b8815e (diff) | |
download | qemu-9da98861213c8e5e675a8544019dd1c763a20922.zip qemu-9da98861213c8e5e675a8544019dd1c763a20922.tar.gz qemu-9da98861213c8e5e675a8544019dd1c763a20922.tar.bz2 |
fixed case where ram < 16 MB
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@976 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r-- | hw/pc.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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); |