3 test driver functionality (windows or linux), Test driver functionality (windows or linux) – Teledyne LeCroy Protocol PCI Express Script Automation Test Tool User Manual

Page 20

Advertising
background image

Teledyne LeCroy

PCI Express Script Automation Test Tool User Manual

16

2.5.3 Test Driver Functionality (Windows or Linux)

The driver does the following:

-

Allocates a buffer in the system memory that is accessible by the Device Emulator for storing commands to
the driver as well as for general DMA.

-

Maps the Device Emulator memory and IO spaces for access.

-

Locates the configuration space for the Root or Switch downstream port to which the Device Emulator
attaches.

-

Takes control of the named Root or Switch port and configures it so that no errors on that port result in an
interrupt being forwarded to the system software.

-

Implements a protocol with the Device Emulator that the CTP will use for executing the tests.


The driver locates the configuration space for the Root or Switch downstream port to which the Device Emulator
attaches by following the ACPI structures created by the system BIOS. It looks for the MCFG structure (as defined
by the PCI Firmware specification) to be pointed at by the ACPI RSDT or XSDT structures. The MCFG structure
points to the location of the mapped PCI Express configuration spaces.

If the driver cannot find the MCFG structure, RSDT structure, XSDT structure, Device Emulator configuration
space, or Root or Switch downstream port configuration space, the Script Automation Test Tool refuses to perform
any of the normal tests. To indicate this case, the software reports that the Special test FAILED.

The Device Emulator communicates with the driver by:

1) Writing a command in the command area of the system buffer.
2) Interrupting the system using legacy PCI interrupt emulation.

Upon receiving the interrupt, the driver acknowledges it, examines the command buffer contents, and executes the
command.

The command types that the driver can execute are:

-

Report information about system variables (such as the physical address of the command buffer) and the
root/switch port found. The Special test for Root testing uses this command (the default command).

-

Execute a Configuration Read transaction from the PCI compatible portion of the Device Emulator
configuration space.

-

Execute a Configuration Write transaction to the PCI compatible portion of the Device Emulator
configuration space.

-

Execute a Memory Read transaction to one of the two Memory spaces on the Device Emulator.

-

Execute a Memory Write transaction to one of the two Memory spaces on the Device Emulator.

-

Execute an IO Read transaction to the IO space on the Device Emulator.

-

Execute an IO Write transaction to the IO space on the Device Emulator.

-

Clear all error status bits for the Root or Switch port to which the Device Emulator attaches.

-

Reflect the current values of the Error Reporting Registers for the Root or Switch port to which the Device
Emulator attaches to the PCI Express link. This can use Configuration Writes or Memory Writes.

-

Retrain or Hard Reset the link to the Device Emulator.

-

Send a series of Memory Write transactions. The Device Emulator monitors those transactions and signals
when the driver should stop sending them. (This command can ensure that the next transaction from the
DUT has a specific Tag value, so that it can be completed from the Trainer script.)

-

Read a specified register from the Configuration Space for the Root or Switch port to which the Device
Emulator attaches.

-

Write a specified register to the Configuration Space for the Root or Switch port to which the Device
Emulator attaches.


Chapter 3 refers to these commands when describing how Root Complex tests are performed.

Advertising