![Solflower SFPCI -VME SERIES Скачать руководство пользователя страница 36](http://html.mh-extra.com/html/solflower/sfpci-vme-series/sfpci-vme-series_user-manual-and-installation-manual_1315249036.webp)
Software Installation
rev 2.0
SFPCI -VME SERIES User’s Guide and Installation Manual
36
5.6.5.2 VME Power Off Support: The Off-Line State
When it enters the “off-line” state, the PVME nexus tries to protect the system by
denying direct attempts to access VME addresses on that bus. The PVME nexus driver
tries to accomplish this by imposing 3 access control policies:
1. In the off-line state,
open
(2),
mmap
(2),
read
(2), or
write
(2) to /dev/pvme/
vmeXXdXX devices will fail with the error ENXIO.
2. In the off-line state, the PVME nexus driver sends a SIGKILL signal to every pro-
cess that has an open file descriptor to any portion of VME space exported by the
PVME driver.
To illustrate, a user process that performed a direct
open
(2) on the device file
/dev/
pvme/vme32d32
before the VMEbus went off-line would be killed to prevent
potentially disasterous attempts to access that VME space. The PVME nexus driver
manages this by saving references via
proc_ref
(9f) to every process that calls its
open
(2) and
close
(2) entry points. When an “off-line” transition occurs, each of these
references is sent a SIGKILL from PVME interrupt context via proc_signal(9f).
3. Also, when in the “off-line” state, attempts to use add_drv(1m) to load a VME
device driver will fail, and the message
WARNING: pvme0: Target VMEbus off-line
will be printed.
VME drivers that were already loaded at the time that power was shutdown can still be
safely unloaded, as long as their detach or fini routines do not attempt to access VME
memory. Generally, it is a good idea to unload VME device drivers controlling a
powered-down VMEbus to avoid erroneous attempts to access the VME devices.
If the user subsequently restores power to the VMEbus, attempts to load VME device
drivers with add_drv(1m) will cause the PVME to detect the power-on state. The PVME
driver will then load the VME driver, and print the following message on the console:
NOTICE: [pvme0 VMEbus on-line]
At this point, the VMEbus should be back to normal.
5.6.6 VME Power-Off Support: Caveats
The power-on/power-off support for the VMEbus provided by PVME is not foolproof.
If there are VME device drivers loaded underneath the PVME nexus driver, the
possibility exists to panic the system if the VMEbus is powered-off.
5.6.6.1 VME leaf driver mappings
Attempts to access powered-down VME devices via a VME driver loaded before the
power went off will fail, and could cause the machine to panic with a bus timeout error.
The reason is that file descriptors that may be open to the user’s VME device driver are
unknown to the PVME nexus driver. These file descriptors provide a “backdoor” to the