7.11 Internal OS Functions

Some of the internal OS functions are briefly described below. Broken into three groups, these functions are mentioned here with the purpose to reduce potential duplicate efforts from developers. Most of these functions are simple routines to access various R4300 registers, Translation Lookaside Buffer (TLB) information, and internal active thread queue. Please refer to the reference pages for specifics about the arguments, return values, and behavior of these functions.

Group 1 provides functions to access various common R4300 registers:

_osGetCause, _osSetCause
These functions return and specify the content of the R4300 Cause register, respectively.
_osGetCompare, _osSetCompare
These functions return and specify the content of the R4300 Compare register, respectively.
_osGetConfig, _osSetConfig
These functions return and specify the content of the R4300 Configuration register, respectively.
_osGetSR, _osSetSR
These functions return and specify the content of the R4300 Status register, respectively.
_osGetFpcCsr, _osSetFpcCsr
These functions return and specify the content of the R4300 floating-point Control/Status register, respectively.

Group 2 provides functions to access TLB information:

_osGetTLBASID
This function returns the TLB Application Space ID in the R4300 EntryHi register.
_osGetTLBPageMask
For a specified TLB entry, this function returns the content of the R4300 PageMask register.
_osGetTLBHi
For a specified TLB entry, this function returns the content of the R4300 EntryHi register.
_osGetTLBLo0
For a specified TLB entry, this function returns the content of the R4300 EntryLo0 register.
_osGetTLBLo1
For a specified TLB entry, this function returns the content of the R4300 EntryLo1 register.

Group 3 provides functions to access the internal active thread queue to find faulted thread(s):

_osGetCurrFaultedThread
This function returns the most recent faulted thread.
_osGetNextFaultedThread
This function returns the next faulted thread from the internal active thread queue.

UP