Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 May 2011 21:04:03 -0500
From:      Erik Moe <ehmoeok@gmail.com>
To:        Oleksandr Tymoshenko <gonzo@freebsd.org>
Cc:        freebsd-mips@freebsd.org
Subject:   Re: FreeBSD MIPS and RB133c
Message-ID:  <5BF1630A-DC4C-4301-B27D-61004D238361@gmail.com>
In-Reply-To: <4DC9E4ED.8070203@freebsd.org>
References:  <AEDDDA7C-BCCF-49F7-82AD-B479230EA6F4@gmail.com>	<F8BC0A73-D14B-497B-A8AE-4C9737B667D4@gmail.com>	<42E1A1C3-654C-4A1F-8EDC-57EF2A52F5FE@gmail.com>	<4DC9DA05.7050901@freebsd.org> <BC730DD0-BD9D-40E4-B57E-46503C8E9314@gmail.com> <4DC9E4ED.8070203@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On May 10, 2011, at 8:22 PM, Oleksandr Tymoshenko wrote:

> On 10/05/2011 5:59 PM, Erik Moe wrote:
>>=20
>> On May 10, 2011, at 7:36 PM, Oleksandr Tymoshenko wrote:
>>=20
>>> 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?
>>=20
>>=20
>> 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.
>=20
> Try this hack:
> http://people.freebsd.org/~gonzo/patches/admsw-hack.diff


Progress!  I definitely got further now.  I had to add a new entry to my =
dhcpd.conf for the hardcoded mac address, but now I'm getting a kernel =
panic.

# dhcpd.conf
#

subnet 192.168.221.0 netmask 255.255.255.0 {
}

subnet 192.168.11.0 netmask 255.255.255.0 {
  deny unknown-clients;
  option routers 192.168.11.1;
  next-server 192.168.11.2;
  filename "boot/kernel/kernel";
}

host rb133c-boot {
  hardware ethernet 00:0c:42:1e:9a:88;
  fixed-address 192.168.11.15;
}

host rb133c {
  hardware ethernet 00:0c:42:07:b2:4e;
  fixed-address 192.168.11.15;
  option root-path "192.168.11.2:/home/emoe/nfsroot";
}

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<WatchRegs,EJTAG>
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 #1 r221418M: Tue May 10 20:45:51 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: <memory>
null: <null device, zero device>
nexus0: <MIPS32 root nexus>
clock0: <Generic MIPS32 ticker> 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: <ADM5120 Switch Engine> 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: <adm5120_uart, channel A> 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)
Received DHCP Offer packet on admsw0 from 192.168.11.2 (accepted) (no =
root path)
Sending DHCP Request packet from interface admsw0 (00:0c:42:07:b2:4e)
Received DHCP Ack packet on admsw0 from 192.168.11.2 (accepted) (got =
root path)
admsw0 at 192.168.11.15 server 192.168.11.2 boot file boot/kernel/kernel
subnet mask 255.255.255.0 router 192.168.11.1 rootfs =
192.168.11.2:/home/emoe/nfsroot=20
Adjusted interface admsw0
panic: _mtx_lock_sleep: recursed on non-recursive mutex admsw1 @ /usr/
db> bt
Tracing pid 0 tid 100000 td 0x8027cd50
db_trace_thread+30 (?,?,?,?) ra 800030b0 sp 802ad3d8 sz 24
80002f9c+114 (0,?,ffffffff,?) ra 8000266c sp 802ad3f0 sz 32
800022e4+388 (?,?,?,?) ra 800027f0 sp 802ad410 sz 168
db_command_loop+70 (?,?,?,?) ra 80004e34 sp 802ad4b8 sz 24
80004d40+f4 (?,?,?,?) ra 800bd9ec sp 802ad4d0 sz 424
kdb_trap+104 (?,?,?,?) ra 801cb0f0 sp 802ad678 sz 40
trap+b98 (?,?,?,?) ra 801c3140 sp 802ad6a0 sz 168
MipsKernGenException+134 (0,a,802abfe4,109) ra 800bdc78 sp 802ad748 sz =
200
kdb_enter+4c (?,?,?,?) ra 80086bf4 sp 802ad810 sz 24
panic+f4 (?,80444814,8021fd68,269) ra 80076f9c sp 802ad828 sz 40
_mtx_lock_sleep+68 (?,?,?,?) ra 800771e0 sp 802ad850 sz 32
_mtx_lock_flags+104 (?,?,?,?) ra 801e0840 sp 802ad870 sz 32
801e07ac+94 (?,?,?,?) ra 801e0ea4 sp 802ad890 sz 72
801e0d20+184 (?,?,?,?) ra 801e185c sp 802ad8d8 sz 40
801e1774+e8 (?,?,?,?) ra 8005f47c sp 802ad900 sz 40
intr_event_handle+98 (?,?,?,?) ra 801e27e0 sp 802ad928 sz 48
801e277c+64 (?,?,?,?) ra 8005f47c sp 802ad958 sz 32
intr_event_handle+98 (?,?,?,?) ra 801e45f4 sp 802ad978 sz 48
cpu_intr+184 (802ad9f8,?,?,?) ra 801c361c sp 802ad9a8 sz 56
MipsKernIntr+134 (80444914,8027cd50,0,269) ra 801e08a8 sp 802ad9e0 sz =
200
801e07ac+fc (?,?,?,?) ra 8012c0d0 sp 802adaa8 sz 72
if_start+14 (?,?,?,?) ra 8012ca8c sp 802adaf0 sz 24
8012c938+154 (?,?,?,?) ra 801348d4 sp 802adb08 sz 40
ether_output_frame+6c (?,8044fd00,?,?) ra 80134eec sp 802adb30 sz 24
ether_output+608 (?,8044fd00,?,?) ra 80141884 sp 802adb48 sz 72
arprequest+1ec (?,?,?,?) ra 80142b88 sp 802adb90 sz 72
arp_ifinit+6c (?,?,?,?) ra 80133f88 sp 802adbd8 sz 32
ether_ioctl+78 (?,?,?,?) ra 801e1024 sp 802adbf8 sz 32
801e0ed8+14c (?,?,?,?) ra 80148c7c sp 802adc18 sz 32
80148984+2f8 (0,?,0,?) ra 80149dfc sp 802adc38 sz 80
in_control+968 (?,?,?,?) ra 8013224c sp 802adc88 sz 88
ifioctl+1350 (?,?,8049fb78,8027cd50) ra 80175740 sp 802adce0 sz 144
bootpc_init+162c (?,?,?,?) ra 8003f3fc sp 802add70 sz 240
mi_startup+138 (?,?,?,?) ra 80001190 sp 802ade60 sz 32
_start+90 (?,?,?,?) ra 0 sp 802ade80 sz 0
pid 0







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5BF1630A-DC4C-4301-B27D-61004D238361>