Commit f19e918d70482789e5b47743e7d849ecaaee9920
1 parent
a0a8793e
Sparc64 update
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3062 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
11 additions
and
3 deletions
hw/sun4u.c
@@ -29,6 +29,7 @@ | @@ -29,6 +29,7 @@ | ||
29 | #define INITRD_LOAD_ADDR 0x00300000 | 29 | #define INITRD_LOAD_ADDR 0x00300000 |
30 | #define PROM_SIZE_MAX (512 * 1024) | 30 | #define PROM_SIZE_MAX (512 * 1024) |
31 | #define PROM_ADDR 0x1fff0000000ULL | 31 | #define PROM_ADDR 0x1fff0000000ULL |
32 | +#define PROM_VADDR 0x000ffd00000ULL | ||
32 | #define APB_SPECIAL_BASE 0x1fe00000000ULL | 33 | #define APB_SPECIAL_BASE 0x1fe00000000ULL |
33 | #define APB_MEM_BASE 0x1ff00000000ULL | 34 | #define APB_MEM_BASE 0x1ff00000000ULL |
34 | #define VGA_BASE (APB_MEM_BASE + 0x400000ULL) | 35 | #define VGA_BASE (APB_MEM_BASE + 0x400000ULL) |
@@ -244,7 +245,7 @@ int sun4u_NVRAM_set_params (m48t59_t *nvram, uint16_t NVRAM_size, | @@ -244,7 +245,7 @@ int sun4u_NVRAM_set_params (m48t59_t *nvram, uint16_t NVRAM_size, | ||
244 | 245 | ||
245 | // OpenBIOS nvram variables | 246 | // OpenBIOS nvram variables |
246 | // Variable partition | 247 | // Variable partition |
247 | - start = 252; | 248 | + start = 256; |
248 | m48t59_write(nvram, start, 0x70); | 249 | m48t59_write(nvram, start, 0x70); |
249 | NVRAM_set_string(nvram, start + 4, "system", 12); | 250 | NVRAM_set_string(nvram, start + 4, "system", 12); |
250 | 251 | ||
@@ -313,6 +314,10 @@ void hstick_irq(void *opaque) | @@ -313,6 +314,10 @@ void hstick_irq(void *opaque) | ||
313 | cpu_interrupt(env, CPU_INTERRUPT_TIMER); | 314 | cpu_interrupt(env, CPU_INTERRUPT_TIMER); |
314 | } | 315 | } |
315 | 316 | ||
317 | +static void dummy_cpu_set_irq(void *opaque, int irq, int level) | ||
318 | +{ | ||
319 | +} | ||
320 | + | ||
316 | static const int ide_iobase[2] = { 0x1f0, 0x170 }; | 321 | static const int ide_iobase[2] = { 0x1f0, 0x170 }; |
317 | static const int ide_iobase2[2] = { 0x3f6, 0x376 }; | 322 | static const int ide_iobase2[2] = { 0x3f6, 0x376 }; |
318 | static const int ide_irq[2] = { 14, 15 }; | 323 | static const int ide_irq[2] = { 14, 15 }; |
@@ -340,6 +345,7 @@ static void sun4u_init(int ram_size, int vga_ram_size, int boot_device, | @@ -340,6 +345,7 @@ static void sun4u_init(int ram_size, int vga_ram_size, int boot_device, | ||
340 | PCIBus *pci_bus; | 345 | PCIBus *pci_bus; |
341 | const sparc_def_t *def; | 346 | const sparc_def_t *def; |
342 | QEMUBH *bh; | 347 | QEMUBH *bh; |
348 | + qemu_irq *irq; | ||
343 | 349 | ||
344 | linux_boot = (kernel_filename != NULL); | 350 | linux_boot = (kernel_filename != NULL); |
345 | 351 | ||
@@ -377,7 +383,7 @@ static void sun4u_init(int ram_size, int vga_ram_size, int boot_device, | @@ -377,7 +383,7 @@ static void sun4u_init(int ram_size, int vga_ram_size, int boot_device, | ||
377 | prom_offset | IO_MEM_ROM); | 383 | prom_offset | IO_MEM_ROM); |
378 | 384 | ||
379 | snprintf(buf, sizeof(buf), "%s/%s", bios_dir, PROM_FILENAME); | 385 | snprintf(buf, sizeof(buf), "%s/%s", bios_dir, PROM_FILENAME); |
380 | - ret = load_elf(buf, 0, NULL, NULL, NULL); | 386 | + ret = load_elf(buf, PROM_ADDR - PROM_VADDR, NULL, NULL, NULL); |
381 | if (ret < 0) { | 387 | if (ret < 0) { |
382 | fprintf(stderr, "qemu: could not load prom '%s'\n", | 388 | fprintf(stderr, "qemu: could not load prom '%s'\n", |
383 | buf); | 389 | buf); |
@@ -441,7 +447,9 @@ static void sun4u_init(int ram_size, int vga_ram_size, int boot_device, | @@ -441,7 +447,9 @@ static void sun4u_init(int ram_size, int vga_ram_size, int boot_device, | ||
441 | pci_nic_init(pci_bus, &nd_table[i], -1); | 447 | pci_nic_init(pci_bus, &nd_table[i], -1); |
442 | } | 448 | } |
443 | 449 | ||
444 | - pci_cmd646_ide_init(pci_bus, bs_table, 1); | 450 | + irq = qemu_allocate_irqs(dummy_cpu_set_irq, NULL, 32); |
451 | + // XXX pci_cmd646_ide_init(pci_bus, bs_table, 1); | ||
452 | + pci_piix3_ide_init(pci_bus, bs_table, -1, irq); | ||
445 | /* FIXME: wire up interrupts. */ | 453 | /* FIXME: wire up interrupts. */ |
446 | i8042_init(NULL/*1*/, NULL/*12*/, 0x60); | 454 | i8042_init(NULL/*1*/, NULL/*12*/, 0x60); |
447 | floppy_controller = fdctrl_init(NULL/*6*/, 2, 0, 0x3f0, fd_table); | 455 | floppy_controller = fdctrl_init(NULL/*6*/, 2, 0, 0x3f0, fd_table); |