From owner-freebsd-mips@FreeBSD.ORG Wed May 11 00:59:10 2011 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AE481065672 for ; Wed, 11 May 2011 00:59:10 +0000 (UTC) (envelope-from ehmoeok@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4C31B8FC18 for ; Wed, 11 May 2011 00:59:10 +0000 (UTC) Received: by iwn33 with SMTP id 33so29482iwn.13 for ; Tue, 10 May 2011 17:59:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to:x-mailer; bh=3LjKLpUH5T1kACg6ykeUduPSxUy4+EoRjxIbVNW36hM=; b=q/DxFS98WT0wMg460jfpDQhNHDThhSNB3pdnRscCwN0uz3rUluspXnTjfDj/2dxbGz ltVC32D33M/d/LAMd1o3UjygRcVfP3zmRHA8X1ajARrxJA+e7Ku0SXFfEvGdqC1AqZCt Z0Dztsu9lwLYpb7R78zKe8pHHi58RMDyyTVaU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=s0syQvx5XE5T9eTbYVcbjBYINXEqXxcfo/J0+n91eJ9gt1grDdg4p00m+rZh1DSjv4 QT2zMwTL751Q6mV7Ytp4gzIjgdJYUGpdztaH1b2iMs01NwydpnY/UMPksrtRwsIWq+xS m7JlnzyGCe6TwAeZ3kj+hCvIP9gnoDVF+qcf0= Received: by 10.42.158.72 with SMTP id g8mr7351487icx.149.1305075549729; Tue, 10 May 2011 17:59:09 -0700 (PDT) Received: from [192.168.1.103] (24-136-20-122.c3-0.stn-ubr3.chi-stn.il.cable.rcn.com [24.136.20.122]) by mx.google.com with ESMTPS id ui7sm3029972icb.2.2011.05.10.17.59.08 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 10 May 2011 17:59:09 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Erik Moe In-Reply-To: <4DC9DA05.7050901@freebsd.org> Date: Tue, 10 May 2011 19:59:07 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: References: <42E1A1C3-654C-4A1F-8EDC-57EF2A52F5FE@gmail.com> <4DC9DA05.7050901@freebsd.org> To: Oleksandr Tymoshenko X-Mailer: Apple Mail (2.1084) Cc: freebsd-mips@freebsd.org Subject: Re: FreeBSD MIPS and RB133c X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 May 2011 00:59:10 -0000 On May 10, 2011, at 7:36 PM, Oleksandr Tymoshenko wrote: > On 10/05/2011 7:58 AM, Erik Moe wrote: >=20 >>>> Using tcpdump, after RouterBoot finishes loading the kernel, I see = one DHCP request coming from the RouterBoard using mac 00:0c:42:1e:9a:88 = and then there is nothing after that. I don't see any packets at all. >>>>=20 >>>> 192.168.11.2.23224> 192.168.11.15.61904: [udp sum ok] UDP, = length 21 >>>> 09:24:05.839921 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], = proto UDP (17), length 32) >>>> 192.168.11.15.61904> 192.168.11.2.23224: [udp sum ok] UDP, = length 4 >>>> 09:24:05.840980 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], = proto UDP (17), length 328) >>>> 0.0.0.0.bootpc> broadcasthost.bootps: [udp sum ok] BOOTP/DHCP, = Request from 00:0c:42:1e:9a:88 (oui Unknown), length 300, xid = 0xd8aaeeff, Flags [none] (0x0000) >>>> Client-Ethernet-Address 00:0c:42:1e:9a:88 (oui Unknown) >>>> Vendor-rfc1048 Extensions >>>> Magic Cookie 0x63825363 >>>> DHCP-Message Option 53, length 1: Release >>>> Client-ID Option 61, length 7: ether 00:0c:42:1e:9a:88 >>>> Vendor-Class Option 60, length 9: "Mikroboot" >>>> Parameter-Request Option 55, length 2: >>>> Subnet-Mask, Default-Gateway >>>> END Option 255, length 0 >>>> PAD Option 0, length 0, occurs 32 >>>>=20 >>>> Thanks, >>>> Erik >>>>=20 >>> Unfortunately the mac address is hardcoded for this driver (in = sys/mips/adm5120/if_admsw.c): >>>=20 >>> 389 /* XXXMIPS: fix it */ >>> 390 enaddr[0] =3D 0x00; >>> 391 enaddr[1] =3D 0x0C; >>> 392 enaddr[2] =3D 0x42; >>> 393 enaddr[3] =3D 0x07; >>> 394 enaddr[4] =3D 0xB2; >>> 395 enaddr[5] =3D 0x4E; >>>=20 >>>=20 >>> Luiz >>>=20 >>=20 >>=20 >> That's not the main issue I have, the fact that the mac address is = hardcoded. The issue is once the RouterBoot loads and boots the kernel, = I'm not seeing the kernel sending any DHCP/BOOTB requests down the wire, = even though from the console log it is acting like it is. >=20 > Tcpdump session above - are those only packets during the session? = Were > there proper DHCP replies that were ignored? Could you show full log? This is all the DHCP traffic, but this is coming from the Routerboot = bios. There is a Discover, Offer, Request and ACK. Then the Routerboot = tftps the kernel and starts to boot. Then right after the "Sending DHCP = Discover packet from interface admsw0 (00:0c:42:07:b2:4e)" message I see = the DHCP Release, but that's coming from the Routerboot. erik-moes-macbook-pro:~ erikmoe$ sudo tcpdump -i en0 -vv port 67 or 68 tcpdump: listening on en0, link-type EN10MB (Ethernet), capture size = 65535 bytes 19:45:28.493715 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto = UDP (17), length 328) 0.0.0.0.bootpc > broadcasthost.bootps: [udp sum ok] BOOTP/DHCP, = Request from 00:0c:42:1e:9a:88 (oui Unknown), length 300, xid = 0xd8aaeeff, Flags [none] (0x0000) Client-Ethernet-Address 00:0c:42:1e:9a:88 (oui Unknown) Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Discover Client-ID Option 61, length 7: ether 00:0c:42:1e:9a:88 Vendor-Class Option 60, length 9: "Mikroboot" Parameter-Request Option 55, length 2:=20 Subnet-Mask, Default-Gateway 19:45:28.494237 IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], = proto UDP (17), length 328) 192.168.11.2.bootps > 192.168.11.15.bootpc: [udp sum ok] BOOTP/DHCP, = Reply, length 300, xid 0xd8aaeeff, Flags [none] (0x0000) Your-IP 192.168.11.15 Server-IP 192.168.11.2 Client-Ethernet-Address 00:0c:42:1e:9a:88 (oui Unknown) file "boot/kernel/kernel" Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Offer Server-ID Option 54, length 4: 192.168.11.2 Lease-Time Option 51, length 4: 43200 Subnet-Mask Option 1, length 4: 255.255.255.0 Default-Gateway Option 3, length 4: 192.168.11.1 19:45:28.495215 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto = UDP (17), length 328) 0.0.0.0.bootpc > broadcasthost.bootps: [udp sum ok] BOOTP/DHCP, = Request from 00:0c:42:1e:9a:88 (oui Unknown), length 300, xid = 0xd8aaeeff, Flags [none] (0x0000) Client-Ethernet-Address 00:0c:42:1e:9a:88 (oui Unknown) Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Request Client-ID Option 61, length 7: ether 00:0c:42:1e:9a:88 Requested-IP Option 50, length 4: 192.168.11.15 Server-ID Option 54, length 4: 192.168.11.2 Vendor-Class Option 60, length 9: "Mikroboot" Parameter-Request Option 55, length 2:=20 Subnet-Mask, Default-Gateway 19:45:28.496099 IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], = proto UDP (17), length 328) 192.168.11.2.bootps > 192.168.11.15.bootpc: [udp sum ok] BOOTP/DHCP, = Reply, length 300, xid 0xd8aaeeff, Flags [none] (0x0000) Your-IP 192.168.11.15 Server-IP 192.168.11.2 Client-Ethernet-Address 00:0c:42:1e:9a:88 (oui Unknown) file "boot/kernel/kernel" Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: ACK Server-ID Option 54, length 4: 192.168.11.2 Lease-Time Option 51, length 4: 43200 Subnet-Mask Option 1, length 4: 255.255.255.0 Default-Gateway Option 3, length 4: 192.168.11.1 19:45:33.598442 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto = UDP (17), length 328) 0.0.0.0.bootpc > broadcasthost.bootps: [udp sum ok] BOOTP/DHCP, = Request from 00:0c:42:1e:9a:88 (oui Unknown), length 300, xid = 0xd8aaeeff, Flags [none] (0x0000) Client-Ethernet-Address 00:0c:42:1e:9a:88 (oui Unknown) Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Release Client-ID Option 61, length 7: ether 00:0c:42:1e:9a:88 Vendor-Class Option 60, length 9: "Mikroboot" Parameter-Request Option 55, length 2:=20 Subnet-Mask, Default-Gateway RouterBOOT booter 2.18 RouterBoard 133C3 CPU frequency: 175 MHz Memory size: 16 MB Press any key within 6 seconds to enter setup...... trying dhcp protocol... OK resolved mac address 00:0C:29:29:27:66 Gateway: 192.168.11.1 transfer started ......................... transfer ok, time=3D5.09s setting up elf image... OK jumping to kernel code entry: mips_init() Cache info: picache_stride =3D 4096 picache_loopcount =3D 2 pdcache_stride =3D 4096 pdcache_loopcount =3D 2 cpu0: MIPS Technologies processor v11.128 MMU: Standard TLB, 16 entries L1 i-cache: 2 ways of 256 sets, 16 bytes per line L1 d-cache: 2 ways of 256 sets, 16 bytes per line Config1=3D0x1e994c8a Physical memory chunk(s): 0x29c000 - 0xffffff, 14041088 bytes (3428 pages) Maxmem is 0x1000000 GDB: debug ports: uart GDB: current port: uart KDB: debugger backends: ddb gdb KDB: current backend: ddb Copyright (c) 1992-2011 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights = reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 9.0-CURRENT #0 r221418M: Tue May 10 19:43:32 CDT 2011 = emoe@freebsd.localdomain:/usr/home/emoe/obj/mips/mips.mipsel/usr/home/emoe= /svn/mips/sys/ADM5120.nfs mips real memory =3D 16777216 (16384K bytes) Physical memory chunk(s): 0x00328000 - 0x00f8dfff, 13000704 bytes (3174 pages) avail memory =3D 12746752 (12MB) nfslock: pseudo-device mem: null: nexus0: clock0: on nexus0 Timecounter "MIPS32" frequency 175000000 Hz quality 800 Event timer "MIPS32" frequency 175000000 Hz quality 800 obio0 at mem 0-0x1ffffffe on nexus0 admsw0: on obio0 admsw0: ADM5120 Switch Engine, 6 ports admsw0: base Ethernet address 00:0c:42:07:b2:4e admsw0: Ethernet address: 00:0c:42:07:b2:4e admsw1: Ethernet address: 00:0c:42:07:b2:4f admsw2: Ethernet address: 00:0c:42:07:b2:50 admsw3: Ethernet address: 00:0c:42:07:b2:51 admsw4: Ethernet address: 00:0c:42:07:b2:52 admsw5: Ethernet address: 00:0c:42:07:b2:53 uart0: on obio0 uart0: fast interrupt uart0: console (115200,n,8,1) Device configuration finished. Timecounters tick every 10.000 msec bootpc_init: wired to interface 'admsw0' Sending DHCP Discover packet from interface admsw0 (00:0c:42:07:b2:4e) DHCP/BOOTP timeout for server 255.255.255.255 DHCP/BOOTP timeout for server 255.255.255.255 DHCP/BOOTP timeout for server 255.255.255.255 DHCP/BOOTP timeout for server 255.255.255.255 DHCP/BOOTP timeout for server 255.255.255.255