Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
84
Issues
84
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
0f64a06f
Commit
0f64a06f
authored
Nov 21, 2014
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc: added an overview of the hal
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
4bebb908
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
wrs-developer-manual.in
doc/wrs-developer-manual.in
+29
-0
No files found.
doc/wrs-developer-manual.in
View file @
0f64a06f
...
...
@@ -1819,6 +1819,35 @@ for details about how they are used:
@end table
@c ##########################################################################
@node The HAL Process
@chapter The HAL Process
In the initial days of White Rabbit Switch, developers tried to have
everything managed by a single ``Hardware Abstraction Layer'' process,
the HAL. The process still exists but its role is smaller than it
used to, so some of the code is likely unused. After release 4.1
we started a serious audit of the @sc{hal}.
The implementation is currently split between @i{userspace/wrsw_hal}
and @i{userspace/libwr}. Some of the @i{libwr} functions are
used by other processes, but some are just librarized parts of
the @sc{hal} process (again, we are not very clean and tidy).
If you run @t{ps} in the switch, you'
ll
see
there
are
two
@
sc
{
hal
}
process
,
one
being
a
child
of
the
other
.
The
child
is
forked
by
the
@
i
{
mini
-
rpc
}
library
,
to
poll
shared
memory
(
the
communication
channel
with
the
@
i
{
rt
}
subsystem
).
@
i
{
mini
-
rpc
}
has
one
file
descriptor
per
channel
,
so
users
can
run
@
i
{
select
()}
or
@
i
{
poll
()},
thus
this
trick
to
be
able
to
turn
a
shared
-
memory
channel
into
a
file
descriptor
.
This
is
documented
in
@
i
{
mini
-
rpc
}
documentation
.
The
polling
time
is
currently
25
ms
.
The
@
sc
{
hal
}
process
is
in
charge
of
replying
to
IPC
requests
(@
i
{
hal_exports
.
c
}),
driving
the
fan
speed
according
to
temperature
(@
i
{
libwr
/
fan
.
c
})
and
monitoring
ports
(
this
is
spread
in
several
files
related
to
@
i
{
i2c
}
communication
).
@
c
##########################################################################
@
node
Reboot
/
Reset
Diagnostics
@
chapter
Reboot
/
Reset
Diagnostics
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment