where the file is owned by root and there is an
s instead of an x in the first set of
permissions.
As soon as spec starts out, the effective
user-id of the spec process is changed to that
of the real user. The effective user-id is only changed back to
root for the duration of the iopl() system
call and at one other time. During the rest of the time,
spec users will not have root privileges.
The other time the root access is used by
spec is to open /dev/mem for memory
mapped devices such as the Oregon Micro System PC-58 motor
controller and the Bit3 Model 403 VME controller. Just as with
iopl(), root access is only turned on for the
duration of the open() system call for
"/dev/mem".
The spec installation program will create
the installed spec executables with the correct
owner and modes if the Install script is run by the
root user.
Configuring I/O Port Access On HP
The HP 700 platforms with E/ISA slots can be used with most
PC cards that spec supports. However, the
platform administrator will have to do some work to make the
cards available. On HP-UX 10.x platforms, the eisa and
iomap kernel drivers may need to be configured into the
kernel. The configuration and creation of a new kernel can be
easily done with HP's system administration tool SAM. On
HP-UX 9.x platforms, those drivers seem to be included in the
default kernel configuration. In addition, for each E/ISA card
to be used, the eisa_config utility needs to be run to add
information from hardware description files to the E/ISA non-
volatile memory. For the purposes of spec, the
configuration files need only contain which I/O port addresses
and/or which memory addresses are to be used. A sample
configuration file and information concerning which ports are
used by which boards is included in the file
aux/README.hp in the spec
distribution.
To access the I/O ports and/or memory on the PC cards,
spec must open special devices associated with
the iomap driver. The spec distribution
includes a utility called hp_ports that gets installed in
the spec auxiliary file directory and gets run
automatically by the spec process to create any
of these needed special devices. spec will
create a directory called /dev/ioports/ and will place the
special files in that directory.
HP-UX uses a somewhat peculiar method for mapping the 64
Kbyte I/O port space on the E/ISA bus to HP memory. Each 4K page
of HP memory maps 512 I/O ports. However, the mapped I/O ports
do not occupy consecutive addresses. The addresses are scrambled
as follows:
|