From patchwork Wed Aug 3 08:13:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?TMOqIMSQ4bupYyBUw6Bp?= X-Patchwork-Id: 108040 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 495D4B71DC for ; Wed, 3 Aug 2011 18:13:46 +1000 (EST) Received: from localhost ([::1]:42022 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoWa7-0006Lt-L4 for incoming@patchwork.ozlabs.org; Wed, 03 Aug 2011 04:13:35 -0400 Received: from eggs.gnu.org ([140.186.70.92]:53205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoWZy-0006Lb-Cd for qemu-devel@nongnu.org; Wed, 03 Aug 2011 04:13:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QoWZv-0005k9-Ma for qemu-devel@nongnu.org; Wed, 03 Aug 2011 04:13:26 -0400 Received: from nm3-vm1.bullet.mail.sg1.yahoo.com ([115.178.12.243]:26155) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QoWZu-0005ju-HL for qemu-devel@nongnu.org; Wed, 03 Aug 2011 04:13:23 -0400 Received: from [115.178.12.222] by nm3.bullet.mail.sg1.yahoo.com with NNFMP; 03 Aug 2011 08:13:17 -0000 Received: from [115.178.12.231] by tm3.bullet.mail.sg1.yahoo.com with NNFMP; 03 Aug 2011 08:13:17 -0000 Received: from [127.0.0.1] by omp1005.mail.sg1.yahoo.com with NNFMP; 03 Aug 2011 08:13:17 -0000 X-Yahoo-Newman-Property: ymail-5 X-Yahoo-Newman-Id: 801383.72528.bm@omp1005.mail.sg1.yahoo.com Received: (qmail 14628 invoked by uid 60001); 3 Aug 2011 08:13:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.vn; s=s1024; t=1312359197; bh=WcLzvRsBzf+ua5c93KbAehwg4NroEiOI2Cyz2BSuKsY=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=HQqi7lVzIQId9MZf+nl6Lyt0fXYsgAxr4MdeKi6/L6j6FBpCQBIvoanVWaE2bPnyX5XiIFJKtOcxPviHEtV4F1PY9AJMmUca0tWD8OY32N3WXWnJ807BuS4CrYwFlaVPoPRRcBrD3WYqK7p9hmbhskgnOg8qmGJ/452s0e0i3gQ= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.vn; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=198/iqrOf4NyNPM+W8xbOAK+wotVQCXyXl8Z6B0+pUsYcSKPPaKSBtVKtJ8qi7mCXM5lInueaTcq7rEeTXmRUWCoo8Bplm7YlzZUaXYsVdVvT3viVI4Y2PYlvHkRpp35NEQzUV8TFUsvBUWtoznvZ5CKpdU4jATWcn8b8QKJJQc=; X-YMail-OSG: XibK1S0VM1kAu7nI_8qBkNs7YKh7FZXr7wCTSlus.FYdmJZ iuzRWmQPi_OAK8o45Wdc1QdIJa2h5uCr7FX_ErTgv_Jcv3.1vrf7MQsIIaFf mYnOfYpMOT3Y_40OpgfWNiILoFLVEAiPzPO8ND601lmvTa6BKrMO.UPO5LJR n5wiHMc9RU13zZ2tPfKEIYXw.e8xzkY0q2ixyJ.ZdcrnhtOTJpeYc7.dAUoS XqdG02EKXtyXrmGqzUPY6AUE0J74qeqgAlL54pFQfg_XqFR2VP9.OZR_1Rld EXH7CmzhZnjjJMn9z1Gb82hZPm9u5PpVjq7vBoEspPYIWBgSEsYyv5j_GqVc yBEP3YpZ0YD0GkHNJlkDRoyBvuv.DWmXP.eNnEh4jQICmBG_TOTY- Received: from [113.160.58.178] by web77918.mail.sg1.yahoo.com via HTTP; Wed, 03 Aug 2011 16:13:14 SGT X-Mailer: YahooMailRC/574 YahooMailWebService/0.8.112.310352 References: <1310355077.90376.YahooMailRC@web77914.mail.sg1.yahoo.com> <1310435223.57220.YahooMailRC@web77901.mail.sg1.yahoo.com> <1310527162.53357.YahooMailRC@web77907.mail.sg1.yahoo.com> <1310563666.22200.YahooMailRC@web77920.mail.sg1.yahoo.com> Message-ID: <1312359194.13500.YahooMailRC@web77918.mail.sg1.yahoo.com> Date: Wed, 3 Aug 2011 16:13:14 +0800 (SGT) From: =?utf-8?B?TMOqIMSQ4bupYyBUw6Bp?= To: "Edgar E. Iglesias" In-Reply-To: <1310563666.22200.YahooMailRC@web77920.mail.sg1.yahoo.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 115.178.12.243 Cc: Alexander Graf , "qemu-devel@nongnu.orgDevelopers" Subject: [Qemu-devel] ethlite mac on virtex board X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Hi Edgar, I have a problem with Ethernet Lite on Virtex board as following. Could you help me? Thank you! [Modify device tree - linux-2.6.37] [Error when running guest machine] zImage starting: loaded at 0x01200000 (sp: 0x0153cfb0) Allocating 0x4bbe68 bytes for kernel ... gunzipping (0x00000000 <- 0x0120e000:0x013cb92a)...done 0x39b4f0 bytes Attached initrd image at 0x013cc000-0x0153bf20 initrd head: 0x1f8b0808 Linux/PowerPC load: console=ttyS0 Finalizing device tree... flat tree at 0x1549300 [ 0.000000] Using Xilinx Virtex440 machine description [ 0.000000] Linux version 2.6.37+ (taild@debian-ttec) (gcc version 4.3.5 (Debian 4.3.5-4) ) #35 PREEMPT Wed Aug 3 11:30:45 ICT 2011 [ 0.000000] Found initrd at 0xc13cc000:0xc153bf20 [ 0.000000] Zone PFN ranges: [ 0.000000] DMA 0x00000000 -> 0x00010000 [ 0.000000] Normal empty [ 0.000000] Movable zone start PFN for each node [ 0.000000] early_node_map[1] active PFN ranges [ 0.000000] 0: 0x00000000 -> 0x00010000 [ 0.000000] MMU: Allocated 1088 bytes of context maps for 255 contexts [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024 [ 0.000000] Kernel command line: console=ttyS0 [ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes) [ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes) [ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes) [ 0.000000] Memory: 253468k/262144k available (3520k kernel code, 8676k reserved, 176k data, 1151k bss, 160k init) [ 0.000000] Kernel virtual memory layout: [ 0.000000] * 0xfffdf000..0xfffff000 : fixmap [ 0.000000] * 0xfde00000..0xfe000000 : consistent mem [ 0.000000] * 0xfde00000..0xfde00000 : early ioremap [ 0.000000] * 0xd1000000..0xfde00000 : vmalloc & ioremap [ 0.000000] Preemptable hierarchical RCU implementation. [ 0.000000] RCU-based detection of stalled CPUs is disabled. [ 0.000000] Verbose stalled-CPUs detection is disabled. [ 0.000000] NR_IRQS:512 [ 0.000000] clocksource: timebase mult[a00000] shift[22] registered [ 0.000000] Console: colour dummy device 80x25 [ 0.016523] pid_max: default: 32768 minimum: 301 [ 0.017972] Mount-cache hash table entries: 512 [ 0.086498] NET: Registered protocol family 16 [ 0.104131] PCI: Probing PCI hardware [ 0.131515] bio: create slab at 0 [ 0.136472] XGpio: /plb@0/gpio@81460000: registered [ 0.137461] XGpio: /plb@0/gpio@81400000: registered [ 0.138130] XGpio: /plb@0/gpio@81420000: registered [ 0.138710] XGpio: /plb@0/gpio@81440000: registered [ 0.141923] vgaarb: loaded [ 0.155370] Switching to clocksource timebase [ 0.203063] NET: Registered protocol family 2 [ 0.207284] IP route cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.214170] TCP established hash table entries: 8192 (order: 4, 65536 bytes) [ 0.214492] TCP bind hash table entries: 8192 (order: 3, 32768 bytes) [ 0.215635] TCP: Hash tables configured (established 8192 bind 8192) [ 0.215961] TCP reno registered [ 0.216157] UDP hash table entries: 256 (order: 0, 4096 bytes) [ 0.216482] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) [ 0.218590] NET: Registered protocol family 1 [ 0.222081] RPC: Registered udp transport module. [ 0.222205] RPC: Registered tcp transport module. [ 0.222230] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.232197] Trying to unpack rootfs image as initramfs... [ 0.250903] rootfs image is not initramfs (no cpio magic); looks like an initrd [ 0.270685] Freeing initrd memory: 1471k freed [ 0.302829] ROMFS MTD (C) 2007 Red Hat, Inc. [ 0.304074] msgmni has been set to 499 [ 0.310585] io scheduler noop registered [ 0.310694] io scheduler deadline registered [ 0.310970] io scheduler cfq registered (default) [ 0.647100] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled [ 0.661291] 83e00000.serial: ttyS0 at MMIO 0x83e01003 (irq = 20) is a 16550 [ 0.674631] console [ttyS0] enabled [ 0.698182] brd: module loaded [ 0.709066] loop: module loaded [ 0.714784] of:xsysace 83600000.sysace: xsysace: error initializing device at 0x83600000 [ 0.715185] of:xsysace 83600000.sysace: could not initialize device, err=-12 [ 0.715579] of:xsysace: probe of 83600000.sysace failed with error -12 [ 0.716847] Xilinx SystemACE device driver, major=254 [ 0.718539] of:xilinx_emaclite 81000000.ethernet: Device Tree Probing [ 0.719785] of:xilinx_emaclite 81000000.ethernet: error registering MDIO bus [ 0.720391] of:xilinx_emaclite 81000000.ethernet: MAC address is now 02:00:00:00:00:00 [ 0.723575] of:xilinx_emaclite 81000000.ethernet: Xilinx EmacLite at 0x81000000 mapped to 0xD10A0000, irq=16 [ 0.728528] mice: PS/2 mouse device common for all mice [ 0.731065] i2c /dev entries driver [ 0.732564] Device Tree Probing 'i2c' [ 0.737730] xilinx-iic #0 at 0x81600000 mapped to 0xD10C0000, irq=18 [ 0.741476] TCP cubic registered [ 0.741646] NET: Registered protocol family 17 [ 0.761763] RAMDISK: gzip image found at block 0 [ 1.009852] VFS: Mounted root (ext2 filesystem) readonly on device 1:0. [ 1.011201] Freeing unused kernel memory: 160k init /etc/mtab: cannot create root:~> ### Application running ... root:~> ifconfig eth0 10.116.17.22 netmask 255.255.255.224 root:~> ifconfig eth0 eth0 Link encap:Ethernet HWaddr 02:00:00:00:00:00 inet addr:10.116.17.22 Bcast:10.116.17.31 Mask:255.255.255.224 UP BROADCAST RUNNING MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:16 Memory:81000000-8100ffff root:~> ping -c 3 10.116.17.1 PING 10.116.17.1 (10.116.17.1): 56 data bytes --- 10.116.17.1 ping statistics --- 3 packets transmitted, 0 packets received, 100% packet loss root:~> root:~> [ 144.880243] NETDEV WATCHDOG: eth0 (of:xilinx_emaclite): transmit queue 0 timed out [ 144.881850] Oops: Exception in kernel mode, sig: 4 [#1] [ 144.882092] PREEMPT Xilinx Virtex440 [ 144.882315] last sysfs file: [ 144.882654] Modules linked in: [ 144.883024] NIP: c0223464 LR: c0223464 CTR: c01b79b4 [ 144.883397] REGS: cfff5e30 TRAP: 0700 Not tainted (2.6.37+) [ 144.883631] MSR: 00029000 CR: 44000024 XER: 20000000 [ 144.884286] TASK = c0373350[0] 'swapper' THREAD: c0396000 [ 144.884564] GPR00: c0223464 cfff5ee0 c0373350 0000005c 00001a6c ffffffff c01b84c4 00004000 [ 144.885167] GPR08: c049e7bc 00000101 00003fff cfff4000 84000024 00000000 00000000 00000000 [ 144.885708] GPR16: c0303e54 00000001 c04a2900 c04a372c 00200200 c04a352c 00000000 cfff4000 [ 144.886181] GPR24: 00000002 ffffffff 00000000 cfff403c cf85e000 c04b0000 c0375eec 00000000 [ 144.887928] NIP [c0223464] dev_watchdog+0x30c/0x328 [ 144.888141] LR [c0223464] dev_watchdog+0x30c/0x328 [ 144.888365] Call Trace: [ 144.888701] [cfff5ee0] [c0223464] dev_watchdog+0x30c/0x328 (unreliable) [ 144.889069] [cfff5f50] [c0040510] run_timer_softirq+0x11c/0x23c [ 144.889292] [cfff5fb0] [c0039af8] __do_softirq+0xb4/0x164 [ 144.889492] [cfff5ff0] [c000c174] call_do_softirq+0x14/0x24 [ 144.889707] [c0397e80] [c0003fcc] do_softirq+0x80/0x8c [ 144.889901] [c0397ea0] [c0039518] irq_exit+0x54/0x6c [ 144.890092] [c0397eb0] [c0009668] timer_interrupt+0xa4/0xfc [ 144.890298] [c0397ec0] [c000cdf0] ret_from_except+0x0/0x18 [ 144.890525] --- Exception: 901 at ppc44x_idle+0x10/0x20 [ 144.890545] LR = cpu_idle+0xd0/0xe0 [ 144.890859] [c0397f80] [c0007490] cpu_idle+0x74/0xe0 (unreliable) [ 144.891087] [c0397fa0] [c00018c8] rest_init+0x8c/0xa4 [ 144.891361] [c0397fc0] [c03487d0] start_kernel+0x260/0x2b4 [ 144.891667] [c0397ff0] [c0000074] _start+0x74/0xb8 [ 144.891894] Instruction dump: [ 144.892201] 3bc35eec 4bfffe90 38810008 7f83e378 38a00040 4bfe89f1 7fe6fb78 7c651b78 [ 144.892568] 3c60c032 7f84e378 3863ce4c 4808b67d <0fe00000> 38000001 981d6a04 4bffff90 [ 144.893734] Kernel panic - not syncing: Fatal exception in interrupt [ 144.893964] Call Trace: [ 144.894070] [cfff5c80] [c00063a8] show_stack+0x48/0x168 (unreliable) [ 144.894283] [cfff5cc0] [c02ae9a4] panic+0xac/0x1e4 [ 144.894445] [cfff5d10] [c0009f20] die+0x1bc/0x1d0 [ 144.894604] [cfff5d30] [c000a174] _exception+0xfc/0x118 [ 144.894774] [cfff5e20] [c000cda4] ret_from_except_full+0x0/0x4c [ 144.894975] --- Exception: 700 at dev_watchdog+0x30c/0x328 [ 144.894988] LR = dev_watchdog+0x30c/0x328 [ 144.895266] [cfff5f50] [c0040510] run_timer_softirq+0x11c/0x23c [ 144.895456] [cfff5fb0] [c0039af8] __do_softirq+0xb4/0x164 [ 144.895631] [cfff5ff0] [c000c174] call_do_softirq+0x14/0x24 [ 144.895823] [c0397e80] [c0003fcc] do_softirq+0x80/0x8c [ 144.896136] [c0397ea0] [c0039518] irq_exit+0x54/0x6c [ 144.896307] [c0397eb0] [c0009668] timer_interrupt+0xa4/0xfc [ 144.896486] [c0397ec0] [c000cdf0] ret_from_except+0x0/0x18 [ 144.896669] --- Exception: 901 at ppc44x_idle+0x10/0x20 [ 144.896682] LR = cpu_idle+0xd0/0xe0 [ 144.896938] [c0397f80] [c0007490] cpu_idle+0x74/0xe0 (unreliable) [ 144.897137] [c0397fa0] [c00018c8] rest_init+0x8c/0xa4 [ 144.897305] [c0397fc0] [c03487d0] start_kernel+0x260/0x2b4 [ 144.897482] [c0397ff0] [c0000074] _start+0x74/0xb8 [ 144.897929] Rebooting in 180 seconds.. diff --git a/arch/powerpc/boot/dts/virtex440-ml507.dts b/arch/powerpc/boot/dts/virtex440-ml507.dts index 9cf6081..acc8406 100644 --- a/arch/powerpc/boot/dts/virtex440-ml507.dts +++ b/arch/powerpc/boot/dts/virtex440-ml507.dts @@ -155,6 +155,18 @@ #size-cells = <1>; compatible = "xlnx,plb-v46-1.03.a", "simple-bus"; ranges ; + ethernet@81000000 { + compatible = "xlnx,xps-ethernetlite-1.00.a"; + device_type = "network"; + interrupt-parent = <&xps_intc_0>; + interrupts = < 5 2 >; + local-mac-address = [02 00 00 00 00 00]; + reg = <0x81000000 0x10000>; + xlnx,duplex = <0x1>; + xlnx,family = "spartan3adsp"; + xlnx,rx-ping-pong = <0x0>; + xlnx,tx-ping-pong = <0x0>; + }; DIP_Switches_8Bit: gpio@81460000 { compatible = "xlnx,xps-gpio-1.00.a"; interrupt-parent = <&xps_intc_0>; [Modify qemu - v0.15.0rc1] diff --git a/hw/virtex_ml507.c b/hw/virtex_ml507.c index 7bde8c7..4dea56a 100644 --- a/hw/virtex_ml507.c +++ b/hw/virtex_ml507.c @@ -232,6 +232,7 @@ static void virtex_init(ram_addr_t ram_size, /* 2 timers at irq 2 @ 62 Mhz. */ xilinx_timer_create(0x83c00000, irq[3], 2, 62 * 1000000); + xilinx_ethlite_create(&nd_table[0], 0x81000000, irq[5], 0, 0); if (kernel_filename) { uint64_t entry, low, high;