From a65f56eeba9152e243f5f08cd0ae7556e27f6fb3 Mon Sep 17 00:00:00 2001 From: aurel32 Date: Wed, 15 Apr 2009 14:57:54 +0000 Subject: Implement sonic netcard (MIPS Jazz) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Attached patch adds emulation of a SONIC netcard. This card has been used in MIPS Jazz machines and in some Apple Mac 68K. Emulation has been done using dp83932 specification, but can be enhanced (if needed) to also emulate dp83916, dp83934 or dp83936 chipsets. This has been tested in Linux 2.1, NetBSD 1.6.2 and MS Windows NT/MIPS Signed-off-by: Hervé Poussineau Signed-off-by: Aurelien Jarno git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7112 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/mips_jazz.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'hw/mips_jazz.c') diff --git a/hw/mips_jazz.c b/hw/mips_jazz.c index 510812e..9550413 100644 --- a/hw/mips_jazz.c +++ b/hw/mips_jazz.c @@ -137,6 +137,7 @@ void mips_jazz_init (ram_addr_t ram_size, int vga_ram_size, void *scsi_hba; int hd; int s_rtc, s_dma_dummy; + NICInfo *nd; PITState *pit; BlockDriverState *fds[MAX_FD]; qemu_irq esp_reset; @@ -212,7 +213,22 @@ void mips_jazz_init (ram_addr_t ram_size, int vga_ram_size, } /* Network controller */ - /* FIXME: missing NS SONIC DP83932 */ + for (n = 0; n < nb_nics; n++) { + nd = &nd_table[n]; + if (!nd->model) + nd->model = "dp83932"; + if (strcmp(nd->model, "dp83932") == 0) { + dp83932_init(nd, 0x80001000, 2, rc4030[4], + rc4030_opaque, rc4030_dma_memory_rw); + break; + } else if (strcmp(nd->model, "?") == 0) { + fprintf(stderr, "qemu: Supported NICs: dp83932\n"); + exit(1); + } else { + fprintf(stderr, "qemu: Unsupported NIC: %s\n", nd->model); + exit(1); + } + } /* SCSI adapter */ scsi_hba = esp_init(0x80002000, 0, -- cgit v1.1