SVR5 and SCO OpenServer 5


Intro -- introduction to PC Card client service function calls


   #include <sys/lcs.h>
   #include <sys/lss.h>

Functional notation for CardServices call (SVR5)

   int Cardservices(int Service, void *Handle, void *Pointer,
    		 void *ArgLength, void *ArgPointer, rm_key_t rmkey);

Functional notation for CardServices call (SCO OpenServer 5)

   int Cardservices(int Service, void *Handle, void *Pointer,
    		 void *ArgLength, void *ArgPointer);


This section documents the SCO implementation of the CardServices( ) services that are defined in the Personal Computer Memory Card International Association (PCMCIA) standard. These services allocate and manage system resources by parsing CIS tuples, requesting IRQs and memory windows, and other similar tasks. The client-enabled device driver must interface properly with the CardServices( ) routine and the documented services.

The SCO implementation uses the sixty services that are defined in the standard. For the SVR5 implementation, a sixth parameter, rmkey, is added to the standard syntax to interface with the SVR5 resource manager database; see ``Resource manager database'' in HDK Technical Reference. The SCO OpenServer 5 syntax matches that defined in the standard.

The SCO implementation defines UNIX style structures to contain much of the information that the standard defines for each service. These structures are documented in the Section D4pccard manual pages in Section D4pccard manual pages.

Return values

All of the functions called in the SCO implementation return a value, which is always an ineger. See the individual manual pages for the specific return values for each service and the return_codes(D5pccard) manual page for a complete list of supported return codes.


The PCMCIA Cardservices Specification carries the C language concept of an overloaded function to the extreme, calling all sixty functions by the name ``CardServices''. The functions differ in parameters passed but there are always the same number of parameters.

The following example illustrates how the CardServices( ) services are called in a SVR5 client-enabled device driver:

    i = CardServices(GetTupleData, NULL, NULL,
                    sizeof ( Tuple_t ), &tuple, rmkey);
The call in an SCO OpenServer 5 driver is the same except that the rmkey parameter is omitted.

In the above example:

is the particular card service requested.

indicate that the generic Handle and Pointer are not relevant to a GetTupleData function call. (Some other functions require a Cardservices Handle to identify some resource. Some require a Pointer value to pass a pointer other than ArgPointer.)

is the size of the variable Tuple_t, in bytes. ArgLength more generally is the representation of the size of the buffer pointed to by ArgPointer.

is the address of the variable tuple, and is the beginning address of the buffer.

is the resource manager key of the physical device driver which the kernel passes to the CFG_ADD subroutine of the config(D2pccard) entry point routine. See ``Resource manager database'' in HDK Technical Reference.

This argument is not part of the standard and is used only for SVR5 PC Card drivers, not for SCO OpenServer 5 drivers.

Context and synchronization

See the individual manual pages for information about the context of each service. This information determines the entry points from which each service can be called; see ``Context of a driver'' in HDK Technical Reference.

Version applicability

The version applicability information provided on the individual manual pages defines the versions in which each service can be used:

pccard: 1
SCO OpenServer 5 version; not implemented at the current time. When implemented, will require ODDI verstion 5 or later.

pccard: 2
SVR5 version; the current implementation requires DDI version 7.2, but future implemenations will support DDI version 8 and later.

pccard: 3
Contains services that are defined in the standard but not yet implemented and tested for SCO platforms. Future SCO implementations may support these services.


Developing PC Card drivers in Developing PC Card drivers
``PC Card interface (PCMCIA)'' in HDK Technical Reference

A client-enabled PCCARD driver is coded using:

PCCARD drivers use the standard DDI or ODDI entry points, functions, strutures, and defines for the I/O operations that their driver supports:

19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005