Commit 58126404f5d8ccb53ab7a385ad0230dd7c4cc130

Authored by pbrook
1 parent 569f5d66

Mips IDE support. (Aurelien Jarno)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2206 c046a42c-6fe2-441c-8c8c-71466251a162
Makefile.target
@@ -357,8 +357,8 @@ VL_OBJS+= grackle_pci.o prep_pci.o unin_pci.o @@ -357,8 +357,8 @@ VL_OBJS+= grackle_pci.o prep_pci.o unin_pci.o
357 DEFINES += -DHAS_AUDIO 357 DEFINES += -DHAS_AUDIO
358 endif 358 endif
359 ifeq ($(TARGET_ARCH), mips) 359 ifeq ($(TARGET_ARCH), mips)
360 -VL_OBJS+= mips_r4k.o dma.o vga.o serial.o i8254.o i8259.o  
361 -#VL_OBJS+= #ide.o pckbd.o fdc.o m48t59.o 360 +VL_OBJS+= mips_r4k.o dma.o vga.o serial.o i8254.o i8259.o ide.o
  361 +#VL_OBJS+= #pckbd.o fdc.o m48t59.o
362 endif 362 endif
363 ifeq ($(TARGET_BASE_ARCH), sparc) 363 ifeq ($(TARGET_BASE_ARCH), sparc)
364 ifeq ($(TARGET_ARCH), sparc64) 364 ifeq ($(TARGET_ARCH), sparc64)
hw/mips_r4k.c
@@ -7,6 +7,10 @@ @@ -7,6 +7,10 @@
7 7
8 #define VIRT_TO_PHYS_ADDEND (-0x80000000LL) 8 #define VIRT_TO_PHYS_ADDEND (-0x80000000LL)
9 9
  10 +static const int ide_iobase[2] = { 0x1f0, 0x170 };
  11 +static const int ide_iobase2[2] = { 0x3f6, 0x376 };
  12 +static const int ide_irq[2] = { 14, 15 };
  13 +
10 extern FILE *logfile; 14 extern FILE *logfile;
11 15
12 static PITState *pit; 16 static PITState *pit;
@@ -118,6 +122,7 @@ void mips_r4k_init (int ram_size, int vga_ram_size, int boot_device, @@ -118,6 +122,7 @@ void mips_r4k_init (int ram_size, int vga_ram_size, int boot_device,
118 int ret; 122 int ret;
119 CPUState *env; 123 CPUState *env;
120 long kernel_size; 124 long kernel_size;
  125 + int i;
121 126
122 env = cpu_init(); 127 env = cpu_init();
123 register_savevm("cpu", 0, 3, cpu_save, cpu_load, env); 128 register_savevm("cpu", 0, 3, cpu_save, cpu_load, env);
@@ -198,6 +203,10 @@ void mips_r4k_init (int ram_size, int vga_ram_size, int boot_device, @@ -198,6 +203,10 @@ void mips_r4k_init (int ram_size, int vga_ram_size, int boot_device,
198 exit (1); 203 exit (1);
199 } 204 }
200 } 205 }
  206 +
  207 + for(i = 0; i < 2; i++)
  208 + isa_ide_init(ide_iobase[i], ide_iobase2[i], ide_irq[i],
  209 + bs_table[2 * i], bs_table[2 * i + 1]);
201 } 210 }
202 211
203 QEMUMachine mips_machine = { 212 QEMUMachine mips_machine = {