Skip to contentSkip to conversation

PATCH: Longword read/write to eepro100's eeprom

Qemu-devel Brian Wheeler 1 participant 1 message Apr 2, 2009

lore
Share & tools
lore
#0 lore raw

It looks like the alpha-softmmu target tries to read/write the eeprom using longword addressing. This patch catches that case and redirects the reads/writes to the eeprom.

hw/eepro100.c +9 -0
@@ -1209,6 +1205,10 @@
     case SCBCtrlMDI:
         val = eepro100_read_mdi(s);
         break;
+    case SCBflash:
+        val = eepro100_read_eeprom(s);
+	logout("reading word from eeprom via longword: %04x\n", val);
+	break;
     default:
         logout("addr=%s val=0x%08x\n", regname(addr), val);
         missing("unknown longword read");
@@ -1299,6 +1299,11 @@
     case SCBCtrlMDI:
         eepro100_write_mdi(s, val);
         break;
+    case SCBflash:
+	logout("writing word %04x to eeprom via longword.\n", val);
+	val = val >> 16;
+	eepro100_write_eeprom(s->eeprom, val);
+	break;
     default:
         logout("addr=%s val=0x%08x\n", regname(addr), val);
         missing("unknown longword write");