142
Advanced Information
Controlling the RSP from the CPU
The operating system running on the CPU includes facilities to control the
RSP. The major function calls and some RSP details are explained in this
section.
Starting RSP Tasks
The man page for
osSpTaskStart()
explains the CPU-side details of
managing the RSP. The include file
sptask.h
contains additional
information in the comments.
The algorithm to start a task is as follows:
•
Halt the RSP (if it is not halted already).
•
DMA the
OSTask
structure into the low part of DMEM
(0x1000 - sizeof(OSTask))
.
•
DMA the RSP boot microcode into IMEM at 0x0.
•
Set the RSP PC to 0x0.
•
Clear the HALT bit of the RSP status register.
Once the HALT bit is cleared, the RSP begins execution using the current PC
and contents of IMEM.
RSP Boot Microcode
The boot microcode copies the task microcode into IMEM (at 0x80) and the
task data into DMEM (at 0x0). Since the task data might overwrite the
OSTask
structure, it is the task’s responsibility to either not need the
OSTask
or guarantee that it is not overwritten (by initializing less than 4K
bytes of DMEM).
Each microcode task typically has “initialization” work of its own; usually
this is performed immediately, possibly loading in additional microcode.
Summary of Contents for Ultra64
Page 2: ...2 ...
Page 10: ...10 ...
Page 12: ...12 Figure 6 2 buildtask Operation 137 ...
Page 14: ...14 ...
Page 80: ...80 Vector Unit Instructions vmadm dres_int dres_int vconst 3 vmadn dres_frac vconst vconst 0 ...
Page 104: ...104 RSP Coprocessor 0 ...
Page 150: ...150 Advanced Information ...
Page 155: ...Revision 1 0 155 ...
Page 248: ...248 Exceptions None ...
Page 251: ...Revision 1 0 251 Exceptions None ...
Page 254: ...254 Exceptions None ...
Page 257: ...Revision 1 0 257 Exceptions None ...
Page 293: ...Revision 1 0 293 Exceptions None ...
Page 316: ...316 Exceptions None ...