2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com>

* bsp_howto/clock.t, bsp_howto/init.t: Eliminate copies of the
	Configuration Table. Use the RTEMS provided accessor macros to obtain
	configuration fields.
This commit is contained in:
Joel Sherrill
2007-12-11 15:51:35 +00:00
parent 4e9893b19a
commit c52d534512
3 changed files with 26 additions and 30 deletions

View File

@@ -1,3 +1,9 @@
2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com>
* bsp_howto/clock.t, bsp_howto/init.t: Eliminate copies of the
Configuration Table. Use the RTEMS provided accessor macros to obtain
configuration fields.
2007-12-04 Joel Sherrill <joel.sherrill@OARcorp.com>
* cpu_supplement/arm.t, cpu_supplement/i386.t, cpu_supplement/m68k.t,

View File

@@ -59,9 +59,9 @@ used as the source of the clock tick.
The device should be programmed such that an interrupt is generated
every @i{m} microseconds, where @i{m} is equal to
@code{BSP_Configuration.microseconds_per_tick}. Sometimes the periodic interval
timer can use a prescaler so you have to look carefully at your user's
manual to determine the correct value.
@code{rtems_configuration_get_microseconds_per_tick()}. Sometimes
the periodic interval timer can use a prescaler so you have to look
carefully at your user's manual to determine the correct value.
You must use the RTEMS primitive @code{rtems_interrupt_catch} to install
your clock interrupt service routine:

View File

@@ -51,19 +51,13 @@ contains initialization for a 68349 based board as well.
Although not strictly part of initialization, there are a few global
variables assumed to exist by many support components. These
global variables are usually declared in the file @code{startup/bspstart.c}
that provides most of the BSP specific initialization. The following is
a list of these global variables:
global variables are normally not defined by the BSP since the RTEMS
Project strives to avoid duplication as much as possible.
The following is a list of these global variables:
@itemize @bullet
@item @code{BSP_Configuration} is the BSP's writable copy of the RTEMS
Configuration Table.
@item @code{Cpu_table} is the RTEMS CPU Dependent Information Table.
@item @code{bsp_isr_level} is the interrupt level that is set at
system startup. It will be restored when the executive returns
control to the BSP.
@item @code{Configuration} is the RTEMS Configuration Table generated
by @code{<rtems/confdefs.h>}.
@end itemize
@@ -110,21 +104,13 @@ use the same shared version of @code{boot_card()} which is located in
the following file:
@example
c/src/lib/libbsp/shared/main.c
c/src/lib/libbsp/shared/bootcard.c
@end example
The @code{boot_card()} routine performs the following functions:
@itemize @bullet
@item initializes the shared fields of the CPU Configuration Table
(variable name @code{Cpu_table}) to a default state,
@item copies the application's RTEMS Configuration Table
(variable name @code{Configuration}) to the BSP's Configuration
Table (variable name @code{BSP_Configuration}) so it can be modified
as necessary without copying the original table,
@item invokes the BSP specific routine @code{bsp_start()},
@item invokes the RTEMS directive @code{rtems_initialize_executive_early()}
@@ -413,17 +399,21 @@ structures.
The RTEMS configuration table is application dependent, which means that
one has to provide one per application. It is usually defined
by defining macros and including the header file @code{<confdefs.h>}.
by defining macros and including the header file @code{<rtems/confdefs.h>}.
In simple applications such as the tests provided with RTEMS, it is
commonly found in the main module of the application. For more complex
applications, it may be in a file by itself.
The header file @code{<confdefs.h>} defines a constant table named
@code{Configuration}. It is common practice for the BSP to copy
this table into a modifiable copy named @code{BSP_Configuration}.
This copy of the table is modified to define the base address of the
RTEMS Executive Workspace as well as to reflect any BSP and
device driver requirements not automatically handled by the application.
The header file @code{<rtems/confdefs.h>} defines a constant table named
@code{Configuration}. With RTEMS 4.8 and older, it was
accepted practice for the BSP to copy this table into a modifiable
copy named @code{BSP_Configuration}. This copy of the table was modified
to define the base address of the RTEMS Executive Workspace as well as
to reflect any BSP and device driver requirements not automatically
handled by the application. In 4.9 and newer, we have eliminated
the BSP copies of the configuration tables and are making efforts
to make the configuration information generated by @code{<rtems/confdefs.h>}
constant and read only.
For more information on the RTEMS Configuration Table, refer to the
@b{RTEMS Application C User's Guide}.