data_types(D4psm)
data_types --
data types used in PSM interfaces
Synopsis
#include <sys/psm.h>
Description
The data types used in the PSM interfaces are all defined in a
single header file, in order to keep the interfaces operating-system neutral.
They are available (unless specified otherwise) by including the header
file psm.h.
Apart from header files private to the PSM and toolkit header files,
no other header files should be included in any PSM code. Only
data types, variables and functions explicitly identified in this guide should
be referenced.
The data types used in the PSM interface are:
ms_param_t-
Enumerates MSPARAM parameters. See
os_set_msparam(D3psm)
for details.
msop_t-
Enumerates MSOPs. See
os_register_msops(D3psm)
for details.
msop_func_t-
Registers an MSOP's entry points. See
os_register_msops(D3psm)
for details.
msop_bool_t-
Represents a logical true/false value. If it has the value zero, it
is considered false. Otherwise it is considered true.
For convenience, psm.h defines MS_TRUE as 1 and
MS_FALSE as 0.
ms_lockp_t-
This opaque data type holds a pointer to a simple mutex lock, as allocated
by and used with the locking primitive provided by the operating system.
ms_lockstate_t-
This opaque data type holds the state saved by the operating system as a
result of the acquisition of a simple mutex lock. It is used to restore
the state when the lock is released.
ms_cpu_t-
This signed integral data type holds a logical CPU number or
a count of the number of CPUs. It is at least 16 bits wide.
CPU numbers are assigned by the PSM, which has the
information required to map them to physical CPUs. The primary
boot CPU must be given CPU number zero.
In some contexts, special values are legal for ms_cpu_t:
MS_CPU_ANY (-1)-
Applies to any CPU (only one at any given time)
MS_CPU_ALL_BUT_ME (-2)-
Applies to all CPUs except the invoking CPU
ms_cgnum_t-
This signed integral data type, at least 16 bits wide, holds a
logical CPU group number or a count of the number of CPU
groups.
CPU group numbers are assigned by the PSM, which maps them
to physical CPU groups. CPU group numbers must be numbered
consecutively from zero to one less than the number of CPU groups
configured. The CPU group containing the primary boot CPU
(CPU 0) must be given CPU group number 0.
ms_cgid_t-
This signed integral data type, at least 64 bits wide, holds a persistent
CPU group identifier. The PSM may use any postive
numbers it chooses, as long as each CPU group in the system
has a different number. The PSM should report, as best it can,
the same CPU
group identifier for any given physical CPU group each time the
system boots.
ms_event_t-
This unsigned integral data type holds a bitmask of event types.
It is at least 8 bits wide.
Events are asynchronous indications of special conditions that can be triggered
by hardware events or sent between processors by software request. See
os_post_events(D3psm)
and
MSOP_XPOST(D2psm)
for more details.
The event types are defined as follows:
MS_EVENT_TICK_1 (0x01)-
A clock 1 tick has occured.
MS_EVENT_TICK_2 (0x02)-
A clock 2 tick has occured.
MS_EVENT_OS_1 (0x04)-
An operating system specific event type 1 has occured.
MS_EVENT_OS_2 (0x08)-
An operating system specific event type 2 has occured.
MS_EVENT_OS_3 (0x10)-
An operating system specific event type 3 has occured.
MS_EVENT_OS_4 (0x20)-
An operating system specific event type 4 has occured.
MS_EVENT_PSM_1 (0x40)-
A PSM specific event type 1 has occured.
MS_EVENT_PSM_2 (0x80)-
A PSM specific event type 2 has occured.
ms_islot_t-
This unsigned integral data type holds an interrupt slot number.
It is at least 32 bits wide. This number uniquely identifies an interrupt
request that is coming in to the interrupt controllers as far as the non-device
specific hardware is able to determine. Slot numbers are assigned by
the PSM, which has the
information required to map them to inputs on the interrupt controllers that
it manages. The core kernel treats these numbers as opaque, except that it
is allowed to use them as array indices. For this reason, none may
exceed MSPARAM_ISLOT_MAX, and they
should be sequential or in a narrow range.
ms_ivec_t-
This unsigned integral data type holds a CPU interrupt
vector number or the size of a range of CPU interrupt
vector numbers. It is at least 16 bits wide.
ms_intr_dist_t-
This data type is a structure that describes the properties of an
attached interrupt. See
MSOP_INTR_ATTACH(D2psm)
for details.
ms_rawtime_t-
This data type is a structure that holds a raw time value from a
free-running clock counter
in units which are internal to the PSM. The structure
contains at least the following fields:
msrt_lo
msrt_hi
These are both 32-bit unsigned integral data types, which the
PSM may use as it wishes. For callers to interpret it,
an ms_rawtime_t structure must first be converted to an
ms_time_t structure using
MSOP_TIME_CVT(D2psm).
ms_time_t-
This data type is a structure that holds a nanosecond-resolution
time value.
The structure contains the following fields:
msrt_sec
-
the number of seconds
msrt_nsec
-
the remainder number in nanoseconds
These are both 32-bit unsigned integral data types. msrt_nsec
must be in the range 0-999999999.
ms_daytime_t-
This data type is a structure that holds an absolute date and time
value of the type that might be held in a non-volatile clock/calendar
circuit. See
MSOP_RTODC(D2psm)
for full details.
ms_xdate_t-
This data type is a structure that holds an absolute date and time
value in an alternative format to ms_daytime_t. See
MSOP_RTODC(D2psm)
for full details.
ms_size_t-
This unsigned integral data type holds the size in bytes of a block
of software-addressable allocated memory.
It is at least 32 bits wide.
ms_memsize_t-
This unsigned integral data type holds the size in bytes of a block
of physical memory.
It is at least 64 bits wide.
ms_paddr_t-
This unsigned integral data type, at least 64 bits wide, is used to
hold a physical address. This address must be useable from all CPUs.
ms_port_t-
This unsigned integral data type holds an I/O space
address for processor architectures such as IA-32 that have separate
I/O register name space.
ms_topology_t-
This data type is a structure that describes the layout of the platform
hardware, including CPUs, memory and I/O bus bridges.
See
os_set_msparam(D3psm)
for details.
ms_resource_t-
This data type is a structure which is used in describing the layout
and properties of the platform hardware, including CPUs, memory and I/O bus bridges.
See
os_set_msparam(D3psm)
for details.
msr_type_t-
This data type enumerates the types of resources in a resource topology
structure (ms_topology_t or ms_resource_t).
See
os_set_msparam(D3psm)
for details.
msr_cpu_t-
This data type is a structure that describes the properties of CPUs
in the platform hardware topology. See
os_set_msparam(D3psm)
for details.
msr_cache_t-
This data type is a structure that describes the properties of memory
caches in the platform hardware topology. See
os_set_msparam(D3psm)
for details.
msr_memory_t-
This data type is a structure that describes the properties of
mainstore memory in the platform hardware topology. See
os_set_msparam(D3psm)
for details.
msr_bus_t-
This data type is a structure that describes the properties of
I/O bus bridges in the platform hardware topology. See
os_set_msparam(D3psm)
for details.
msr_bus_type_t-
This data type enumerates the
I/O bus type for a particular I/O bus bridge. See
os_set_msparam(D3psm)
for details.
msr_routing_t-
This data type is a structure that describes the interrupt routing
map for a particular I/O bus bridge. See
os_set_msparam(D3psm)
for details.
References
MSOP_INTR_ATTACH(D2psm),
MSOP_RTODC(D2psm),
MSOP_TIME_CVT(D2psm),
MSOP_XPOST(D2psm),
os_post_events(D3psm),
os_set_msparam(D3psm),
os_register_msops(D3psm)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - 19 June 2005