Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hw core: generic timer driver interface #2347

Closed
m-stein opened this issue Mar 23, 2017 · 7 comments
Closed

hw core: generic timer driver interface #2347

m-stein opened this issue Mar 23, 2017 · 7 comments
Assignees

Comments

@m-stein
Copy link
Contributor

m-stein commented Mar 23, 2017

No description provided.

@m-stein m-stein self-assigned this Mar 23, 2017
m-stein pushed a commit to m-stein/genode that referenced this issue Mar 23, 2017
If we do the tics-to-us translation with one division and multiplication
over the whole argument, like before, we loose microseconds granularity
although the timer frequency allows for such granularity. Thus, we treat
the most significant half and the least significant half of the tics
value separate. Each half is shifted to the best bit position for the
translation, then translated, and then shifted back.

Ref genodelabs#2347
m-stein pushed a commit to m-stein/genode that referenced this issue Mar 23, 2017
Previously, the timer class was declared for each platform separately
and maintainers would have to take care that the class fullfills the
generic interface requirements. Now the interface is documented through
a generic timer class that has a platform specific timer member.

Fixes genodelabs#2347
@m-stein
Copy link
Contributor Author

m-stein commented Mar 23, 2017

@skalk Could you please have a look at these commits. I had some spare time these days and this is what happened ^^ I don't know if they clash with your current base-hw development. If they do, we can also delay them.
0a0301b hw core: generic timer driver interface
f626ea4 hw cortex-a9 timer: raise translation precision

@skalk
Copy link
Member

skalk commented Mar 27, 2017

@m-stein: indeed it would be really nice if we delay the re-structuring commit. The Cortex A9 timer fix of course can be applied immediately of course

chelmuth pushed a commit that referenced this issue Mar 28, 2017
If we do the tics-to-us translation with one division and multiplication
over the whole argument, like before, we loose microseconds granularity
although the timer frequency allows for such granularity. Thus, we treat
the most significant half and the least significant half of the tics
value separate. Each half is shifted to the best bit position for the
translation, then translated, and then shifted back.

Ref #2347
@chelmuth
Copy link
Member

Merged 481660e just now.

@chelmuth chelmuth added fixed and removed fixed labels Mar 28, 2017
m-stein pushed a commit to m-stein/genode that referenced this issue Mar 30, 2017
@m-stein
Copy link
Contributor Author

m-stein commented Mar 30, 2017

Solved a bug in the new kernel timer driver:
8385f1d fixup "hw cortex-a9 timer: raise translation precision"

chelmuth pushed a commit that referenced this issue Apr 11, 2017
If we do the tics-to-us translation with one division and multiplication
over the whole argument, like before, we loose microseconds granularity
although the timer frequency allows for such granularity. Thus, we treat
the most significant half and the least significant half of the tics
value separate. Each half is shifted to the best bit position for the
translation, then translated, and then shifted back.

Ref #2347
m-stein pushed a commit to m-stein/genode that referenced this issue May 13, 2017
With this, we get rid of platform specific timer interfaces. The new
Timer class does the same as the old Clock class and has a generic
interface. The old Timer class was merely used by the old Clock class.
Also, we get rid of having only one timer instance which we tell with
each method call for which CPU it shall be done. Instead now each Cpu
object has its own Timer member that knows the CPU it works for.

Fixes genodelabs#2347
@m-stein
Copy link
Contributor Author

m-stein commented May 13, 2017

This commit
29ab328 hw core: merge Kernel::Clock and Kernel::Timer
is the rebased version of the original fix and adds further simplification and a good diff-stat-karma.

chelmuth pushed a commit that referenced this issue May 13, 2017
With this, we get rid of platform specific timer interfaces. The new
Timer class does the same as the old Clock class and has a generic
interface. The old Timer class was merely used by the old Clock class.
Also, we get rid of having only one timer instance which we tell with
each method call for which CPU it shall be done. Instead now each Cpu
object has its own Timer member that knows the CPU it works for.

Fixes #2347
m-stein pushed a commit to m-stein/genode that referenced this issue May 13, 2017
@m-stein
Copy link
Contributor Author

m-stein commented May 13, 2017

@chelmuth A little clean-up:
ea1710c base-hw: Rename 'tics' 'ticks'

chelmuth pushed a commit that referenced this issue May 13, 2017
m-stein pushed a commit to m-stein/genode that referenced this issue May 14, 2017
@m-stein
Copy link
Contributor Author

m-stein commented May 14, 2017

@chelmuth There's a fixup for muen
ad1cd93 Fixup "hw core: merge Kernel::Clock and Kernel::Timer"

chelmuth pushed a commit that referenced this issue May 23, 2017
With this, we get rid of platform specific timer interfaces. The new
Timer class does the same as the old Clock class and has a generic
interface. The old Timer class was merely used by the old Clock class.
Also, we get rid of having only one timer instance which we tell with
each method call for which CPU it shall be done. Instead now each Cpu
object has its own Timer member that knows the CPU it works for.

Also, rename all "tics" to "ticks".

Fixes #2347
chelmuth pushed a commit that referenced this issue May 31, 2017
With this, we get rid of platform specific timer interfaces. The new
Timer class does the same as the old Clock class and has a generic
interface. The old Timer class was merely used by the old Clock class.
Also, we get rid of having only one timer instance which we tell with
each method call for which CPU it shall be done. Instead now each Cpu
object has its own Timer member that knows the CPU it works for.

Also, rename all "tics" to "ticks".

Fixes #2347
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants