3.2. Card Control

The sdadmin device driver can control up to 8 Direct-Link cards. There are two requests that allow a task to access information and control each card individually. The SD_CARD_INFO and SD_RUN_Z80_HW requests provide access and control for each card. Both of these requests return SD_R_BAD_PARM if card_num is not between 0 and 7.

3.2.1. SD_CARD_INFO

The SD_CARD_INFO request allows a task to retrieve data for a Direct-Link card. The card is specified in the card_num field within the sd_common structure. The information returned is defined in the SDRCARDINFO structure which contains the common return information followed by eleven fields: initialized, base_addr, io_base, vector, station, slot, timeout, duplicates, diagnostics, baud_rate and sd2_card. Unless an invalid card is specified, the result is SD_R_OK.

The returned structure contains the following fields:

initialized

A flag to indicate that the card has been successfully loaded. 0 - card not loaded, non-zero - module ID byte (see below).

base_addr

A significant byte of the card memory address, e.g. 0xD8 for address 0xD8000.

io_base

The I/O address in hex.

vector

The interrupt number used.

station

The Data Highway station address set for this card.

slot

The slot number (1 to 8) for a Micro Channel card.

timeout

The timeout set in 1/4 seconds for this card. 0 indicates no timeout used.

duplicates

If non-zero, duplicate checking is turned on for the card.

diagnostics

If non-zero, the card responds to diagnostic messages.

baud_rate

0=default, 1=lowest supported baud rate, 2=next supported baud rate, etc.

sd2_card

If non-zero, the card is Revision 2.

term_name

The terminal name of the node.

Module ID byte: The upper nibble contains the module type, 0xa0 for Data Highway Plus, or 0x50 for Data Highway.

The lower nibble contains the card type.

TypeValue
KS0
KT/KL1
VME2
SD/MCA3
SD2/MCA24

3.2.2. SD_RUN_Z80_HW

When sdadmin receives the SD_RUN_Z80_HW request, it allows the card specified in the card_num field within the sd_common structure to begin execution. This is normally performed by the sdload program and should not have to be repeated. The return value is either SD_R_Z80_FAIL or SD_R_OK if successful.

Neither the request nor the response takes extra parameters.