initpsm(D2psm)
initpsm --
entry point for the PSM
Synopsis
ms_bool_t pfxinitpsm(void)
Description
initpsm is the initial entry point for a PSM.
All PSMs must export an initpsm entry point. For
SVR5 this means that they must contain a function named pfxinitpsm
and declare the following line in their
Master(DSP/4dsp)
file:
$entry initpsm
initpsm must perform the following tasks:
-
Perform sufficient hardware initialization and detection to be able to
determine operating parameters such as the number of CPUs
-
Register MSOP entry points that can be called at a later time by
the core kernel
-
Check, set, or both, operating parameters such as the number of CPUs
which are relevant to the machine specific hardware that it controls
The initpsm function returns MS_TRUE if the
PSM installs itself successfully and MS_FALSE if
it does not. A PSM installation may fail because the PSM
is wrong for the hardware, or because initpsm attempts to register
an MSOP or an MSPARAM parameter that the core kernel
does not support. See
os_set_msparam(D3psm)
for details of MSPARAM parameters.
If pfxinitpsm fails, the core kernel may attempt to
recover by installing another PSM. In this case, pfxinitpsm
must not have set any MSPARAM parameters and must have freed any
allocated resources. Wherever possible, it should also have had no visible
net side effects on external hardware states.
On successful return from pfxinitpsm, all subsequent
calls to MSOPs and other PSM entry points can assume
that memory written by pfxinitpsm is visible.
The life of the PSM is considered to extend from when pfxinitpsm
returns successfully until the invocation of
MSOP_SHUTDOWN(D2psm).
Specific initialization of various subsystems is handled on a per-CPU
basis by
MSOP_INIT_CPU(D2psm).
Return values
initpsm
returns:
MS_FALSE-
PSM probe failed
MS_TRUE-
PSM probe succeeded: the PSM is in use
References
os_set_msparam(D3psm),
MSOP_SHUTDOWN(D2psm),
MSOP_INIT_CPU(D2psm)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - 19 June 2005