SPRUIG3C January 2018 – August 2019 TDA4VM , TDA4VM-Q1
The init()
function generated as
part of native kernel compilation for EVE computes kernel-invariant expressions
(called pexprs in the Kernel-C language spec) and stores the computed values
in a block of memory called the parameter block, or pblock. As the kernel
executes, it references parameter values as memory-mapped 16-bit parameter registers
(pregs) that are mapped to the location of the pblock. The parameter
block is declared as an array of unsigned short
, corresponding to
the data type of the pregs. It may be allocated by the application code and passed
to both the init()
function and the custom()
kernel function. Alternately, there is a statically allocated default variable
called <kernel>_pblock[]
that can be used
when the application code does not need to control pblock allocation.
All parameterization of the
vloops()
function is done through the pblock. Arguments to the
kernel()
function are not passed to the
vloops()
function; instead they are captured by the
init()
function and accessed via the pblock.