SYSMOT(2) SYSMOT(2)
NAME
sysmot - machine-specific functions
SYNOPSIS
#include <sys/syslocal.h>
init sysmot (cmd, arg1, arg2, arg3);
init cmd;
init arg1;
init arg2;
init arg3;
DESCRIPTION
sysmot implements machine specific functions. The cmd
argument determines the function performed. The number of
arguments expected is dependent on the function.
Command RDUBLK
Reads the u.structure for the specified process. Arg1 is
the pid of the desired process. Arg2 is the address in the
calling process's address space to which to copy u.. Arg3
is the length of the buffer in userspace. This function is
the used by ps(2) to retrieve the u. for each process
running on the system.
Command S68STACK
> > > This system call is obsolete and is included only for
compatibility with previous releases.
When cmd is the available stack space is increased by the
number of bytes (rounded to the nearest page boundary). If
this system call succeeds, the new value of the stack
pointer is returned.
Command SMOTCONT
When cmd is S68CONT, the kernel will continue with the
instruction that was interrupted by a bus error signal to
the calling routine.
Command S68FPEX
When cmd is S68FPEX, the floating point operand that caused
Page 1 May 1989
SYSMOT(2) SYSMOT(2)
the floating point exception is returned to the user at the
address specified by arg1. This command should be executed
only after a floating point exception has been indicated to
the caller, otherwise an undetermined operand will be
returned to the user.
Command SMOTSTIME
When cmd is SMOTSTIME, the argument is used as the new value
for the system time and date. The argument contains the
time as measured in seconds from 00:00:00 GMT January 1,
1970. Note that this command is only available to the
superuser. This command is redundant in that stime(2) may
also be used to set the system time but this command is
included for compatibility with previous releases.
Command SMOTSETNAME
When cmd is SMOTSETNAME, the argument is expected to be a
pointer to a character string. The system name and node
name are set to the character string specified by the
argument. Note that this command is available to the
superuser only.
Command SMOTRTDOC
When cmd is SMOTRTDOC, the value of the real time clock
(rtc) is returned to the address specified by the argument.
If there is no real time clock on the system, the current
time is returned. Note that this command is available to
the superuser only.
Command S68ICACHEON When cmd is S68ICACHEON, the internal
cache of the MC68020 chip is enabled. Note this command is
available to the superuser only.
Command S68ICACHEOFF When cmd is S68ICACHEOFF, the internal
cache of the MC68020 chip is disabled. Note this command is
available to the superuser only.
Command SMOTDELMEM
When cmd is SMOTDELMEM, the argument is used as the number
of pages to delete from the free list. Note that this
Page 2 May 1989
SYSMOT(2) SYSMOT(2)
command is available to the superuser only. This command is
intended to allow stress tests to verify system behavior
with low free memory.
Command SMOTADDMEM
When cmd is SMOTADDMEM, the argument is used as the number
of pages to add to the free list. Note that this command is
available to the superuser only. If more pages are added
with this command than were deleted with SMOTDELMEM, only
the amount previously deleted will be added back.
Command SMOTMEMSIZE
When cmd is SMOTMEMSIZE, no arguments are expected. The
size of the virtual memory space and the amount of physical
memory (in bytes) are returned.
Command SMOTSWAP
When cmd is SMOTSWAP, individual swapping areas may be added
or deleted, or the current areas determined. The address of
an appropriately primed swap buffer is passed as the only
argument. (Refer to sys/swap.h header for details of
loading the buffer.}
The format of the swap buffer is:
struct swapint {
char si_cmd; /*commands: list, add, delete*/
char *si_buf; /*swap file path pointer*/
int sw_swplo; /*start block*/
int si_nblks; /*swap size*/
}
Note that the add and delete options of the command may only
be exercised by the superuser.
Typically, a swap area is added by a single call to sysmot.
First, the swap buffer is primed with appropriate entries
for the structure members. Then sysmot is invoked.
#include <sys/sysmot.h> #include <sys/swap.hZ
struct swapint swapbuf;
sysmot (SMOTSWAP, & swapbuf);
Page 3 May 1989
SYSMOT(2) SYSMOT(2)
Command S68FPHW
When cmd is S68FPHW, a flag is set at the address specified
by the argument that indicates whether or not the floating
point hardware chip is present on the system. A flag of
NOFPHW will be stored if there isn't a floating point chip.
A flag of MC68881 will be stored if there is.
Command S68BCACHEON
When cmd is S68BCACHEON, argument is used as the value to be
written to the cache mask register on the MVME131 and the
cache is then enabled. Note this command is available to
the superuser only.
Command S68BCACHEOFF
When cmd is S68BCACHEOFF, the cache mask register on the
MVME131 and the cache is disabled. Note this command is
available to the superuser only.
SEE ALSO
swap(1M) in the System Administrator's Reference Manual.
Page 4 May 1989