[gPXE-devel] gPXE is not support RTL8111B?
kun zhu
bozer1228 at gmail.com
Thu Aug 12 05:40:21 EDT 2010
Hello
I used gdb serial debug gpxe1.0.1 in my board lan rtl8111b. I used undionly
for boot file . After PXE ,Ctrl_B break in the gpxe shell ,used autoboot for
debug.In the debugger ,I set some breakpoints, such as dhcp_tx,
dhcp_rx_offer, ipv4_tx. It could break in dhcp_tx after dhcp net0(XXX).
Debug info:
Breakpoint 5, dhcp_tx (dhcp=0x152c4) at net/udp/dhcp.c:1208
1208 static int dhcp_tx ( struct dhcp_session *dhcp ) {
(gdb) n
1213 .netdev = dhcp->netdev,
(gdb) n
1216 }
(gdb) n
1218 uint8_t msgtype = dhcp->state->tx_msgtype;
(gdb) n
1225 start_timer ( &dhcp->timer );
(gdb) p msgtype
$3 = 1 '\001'
(gdb) n
1228 iobuf = xfer_alloc_iob ( &dhcp->xfer, DHCP_MIN_LEN );
(gdb) n
1229 if ( ! iobuf )
(gdb) n
1233 if ( ( rc = dhcp_create_request ( &dhcppkt, dhcp->netdev, msgtype,
(gdb) n
dhcp_create_request (dhcppkt=0x36120, netdev=0x151a4, msgtype=1,
ciaddr=...,
data=0x15bf8, max_len=552) at net/udp/dhcp.c:1109
1109 struct in_addr ciaddr, void *data, size_t max_len ) {
(gdb) n
1120 if ( ( rc = dhcp_create_packet ( dhcppkt, netdev, msgtype,
(gdb) n
1130 dhcppkt->dhcphdr->ciaddr = ciaddr;
(gdb) n
1135 if ( ( rc = dhcppkt_store ( dhcppkt, DHCP_EB_ENCAP, dhcp_features,
(gdb) n
1143 fetch_setting ( &netdev->settings.settings, &busid_setting, &dhcp_desc,
(gdb) n
1145 if ( ( rc = dhcppkt_store ( dhcppkt, DHCP_EB_BUS_ID, &dhcp_desc,
(gdb) n
1155 client_id.ll_proto = ntohs ( netdev->ll_protocol->ll_proto );
(gdb) n
1156 ll_addr_len = netdev->ll_protocol->ll_addr_len;
(gdb) n
1158 memcpy ( client_id.ll_addr, netdev->ll_addr, ll_addr_len );
(gdb) n
1159 if ( ( rc = dhcppkt_store ( dhcppkt, DHCP_CLIENT_ID, &client_id,
(gdb) n
1167 client_uuid.type = DHCP_CLIENT_UUID_TYPE;
(gdb) n
1168 if ( ( len = fetch_uuid_setting ( NULL, &uuid_setting,
(gdb) n
1170 if ( ( rc = dhcppkt_store ( dhcppkt, DHCP_CLIENT_UUID,
(gdb) n
1180 if ( ( len = fetch_setting_len ( NULL, &user_class_setting ) ) >= 0 ) {
(gdb) n
1194 }
(gdb) n
dhcp_tx (dhcp=0x152c4) at net/udp/dhcp.c:1242
1242 if ( ( rc = dhcp->state->tx ( dhcp, &dhcppkt, &peer ) ) != 0 ) {
(gdb) n
1249 iob_put ( iobuf, dhcppkt.len );
(gdb) n
1250 if ( ( rc = xfer_deliver_iob_meta ( &dhcp->xfer, iob_disown ( iobuf ),
(gdb) n
Breakpoint 4, ipv4_tx (iobuf=0x15e20, tcpip_protocol=0x150b8,
st_src=0x152e8,
st_dest=0x144d8, netdev=0x151a4, trans_csum=0x15bf6) at net/ipv4.c:306
306 uint16_t *trans_csum ) {
(gdb) n
307 struct iphdr *iphdr = iob_push ( iobuf, sizeof ( *iphdr ) );
(gdb) n
316 memset ( iphdr, 0, sizeof ( *iphdr ) );
(gdb) n
317 iphdr->verhdrlen = ( IP_VER | ( sizeof ( *iphdr ) / 4 ) );
(gdb) n
318 iphdr->service = IP_TOS;
(gdb) n
319 iphdr->len = htons ( iob_len ( iobuf ) );
(gdb) n
320 iphdr->ident = htons ( ++next_ident );
(gdb) n
321 iphdr->ttl = IP_TTL;
(gdb) n
322 iphdr->protocol = tcpip_protocol->tcpip_proto;
(gdb) n
323 iphdr->dest = sin_dest->sin_addr;
(gdb) n
326 next_hop = iphdr->dest;
(gdb) n
327 if ( sin_src )
(gdb) n
328 iphdr->src = sin_src->sin_addr;
(gdb) n
329 if ( ( next_hop.s_addr != INADDR_BROADCAST ) &&
(gdb) n
335 if ( ! netdev ) {
(gdb) n
342 if ( ( rc = ipv4_ll_addr ( next_hop, iphdr->src, netdev,
(gdb) n
350 if ( trans_csum )
(gdb) n
351 *trans_csum = ipv4_pshdr_chksum ( iobuf, *trans_csum );
(gdb) n
352 iphdr->chksum = tcpip_chksum ( iphdr, sizeof ( *iphdr ) );
(gdb) n
361 if ( ( rc = net_tx ( iobuf, netdev, &ipv4_protocol, ll_dest ) ) != 0 ) {
(gdb) n
net_tx (iobuf=0x15e20, netdev=0x151a4, net_protocol=0x14d9c,
ll_dest=0x36084)
at net/netdevice.c:540
540 struct net_protocol *net_protocol, const void *ll_dest ) {
(gdb) n
541 struct ll_protocol *ll_protocol = netdev->ll_protocol;
(gdb) n
549 netdev_poll ( netdev );
(gdb) n
552 if ( ( rc = ll_protocol->push ( netdev, iobuf, ll_dest, netdev->ll_addr,
(gdb) n
eth_push (netdev=0x151a4, iobuf=0x15e20, ll_dest=0x36084,
ll_source=0x151d8,
net_proto=8) at net/ethernet.c:55
55 const void *ll_source, uint16_t net_proto ) {
(gdb) n
56 struct ethhdr *ethhdr = iob_push ( iobuf, sizeof ( *ethhdr ) );
(gdb) n
59 memcpy ( ethhdr->h_dest, ll_dest, ETH_ALEN );
(gdb) n
60 memcpy ( ethhdr->h_source, ll_source, ETH_ALEN );
(gdb) n
61 ethhdr->h_protocol = net_proto;
(gdb) n
64 }
(gdb) n
net_tx (iobuf=0x15e20, netdev=0x151a4, net_protocol=0x14d9c,
ll_dest=0x36084)
at net/netdevice.c:559
559 return netdev_tx ( netdev, iobuf );
(gdb) n
560 }
(gdb) n
ipv4_tx (iobuf=0x15e20, tcpip_protocol=<value optimized out>,
st_src=<value optimized out>, st_dest=0x144d8, netdev=0x151a4,
trans_csum=0x15bf6) at net/ipv4.c:372
372 }
(gdb) n
tcpip_tx (iobuf=<value optimized out>, tcpip_protocol=<value optimized
out>,
st_src=<value optimized out>, st_dest=0x144d8, netdev=0x151a4,
trans_csum=0x15bf6) at net/tcpip.c:80
80 }
(gdb) n
udp_xfer_deliver_iob (xfer=0x15bf0, iobuf=0x15e20, meta=<value optimized
out>)
at net/udp.c:409
409 }
(gdb) n
xfer_deliver_iob_meta (xfer=<value optimized out>,
iobuf=<value optimized out>, meta=<value optimized out>) at
core/xfer.c:162
162 xfer_put ( dest );
(gdb) n
164 }
(gdb) n
dhcp_tx (dhcp=0x152c4) at net/udp/dhcp.c:1258
1258 free_iob ( iobuf );
(gdb) n
1260 }
(gdb) n
dhcp_timer_expired (timer=<value optimized out>, fail=<value optimized out>)
at net/udp/dhcp.c:1364
1364 }
(gdb) n
retry_step (process=<value optimized out>) at net/retry.c:181
181 list_for_each_entry_safe ( timer, tmp, &timers, list ) {
(gdb) n
186 }
(gdb) n
monojob_wait (string=<value optimized out>) at core/monojob.c:76
76 if ( iskey() ) {
(gdb) n
87 elapsed = ( currticks() - last_progress_dot );
(gdb) n
88 if ( elapsed >= TICKS_PER_SEC ) {
(gdb) n
74 while ( monojob_rc == -EINPROGRESS ) {
(gdb) n
75 step();
(gdb) c
Continuing.
Only break in xx_tx,but not break in xx_rx. I used wireshark in the server
to moniter, found 4 times dhcp disocver and dhcp offer, and then timeout.
Those debug infos are enough. Give some ideas for help me, thanks.
ÔÚ 2010Äê8ÔÂ12ÈÕ ÏÂÎç5:15£¬kun zhu <bozer1228 at gmail.com>дµÀ£º
> Hello once more
>>
>
>
>>
>> 2010/7/29 Thomas Miletich <thomas.miletich at gmail.com>
>>
>> Hello once more
>>> after reading your mail again I noticed that you say DHCP and TFTP
>>> work is done, and then gPXE starts. Does that mean you're using
>>> 'undionly.kpxe'? If that's the case we will have to look in a
>>> different direction to find the problem.
>>>
>>> --
>>> Thomas
>>>
>>> On Thu, Jul 29, 2010 at 11:50 AM, Thomas Miletich
>>> <thomas.miletich at gmail.com> wrote:
>>> > Hello
>>> > from a quick comparison between the gPXE and linux driver I can't see
>>> > any differences in the handling of 8111B specific things. As the
>>> > non-variant-specific code in the r8169 driver is well tested I don't
>>> > know what could be the problem.
>>> >
>>> > To give us an idea about the problem we need more information from the
>>> driver.
>>> >
>>> > If you have another computer and a serial cable you can enable serial
>>> > console output by editing 'src/config/console.h'.
>>> > In this file please replace "//#define CONSOLE_SERIAL" with
>>> > "#define CONSOLE_SERIAL".
>>> >
>>> > You can enable debugging output from the driver by building gPXE with
>>> > this command:
>>> >
>>> > make bin/r8169.dsk DEBUG=r8169
>>> >
>>> > (adjust 'bin/r8169.dsk' to the image type you're using)
>>> >
>>> > Now capture the output from gPXE on the other computer using some
>>> > terminal program(default settings are 115200 8N1)
>>> > Please send us the capture so we can look into the problem.
>>> >
>>> > --
>>> > Thomas
>>> >
>>> > On Thu, Jul 29, 2010 at 10:26 AM, ÖìÒ <bozer1228 at gmail.com> wrote:
>>> >> I have a motherboard with onboard LAN RTL8111B.This device is work
>>> well in
>>> >> windows xp. I run it with gPXE . I get error. I run Wireshark to
>>> monitor
>>> >> network in the server, DHCP ,TFTP work done, gPXE start work. In
>>> network
>>> >> moniter , it show repeat arp request and reply. In gpxe , i found
>>> netdevice
>>> >> can transmit packet, but can't not receive packet.gPXE is not support
>>> >> RTL8111B?
>>> >>
>>> >> _______________________________________________
>>> >> gPXE-devel mailing list
>>> >> gPXE-devel at etherboot.org
>>> >> http://etherboot.org/mailman/listinfo/gpxe-devel
>>> >>
>>> >>
>>> >
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://etherboot.org/pipermail/gpxe-devel/attachments/20100812/6abf3577/attachment-0001.html
More information about the gPXE-devel
mailing list