[Etherboot-developers] problems inside the await_reply
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: Yannis M. <gm...@te...> - 2003-02-24 16:31:06
|
Hi all, It seems that the porting is moving smoothly, I have managed to configure the processor and fire-up a second serial port to act as console. Thus, I managed to configure the cs8900A device without a configuration ROM. The problem I faced is the following: After sending the bootp request, I get a reply and I enter in the await_reply function with the corresponding parameters. There, in line 1068 of main.c (Etherboot version 5.0.8) you set the pointer "bootpreply" to point in the nic.packet at the position : ETH_HLEN + sizeof(struct iphdr) + sizeof(struct udphdr). The value (sizeof(struct iphdr) + sizeof(struct udphdr)) is word aligned but the ETH_HLEN which is set to 14 makes the aforementioned position NON word aligned. So the value (bootpreply->bp_xid) returns wrong values. If you wish I can send you details with addresses e.t.c. To overcome the problem I allocate in the stack a structure of type bootp_t instead of a pointer to a structure and I copy the data from the nic.packet to the bootpreply structure. Now, since the bootpreply structure is allocated in the stack is word alligned and I do not have a problem. Any comments on this ? Regards Yannis P.S: If I understand correctly the current_tick increments by one value every 55.555 ms ? -- Research Associate National Technical University of Athens Electrical & Computers Engineering Department Computer Science Division, Telecommunications Laboratory Heroon Polytechneiou 9, Zographou Campus, 157 73, Athens, Greece E-mail:gm...@te... Tel.: (+30)-210- 772 3939 Fax: (+30)-210- 772 2534 |