IVXIRMINFO(3)
HP-UX
NAME
ivxirminfo − returns information about a VXI device.
SYNOPSIS
#include <sicl.h>
int ivxirminfo(
INST id,
int laddr,
struct vxiinfo *info;
);
DESCRIPTION
ivxirminfo returns information about an arbitrary VXI device from the Resource Manager.
The laddr parameter should contain the logical address of the VXI device to query information about. The info parameter should be a pointer to a pre-declared structure of type struct vxiinfo. The structure will be filled in with the relevant information from the VXI Resource Manager.
This routine will work with a session id of any of the three types (interface, device, commander). However, the session id is only used to determine which VXI interface the request is destined to. The device on the given VXI interface is determined by the laddr parameter, not by the session id (if it is a device session). This means that a user can query Resource Manager information about any VXI device, not just the device currently open. If the session id does refer to a device session, then a -1 can be passed into the laddr parameter, which causes this routine to return information about the device refered to by the session id.
All of the values in the vxiinfo structure are valid as of the last time the Resource Manager was run (i.e., the Resource Manager must have already run prior to calling this routine in order for the routine to be successful.) Note that the Resource Manager is only run for the controller set for logical address 0.
The following is a description of the vxiinfo structure:
struct vxiinfo {
/* Device Identification */
short laddr; /* Logical Address */
char name[16]; /* Symbolic Name */
char manuf_name[16]; /* Manufacturer Name */
char model_name[16]; /* Model Name */
unsigned short man_id; /* Manufacturer ID */
unsigned short model; /* Model Code */
unsigned short devclass; /* Device Class */
/* Self Test Status */
short selftest; /* 1=PASSED, 0=FAILED */
/* Location of Device */
short cage_num; /* Cardcage Number */
short slot; /* slot number, -1 is unknown, */
/* -2 is MXI */
/* Device Information */
unsigned short protocol; /* Value of protocol register */
unsigned short x_protocol; /* Results of Read Protocol */
/* WS command */
unsigned short servant_area; /* Value of servant area */
/* Memory Information */
/* page size is 256 bytes for A24 and 64K bytes for A32 */
unsigned short addrspace; /* 24=A24, 32=A32, 0=none */
unsigned short memsize; /* Amount of memory in pages */
unsigned short memstart; /* Start of memory in pages */
/* Misc. Information */
short slot0_laddr; /* LADDR of slot 0 device, */
/* -1 if unknown */
short cmdr_laddr; /* LADDR of commander, */
/* -1 if top level */
/* Interrupt Information */
short int_handler[8]; /* List of interrupt handlers */
short interrupter[8]; /* List of interrupters */
short fill[10]; /* Unused */
};
The three character arrays(name, manuf_name, and model_name) are filled in with NULL-terminated strings (fist 15 characters of respective name).
The devclass variable can contain one of the following values:
I_VXI_DEVCLASS_MEMORY - returned if device is a memory device.
I_VXI_DEVCLASS_EXTENDED - returned if device is an extended device.
I_VXI_DEVCLASS_MSGBASED - returned if device is message based.
I_VXI_DEVCLASS_REGBASED - returned if device is register based.
The int_handler array is a list of interrupt lines handled by this device. All elements of this array after the last valid interrupt line is filled in will contain a -1.
RETURN VALUE
ivxirminfo returns (0) for success and the following error codes if it is not successful:
[I_ERR_BADADDR] The specified logical address doesn’t contain a valid VXI device.
[I_ERR_PARAM] The specified logical address is out of range.
[I_ERR_NOTSUPP] The Resource Manager hasn’t run yet.
AUTHOR
ivxirminfo was developed by HP.
Hewlett-Packard Company — September 29, 1999