NAME

vme_slave_window_create - Allocates a VMEbus Slave Window handle.

SYNOPSIS

int vme_slave_window_create ( vme_bus_handle_t bus_handle, vme_slave_handle_t * window_handle, uint64_t vme_addr, int address_space, size_t size, int flags, void * phys_addr )

PARAMETERS

vme_bus_handle_t bus_handle

Handle allocated by vme_init.

vme_slave_handle_t * window_handle

Pointer to the window handle to allocate.

uint64_t vme_addr

VMEbus address.

int address_space

VMEbus address space. Valid values are:

- VME_A16
- VME_A24
- VME_A32
size_t size

Minimum size of the window, in bytes.

int flags

Flags indicating special window features. If a value is specified, it must be a bitwise "OR" of the following values for the Tundra Universe II device:

- VME_CTL_PWEN - Posted writes enabled.
- VME_CTL_PREN - Prefetch reads enabled.
- VME_CTL_64_BIT - Enable 64-bit PCI transactions.
- VME_CTL_RMW - Enable PCI bus lock on VMEbus read-modify-write cycles.

One of the following address modes can be used. If a mode is not specified, the window responds to accesses in either mode.

- VME_CTL_PROGRAM_ONLY - Respond to program address modifiers only.
- VME_CTL_DATA_ONLY - Respond to data address modifiers only.

One of the following address privileges can be used. If a privledge is not specified, the window responds to accesses of either privledge.

- VME_CTL_SUPER_ONLY - Respond to supervisor address modifiers only.
- VME_CTL_USER_ONLY - Respond to user address modifiers only.

One of the following PCI address spaces can be used. If a flag is not specified, the window maps to PCI memory space.

- VME_CTL_PCI_CONFIG - Access PCI bus using configuration cycles.
- VME_CTL_PCI_IO_SPACE - Access PCI bus I/O space.
void * phys_addr

Specifies the local physical address to which the VMEbus window should translate. If NULL, the driver attempts to allocate physical RAM.

DESCRIPTION

Allocates a VMEbus Slave Window handle. If a suitable window is already configured within the bridge device, then that window will be used, otherwise, a VMEbus window is created to access the specified address and address space.

RETURNS

0 on success or -1 on failure

NOTES

Setting VME_CTL_64_BIT results in a performance degradation when accessing 32-bit targets.

Setting VME_CTL_64_BIT results in performance degradation when accessing 64-bit targets if less than 64 bits of data are being transferred.

Enabling VME_CTL_RMW for a Slave Window may reduce performance for all transactions through that Slave Window.

SEE ALSO

vme_slave_window_map(3), vme_slave_window_phys_addr(3), vme_slave_window_release(3), vme_slave_window_unmap(3)