Re: [Etherboot-developers] currticks function
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: <ke...@us...> - 2002-07-01 10:19:16
|
>With the above implementation the bootp process works fine. However, I >have *many* problems with the tftp process. For example, the client >starts downloading the kernel image after at least 2-3 requests. For the >first requests (at least) the downloading fails due to timeouts. Many >times, the kernel downloading (even if it starts), stops before finish >succesfully (because the etherboot does not "read" a TFTP_DATA packet >from the tftpd). Moving arround with different values into the currticks >function, (especially with the value 182), I realized that the behaviour >of the system *changes*. I didn't find any documentation on currticks() >function and I don't know which has to be the value that it returns each >time is called, the period, the resolution etc. Just from a comment that >I found on cs89x0.c driver, I thought that it has a period of 55ms. Is >this true ? Is the tftp process so sensitive in time functions such as >currticks ? Thanks a lot. currticks started with the standard PC BIOS implementation. Later Eric Biederman wrote a BIOSless implementation, which is the one you are trying to mimic. currticks returns a counter that's incremented 18.2 times per second. The exact value is not very sensitive, it's only used for rough timing. However it must increase monotonically, i.e. not go backwards, or the timeout logic will get very confused. You should check that this property holds for your implementation. BTW, are you sure your arithmetic is being done in sufficient precision? You don't show the declaration of value, it should be a uint64_t. Maybe you don't even need all the bits in the low half of the timer and can do your arithmetic with 32 bit variables. Also consider the possibility you have tftp server problems. When you have this alternate implementation working, please submit it for inclusion (#ifdefed of course). Thanks. |