Hal classes, File descriptions – Comtrol eCos User Manual
Page 308

Chapter 11. Porting Guide
HAL Classes
The eCos HAL consists of four HAL sub-classes. This table gives a brief description of each class and partly
reiterates the description in
. The links refer to the on-line CVS tree (specifically to the sub-HALs used
by the PowerPC MBX target).
HAL type
Description
Functionality Overview
Common HAL (hal/common)
(http://sourceware.cygnus.com/cgi-
bin/cvsweb.cgi/ecos/packages/hal/common/current?cvsroot=ecos)
Configuration options and
functionality shared by all HALs.
Generic debugging functionality,
driver API, eCos/ROM monitor
calling interface, and tests.
Architecture HAL
(hal/<architecture>/arch)
(http://sourceware.cygnus.com/cgi-
bin/cvsweb.cgi/ecos/packages/hal/powerpc/arch/current?cvsroot=ecos)
Functionality specific to the given
architecture. Also default
implementations of some
functionality which can be
overridden by variant or platform
HALs.
Architecture specific debugger
functionality (handles single
stepping, exception-to-signal
conversion, etc.), exception/interrupt
vector definitions and handlers,
cache definition and control macros,
context switching code, assembler
functions for early system
initialization, configuration options,
and possibly tests.
Variant HAL
(hal/<architecture>/<variant>)
(http://sourceware.cygnus.com/cgi-
bin/cvsweb.cgi/ecos/packages/hal/powerpc/mpc8xx/current?cvsroot=ecos)
Some CPU architectures consist of a
number variants, for example MIPS
CPUs come in both 32 and 64 bit
versions, and some variants have
embedded features additional to the
CPU core.
Variant extensions to the architecture
code (cache, exception/interrupt),
configuration options, possibly
drivers for variant on-core devices,
and possibly tests.
Platform HAL
(hal/<architecture>/<platform>)
(http://sourceware.cygnus.com/cgi-
bin/cvsweb.cgi/ecos/packages/hal/powerpc/mbx/current?cvsroot=ecos)
Contains functionality and
configuration options specific to the
platform.
Early platform initialization code,
platform memory layout
specification, configuration options
(processor speed, compiler options),
diagnostic IO functions, debugger IO
functions, platform specific
extensions to architecture or variant
code (off-core interrupt controller),
and possibly tests.
Auxiliary HAL
(hal/<architecture>/<module>)
(http://sourceware.cygnus.com/cgi-
bin/cvsweb.cgi/ecos/packages/hal/powerpc/quicc/current?cvsroot=ecos)
Some variants share common
modules on the core. Motorola’s
PowerPC QUICC is an example of
such a module.
Module specific functionality
(interrupt controller, simple device
drivers), possibly tests.
File Descriptions
Listed below are the files found in various HALs, with a short description of what each file contains. When looking
in existing HALs beware that they do not necessarily follow this naming scheme. If you are writing a new HAL,
204