
October 13 1995, Draft 1
350
Addendum to –– Evaluating and Programming the 29K RISC Family
1
The UART serial driver enters Freeze mode and execution continues at the
address given in the vector table for the interrupt handler. (Note, it is the
operating system cold–start code’s responsibility to install the trap handler for
this interrupt, even if a MiniMON29K SER module driver is used).
2
Next the SER driver saves some global registers to memory.
3
The driver
talks
to the UART, receives the character and places the new data into
the
msg_rbuf
buffer at the location given by the pointer
msg_next_p
. The
registers are restored and the pointer incremented.
The SER driver then jumps (virtual vectors) to address
msg_V_arrive
in the
MSG module. This whole procedure appears to the message system as if the
interrupt had been directed to
msg_V_arrive
when a character arrived in its
buffer.
4
5
The MSG saves its own working register space and examines the size of the
incoming message and decides if it is complete or if more data is required. If
incomplete the registers are repaired and an IRET is issued. When complete,
working registers are repaired and the PC–buffer registers are updated with
address of the operating system handler or DebugCore handler accessed from
the vector table.
Using the sequence described above, messages arrive via a V_DBG_MSG or
V_OS_MSG
virtual interrupt
directly to the appropriate message processing han-
dler. The operating system and the DebugCore need never be concerned about any
registers used by the MSG or SER modules in the process of preparing the received
message, as their temporary register usage is kept hidden.
When interrupts are being used, rather than polling for a new message to arrive,
the
msg_wait_for()
function simply returns 0 indicating that no message is avail-
able. If the SER module is making use of polling and interrupts are turned off, then
the
msg_wait_for()
function returns –1 when a complete new message is available in
the
msg_rbuf.
In fact the MSG sets variable
msg_rbuf_p
to point to the just–re-
ceived message buffer. The DebugCore interrupt handler dereferences this pointer
when accessing any received messages.
7.4
THE OS–BOOT OPERATING SYSTEM
MiniMON29K is a debugger. It does not initialize the processor, service inter-
rupts, support HIF system calls or even install itself into the target system. All these
tasks must be performed by an operating system. It does seem a rather grand title but
OS–boot does perform these tasks. If a user does not build an operating system or buy
an operating system from a third party then OS–boot may be adequate for their proj-
ect needs.