[okl4-developer] Bugs: Device register files, 64bit IDL
Lukas HANEL
lukas.hanel at st.com
Wed May 21 22:41:37 EST 2008
Hi all,
When I was testing the vtimer server with my iguana timer driver, I
noted several problems, which I consider as bugs of the system not of my
adaptions. Can you just confirm?
*.dx files: When setting a register to read only: type="r", the
generated header file will not have any functions for this register.
* IDL compiler does not handle 64 bit (return) values:
The vtimer client library has two interfaces that return uint64_t time
values.
However, the resulting header takes the return value only from one
32bit-register and casts it to 64bit. Hence, the clock, as perceived by
the vtimer client is overflowing very often. Around every 4s, as the
time is represented in nanoseconds (2^32/10^9).
* drivers example, line 323: Do not display time in hex, and do not
confuse the user neither!
- printf("time is 0x%08lld\t", current);
+ printf("time is %08lld\t", current);
----
* Source file : libs/vtimer/include/interfaces/vtimer.idl4
* Output file :
build/iguana/object/libs_vtimer/include/interfaces/vtimer_client.h
...
/* Unmarshal */
__return = (uint64_t)magpie_unmarshal_int32(&mr[4]);
...
---
Output from drivers example:
...
timer_get_ticks_impl: 9651300
timer_get_ticks_impl: 9657452
main: Got message from 0 (msg: 1)
timer_get_ticks_impl: 9671208
time is 0x4029670000 diff = 500001250
rtc = 4029670000
timer_get_ticks_impl: 10851299
timer_get_ticks_impl: 10857659
main: Got message from 0 (msg: 1)
timer_get_ticks_impl: 10871628
time is 0x234877704 diff = -3794792296
rtc = 234877704
timer_get_ticks_impl: 12051503
timer_get_ticks_impl: 12057867
main: Got message from 0 (msg: 1)
timer_get_ticks_impl: 12071834
time is 0x734963537 diff = 500085833
rtc = 734963537
...
thanks for your previous responses,
Lukas
More information about the Developer
mailing list