RtTranslateBusAddress

RtTranslateBusAddress translates a bus-specific address into the corresponding system logical address.

NOTE: RtTranslateBusAddress is only supported in the RTSS environment. It cannot be called from a Windows application linked to RTX64.

Syntax

BOOL RtTranslateBusAddress(
    INTERFACE_TYPE InterfaceType,
    ULONG BusNumber,
    LARGE_INTEGER BusAddress,
    PULONG pAddressSpace,
    PLARGE_INTEGER pTranslatedAddress
);

Parameters

InterfaceType

The bus interface type, which can be one of the following: Internal, MicroChannel, TurboChannel, or PCIBus. The upper bound on the types of buses supported is always MaximumInterfaceType.

BusNumber

The zero-based and system-assigned bus number for the device is used together with InterfaceType to identify the bus for systems with more than one bus of the same type.

BusAddress

The bus-relative address.

pAddressSpace

A pointer that specifies whether the address is a port number or a memory address: *pAddressSpace 0x0 indicates memory, 0X1 indicates I/O space.

pTranslatedAddress

A pointer to the translated address.

Return Value

TRUE indicates that the system logical address corresponding to the given BusNumber and BusAddress has been returned in pTranslatedAddress, FALSE indicates that the BusAddress was not found.

Remarks

There are many ways to connect a peripheral bus into a system. The memory address space of the bus, referred to as the logical address space, can be directly merged with the physical address space of the host, or some mapping may be involved. Also, some machines can have more than one bus, or a bus can have more than one address space, as in having separate memory and I/O addresses.

RtTranslateBusAddress performs this translation. The parameters to this routine include a bus number to support platforms with more than one bus of the same InterfaceType, the bus address to be translated, and a pAddressSpace specifier typically used to differentiate between memory and I/O space, if these are separate. The user might obtain these parameters by calling RtGetBusDataByOffset.

Requirements

Minimum Supported Version RTX64 2013
Header Rtapi.h
Library RtApi.lib (Windows), Rtx_Rtss.lib (RTSS)

See Also:

HalTranslateBusAddress (in the Windows Driver Development Kit)

RtGetBusDataByOffset

RtSetBusDataByOffset