
User’s Manual U14833EJ2V0UM
96
CHAPTER 9 SYSTEM CONFIGURATION MANAGEMENT
This chapter describes system configuration management in the RX4000.
9.1
Overview
System configuration management includes the following functions.
Defining and activating a CPU exception handler to be called when the CPU detects an exception
Defining and activating an initialization routine to be called at system initialization
Defining and activating an idle routine for when there are no tasks in the running or ready states (refer to
CHAPTER 1
for details of idle routines)
9.2
Exception Processing
If the CPU detects an exception such as 0 remainder, the kernel activates a corresponding exception handler. The
exception processing and CPU exception handlers provided in the RX4000 are described below. Note that as with
interrupt processing, a source file is also provided as a sample, allowing users to describe exception processing that
best suits their system.
9.2.1
Exception processing flow
The assumed exception processing flow of the RX4000 is shown below. This flow is also shown in diagram form in
Figure 9-1.
(1)
An exception occurs and control shifts to a CPU interrupt/exception vector.
(2)
At the interrupt/exception vector, in the sample, processing only branches to the exception processing main
body.
(3)
Because control shifts to a single vector for all exceptions/interrupts in the V
R
4100 Series or V
R
5000 Series,
the exception source is determined by the initial section of the interrupt/exception processing, which then
divides.
(4)
If the exception that occurred is a service call exception, control shifts to the initial processing section of the
service call. Also, if a device such as a monitor for debugging is being used, be aware that control may have
to be passed to the debug side, depending on the type of exception.
(5)
All registers used are saved to the stack in the initial section of the exception processing.
(6)
After these registers have been saved, the kernel’s internal function “_kernel_exc_handle” is called, which
notifies the kernel of the activation of exception processing. Note that in order to call the above function, the
values of the epc, cause, and status registers and the top address of the register save area must be assigned
as parameters when an exception occurs.