Skip to contentSkip to conversation

qemu/hw mips_malta.c

Qemu-devel Thiemo Seufer 2 participants 3 messages Feb 20, 2007 – Feb 21, 2007

lore
Share & tools
lore
#1 lore raw

With your change, both serial ports are connected to the same virtual console which results in a funny but unwanted behaviour.

My patch fixes this.

The patch also modifies the BIOS check. It is now possible to load a BIOS with less than 4 MiB.

What about my patch for EEPROM 24C01 / 24C02 emulation needed for SDRAM SPD (dated 2007-01-23)? Is there any reason why it cannot be included in CVS HEAD?

Without it, Malta won't run Redboot BIOS...

Stefan

mips_malta.c +7 -3
Index: hw/mips_malta.c
===================================================================
@@ -533,7 +533,7 @@
     } else {
         snprintf(buf, sizeof(buf), "%s/%s", bios_dir, BIOS_FILENAME);
         ret = load_image(buf, phys_ram_base + bios_offset);
-        if (ret != BIOS_SIZE) {
+        if (ret < 0 || ret > BIOS_SIZE) {
             fprintf(stderr, "qemu: Warning, could not load MIPS bios '%s'\n",
                     buf);
             exit(1);
@@ -569,8 +569,12 @@
     /* Super I/O */
     kbd_init();
     rtc_state = rtc_init(0x70, 8);
-    serial_init(&pic_set_irq_new, isa_pic, 0x3f8, 4, serial_hds[0]);
-    serial_init(&pic_set_irq_new, isa_pic, 0x2f8, 4, serial_hds[0]);
+    if (serial_hds[0]) {
+        serial_init(&pic_set_irq_new, isa_pic, 0x3f8, 4, serial_hds[0]);
+    }
+    if (serial_hds[1]) {
+        serial_init(&pic_set_irq_new, isa_pic, 0x2f8, 4, serial_hds[1]);
+    }
     parallel_init(0x378, 7, parallel_hds[0]);
     /* XXX: The floppy controller does not work correctly, something is
        probably wrong.
#2 lore raw
Quoted 5 lines · Stefan Weil

With your change, both serial ports are connected to the same virtual console which results in a funny but unwanted behaviour.

My patch fixes this.

Thanks. I expanded it slightly ...

Quoted 2 lines

The patch also modifies the BIOS check. It is now possible to load a BIOS with less than 4 MiB.

... and made that a separate patch.

Quoted 4 lines

What about my patch for EEPROM 24C01 / 24C02 emulation needed for SDRAM SPD (dated 2007-01-23)? Is there any reason why it cannot be included in CVS HEAD?

Apparently fell through the cracks, please resend.

Thiemo