Part Number Hot Search : 
XC621 FR6A04 10PBF 2E104J UPC2712T 7C63612 MC33153P 74LS240N
Product Description
Full Text Search
 

To Download 1991727 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
 S/UNI-APEX (PM7326) Driver Manual
PM7326
S/UNI-APEX
ATM/PACKET TRAFFIC MANAGER AND SWITCH
DRIVER MANUAL
DOCUMENT ISSUE 2 ISSUED MAY 2000
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
S/UNI-APEX (PM7326) Driver Manual Introduction to This Manual
INTRODUCTION TO THIS MANUAL
This manual describes the S/UNI-APEX device driver. It describes the driver's functions, data structures, and architecture. This manual focuses on the driver's interfaces to your application, real-time operating system, and to the S/UNI-APEX device. It also describes in general terms how to modify and port the driver to your software and hardware platform.
Audience
This manual will help people who need to: * * * Evaluate and test the S/UNI-APEX device Modify and add to the S/UNI-APEX driver's functions Port the S/UNI-APEX driver to a particular platform.
References
For more information about the S/UNI-APEX driver, see the driver release notes. For more information about the S/UNI-APEX device, see the documents listed in Table 1. Table 1: Related Documents Device PM7326 Document Name ATM/Packet Traffic Manager and Switch Data Sheet S/UNI-APEX Device Errata S/UNI-APEX ATM/PACKET Traffic Manager and Switch Short Form Data Sheet Document Number PMC-981224 PMC-990882 PMC-990146
Note: Ensure that you use the document that PMC-Sierra issued for your version of the device.
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
2
S/UNI-APEX (PM7326) Driver Manual Introduction to This Manual
REVISION HISTORY
Issue No. Issue 1 Issue 2 Issue Date Details of Change December 1999 Document created April 2000 Added API functions to update congestion thresholds and scheduling parameters for direction, port, class and connection. Added API functions to install and reset multicasting callback function Added multicasting callback function to section on application callbacks Modified section on SAR Assist to include support for multicasting.
Legal Issues
None of the information contained in this document constitutes an express or implied warranty by PMC-Sierra, Inc. as to the sufficiency, fitness or suitability for a particular purpose of any such information or the fitness, or suitability for a particular purpose, merchantability, performance, compatibility with other parts or systems, of any of the products of PMC-Sierra, Inc., or any portion thereof, referred to in this document. PMC-Sierra, Inc. expressly disclaims all representations and warranties of any kind regarding the contents or use of the information, including, but not limited to, express and implied warranties of accuracy, completeness, merchantability, fitness for a particular use, or non-infringement. In no event will PMC-Sierra, Inc. be liable for any direct, indirect, special, incidental or consequential damages, including, but not limited to, lost profits, lost business or lost data resulting from any use of or reliance upon the information, whether or not PMC-Sierra, Inc. has been advised of the possibility of such damage. The information is proprietary and confidential to PMC-Sierra, Inc., and for its customers' internal use. In any event, you cannot reproduce any part of this document, in any form, without the express written consent of PMC-Sierra, Inc. (c) 2000 PMC-Sierra, Inc. PMC-991727 (P1), ref PMC-990236 (P2) PMC-Sierra, Inc. has patents pending on the following S/UNI-APEX device and driver technologies: * Loop port scheduler
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
3
S/UNI-APEX (PM7326) Driver Manual Introduction to This Manual
* *
HSS protocol DSLAM architecture
Contacting PMC-Sierra
PMC-Sierra, Inc. 105-8555 Baxter Place Burnaby, BC Canada V5A 4V7 Tel: (604) 415-6000 Fax: (604) 415-6200 Document Information: document@pmc-sierra.com Corporate Information: info@pmc-sierra.com Technical Support: apps@pmc-sierra.com Web Site: http: //www.pmc-sierra.com
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
4
S/UNI-APEX (PM7326) Driver Manual Table of Contents
TABLE OF CONTENTS
Introduction to This Manual .................................................................................................2 Audience .......................................................................................................................2 References....................................................................................................................2 Legal Issues ..................................................................................................................3 Contacting PMC-Sierra .................................................................................................4 Table of Contents.................................................................................................................5 Figures...............................................................................................................................12 Tables ................................................................................................................................13 1 2 Driver Porting Quick Start ...........................................................................................15 Driver Functions and Architecture...............................................................................16 2.1 2.2 Driver Functions ................................................................................................16 Driver Interfaces................................................................................................16 Application Programming Interface ............................................................17 Real-Time OS Interface ..............................................................................18 Hardware Interface .....................................................................................18 Main Driver Components ..................................................................................18 Global Driver Database ..............................................................................19 Interrupt Service and Deferred Processing Routines .................................20 Driver Library ..............................................................................................20 Queue Engine.............................................................................................20 WAN Port Scheduler...................................................................................21 Loop Port Scheduler ...................................................................................21 Segmentation and Re-assembly Assist Component ..................................21 Input/Output Component ............................................................................21 Statistics Component ..................................................................................22 Software States .................................................................................................22 Process Flows ...................................................................................................23 Driver Initialization and Shutdown ..............................................................24 Device Addition, Initialization, and Deletion................................................25
2.3
2.4 2.5
3
Interrupt Servicing.......................................................................................................26 3.1 3.2 High-Priority Interrupt Servicing ........................................................................27 Low-Priority Interrupt Servicing.........................................................................27
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
5
S/UNI-APEX (PM7326) Driver Manual Table of Contents
3.3 4
Installation and Removal of Interrupt Handlers.................................................28
Queue Engine .............................................................................................................29 4.1 4.2 4.3 Queue-Engine Data Structures .........................................................................29 Port-Class and ICI Tables .................................................................................29 Queue Control Block .........................................................................................31
5
Loop Port Scheduler ...................................................................................................32 5.1 5.2 5.3 5.4 5.5 5.6 Assigning Sequence Numbers..........................................................................32 LPS Data Structures..........................................................................................33 Poll Sequence Database...................................................................................34 Port Sequence Table.........................................................................................36 Assigning Port Sequence Numbers ..................................................................36 Updating Port Sequence Numbers ...................................................................37
6 7
SAR Assist ..................................................................................................................38 Data Structures ...........................................................................................................41 7.1 7.2 7.3 Global Driver Database.....................................................................................41 Device Data Blocks ...........................................................................................42 Configuration Vectors........................................................................................44 Module Initialization Vector Structure: sAPX_MIV......................................44 Device Initialization Vector Structure: sAPX_INIT_VECT ..........................44 Port Vector Structure: sAPX_PORT_VECT................................................46 Class Vector Structure: sAPX_CLASS_VECT ...........................................46 Connection Vector Structure: sAPX_CONN_VECT ...................................47 Shaper Vector Structure: sAPX_SHPR_VECT...........................................48 Other API Data Structures.................................................................................49 Port ID Structure: sAPX_PORT_ID ............................................................49 Class ID Structure: sAPX_CLASS_ID ........................................................49 Connection ID Structure: sAPX_CONN_ID ................................................50 Port Weight Structure: sAPX_PORT_WT...................................................50 Port Sequence Structure: sAPX_PORT_SEQ............................................51 Queue-Module Information Structure: sAPX_QE_INFO ............................51 Module Information Structure: sAPX_MODULE_INFO ..............................51 Device Information Structure: sAPX_DEV_INFO .......................................52 SAR Transmit Context Structure: sAPX_TX_CTXT ...................................53
7.4
8
Application Programming Interface.............................................................................54
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
6
S/UNI-APEX (PM7326) Driver Manual Table of Contents
8.1
Driver Initialization and Shutdown Functions ....................................................54 Initializing the Driver: apexModuleInit.........................................................54 Shutting Down the Driver: apexModuleShutdown......................................54 Profile Management Functions .........................................................................55 Initialization Profile Functions............................................................................55 Setting Initialization Profile Vectors: apexSetInitProfile ..............................55 Getting Initialization Profiles: apexGetInitProfile ........................................56 Clearing Initialization Profiles: apexClrInitProfile........................................56 Port Profile Functions........................................................................................56 Setting Port Profile Vectors: apexSetPortProfile ........................................57 Getting Port Profiles: apexGetPortProfile...................................................57 Clearing Port Profiles: apexClrPortProfile ..................................................57 Class Profile Functions .....................................................................................58 Setting Class Profile Vectors: apexSetClassProfile....................................58 Getting Class Profiles: apexGetClassProfile ..............................................58 Clearing Class Profiles: apexClrClassProfile .............................................59 Connection Profile Functions ............................................................................59 Setting Connection Profile Vectors: apexSetConnProfile...........................59 Getting Connection Profiles: apexGetConnProfile .....................................60 Clearing Connection Profiles: apexClrConnProfile.....................................60 Device Addition and Removal Functions ..........................................................61 Adding Devices: apexAdd ..........................................................................61 Deleting Devices: apexDelete ....................................................................61 Device Register Access Functions....................................................................62 Reading From Device Registers: apexReadReg .......................................62 Writing To Device Registers: apexWriteReg...............................................62 Device Diagnostic Functions.............................................................................63 Testing Register Access: apexRegisterTest ...............................................63 Testing Access to External Queue Context-Memory: apexExtQCtxtTest...64 Testing Access to Internal Queue Context-Memory: apexIntQCtxtTest .....64 Testing Access to LPS Context-Memory: apexLpsCtxtTest .......................65 Testing Access to WPS Context-Memory: apexWpsCtxtTest.....................66 Testing Access to the External SDRAM Cell-Buffers: apexCellBufTest .....67 Testing the Context Memory Image: apexCtxtMemCheck .........................68
8.2 8.3
8.4
8.5
8.6
8.7
8.8
8.9
8.10 Device Reset and Initialization Functions .........................................................68 Resetting Devices: apexReset ...................................................................68 Initializing Devices: apexInit .......................................................................69 8.11 Device Activation and Deactivation Functions ..................................................70 Activating Devices: apexActivate................................................................70 Deactivating Devices: apexDeactivate .......................................................70 8.12 Queue Engine Functions...................................................................................71
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
7
S/UNI-APEX (PM7326) Driver Manual Table of Contents
8.13 Direction Functions ...........................................................................................71 Updating Direction Thresholds: apexSetDirCongThrsh .............................71 8.14 Port Functions ...................................................................................................72 Setting Up Ports: apexPortSetup................................................................72 Disabling Ports: apexPortDisable ...............................................................73 Re-Enabling Ports: apexPortEnable...........................................................74 Tearing Down Ports: apexPortTeardown ....................................................74 Updating Port Congestion Thresholds: apexSetPrtCongThrsh..................75 Updating Class Scheduling Parameters: apexSetClSchd..........................76 8.15 Class Functions.................................................................................................77 Setting Up Classes: apexClassSetup.........................................................77 Disabling Classes: apexClassDisable ........................................................78 Re-Enabling Classes: apexClassEnable....................................................78 Tearing Down Classes: apexClassTeardown .............................................79 Updating Class Congestion Thresholds: apexSetClCongThrsh ................80 8.16 Shaper Functions ..............................................................................................80 Setting Up Shapers: apexShprSetup .........................................................80 Tearing Down Shapers: apexShprTeardown ..............................................81 8.17 Connection Functions .......................................................................................82 Setting Up Connections: apexConnSetup..................................................82 Disabling Connections: apexConnDisable .................................................83 Re-Enabling Connections: apexConnEnable .............................................84 Tearing Down Connections: apexConnTeardown ......................................84 Updating Connection Congestion Thresholds: apexSetConnCongThrsh ..85 Updating Class Queuing Weight: apexSetConnWfqWt .............................85 Updating Shaped Single Rate Parameters: apexSetConnShpSnglRt .......86 8.18 Watchdog Patrol Functions ...............................................................................87 Setting Watchdog Patrol Parameters: apexSetWdgPatrolRng ..................87 Getting Watchdog Patrol Parameters: apexGetWdgPatrolRng..................88 Initiating a Watchdog Patrol: apexWatchdogPatrol ....................................88 8.19 Segmentation and Re-assembly Assist Functions............................................89 Transmitting Cells: apexTxCell ...................................................................89 Transmitting AAL5 Frames: apexTxFrm.....................................................90 SAR Transmit Task Function: apexSarTxTaskFn .......................................90 SAR Receive Task Function: apexSarRxTaskFn .......................................91 8.20 Multicasting Support Functions .........................................................................92 Installing the Multicasting Callback Function: apexInstallMulticastFn........92 Resetting the Multicasting Callback Function: apexResetMulticastFn.......93 8.21 Loop Port Scheduler Functions.........................................................................93 Setting Contents of the Port-Weight Table: apexLpsSetPortWts ...............93 Getting Contents of the Port-Weight Table: apexLpsGetPortWts...............94 Setting Contents of the Poll Sequence Table: apexLpsSetPollSeq............94 Getting Contents of the Poll Sequence Table: apexLpsGetPollSeq...........95 8.22 WAN Port Scheduler Functions ........................................................................96
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
8
S/UNI-APEX (PM7326) Driver Manual Table of Contents
Setting Contents of the Port-Weight Table: apexWpsSetPortWts ..............96 Getting Contents of the Port-Weight Table: apexWpsGetPortWts .............96 8.23 Statistic Functions .............................................................................................97 8.24 Statistical Counts...............................................................................................97 Getting Cell Discard Counts: apexGetStatDiscardCnts..............................97 Getting Connection-Level Cell-Transmission Counts: apexGetStatConnTxCnts .....................................................................98 8.25 Congestion Counts............................................................................................99 Getting Device-Level Congestion Counts: apexGetCongDevCnt ..............99 Getting Direction-Level Congestion Counts: apexGetCongDirCnt.............99 Getting Port-Level Congestion Counts: apexGetCongPortCnt ................100 Getting Class-Level Congestion Counts: apexGetCongClassCnt ...........100 Getting Connection-Level Congestion Counts: apexGetCongConnCnts.101 8.26 Interrupt Service Functions .............................................................................102 Servicing High-Priority Interrupts: apexHiISR ..........................................102 Servicing Low-Priority Interrupts: apexLoISR...........................................103 Processing High-Priority Interrupt-Status Information: apexHiDPR .........104 Processing Low-Priority Interrupt-Status Information: apexLoDPR .........104 Setting Interrupt Masks: apexSetIntMsk...................................................105 Getting Interrupt Masks: apexGetIntMsk..................................................106 Enabling and Disabling Interrupts: apexIntCtrl .........................................106 Getting Interrupt Counts: apexGetIntCnts ................................................107 Resetting Interrupt Counters: apexResetIntCnts......................................107 Setting Interrupt-Count Thresholds: apexSetIntThresh............................108 8.27 Application Callback Functions .......................................................................109 Indicating the Success or Failure of Cell Transmissions: indTxCell.........109 Indicating the Success or Failure of Cell Receptions: indRxCell ............. 110 Indicating the Success or Failure of Frame Transmissions: indTxFrm .... 110 Indicating the Success or Failure of Frame Receptions: indRxFrm ......... 111 Inquiring Whether the Received Cell or Frame is part of Multicasting Group: isVcMulticast .......................................................................... 112 Indicating Critical Events: indCritical ........................................................ 113 Indicating Errors: indError......................................................................... 114 9 Hardware Interface ................................................................................................... 116 9.1 Device Input and Output Functions................................................................. 116 Reading the Contents of Address Locations: sysApexRawRead............. 116 Writing the Contents of Address Locations: sysApexRawWrite ............... 116 Detecting New Devices: sysApexDeviceDetect ....................................... 116 Interrupt Service Functions ............................................................................. 117 ISR Installation and Removal Functions................................................... 117 Installing System-Specific Interrupt Handlers: sysApexIntInstallHandler . 117 Removing System-Specific Interrupt Handlers: sysApexIntRemoveHandler118 System-Specific ISR Functions ................................................................ 118 Handling High-Priority Interrupts: sysApexHiIntHandler........................... 118 Handling Low-Priority Interrupts: sysApexLoIntHandler........................... 119
9.2
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
9
S/UNI-APEX (PM7326) Driver Manual Table of Contents
System-Specific DPR Functions............................................................... 119 Deferred Interrupt Processing: sysApexDPRtaskFn ................................ 119 10 RTOS Interface .........................................................................................................120 10.1 Memory Allocation and De-allocation Functions .............................................120 Allocating Memory: sysApexMemAlloc ....................................................120 Freeing Memory: sysApexMemFree ........................................................120 10.2 Buffer Management Functions ........................................................................121 Cell Buffer Functions ................................................................................121 Allocating Cell Header Structures and Buffers: sysApexAllocCellBuf ......121 Freeing Cell Header Structures and Buffers: sysApexFreeCell ...............121 Frame Buffer Functions ............................................................................121 Allocating the First Frame Buffer in a Chain: sysApexAllocFrmBuf .........121 Adding the Next Frame Buffer to a Chain: sysApexAllocNxtFrmBuf........122 Getting a Frame Buffer's Size: sysApexGetFrmBufSz.............................122 Getting the Next Frame Buffer's Size: sysApexGetNxtFrmBuf ................123 Freeing Frame Buffers: sysApexFreeFrm ................................................123 10.3 Timer Functions...............................................................................................123 Delaying Tasks: sysApexTaskDelay .........................................................123 10.4 Semaphore Functions .....................................................................................124 Creating Semaphores: sysApexSemCreate.............................................124 Deleting Semaphores: sysApexSemDelete .............................................124 Taking Semaphores: sysApexSemTake ...................................................125 Releasing Semaphores: sysApexSemGive..............................................125 10.5 Pre-Emption Control Functions .......................................................................125 Disabling Task Pre-emption: sysApexPreemptDis ...................................125 Enabling Task Pre-Emption: sysApexPreemptEn ....................................126 10.6 Segmentation and Re-Assembly Assist Functions .........................................126 Creating SAR Tasks: sysApexSarInstall...................................................126 Removing SAR Tasks: sysApexSarRemove ............................................127 SAR Transmit Task Function: sysApexSarTxTaskFn ...............................127 SAR Receive Task Function: sysApexSarRxTaskFn................................127 Sending Transmission Request Messages: sysApexSarTxMsg ..............128 11 Porting Drivers ..........................................................................................................129 11.1 Driver Source Files..........................................................................................129 11.2 Porting Procedure ...........................................................................................130 Step 1: Porting the Hardware Interface ....................................................130 Step 2: Porting the RTOS interface ..........................................................132 Step 3: Porting the Application-Specific Elements....................................134 Step 4: Building the Driver ........................................................................135 Appendix A: Driver Return Codes ...................................................................................136 Appendix B: Coding Conventions....................................................................................140
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
10
S/UNI-APEX (PM7326) Driver Manual Table of Contents
Variable Types...........................................................................................................140 Naming Conventions.................................................................................................140 Index ................................................................................................................................143
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
11
S/UNI-APEX (PM7326) Driver Manual Figures
FIGURES
Figure 1: Driver Interfaces ...........................................................................................................................17 Figure 2: Driver Architecture........................................................................................................................19 Figure 3: Driver Software States..................................................................................................................22 Figure 4: Driver Initialization and Shutdown................................................................................................24 Figure 5: Device Addition, Initialization, and Deletion .................................................................................25 Figure 6: Interrupt Service Model ................................................................................................................26 Figure 7: Port-Class Table Layout ...............................................................................................................30 Figure 8: LPS Module Data Structures........................................................................................................35 Figure 9: SAR Assist....................................................................................................................................38
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
12
S/UNI-APEX (PM7326) Driver Manual Tables
TABLES
Table 1: Related Documents .........................................................................................................................2 Table 2: Driver Software States ...................................................................................................................22 Table 3: Port Poll-Sequence Numbers ........................................................................................................32 Table 4: Global Driver Database: sAPX_GDD ............................................................................................41 Table 5: Device Data Block: sAPX_DDB.....................................................................................................42 Table 6: Module Initialization Vector Structure: sAPX_MIV .........................................................................44 Table 7: Device Initialization Vector Structure: sAPX_INIT_VECT..............................................................45 Table 8: Port Vector Structure: sAPX_PORT_VECT ...................................................................................46 Table 9: Class Vector Structure: sAPX_CLASS_VECT...............................................................................46 Table 10: Connection Vector Structure: sAPX_CONN_VECT ....................................................................47 Table 11: Shaper Vector Structure: sAPX_SHPR_VECT ............................................................................48 Table 12: Port ID Structure: sAPX_PORT_ID..............................................................................................49 Table 13: Class ID Structure: sAPX_CLASS_ID .........................................................................................49 Table 14: Connection ID Structure: sAPX_CONN_ID .................................................................................50 Table 15: Port Weight Structure: sAPX_PORT_WT ....................................................................................50 Table 16: Port Sequence Structure: sAPX_SEQ_WT .................................................................................51 Table 17: Queue-Module Information Structure: sAPX_QE_INFO .............................................................51 Table 18: Module Information Structure: sAPX_MODULE_INFO ...............................................................51 Table 19: Device Information Structure: sAPX_DEV_INFO ........................................................................52 Table 20: SAR Transmit Context Structure: sAPX_TX_CTXT ....................................................................53 Table 21: Source Files ...............................................................................................................................129 Table 22: Include Files...............................................................................................................................129 Table 23: Return Types..............................................................................................................................136 Table 24: Variable Type Definitions ...........................................................................................................140
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
13
S/UNI-APEX (PM7326) Driver Manual Tables
Table 25: Naming Conventions: Macros, Constants, and Structures ........................................................141 Table 26: Naming Conventions: Functions and Variables.........................................................................142
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
14
S/UNI-APEX (PM7326) Driver Manual Driver Porting Quick Start
1
DRIVER PORTING QUICK START
This section summarizes how to port the S/UNI-APEX device driver to your hardware and operating system (OS) platform. For more information about porting the S/UNIAPEX driver, see page 129. Note: Because each platform and application is unique, this manual can only offer guidelines for porting the S/UNI-APEX driver. The code for the S/UNI-APEX driver is organized into C source files. You may need to modify the code or develop additional code. The code is in the form of constants, macros, and functions. For the ease of porting, the code is grouped into "source" files (src) and "include" files (inc). The source files contain the functions and the include files contain the constants and macros. To port the S/UNI-APEX driver to your platform: 1. Port the driver's hardware interface (page 130): Data types Port the device detection function. Port low-level device read-and-write macros. Define hardware system-configuration constants. Port the busy-bit polling function. Port the error tracing function (Optional).
2. Port the driver's RTOS interface (page 132): OS-specific services Utilities and interrupt services that use OS-specific services
3. Port the driver's application-specific elements (page 134): Define the base value for the driver's return codes. Code the indication callback functions.
4. Build the driver (page 135).
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
15
S/UNI-APEX (PM7326) Driver Manual Driver Functions and Architecture
2
DRIVER FUNCTIONS AND ARCHITECTURE
This section describes the functions and software architecture of the S/UNI-APEX device driver. It includes a discussion of the driver's external interfaces and its main components.
2.1
Driver Functions
The S/UNI-APEX driver supports the following functions: * * * * * * * * * * * * * Driver initialization and shutdown (see page 54) Profile management (see page 55) Device addition and removal (see page 61) Device register access (see page 62) Device diagnostics (see page 63) Device reset and initialization (see page 68) Device activation and deactivation (see page 70) Queue engine operations (see page 71) SAR-assist operations (see pages 38, 89 and 126) Loop port scheduler configuration (see pages 32 and 92) WAN port scheduler operation (see page 96) Statistic functions (see page 97) Interrupt service operations (see pages 26, 102 and 117)
2.2
Driver Interfaces
The driver's main function is to serve as an interface between the device and your application and operating system. Thus, the driver itself interfaces with the device, the application, and the operating system. Figure 1 illustrates the external interfaces defined for the S/UNI-APEX device driver.
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
16
S/UNI-APEX (PM7326) Driver Manual Driver Functions and Architecture
Figure 1: Driver Interfaces
Application
Indication Callbacks
Function Calls
Service Callbacks
S/UNI-APEX Driver
RTOS
Service Calls
Hardware Interrupts
Register Access
S/UNI-APEX Device
Application Programming Interface
The driver's API is a collection of high-level functions that application programmers can call to perform the following tasks (and many others): * * * * Initialize the device Validate the device's configuration Retrieve device status and statistics information Diagnose the device
The driver API functions use the driver library functions as building blocks to provide this system level functionality to the application programmer (see below). The driver API also consists of callback functions that notify the application of significant events that take place within the device, such as cell and frame transmission/reception and error events.
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
17
S/UNI-APEX (PM7326) Driver Manual Driver Functions and Architecture
Real-Time OS Interface
The driver's RTOS interface module consists of functions that the driver calls so that the driver can use RTOS services. These services include * * * Memory allocation and de-allocation Semaphore operations Timer operations
The RTOS interface also includes service callback functions. The driver installs these service callbacks using RTOS service calls that install interrupt handler routines. The RTOS invokes these service callbacks when an interrupt occurs or a timer expires. Note: You must modify the RTOS interface code according to your RTOS environment.
Hardware Interface
The S/UNI-APEX hardware interface module consists of functions/macros that read from and write to the S/UNI-APEX device-registers. It also consists of some system-specific constants that you will need to define. (For example, the maximum number of S/UNIAPEX devices to be controlled by the driver). The hardware interface also provides a template for an ISR that the driver calls when the device raises a device interrupt. You must modify this template based on the interrupt configuration of the application.
2.3
Main Driver Components
Figure 2 illustrates the top-level architectural components of the S/UNI-APEX device driver. This applies in both polled and interrupt-driven operation. In polled operation, the driver calls the ISR periodically. In interrupt operation, the interrupt directly triggers the ISR. The driver includes ten main components: * * * * * * * * * Global driver database Interrupt service routine Deferred processing routine Driver library Queue engine Loop port scheduler WAN port scheduler Segmentation and re-assembly assist component Input/output component
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
18
S/UNI-APEX (PM7326) Driver Manual Driver Functions and Architecture
*
Status and statistics component
Figure 2: Driver Architecture
Application Function Calls Service Callbacks RTOS Interface Service Calls RTOS Indication Callbacks Driver API Status & Statistics Component
SAR Assist Component Driver Library Functions WPS Component
Deferred Processing Routine
Interrupt Context
Global Driver DB
LPS Component
Interrupt Servicing Routine Hardware Interface Hardware Interrupts Register & Memory Access S/UNI-APEX Device
Queue Engine Component
I/O Component
S/UNI-APEX Driver
SSRAM
SDRAM
Global Driver Database
The Global Driver Database (GDD) is the main data structure employed by the S/UNIAPEX device driver. It serves as a central repository for driver data. The driver allocates the GDD during driver initialization. One of the main components of the GDD is an array of pointers to per-device context structures called Device Data Blocks (DDBs). The DDB stores context information about the S/UNI-APEX device, such as: * * * * Device state Control information Initialization vector Callback function pointers
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
19
S/UNI-APEX (PM7326) Driver Manual Driver Functions and Architecture
Interrupt Service and Deferred Processing Routines
The device driver provides an interrupt service routine (ISR) for each of the device interrupt outputs. When the device interrupts the microprocessor, these ISRs store the interrupt context information and clear the interrupt conditions. The ISR routines provided by the driver simply retrieve context information. This allows the routines to be compact and efficient. The interrupt context retrieved by these routines is saved for deferred processing. This processing occurs in the context of separate tasks within the RTOS. The driver provides a deferred processing routine (DPR) that can run as a separate task. The DPR processes the interrupt context information and invokes callbacks, which you define, to inform the application when specific interrupt events have occurred. The driver supports two modes for servicing interrupts: * * Asynchronous interrupt servicing Synchronous polling
For more information about the DPR and interrupt-servicing model, see page 26.
Driver Library
The driver library is a collection of low-level utility functions that manipulate the device registers and the contents of the device DDBs. The driver library functions serve as building blocks for the higher level functions that constitute the driver API. The application software does not normally call the driver library functions.
Queue Engine
The queue engine controls the device's queue engine functions. These functions include: * * * * Setting up and tearing down ports Setting up and tearing down classes (loop, WAN and uP) Setting up and tearing down connections Setting up and tearing down shapers
For more information about the queue engine, see pages 29 and 71.
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
20
S/UNI-APEX (PM7326) Driver Manual Driver Functions and Architecture
WAN Port Scheduler
The WAN port scheduler (WPS) schedules packet transmissions to the four WAN ports. To fairly and efficiently service these ports, the WPS uses the port weight table; this resides in the WPS internal-context memory. When you configure WAN ports, you must assign weights to them so that your application services the high-bandwidth ports more often than low-bandwidth ports. The WPS provides functions that set and retrieve the port weights assigned to the WAN ports.
Loop Port Scheduler
The loop port scheduler (LPS) controls the S/UNI-APEX loop port scheduler. This component manipulates the loop port scheduler's internal context memory (polling sequence and polling weight tables) so that the driver services the S/UNI-APEX device's loop ports fairly and efficiently. For more information about the LPS, see pages 32 and 92.
Segmentation and Re-assembly Assist Component
The segmentation and re-assembly (SAR) assist component performs the insertion/extraction of cells and AAL5 frames from the microprocessor interface. This component uses the SAR assist features of the S/UNI-APEX device to perform these functions. The SAR transmit task injects cells or frames into the device. The SAR receive task extracts cells or frames from the device. They both typically run as separate tasks within the RTOS. Note: The SAR assist component is not a full-fledged AAL5 SAR implementation. It does not perform automatic retransmission or error correction. The SAR Assist module also provides support for multicasting cells or frames. Multicasting is defined as forwarding cells or frames, received on an incoming connection, to multiple outgoing connections. For more information about the SAR assist component, see pages 38 and 89.
Input/Output Component
The input/output component provides low-level access to the device registers and the context memories. It uses the memory port interface to provide context-memory access. This component provides routines to perform read, write, and mask write operation on the context memory apertures. The input/output component also maintains an image of the context memory in its host memory. This image only mirrors the configuration and control fields in the context memory. This image minimizes the number of indirect accesses through the memory port (which affects the device and overall system performance).
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
21
S/UNI-APEX (PM7326) Driver Manual Driver Functions and Architecture
The context memory image is optional. You can compile the driver so that it does not use the context memory image. You may choose to use this option when memory resources in the system are limited.
Statistics Component
The statistics component consists of functions that retrieve statistical and congestion counts accumulated by the device.
2.4
Software States
Figure 3 shows the software state diagram for the S/UNI-APEX driver. State transitions occur on the successful execution of the corresponding transition functions shown. State information helps maintain the integrity of the driver's DDB by controlling the set of device operations allowed in each state. Table 2 describes the software states for the S/UNI-APEX device as maintained by the driver. Figure 3: Driver Software States
Empty
apexAdd
apexDelete
Present apexInit apexReset apexActivate Init apexDeactivate
apexReset
apexReset Active
Table 2: Driver Software States State
APEX_EMPTY
Description The S/UNI-APEX device is not registered. This is the initial state.
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
22
S/UNI-APEX (PM7326) Driver Manual Driver Functions and Architecture
State
APEX_PRESENT
Description The driver has detected the S/UNI-APEX device and the device has passed power-on self-tests. A software reset has been applied to the device. The driver has allocated memory to store context information about this device. An initialization vector passed by the application has successfully initialized the S/UNI-APEX device. The driver has validated the initialization parameters, and it has configured the device by writing appropriate bits in the control registers of the device. The driver has activated the S/UNI-APEX device. This means that the driver has enabled the device interrupts and SAR processing. The device is ready for normal operation.
APEX_INIT
APEX_ACTIVE
2.5
Process Flows
This section describes two of the main processing flows of the S/UNI-APEX driver: * * Driver initialization and shutdown Device addition and deletion
The following flow diagrams illustrate the sequence of operations that take place for different driver functions. The diagrams also serve as a guide to the application programmer by illustrating the sequence in which the application must invoke the driver API.
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
23
S/UNI-APEX (PM7326) Driver Manual Driver Functions and Architecture
Driver Initialization and Shutdown
The following figure shows the functions and processes that the driver uses to initialize and shutdown the S/UNI-APEX driver components. Figure 4: Driver Initialization and Shutdown
START
apexModuleInit
This function performs module level initialization of the S/UNI-APEX driver. It allocates memory for the GDD and its components, and initializes its contents. OPTIONAL: These functions register profiles for initialization, port, class, and connection vectors. This lets you store pre-defined parameter vectors that you validate ahead of time. Subsequently, when the driver invokes the initialization, port, class, or connection setup functions, it only needs to pass a profile number. This method simplifies and expedites the above operations. Device level functions are active between module initialization and shutdown (for example, functions that add, delete, and initialize devices). See the following figure. These functions de-register all the initialization, port, class, and connection parameter profiles previously registered with the driver.
apexSetInitProfile apexSetPortProfile apexSetClassProfile apexSetConnProfile
Device Level Functions
apexClrInitProfile apexClrPortProfile apexClrClassProfile apexClrConnProfil
apexModuleShutDown
This function performs module level shutdown for the APEX driver. It deletes all devices registered with the driver and de-allocates the GDD.
END
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
24
S/UNI-APEX (PM7326) Driver Manual Driver Functions and Architecture
Device Addition, Initialization, and Deletion
Figure 5 illustrates the typical function call sequences that occur when adding, initializing, re-initializing and deleting devices. Figure 5: Device Addition, Initialization, and Deletion
START
apexAdd
This function detects the device being added to the hardware (using sysApexDeviceDetect). Then it performs a register readback test, assigns a device handle for storing device information, and applies a software reset to the device. This function initializes the device based on an initialization vector or initialization vector profile that you provide. Your application validates the initialization vector, then the driver stores it as part of device context information. The device registers are then configured accordingly. This function installs and enables interrupts, enables the transmission and reception of cells and frames from the microprocessor port, and enables the queue engine's external interfaces. The device is now operational and all other APIs can be invoked.
apexInit
apexActivate
apexReset This function de-activates the device and removes it from normal operation. It disables device interrupts, disables the transmission and reception of cells and frames from the microprocessor port, and disables the queue engine's external interfaces. This function performs a software reset on the device. It also resets the device context information in the DDB contents, except for the initialization vector. This function can be invoked from any device state. This function removes the device from the list of devices being controlled by the driver. This function also clears the device context information for the device being deleted and frees the device handle assigned for this device.
apexDeactivate
apexReset
apexDelete
END
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
25
S/UNI-APEX (PM7326) Driver Manual Interrupt Servicing
3
INTERRUPT SERVICING
The S/UNI-APEX driver services device interrupts by using an interrupt service routine (ISR) and a deferred processing routine (DPR). The ISR traps the interrupts and saves the interrupt context information. The DPR performs the actual processing of the saved interrupt context information. The DPR function runs in the context of a separate task within the RTOS. Note: Since the DPR task processes potentially serious interrupt conditions, you should set the DPR task's priority higher than the application task interacting with the S/UNIAPEX driver. Figure 6 illustrates the interrupt service model used in the S/UNI-APEX driver design. Figure 6: Interrupt Service Model
sysApexHiIntHandler apexHiISR High-Priority Message
sysApexDPRTask indCritical apexHiDPR indError apexLoDPR
sysApexLoIntHandler apexLoISR Interrupt Status sysApexSarRxTaskFn apexSarRxTaskFn S/UNI-APEX Driver Indication Callbacks indRxCell indRxFrm
Application
The interrupt service code includes some system-specific code that you provide (routines prefixed by sysApex); it also includes some application-independent code that comes with this driver and does not change from application to application (prefixed by apex). You must implement the following system-specific interrupt-handler routines and install them in the interrupt vector table of the system processor: sysApexHiIntHandler and sysApexLoIntHandler. They correspond to the high and low priority interrupt pins of the S/UNI-APEX device. The microprocessor invokes these routines when one or more S/UNI-APEX devices interrupt the processor.
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
26
S/UNI-APEX (PM7326) Driver Manual Interrupt Servicing
3.1
High-Priority Interrupt Servicing
When a high priority interrupt occurs, sysApexHiIntHandler invokes a driver provided routine, apexHiISR, for each device that has high-priority interrupt processing enabled. The apexHiISR function reads the high-priority interrupt status-register of the device and returns with the status information if a valid status bit is set. Then sysApexHiIntHandler sends this status information to the DPR task via a high-priority messaging function to the DPR task. The DPR task processes this information using the driver provided routine, apexHiDPR. This function updates the interrupt counters for the interrupt events causing the interrupt. For each event that crosses its threshold, it invokes an indication callback, indCritical. The input arguments passed to this indication function include your context for the device, the event identifier, and any applicable event information. After processing all interrupt events, the DPR exits after enabling the high-priority interrupt processing.
3.2
Low-Priority Interrupt Servicing
When a low priority interrupt occurs, sysApexLoIntHandler invokes a driver provided routine, apexLoISR, for each device that has low-priority interrupt processing enabled. The apexLoISR function reads the low-priority interrupt error-register and low-priority interrupt status-register. After that, it returns the status information if valid error or status conditions are detected. The driver then selectively sends the status information to one of two tasks, depending on the nature of the condition(s) detected: * * The SAR receive task The DPR task
A system-specific routine, sysApexSarRxTaskFn, runs as a separate task (SAR receive task) within the RTOS. This task waits for messages, sent by sysApexLoIntHandler, to arrive at an associated message queue. These messages correspond to arrival of cell(s) in the SAR TX Data register(s) When sysApexSarRxTaskFn receives a message, it invokes the driver-provided routine, apexSarRxTaskFn. The apexSarRxTaskFn routine takes the appropriate actions based on the status information received in the message. Actions include extracting cells/frames from the SAR TX registers and reporting frame re-assembly timeouts or length errors to the application via indication callback functions. Another system-specific routine, sysApexDPRtask, runs as a separate task (DPR task) within the RTOS. This task also waits for messages, sent by sysApexLoIntHandler, to arrive at an associated message queue. These messages correspond to interrupt conditions that are not SAR-related. These events include the following:
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
27
S/UNI-APEX (PM7326) Driver Manual Interrupt Servicing
* * * *
Port, class, and VC maximum threshold errors VC cell receive error, re-assembly length error, and re-assembly timeout error WAN and loop transmit-cell transfer error WAN and loop receive runt-cell error, parity error
When the driver receives a message, it invokes the driver-supplied function, apexLoDPR. This function updates the interrupt counters for the interrupt events that cause the interrupt. For each event that crosses its threshold, it invokes an indication callback, indError. The input arguments passed to this indication function include your context for the device, the event identifier, and any applicable event information. After processing all interrupt events, the DPR exits after enabling the low-priority error interrupt processing. Note: The driver-provided routines, apexHiISR, apexLoISR, apexSarRxTaskFn, apexHiDPR, and apexLoDPR do not specify a communication mechanism between the ISRs and tasks. Therefore, you have full flexibility in choosing a communication mechanism between the two. The most common way to implement this communication mechanism is to use a message queue, a service that most RTOSs provide.
3.3
Installation and Removal of Interrupt Handlers
You must implement the system-specific routines, sysApexHiIntHandler, sysApexLoIntHandler and sysApexDPRtask. Your interrupt installation routine, sysApexIntInstallHandler, installs the interrupt handlers (sysApexHiIntHandler and sysApexLoIntHandler) in the interrupt vector table of the processor. The sysApexDPRtask is spawned as a task during the first time invocation of sysApexIntInstallHandler. In addition, sysApexIntInstallHandler also creates the communication channels between sysApexLoIntHandler and sysApexDPRtask. Programmers usually implement this communication channel as a message queue. Similarly, during removal of interrupts, the driver removes sysApexHiIntHandler and sysApexLoIntHandler from the microprocessor's interrupt vector table and then deletes the sysApexDPRtask task. You must implement the function, sysApexIntRemoveHandler, that removes the interrupt handlers and the DPR task.
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
28
S/UNI-APEX (PM7326) Driver Manual Queue Engine
4
QUEUE ENGINE
The driver's queue engine controls and maintains the external and internal queue context information of the S/UNI-APEX devices. It also keeps track of the configured ports, classes, shapers, and connections and identifies how these entities are associated with each other.
4.1
Queue-Engine Data Structures
The queue engine module uses two main data structures, the port-class table and the ICI table. The port-class table is a data structure used to efficiently look up all the VCs that are associated with a port-class combination. The ICI array is used to efficiently lookup the port-class combination that a VC is associated with. Note that these two constructs are actually two different views of the same block of memory.
4.2
Port-Class and ICI Tables
Figure 7 is a diagrammatic representation of the queue control table and the ICI array. The ICI array is an array of 16k/64k elements. Each element has the following structure:
typedef struct _apx_ici_rec { UINT4 conn;
struct _apx_ici_rec *prev; struct _apx_ici_rec *next; } sAPX_ICI_REC;
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
29
S/UNI-APEX (PM7326) Driver Manual Queue Engine
Figure 7: Port-Class Table Layout
ICI Table Port-class Table
ICI 0 ICI 1 ICI 2
uP Port Class 0 Class 1 Class 2 Class 3
WAN Port 3 WAN Port 0
Class 0
Class 1
Class 2
Class 3
Class 0
Class 1
Class 2
Class 3
Loop Port 2k-1 Class 0 Loop Port 0
Class 1
Class 2
Class 3
ICI 23 ICI 24
C
E CL
Port
ICI=23
P
N
Class 0
Class 1
Class 2
Class 3
vc 23
vc 95
vc 55
vc 05
ICI 64k-1
vc 32
vc 64
vc 99
ICI : 16 bit connection id Port : 12 bit port id CL : 2 bit class id E : connection enable bit C : connection configure bit P N : previous ICI record ptr : next ICI record ptr
vc 72
vc 103
vc 220
The contents of the member, `conn' , that belongs to this structure are used to look up the port-class combination that a connection is associated with. The `prev' and `next' pointers are used to form ordered linked lists of connections that are associated with a particular port-class combination. Each record of the table has the following structure:
typedef struct _apx_prt_class_rec { UINT4 UINT2 sAPX_ICI_REC sAPX_ICI_REC } sAPX_PRT_CLASS_REC; status; numICIs[APX_NUM_CLASSES]; *psIciLstHead[APX_NUM_CLASSES]; *psIciLstTail[APX_NUM_CLASSES];
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
30
S/UNI-APEX (PM7326) Driver Manual Queue Engine
The port-class table is comprised of the following arrays of port-class records:
typedef struct _apx_prt_class_tbl { sAPX_PRT_CLASS_REC sAPX_PRT_CLASS_REC sAPX_PRT_CLASS_REC sAPX_PRT_CLASS_REC } sAPX_PRT_CLASS_TBL; *prec[APX_NUM_PORT_TYPES]; lp[APX_NUM_LOOP_PORTS]; wp[APX_NUM_WAN_PORTS]; up;
The table consists of ordered linked lists of connections associated with each port-class combination for loop, WAN, and microprocessor ports. The queue engine module uses this information to tear down a port or class gracefully. For example, to shutdown loop port 0, the queue engine module checks the table to figure out which connections and classes are associated with that port. In this case, connections 23, 32, 95, 55, 64, 72, 05, 99, 103 and 220 are torn down; then classes 0 through 3; and finally, port 0 is shutdown.
4.3
Queue Control Block
The queue control block contains all the bookkeeping information required by the queue engine module.
typedef struct _apx_qe_cb { sAPX_ICI_REC sAPX_PRT_CLASS_TBL UINT2 UINT2 UINT2 UINT2 UINT4 } sAPX_QE_CB; sIciTbl[APX_MAX_NUM_VCS]; sPrtClTbl; u2WdgStartIci; u2WdgEndIci; u2PrtCfgCnt[APX_NUM_PORT_TYPES]; u2ClCfgCnt[APX_NUM_PORT_TYPES]; u4ConnCfgCnt[APX_NUM_PORT_TYPES];
The sAPX_QE_CB structure contains the following information: * * * The ICI and port-class tables previously described The watchdog patrol start and end ICI parameters (specified in the initialization vector) Counts for the number of configured ports, classes, and connections for each port type: uP, loop, and WAN
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
31
S/UNI-APEX (PM7326) Driver Manual Loop Port Scheduler
5
LOOP PORT SCHEDULER
The loop port scheduler (LPS) schedules packet transmissions to the 2048 loop ports that the device can handle. In order for all these ports to be serviced fairly and efficiently, the loop port scheduler uses the port weight and port sequence tables that reside in the LPS internal context memory. When loop ports are configured, they have to be assigned weights and sequence numbers to achieve the following: * High-bandwidth ports are serviced more often than ports with low-bandwidth requirements. The LPS module achieves this goal by assigning lower weights to high-bandwidth ports and higher weights to low-bandwidth ports. You must assign the weight values. The number of ports that need to be polled (to see if they can accept a packet for transmission) at any time is minimal. The port polling times should be "spread-out" and not "bunched-up". The APEX driver's LPS module achieves this by assigning sequence number to ports (that have the same weight), such that the number of ports associated with each sequence number is evenly distributed across the sequence numbers used for each weight.
*
5.1
Assigning Sequence Numbers
The sequence numbers assigned depend on the weight assigned to the node. For ports with weight 1, the sequence number assigned is either 0 or 1. For ports with weight 2, the sequence number is one of 0, 1, 2 or 3. Thus the number of possible sequence numbers increases with the weight assigned to a port. Subsequently, for ports assigned a weight of 7, the maximum possible range of sequence numbers is utilized, namely; 0 through 127. Table 3: Port Poll-Sequence Numbers Number of Port Added 1 2 3 4 5 6 7 Sequence Numbers Assigned for Each Weight Wt 0 0 0 0 0 0 0 0 Wt 1 0 1 0 1 0 1 0 Wt 2 0 2 1 3 0 2 1 Wt 3 0 4 2 6 1 5 3 Wt 4 0 8 4 12 2 10 6 Wt 5 0 16 8 24 4 20 12 Wt 6 0 32 16 48 8 40 24 Wt 7 0 64 32 96 16 80 48
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
32
S/UNI-APEX (PM7326) Driver Manual Loop Port Scheduler
Number of Port Added 8 2041 2042 2043 2044 2045 2046 2047 2048
Sequence Numbers Assigned for Each Weight Wt 0 0 0 0 0 0 0 0 0 0 Wt 1 1 0 1 0 1 0 1 0 1 Wt 2 3 0 2 1 3 0 2 1 3 Wt 3 7 0 4 2 6 1 5 3 7 Wt 4 14 1 9 5 13 3 11 7 15 Wt 5 28 3 19 11 27 7 23 15 31 Wt 6 56 7 39 23 55 15 47 31 63 Wt 7 112 15 79 47 111 31 95 63 127
Since sequence numbers should be assigned in a manner that the port polling times are "spread-out" and not "bunched-up," the sequence number are not assigned in a linear order. Referring to Table 3, consider the sequence numbers for weight 3. The possible sequence numbers are 0, 1, 2, 3, 4, 5, 6 and 7. The first port of weight 3 is given the sequence number 0. The second port of weight 3 is assigned the sequence number 4(and not 1). This would "spread-out" the time interval between scheduling of these two ports with the same weight. The third port of weight 3 would be assigned the sequence number 2 and the fourth port is given the sequence number 6 and so on. Note: Since the number of ports assigned to a particular weight can be greater than the number of sequence numbers available for that weight, the sequence numbers are repeated. For example, in the table the sequence numbers for weight 2 are repeated every 4 ports, whereas the sequence numbers for weight 3 are repeated every 8 ports and so on.
5.2
LPS Data Structures
The LPS module uses two main data structures: the poll sequence database and the port sequence table. The poll sequence database is a data structure used to efficiently assign sequence numbers to ports of different weights, such that the sequence numbers are distributed. The port sequence table is used to efficiently lookup the sequence number already assigned to a particular port.
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
33
S/UNI-APEX (PM7326) Driver Manual Loop Port Scheduler
5.3
Poll Sequence Database
Figure 8 shows that the Poll Sequence Database is a two dimensional array. It consists of 8 columns, each column corresponding to a particular weight (0 - 7). The number of rows corresponds to the maximum number of loop ports. Each element of the array is a poll sequence record, which has the following structure:
typedef struct _apx_poll_seq_rec { UINT1 UINT1 UINT2 u1PortWt; u1PortSeq; u2PortNum;
} sAPX_POLL_SEQ_REC;
When the poll sequence database is initialized, the port number for all the poll sequence records is set to 0xFFFF. This means that the sequence number associated with the node is unassigned. All the poll sequence records in the same column are assigned the same weight, which is the same as the column index of the array. The sequence numbers in each column of the poll sequence database are initialized by following the same procedure used to assign sequence numbers for each column in Table 3.
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
34
S/UNI-APEX (PM7326) Driver Manual Loop Port Scheduler
Figure 8: LPS Module Data Structures
Next Available Sequence Index for each weight
weight 0: nxtAvlSeqIdx =4 weight 1: nxtAvlSeqIdx =1 weight 2: nxtAvlSeqIdx =1 weight 3: nxtAvlSeqIdx =1 weight 4: nxtAvlSeqIdx =0 weight 7: nxtAvlSeqIdx =6
Port 0 Port 1 :
Port = 2040 Wt = 0 Seq = 0 Port = 0 Wt = 0 Seq = 0 Port = 1 Wt = 0 Seq = 0 Port = 2 Wt = 0 Seq = 0 Port = 0xffff Wt = 0 Seq = 0 Port = 0xffff Wt = 0 Seq = 0 Port = 0xffff Wt = 0 Seq = 0 Port = 0xffff Wt = 0 Seq = 0
Port = 3 Wt = 1 Seq = 0 Port = 0xffff Wt = 1 Seq = 1 Port = 0xffff Wt = 1 Seq = 0 Port = 0xffff Wt = 1 Seq = 1 Port = 0xffff Wt = 1 Seq = 0 Port = 0xffff Wt = 1 Seq = 1 Port = 0xffff Wt = 1 Seq = 0 Port = 0xffff Wt = 1 Seq = 1
Port = 2000 Wt = 2 Seq = 0 Port = 0xffff Wt = 2 Seq = 2 Port = 0xffff Wt = 2 Seq = 1 Port = 0xffff Wt = 2 Seq = 3 Port = 0xffff Wt = 2 Seq = 0 Port = 0xffff Wt = 2 Seq = 2 Port = 0xffff Wt = 2 Seq = 1 Port = 0xffff Wt = 2 Seq = 3
Port = 11 Wt = 3 Seq = 0 Port = 0xffff Wt = 3 Seq = 4 Port = 0xffff Wt = 3 Seq = 2 Port = 0xffff Wt = 3 Seq = 6 Port = 0xffff Wt = 3 Seq = 1 Port = 0xffff Wt = 3 Seq = 5 Port = 0xffff Wt = 3 Seq = 3 Port = 0xffff Wt = 3 Seq = 7
Port = 0xffff Wt = 4 Seq = 0 Port = 0xffff Wt = 4 Seq = 8 Port = 0xffff Wt = 4 Seq = 4 Port = 0xffff Wt = 4 Seq = 12 Port = 0xffff Wt = 4 Seq = 2 Port = 0xffff Wt = 4 Seq = 10 Port = 0xffff Wt = 4 Seq = 6 Port = 0xffff Wt = 4 Seq = 14
Port = 25 Wt = 7 Seq = 0 Port = 22 Wt = 7 Seq = 64 Port = 2046 Wt = 7 Seq = 32 Port = 1001 Wt = 7 Seq = 96 Port = 0x28 Wt = 7 Seq = 16 Port = 2045 Wt = 7 Seq = 80 Port = 0xffff Wt = 7 Seq = 48 Port = 0xffff Wt = 7 Seq = 112
Port 2044 Port 2045 Port 2046 Port 2047
Port = 0xffff Wt = 0 Seq = 0 Port = 0xffff Wt = 0 Seq = 0
Port = 0xffff Wt = 1 Seq = 0 Port = 0xffff Wt = 1 Seq = 1
Port = 0xffff Wt = 2 Seq = 1 Port = 0xffff Wt = 2 Seq = 3
Port = 0xffff Wt = 3 Seq = 3 Port = 0xffff Wt = 3 Seq = 7
Port = 0xffff Wt = 7 Seq = 7 Port = 0xffff Wt = 7 Seq = 15
Port = 0xffff Wt = 7 Seq = 63 Port = 0xffff Wt = 7 Seq = 147
Port Sequence Table
Poll Sequence Database
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
35
S/UNI-APEX (PM7326) Driver Manual Loop Port Scheduler
5.4
Port Sequence Table
The port sequence table is an array of pointers to poll sequence records. The purpose of this table is to efficiently lookup the sequence number assigned to a particular port. On initialization each entry of the port sequence table will be set to NULL since none of the ports have yet been assigned a sequence number. Each time a sequence number is assigned to a port, an entry in the port sequence table, indexed by the port number, is updated. In Figure 8, the entry in the port sequence table for port 2046, points to the poll sequence record in column 7 and row 2; this has a sequence number of 32 associated with it.
5.5
Assigning Port Sequence Numbers
When a loop port is added, depending on the weight of the port, the driver routine goes to a particular column of the poll sequence database and, starting from the first row, it searches for the first unassigned poll sequence record. The sequence number in this record is the one assigned to the port. To expedite this process, a `next available sequence index' array, of a dimension equal to the number of weights, is created. This array has an entry for each column of the poll sequence database and contains the index of the next unassigned poll sequence record in the corresponding column. At initialization all the index values will be zero. The next available sequence index for a column is updated each time a port is added or deleted from that column. Consider an example where we have to assign a sequence number to loop port 10, which has a weight of 7. In the figure, the entry for weight 7 in the next available sequence index array is 6. Looking at the poll sequence database, the record at column 7 and row 6 is unassigned (since the port number entry is 0xFFFF). So the sequence number 48, which is associated with this record is assigned to loop port 10. To indicate that the sequence number has been assigned the port number for the poll sequence record is set to 10. The entry for port 10 in the port sequence table is set to point to the poll sequence record at column 7 and row 6. The next available sequence number index for weight 7 is updated to 7.
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
36
S/UNI-APEX (PM7326) Driver Manual Loop Port Scheduler
5.6
Updating Port Sequence Numbers
On deleting a port, the driver routine gets the address of the poll sequence record from the port sequence table using the port number as the index. The poll sequence record is then freed. In this scenario, there is a free sequence number in the middle of a series of sequence numbers assigned to ports of the same weight. Note that deleting a few ports could potentially lead to a situation where the port polling times for ports of the same weight are "bunched up." To avoid this situation, when a port of a particular weight is deleted, we reassign this sequence number to another port; specifically, a port that meets the following criteria: the port has the same weight, and the port is the last one in the series of sequence numbers assigned for this weight. By doing this, instead of having a free sequence number in the middle of a series of assigned sequence numbers for the same weight, we free the sequence number that is at the end of the series. Doing this guarantees that the sequence numbers remain "distributed." Referring to the figure, consider an example where we have to delete port number 2046. Using the port sequence table, we get a pointer to the poll sequence record at column 7 and row 2. Deleting the port frees up the sequence number 32. This sequence number needs to be reassigned to another port. The port that meets the criteria for reassignment is port 2045, since it has a weight of 7 and is the last one in the series of assigned sequence number for weight 7. So port 2045 is assigned sequence number of 32. The sequence number 80, previously assigned to port 2045 is freed. The next available poll sequence index entry for weight 7 is changed to 5. The entry for port 2045, in the port sequence table, now points to poll sequence node at column 7 and row 2.
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
37
S/UNI-APEX (PM7326) Driver Manual SAR Assist
6
SAR ASSIST
The SAR component provides the following functions: * * * Insertion and extraction of cells Insertion and extraction of AAL5 frames Multicast forwarding of cells on multiple VCs
Figure 9: SAR Assist
Application Task
apexTxCell, apexTxFrm indTxCell, indTxFrm
sysApexSarTxTaskFn message queue
Application Task extract cell/frame and invoke indication callback
indRxCell, indRxFrm
no message queue sysApexSarRxTaskFn
isVcMulticast?
yes sysApexLoIntHandler forward cell/frame to outgoing connections of multicasting group
APEX low-priority interrupt
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
38
S/UNI-APEX (PM7326) Driver Manual SAR Assist
Figure 9 illustrates the SAR-Assist component's architecture. The SAR Assist component is implemented as a set of two tasks. One task is responsible for transmitting cells and frames, the other is responsible for receiving cells and frames. Both tasks are spawned when the first device is activated by invoking apexActivate. In addition to creating the tasks, apexActivate will also create a message queue for each task; this queue is used to communicate with the task. Insertion of cells and frames When the user invokes apexTxCell or apexTxFrm to transmit a cell or frame, the information is encapsulated into a message structure and is sent to the message queue of the SAR transmit task. The transmit task then dequeues the message and calls the appropriate routines to transmit the cell or frame. Once the transmission is complete, it invokes the indication callback functions indTxCell or indTxFrm, to inform the user about the status. Extraction of cells and frames When a low priority interrupt occurs and the low priority interrupt handler determines the cause of the interrupt to be the arrival of cells at the SAR module, it sends a message to the SAR receive task. Once a message is received by the SAR receive task, it invokes the driver-provided routine, apexSarRxTaskFn. The apexSarRxTaskFn routine will scan through the four class queues, in order of priority as specified by the user in the initialization vector. If the multicasting support is not activated, the SAR receive task retrieves the cells/frames and saves them in a buffer. It then invokes the indication callback functions indRxCell or indRxFrm to inform the application about the receipt of the cell/frame and provides a pointer to the header and payload. Multicast forwarding The SAR module also provides support for multicasting cells and frames. Multicasting is defined as: forwarding a cell or frame received on an incoming connection to multiple outgoing connections. The incoming connection and the outgoing connections together comprise a multicast group. The multicast forwarding feature is enabled by installing the multicasting callback function, isVcMulticast, using the routine apexInstallMulticastFn. The multicasting support is disabled by invoking
apexResetMulticastFn.
When the multicast forwarding feature is enabled, each time a cell or frame is received by the SAR receive task, the multicasting callback function is invoked with the connection ID of the received cell as an input. The multicasting callback function, which is provided by the user, determines whether the connection ID belongs to a multicasting group.
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
39
S/UNI-APEX (PM7326) Driver Manual SAR Assist
If the connection does belong to a multicast group, the callback function provides information about the number of outgoing connections and the connection id for each outgoing connection. The SAR receive task then forwards the cell or frame to these outgoing connection. It should be noted that in the event that the cell/frame is multicast, the cell/frame is not saved in a buffer and the indication callback functions indRxCell or indRxFrm are not invoked. The contents of the cell and frame are not checked for errors in payload, such as CRC errors, errors in frame length etc. On the other hand, if the connection does not belong to a multicast group, the callback function returns the number of outgoing connections as 0. The SAR receive task then retrieves the cell or frame, saves it to a buffer, and invokes the callback functions indRxCell or indRxFrm (as in the case where multicasting support is not enabled).
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
40
S/UNI-APEX (PM7326) Driver Manual Data Structures
7
DATA STRUCTURES
The following are the main data structures used by the S/UNI-APEX driver.
7.1
Global Driver Database
Table 4: Global Driver Database: sAPX_GDD Member Name
u4Mode
Type
UINT4
Description 1: Interrupt mode 2: Polling mode Total memory allocated by driver 1: Read from driver's context memory image 0: Read from actual physical context memory
u4MemSz u4ImgRd
UINT4 UINT4
semApex u2NumDevs u2NumDevsActive sMiv psDdb
APX_SEM_ID UINT2 UINT2 sAPX_MIV sAPX_DDB *
Semaphore to protect critical sections of driver Number of devices currently registered. Number of devices in active state Module initialization vector Array of (u2MaxDevs) device data block (DDBs) pointers of the registered devices An array of pointers to different initialization vector profiles. A profile simply serves as a "canned configuration" that can be used to initialize a device without having to pass all the initialization parameters every time a device is configured. Instead, the application passes a profile number. The driver then indexes this array, obtains the initialization vector, and configures the device accordingly.
psInitProfs
sAPX_INIT_VECT *
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
41
S/UNI-APEX (PM7326) Driver Manual Data Structures
Member Name
psPortProfs
Type
sAPX_PORT_VECT *
Description An array of pointers to port-parameter vector profiles. You can use these profile parameters to configure loop, WAN and uP ports easily without having to pass all the port parameters each time you add a port. This is useful when several ports have the same parameters. An array of pointers to class vector profiles An array of pointers to connection-parameter vector profiles
psClassProfs psConnProfs
sAPX_CLASS_VECT * sAPX_CONN_VECT *
7.2
Device Data Blocks
Each device data block (DDB) stores control information for a single S/UNI-APEX device. The driver allocates a DDB when the driver registers a new device. The driver de-allocates it when the driver deregisters the device. Table 5: Device Data Block: sAPX_DDB Member Name
u4Valid pSysInfo
Type
UINT4 void *
Description Indicates that this is a valid DDB if its value is
APX_VALID
Pointer to system-specific device information. For example, in PCI bus environments, the bus, device, function numbers, IRQ assignment. Device state, which can be one of the following:
* * APX_PRESENT APX_INIT APX_ACTIVE
eDevState
eAPX_DEV_STATE
*
u4BaseAddr UINT4
Base address of the device
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
42
S/UNI-APEX (PM7326) Driver Manual Data Structures
Member Name
usrCtxt
Type
APX_USR_CTXT
Description Pointer to device context information, which the application maintains. Your application must pass this pointer while adding the device. The driver passes this information when it invokes the indication callbacks. Cell-buffer diagnostic access-mode:
* * CB_DIAG_DISABLED CB_DIAG_READ CB_DIAG_WRITE
u4CbDiagMd
UINT4
*
u4MaxVCs u4MaxCellBufs u1LpTxECIPreEn u1LpTxHecDis u1WanTxECIPreEn u1WanTxHecDis u2LpTxSwPreEn u2WanTxSwPreEn u4QLClsStartAddr u4ShprStartAddr UINT4 UINT4 UINT1 UINT1 UINT1 UINT1 UINT2 UINT2 UINT4 UINT4
Maximum number of VCs to be used by device Maximum number of cell buffers (for queuing) to be used by device Indicates if ECI prepend is expected on the loop transmit interface Indicates if HEC/UDF field is expected on the loop transmit interface Indicates if ECI prepend is expected on the WAN transmit interface Indicates if HEC/UDF field is expected on the WAN transmit interface Indicates if a switch tag prepend is expected on the loop transmit interface Indicates if a switch tag prepend is expected on the WAN transmit interface Offset for the start of the loop-class context records in the external-queue context memory Offset for the start of the shaper TxSlot context records in the external-queue context memory Offset for the start of the cell context records in the external-queue context memory Device configuration information that the application passes to the driver. The driver writes to the appropriate device registers, based on the contents of this vector. Driver's image of the context memory
u4CellStartAddr sInitVect
UINT4 sAPX_INIT_VECT
sCtxt
sAPX_CTXT_IMG
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
43
S/UNI-APEX (PM7326) Driver Manual Data Structures
Member Name
sIsmCb sQeCb sSarCb sLpsCb
Type
sAPX_ISM_CB sAPX_QE_CB sAPX_SAR_CB sAPX_LPS_CB
Description Interrupt service control block Queue-engine control block SAR-assist control block LPS control block
7.3
Configuration Vectors
Module Initialization Vector Structure: sAPX_MIV
The application allocates the module initialization vector before initializing an S/UNIAPEX device. The module initialization vector defines the number of profiles used by the driver. Table 6: Module Initialization Vector Structure: sAPX_MIV Member Name
u2MaxInitProfs u2MaxPortProfs u4MaxClassProfs u4MaxConnProfs
Type
UINT2 UINT2 UINT4 UINT4
Description Maximum number of initialization profiles supported by the driver. Maximum number of port profiles supported by the driver. Maximum number of class profiles supported by the driver. Maximum number of connection profiles supported by the driver.
Device Initialization Vector Structure: sAPX_INIT_VECT
The application allocates the initialization vector before initializing an S/UNI-APEX device. The initialization vector contains various configuration parameters that the driver uses to program the device's control registers. It is the responsibility of the application to free the initialization vector memory.
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
44
S/UNI-APEX (PM7326) Driver Manual Data Structures
Table 7: Device Initialization Vector Structure: sAPX_INIT_VECT Member Name
u4Valid
Type
UINT4
Description Indicates whether or not this vector's contents are valid:
* * APX_VALID APX_INVALID
Note: You should not set this field.
u1SarRxPri[4] u4MaxVCs u4MaxCellBufs sRegs indCritical UINT1 UINT4 UINT4 sAPX_REGS APX_IND_INTR
Service priority for each of the four classes of the uP port Maximum number of VCs Maximum number of cell buffers available for queuing Contains the values to be written to the control registers of the device Indication callback routine, invoked by the DPR, to notify the application of a high-priority interrupt event Indication callback routine, invoked by the DPR, to notify the application of a low-priority interrupt event Indication callback routine, invoked by the SAR transmit task, to confirm the success or failure of a cell transmission request by the application Indication callback routine, invoked by the SAR transmit task, to confirm the success or failure of an AAL5 frame-transmission request by the application Indication callback routine, invoked by the SAR receive task, to notify the application of the reception of a cell Indication callback routine, invoked by the SAR receive task, to notify the application of the reception of an AAL5 frame
indError
APX_IND_INTR
indTxCell
APX_IND_TX_CELL
indTxFrm
APX_IND_TX_FRM
indRxCell
APX_IND_RX_CELL
indRxFrm
APX_IND_RX_FRM
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
45
S/UNI-APEX (PM7326) Driver Manual Data Structures
Port Vector Structure: sAPX_PORT_VECT
The driver uses the port parameters vector to store port configuration profiles. They also pass port configuration parameters to the driver. Table 8: Port Vector Structure: sAPX_PORT_VECT Member Name
u1Valid
Type
UINT1
Description Indicates whether or not this vector's contents are valid:
* * APX_VALID APX_INVALID
Note: You should not set this field.
u1Clp0Thrsh u1Clp1Thrsh u1MaxThrsh u4PollWt u4PollSeq sCschd UINT1 UINT1 UINT1 UINT4 UINT4 sAPX_CS_VECT
Maximum threshold for CLP0 cells Maximum threshold for CLP1 cells Maximum threshold for all cells LPS (or WPS) poll weight LPS poll sequence Class scheduler parameters
Class Vector Structure: sAPX_CLASS_VECT
The driver uses the class parameters vector to store class configuration profiles. It also passes class configuration parameters to the driver. Table 9: Class Vector Structure: sAPX_CLASS_VECT Member Name
u4Valid
Type
UINT4
Description Indicates whether or not this vector's contents are valid:
* * APX_VALID APX_INVALID
Note: You should not set this field.
u1ShpFlg UINT1
1: This class is shaped 0: This class in not shaped Maximum threshold for CLP0 cells Maximum threshold for CLP1 cells
u1Clp0Thrsh u1Clp1Thrsh
UINT1 UINT1
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
46
S/UNI-APEX (PM7326) Driver Manual Data Structures
Member Name
u1MaxThrsh
Type
UINT1
Description Maximum threshold for all cells
Connection Vector Structure: sAPX_CONN_VECT
The driver uses the connection parameters vector to store connection configuration profiles. It also passes connection configuration parameters to the driver. Table 10: Connection Vector Structure: sAPX_CONN_VECT Member Name
u4Valid
Type
UINT4
Description Indicates whether or not this vector's contents are valid:
* * APX_VALID APX_INVALID
Note: You should not set this field.
u1EndSegOam UINT1
00b: No redirection of OAM cells to uP 01b: Redirection of segment OAM cells to uP 10b: Redirection of end-end OAM cells to uP 11b: Redirection of both segment and end-end OAM cells to uP
u1VcVpc u1Clp0MinThrsh u1Clp0Thrsh u1Clp1Thrsh u1MaxThrsh u1EfciMd u1GfrMd u4RemapMd
UINT1 UINT1 UINT1 UINT1 UINT1 UINT1 UINT1 UINT4
VC or VPC Minimum number of CLP0 cells guaranteed to be allowed on a per-VC basis Maximum threshold for CLP0 cells Maximum threshold for CLP1 cells Maximum threshold for all cells EFCI marking mode GFR mode VC remapping mode (0-3)
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
47
S/UNI-APEX (PM7326) Driver Manual Data Structures
Member Name
eQtype
Type
eAPX_Q_TYPE
Description Queuing type, which can be one of the following:
* * WFQ FCQ SFQ
*
sRemap uQinfo sAPX_VC_REMAP uAPX_VC_Q_INFO
VC address remap information VC queuing parameters
Shaper Vector Structure: sAPX_SHPR_VECT
The shaper-parameters vector stores shaper configuration profiles and passes shaper configuration parameters to the driver. Table 11: Shaper Vector Structure: sAPX_SHPR_VECT Member Name
u1Valid
Type
UINT1
Description Indicates whether or not this vector's contents are valid:
* * APX_VALID APX_INVALID
Note: You should not set this field.
u1Port u1Class u1SlowDnEn u1ThrshEn u1ThrshVal u1MeasInt u1RedFact u4RtRate UINT1 UINT1 UINT1 UINT1 UINT1 UINT1 UINT1 UINT4
WAN port to be shaped (0 to 3) WAN port-class to be shaped Slow down enable used to provide fair shaping to high-speed VCs Enables comparison of class queue-length and shaper threshold-value Shaper threshold value (ignored if u1ThrshEn = 0) Congestion level measurement-interval (4-bit logarithmic value) Encoded slow-down rate-reduction factor (0-3) Real-time rate for shaper (9-bits)
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
48
S/UNI-APEX (PM7326) Driver Manual Data Structures
7.4
Other API Data Structures
Port ID Structure: sAPX_PORT_ID
The port ID structure identifies the port type (loop, WAN, or uP) and port number. Table 12: Port ID Structure: sAPX_PORT_ID Member Name
u2Type
Type
UINT2
Description Port type:
* * APX_LOOP_PORT APX_WAN_PORT APX_UP_PORT
*
u2Num UINT2
Port number: * * * Loop (0 to 2047) WAN (0 to 3) uP (0)
Class ID Structure: sAPX_CLASS_ID
The class ID structure identifies a port-class by port type (loop, WAN, or uP), port number, and class number. Table 13: Class ID Structure: sAPX_CLASS_ID Member Name
u1Type
Type
UINT1
Description Port type:
* * APX_LOOP_PORT APX_WAN_PORT APX_UP_PORT
*
u1Class UINT1
Class number (0 to 3)
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
49
S/UNI-APEX (PM7326) Driver Manual Data Structures
Member Name
u2Port
Type
UINT2
Description Port number: * * * Loop (0 to 2047) WAN (0 to 3) uP (0)
Connection ID Structure: sAPX_CONN_ID
The connection ID structure identifies a connection and its destination port-class. Table 14: Connection ID Structure: sAPX_CONN_ID Member Name
u1Type
Type
UINT1
Description Destination port type:
* * APX_LOOP_PORT APX_WAN_PORT APX_UP_PORT
*
u1Class u2Port UINT1 UINT2
Destination class number (0 to 3) Destination port number: * * * Loop (0 to 2047) WAN (0 to 3) uP (0)
u4ICI
UINT4
ICI of the connection
Port Weight Structure: sAPX_PORT_WT
The port weight structure specifies the weight for a particular port. Table 15: Port Weight Structure: sAPX_PORT_WT Member Name
u2PortNum u1PortWt
Type
UINT2 UINT1
Description Port number Port weight
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
50
S/UNI-APEX (PM7326) Driver Manual Data Structures
Port Sequence Structure: sAPX_PORT_SEQ
The port sequence structure specifies the sequence number for a particular port. Table 16: Port Sequence Structure: sAPX_SEQ_WT Member Name
u2PortNum u1PortSeq
Type
UINT2 UINT1
Description Port number Port sequence number
Queue-Module Information Structure: sAPX_QE_INFO
The queue-module information structure retrieves information from the queue module's control block. Table 17: Queue-Module Information Structure: sAPX_QE_INFO Member Name
u2WdgStartIci u2WdgEndIci u2PrtCfgCnt[] u2ClCfgCnt[] u4ConnCfgCnt[]
Type
UINT2 UINT2 UINT2 UINT2 UINT4
Description Start of ICI watchdog patrol range End of ICI watchdog patrol range Number of ports configured in loop, WAN, and uP directions Number of classes configured in loop, WAN, and uP directions Number of connections configured in loop, WAN and uP directions
Module Information Structure: sAPX_MODULE_INFO
The module information structure retrieves select GDD parameters. Table 18: Module Information Structure: sAPX_MODULE_INFO Member Name
u2NumDevs
Type
UINT2
Description Number of devices maintained by the driver (added)
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
51
S/UNI-APEX (PM7326) Driver Manual Data Structures
Member Name
u2NumDevsActive u4Mode
Type
UINT2 UINT4
Description Number of devices currently in APX_ACTIVE state 1: Interrupt mode 2: Poll mode Total memory allocated by the driver 1: Perform context reads from driver image 0: Perform context reads from physical context memory
u4MemSz u4ImgRd
UINT4 UINT4
Device Information Structure: sAPX_DEV_INFO
The device information structure retrieves select DDB parameters. Table 19: Device Information Structure: sAPX_DEV_INFO Member Name
u4BaseAddr u4DevState usrCtxt u4CbDiagMd u4LpClStartAddr u4ShprStartAddr u4CellStartAddr u4MaxVCs u4MaxCellBufs u1LpTxECIPreEn u1LpTxHecDis u1WanTxECIPreEn
Type
UINT4 UINT4 UINT4 UINT4 UINT4 UINT4 UINT4 UINT4 UINT4 UINT1 UINT1 UINT1
Description Base address of device Device state Pointer to device context information, which the application maintains Cell-buffer diagnostic mode Offset for the start of the loop-class context records in the external-queue context memory Offset for the start of the shaper TxSlot context records in the external-queue context memory Offset for the start of the cell context records in the external-queue context memory Maximum number of VCs Maximum number of cell buffers available for queuing Indicates if ECI prepend is expected on the loop transmit interface Indicates if HEC/UDF field is expected on the loop transmit interface Indicates if ECI prepend is expected on the WAN transmit interface
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
52
S/UNI-APEX (PM7326) Driver Manual Data Structures
Member Name
u1WanTxHecDis u2LpTxSwPreEn u2WanTxSwPreEn
Type
UINT1 UINT2 UINT2
Description Indicates if HEC/UDF field is expected on the WAN transmit interface Indicates if a switch tag prepend is expected on the loop transmit interface Indicates if a switch tag prepend is expected on the WAN transmit interface
SAR Transmit Context Structure: sAPX_TX_CTXT
The transmit context structure stores information about a transmit cell/frame for the SAR transmit task. Table 20: SAR Transmit Context Structure: sAPX_TX_CTXT Member Name
Apex txType txInfo
Type
APEX eAPX_SAR_TX_TYPE union (sAPX_CELL_INFO or sAPX_FRM_INFO)
Description Apex device handle Transmit type (either cell or frame) Stores either cell information or frame information
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
53
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
8
APPLICATION PROGRAMMING INTERFACE
This section provides a detailed description of each function that is a member of the S/UNI-APEX driver API. The API functions typically execute in the context of an application task. Note: These functions are typically not re-entrant. Therefore, you should be careful not to execute the same functions in multiple tasks running concurrently. The driver does protect its data structures from simultaneous access by a single application task and all its internal tasks (i.e., the DPR and SAR tasks).
8.1
Driver Initialization and Shutdown Functions
This section describes the functions that initialize and shutdown the driver.
Initializing the Driver: apexModuleInit
This function initializes the device driver. Initialization involves allocating memory for the driver data structures (such as the GDD and DDB) and initializing these data structures. Prototype Inputs
INT4 apexModuleInit(sAPX_MIV *psMiv)
psMiv: Module initialization vector. The driver copies this vector into the GDD.
Outputs Returns
None
APX_SUCCESS APX_ERR_MODULE_ALREADY_INIT APX_ERR_MEM_ALLOC APX_ERR_SEMAPHORE
Shutting Down the Driver: apexModuleShutdown
This function shuts down the driver. Shutdown involves deleting all devices that the driver controls and de-allocating the GDD. Prototype
void apexModuleShutdown(void)
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
54
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Inputs Outputs Returns
None None None
8.2
Profile Management Functions
This section describes the functions that add, copy, and clear the following profiles: * * * * Initialization Profiles Port Profiles Class Profiles Connection Profiles
8.3
Initialization Profile Functions
This section describes the functions that add, copy, and clear initialization profiles.
Setting Initialization Profile Vectors: apexSetInitProfile
This function validates an initialization vector passed by the application and copies it into the GDD. Your application can now initialize a device by simply passing the initialization profile number. You should call this function only after apexModuleInit. Prototype
INT4 apexSetInitProfile(sAPX_INIT_VECT *psProfile, UINT4 *pu4ProfileNum)
Inputs Outputs Returns
psProfile: Profile that your application is setting
pu4ProfileNum: Profile number assigned by the driver
APX_SUCCESS APX_ERR_MODULE_NOT_INIT APX_ERR_INVALID_INIT_VECTOR APX_ERR_PROFILES_FULL APX_ERR_MEM_ALLOC
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
55
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Getting Initialization Profiles: apexGetInitProfile
This function copies the contents of the specified initialization vector stored in the GDD into the init-vector variable, which you provide. You should call this function only after calling apexModuleInit. Prototype
INT4 apexGetInitProfile(UINT4 u4ProfileNum, sAPX_INIT_VECT *psProfile)
Inputs Outputs
u4ProfileNum: Profile number to display
psProfile: The driver copies the profile contents to this area, which
you provide Returns
APX_SUCCESS APX_ERR_MODULE_NOT_INIT APX_ERR_INVALID_PROFILE_NUM
Clearing Initialization Profiles: apexClrInitProfile
Given the profile number, this function clears an initialization vector profile, Prototype Inputs Outputs Returns
INT4 apexClrInitProfile(UINT4 u4ProfileNum)
u4ProfileNum: Initialization vector profile-number
None
APX_SUCCESS APX_ERR_MODULE_NOT_INIT APX_ERR_INVALID_PROFILE_NUM
8.4
Port Profile Functions
This section describes the functions that add, copy, and clear port profiles.
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
56
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Setting Port Profile Vectors: apexSetPortProfile
This function validates a port parameters vector, which you provide, and copies it into the GDD. Your application can now initialize a port by simply passing the initialization profile number. You should call this function only after apexModuleInit. Prototype
INT4 apexSetPortProfile(sAPX_PORT_VECT *psProfile, UINT4 *pu4ProfileNum)
Inputs Outputs Returns
psProfile: Profile that your application is setting
pu4ProfileNum: Profile number assigned by the driver
APX_SUCCESS APX_ERR_MODULE_NOT_INIT APX_ERR_INVALID_PORT_VECTOR APX_ERR_PROFILES_FULL APX_ERR_MEM_ALLOC
Getting Port Profiles: apexGetPortProfile
This function copies the contents of the specified port-parameters vector to the variable you provide. Prototype
INT4 apexGetPortProfile(UINT4 u4ProfileNum, sAPX_PORT_VECT *psProfile)
Inputs Outputs Returns
u4ProfileNum: Profile number to display
psProfile: Profile contents are copied here
APX_SUCCESS APX_ERR_MODULE_NOT_INIT APX_ERR_INVALID_PROFILE_NUM
Clearing Port Profiles: apexClrPortProfile
Given the profile number, this function clears a port vector profile. Prototype
INT4 apexClrPortProfile(UINT4 u4ProfileNum)
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
57
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Inputs Outputs Returns
u4ProfileNum: Port-vector profile number
None
APX_SUCCESS APX_ERR_MODULE_NOT_INIT APX_ERR_INVALID_PROFILE_NUM
8.5
Class Profile Functions
This section describes the functions that add, copy, and clear class profiles.
Setting Class Profile Vectors: apexSetClassProfile
This function validates a class-parameters vector and copies it into the GDD. Your application can now initialize a class by simply passing the initialization profile number. You should call this function only after apexModuleInit. Prototype
INT4 apexSetClassProfile(sAPX_CLASS_VECT *psProfile, UINT4 *pu4ProfileNum)
Inputs Outputs Returns
psProfile: The profile that your application is adding
pu4ProfileNum: Profile number assigned by the driver
APX_SUCCESS APX_ERR_MODULE_NOT_INIT APX_ERR_INVALID_CLASS_VECTOR APX_ERR_PROFILES_FULL APX_ERR_MEM_ALLOC
Getting Class Profiles: apexGetClassProfile
This function copies the contents of the specified class-parameters vector from the GDD to the variable you provide. Prototype
INT4 apexGetClassProfile(UINT4 u4ProfileNum, sAPX_CLASS_VECT *psProfile)
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
58
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Inputs Outputs Returns
u4ProfileNum: Profile number to display
psProfile: Profile contents are copied in here
APX_SUCCESS APX_ERR_MODULE_NOT_INIT APX_ERR_INVALID_PROFILE_NUM
Clearing Class Profiles: apexClrClassProfile
Given the profile number, this function clears a class vector profile. Prototype Inputs Outputs Returns
INT4 apexClrClassProfile(UINT4 u4ProfileNum)
u4ProfileNum: Class-vector profile number
None
APX_SUCCESS APX_ERR_MODULE_NOT_INIT APX_ERR_INVALID_PROFILE_NUM
8.6
Connection Profile Functions
This section describes the functions that add, copy, and clear connection profiles.
Setting Connection Profile Vectors: apexSetConnProfile
This function validates a connection-parameters vector and copies it into the GDD. Your application can now initialize a connection by simply passing the initialization profile number. The driver should call this function only after calling apexModuleInit. Prototype
INT4 apexSetConnProfile(sAPX_CONN_VECT *psProfile, UINT4 *pu4ProfileNum)
Inputs
psProfile: Profile that your application is setting
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
59
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Outputs Returns
pu4ProfileNum: Profile number assigned by the driver
APX_SUCCESS APX_ERR_MODULE_NOT_INIT APX_ERR_INVALID_CONN_VECTOR APX_ERR_PROFILES_FULL APX_ERR_MEM_ALLOC
Getting Connection Profiles: apexGetConnProfile
This function copies the contents of the specified connection-parameters vector from the GDD to the variable you provide. Prototype
INT4 apexGetConnProfile(UINT4 u4ProfileNum, sAPX_CONN_VECT *psProfile)
Inputs Outputs Returns
u4ProfileNum: Profile number to display
psProfile: Profile contents are filled in here
APX_SUCCESS APX_ERR_MODULE_NOT_INIT APX_ERR_INVALID_PROFILE_NUM
Clearing Connection Profiles: apexClrConnProfile
Given the profile number, this function clears a connection vector profile. Prototype Inputs Outputs Returns
INT4 apexClrConnProfile(UINT4 u4ProfileNum)
u4ProfileNum: Connection vector profile number
None
APX_SUCCESS APX_ERR_MODULE_NOT_INIT APX_ERR_INVALID_PROFILE_NUM
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
60
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
8.7
Device Addition and Removal Functions
This section describes the functions needed to add and removal devices.
Adding Devices: apexAdd
This function detects the new device in the hardware, assigns the device a device data block (DDB). Then it stores context information, which you maintain, for the device being added. Finally, it returns a device handle back to the application. You should use the device handle to identify the device on which the driver will perform the operation. Your application should call this function only after it calls apexModuleInit. Prototype Inputs
INT4 apexAdd(APX_USR_CTXT usrCtxt, APEX *pApex)
usrCtxt: Pointer to device context information, which the application
maintains Outputs
pApex: Pointer to the S/UNI-APEX device handle that contains context information maintained by the driver.
Returns
APX_SUCCESS APX_ERR_MODULE_NOT_INIT APX_ERR_DEVS_FULL APX_ERR_DEV_NOT_DETECTED APX_ERR_DEV_ALREADY_ADDED APX_ERR_INVALID_TYPE_ID APX_ERR_DLL_PHASE_LOCK
Side Effects
The device state changes to APX_PRESENT. The driver applies a software reset to the device.
Deleting Devices: apexDelete
This function removes the specified device from the list of devices that the driver controls. Deleting a device involves clearing the DDB for that device. Prototype Inputs
INT4 apexDelete(APEX apex)
apex: Device handle
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
61
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Outputs Returns
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE
Valid States Side Effects
APX_PRESENT
The device handle, apex, is no longer valid.
8.8
Device Register Access Functions
Reading From Device Registers: apexReadReg
This function can be used to read the various registers of the APEX device. Prototype Inputs
INT4 apexReadReg(APEX apex, UINT4 u4RegOff, UINT4 *pu4Val)
apex: Device handle u4RegOff: Register's offset from the base address
(for example, 0x10, 0x14 etc) Outputs Returns
pu4Val: Contents of the register
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_REG
Side Effects
Will clear clear-on-read registers (e.g., interrupt status registers)
Writing To Device Registers: apexWriteReg
This function is used to write to the various registers of the APEX device. Prototype
INT4 apexWriteReg(APEX apex, UINT4 u4RegOff, UINT4 u4Val)
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
62
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Inputs
apex: Device handle u4RegOff: Register's offset from the base address
(for example, 0x10, 0x14 etc)
u4Val: Data to be written to the register
Outputs Returns
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_REG
Side Effects
Writes to device registers after device initialization will overwrite initialization data and may cause incorrect operation of the device. Use with caution!
8.9
Device Diagnostic Functions
This section describes the functions that perform the following device tests:
Testing Register Access: apexRegisterTest
This function tests the microprocessor's access to the device registers by writing values to the registers and reading them back. Prototype Inputs Outputs Returns
INT4 apexRegisterTest(APEX apex)
apex: Device handle
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_FAILURE
Side Effects
The device is reset and put in the APX_PRESENT state
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
63
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Testing Access to External Queue Context-Memory: apexExtQCtxtTest
This function tests the microprocessor's access to the external queue context-memory aperture. Prototype
INT4 apexExtQCtxtTest(APEX apex, UINT1 u1TestType, UINT4 u4QuadStart, UINT4 u4QuadNum, sAPX_DATA34 *psPattern)
Inputs
apex: Device handle u1TestType (ZBT SSRAM tests):
* * * * * *
0x00: WrRd.. pattern test 0x01: WrWr..RdRd.. pattern test 0x02: Address aliasing test 0x10: WrRd.. pattern test 0x11: WrWr..RdRd.. pattern test 0x12: Address aliasing test
u1TestType (late write SSRAM tests):
u4QuadStart: Starting quad-word for test u4QuadNum: Number of quad-words to test psPattern: Test pattern (only applicable for pattern tests)
Outputs Returns
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_TEST_PARAM APX_FAILURE APX_ERR_POLL_TIMEOUT
Side Effects
The device is reset and put in the APX_PRESENT state
Testing Access to Internal Queue Context-Memory: apexIntQCtxtTest
This function tests the microprocessor's access to the internal queue context-memory aperture. Prototype
INT4 apexIntQCtxtTest(APEX apex, UINT1 u1TestType, UINT4 u4QuadStart, UINT4 u4QuadNum, sAPX_DATA34 *psPattern)
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
64
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Inputs
apex: Device handle u1TestType:
* * *
0: WrRd.. pattern test 1: WrWr..RdRd.. pattern test 2: address aliasing test
u4QuadStart: Starting quad-word for test (0..1559) u4QuadNum: Number of quad-words to test (1..1559) psPattern: Test pattern (only applicable for pattern tests). If test
includes quad-words in the range 512-1023, then test pattern words should not be more than 16-bits wide Outputs Returns None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_TEST_PARAM APX_ERR_INVALID_ADDR APX_ERR_POLL_TIMEOUT APX_FAILURE
Side Effects
The device is reset and put in the APX_PRESENT state
Testing Access to LPS Context-Memory: apexLpsCtxtTest
This function tests the microprocessor's access to the LPS context-memory aperture. Prototype
INT4 apexLpsCtxtTest(APEX apex, UINT1 u1Ctxt, UINT1 u1TestType, UINT4 u4Pattern)
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
65
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Inputs
apex: Device handle u1Ctxt:
* * * * *
0: LPS port poll-sequence context 1: LPS port weight context 2: LPS transmit-class status context 0: WrRd.. pattern test 1: WrWr..RdRd.. pattern test
u1TestType:
u4Pattern: Test pattern
Outputs Returns
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_TEST_PARAM APX_ERR_POLL_TIMEOUT APX_FAILURE
Side Effects
The device is reset and put in the APX_PRESENT state
Testing Access to WPS Context-Memory: apexWpsCtxtTest
This function tests the microprocessor's access to the WPS context-memory aperture. Prototype Inputs
INT4 apexWpsCtxtTest(APEX apex, UINT4 u4Pattern)
apex: Device handle u4Pattern: Test pattern
Outputs
None
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
66
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Returns
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_TEST_PARAM APX_ERR_POLL_TIMEOUT APX_FAILURE
Side Effects
The device is reset and put in the APX_PRESENT state
Testing Access to the External SDRAM Cell-Buffers: apexCellBufTest
This function tests the microprocessor's access to the device's associated cell-buffer SDRAM. It does this by writing test-cell patterns to the SDRAM and reading them back. Prototype
INT4 apexCellBufTest (APEX apex, UINT4 u4CellStartAddr, UINT4 u4NumCells, UINT1 u1TestType, UINT4 u4Pattern)
Inputs
apex: Device handle u4CellStartAddr: Address in SDRAM to start the test from u4NumCells: Number of cells u1TestType:
* *
0: WrWr..RdRd.. pattern test 1: Address aliasing test
u4Pattern: Test pattern (only applicable for pattern tests)
Outputs Returns
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_FAILURE APX_INVALID_TEST_PARAM APX_ERR_POLL_TIMEOUT
Valid States
APX_INIT APX_ACTIVE
Side Effects
The device is reset and put into the APX_PRESENT state
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
67
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Testing the Context Memory Image: apexCtxtMemCheck
This function tests the context memory image maintained by the driver. The driver compares the context memory image with the contents of the actual context memory. Prototype Inputs Outputs Returns
INT4 apexCtxtMemCheck(APEX apex)
apex: Device handle
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_PORT_CTXT_CHK APX_ERR_CLASS_CTXT_CHK APX_ERR_CONN_CTXT_CHK
Valid States
APX_INIT APX_ACTIVE
Side Effects
Can slow down device operations due to bottleneck at the memory port interface
8.10 Device Reset and Initialization Functions
This section describes the functions needed to reset and initialize S/UNI-APEX devices.
Resetting Devices: apexReset
This function applies a software reset to the S/UNI-APEX device. It also resets all the DDB contents (except for the initialization vector, which is not modified). Your application should call this function before initializing the device with a new initialization vector. Prototype Inputs
INT4 apexReset(APEX apex)
apex: Device handle
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
68
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Outputs Returns
None
APX_SUCCESS APX_ERR_INVALID_DEV
Side Effects
The device state changes to APX_PRESENT. Therefore, your application must initialize the device after a reset.
Initializing Devices: apexInit
This function initializes the device based on an initialization vector passed by the application. This driver validates the vector and copies it into the DDB. Then the driver configures the device registers according to the contents of the initialization vector. Alternatively, you can also use an initialization vector profile number. In this case, driver copies the profile contents (stored in GDD) into the DDB. The driver has now finished initializing the device as per the profile contents. Note: This function may modify the mask registers in the initialization vector supplied by your application Prototype
INT4 apexInit(APEX apex, sAPX_INIT_VECT *psInitVect, UINT4 u4ProfileNum)
Inputs
apex: Device handle psInitVect: The initialization vector that the driver uses to program
the device registers. You should set this pointer to NULL if you are using an initialization vector profile.
u4ProfileNum: Profile number the driver will use to get the
initialization vector from the GDD. You should set this variable to 0xffffffff if you are directly passing an initialization vector. Outputs Returns
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_INIT_VECTOR APX_ERR_INVALID_PROFILE_NUM APX_ERR_PROFILE_VECTOR_BOTH_VALID
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
69
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Valid States Side Effects
APX_PRESENT
The device state changes to APX_INIT
8.11 Device Activation and Deactivation Functions
This section describes the functions needed to activate and deactivate S/UNI-APEX devices.
Activating Devices: apexActivate
This function activates the S/UNI-APEX device by preparing it for normal operation. Activation involves installing and enabling device interrupts; enabling the queue engine's external interfaces; and enabling the transmission and reception of cells and frames from the microprocessor port. If this is the first device that the driver activates, the DPR task and the SAR tasks, along with the associated message queues, are created. Prototype Inputs Outputs Returns
INT4 apexActivate(APEX apex)
apex: Device handle
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_SAR_INSTALL
Valid States Side Effects
APX_INIT
The device state changes to APX_ACTIVE
Deactivating Devices: apexDeactivate
This function de-activates the S/UNI-APEX device and removes it from normal operation. Deactivation involves removing device interrupts; disabling the queue engine's external interfaces; and disabling transmission and reception of cells and frames from the microprocessor port.
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
70
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Prototype Inputs Outputs Returns
INT4 apexDeactivate(APEX apex)
apex: Device handle
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_SAR_REMOVE
Valid States Side Effects
APX_ACTIVE
The device state changes to APX_INIT. If this is the last device that the driver is deactivating, then the driver also deletes the DPR task, the SAR-component transmit and receive tasks, and their associated message queues.
8.12 Queue Engine Functions
This section describes the queue engine functions that include: * * * * Setup, disable, re-enable, and teardown of ports, classes, and connections Updating the congestion thresholds and scheduling parameters for direction, ports, classes and connections Setup and teardown of shapers Watchdog patrol operations
8.13 Direction Functions
This section describes how to update the congestion thresholds for the Loop and WAN directions.
Updating Direction Thresholds: apexSetDirCongThrsh
This function updates the congestion thresholds for the Loop and WAN directions
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
71
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Prototype
INT4 apexSetDirCongThrsh(APEX apex, UINT1 u1Dir, UINT1 u1Clp0Thrsh, UINT1 u1Clp1Thrsh, UINT1 u1MaxThrsh)
Inputs
apex: Device handle u1Dir: Direction for setting thresholds (Loop or WAN direction) u1Clp0Thrsh: Value for CLP0 threshold u1Clp1Thrsh: Value for CLP1 threshold u1MaxThrsh: Value for max threshold
Outputs Returns
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_DIR APX_ERR_INVALID_DIR_THRSH
Valid States
APX_INIT APX_ACTIVE
8.14 Port Functions
This section describes how to set up, disable, re-enable, tear down ports and update the port thresholds and class scheduling parameters for a port, which has already been set up.
Setting Up Ports: apexPortSetup
This function configures and enables a port based on a port-parameters vector passed by the application. Alternatively, the application can pass the profile number of a port-vector already registered with the driver. Prototype
INT4 apexPortSetup(APEX apex, sAPX_PORT_ID *psPortId, sAPX_PORT_VECT *psPortVect, UINT4 u4ProfileNum)
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
72
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Inputs
apex: Device handle psPortId: Port to be configured psPortVect: Port vector that the driver uses to program the port context records. You should set this pointer to NULL if you are using a port vector profile. u4ProfileNum: Profile number the driver will use to get the port
vector from the GDD. You should set this variable to 0xffffffff if you are instead directly passing a port vector. Outputs Returns None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_PORT_ID APX_ERR_PORT_NOT_FREE APX_ERR_PROFILE_VECTOR_BOTH_VALID APX_ERR_INVALID_PORT_VECTOR APX_ERR_INVALID_PROFILE_NUM APX_ERR_POLL_TIMEOUT
Valid States
APX_INIT APX_ACTIVE
Disabling Ports: apexPortDisable
This function disables an active port. If the port is already disabled, the function returns without doing anything. Prototype Inputs
INT4 apexPortDisable(APEX apex, sAPX_PORT_ID *psPortId)
apex: Device handle psPortId: Port to be disabled
Outputs
None
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
73
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Returns
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_PORT_ID APX_ERR_PORT_NOT_CFG APX_ERR_POLL_TIMEOUT
Valid States Side Effects
APX_ACTIVE
Disables all associated classes and connections
Re-Enabling Ports: apexPortEnable
This function enables a disabled port. If the port is already enabled, the function returns without doing anything. Prototype Inputs
INT4 apexPortEnable(APEX apex, sAPX_PORT_ID *psPortId)
apex: Device handle psPortId: Port to be enabled
Outputs Returns
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_PORT_ID APX_ERR_PORT_NOT_CFG APX_ERR_POLL_TIMEOUT
Valid States Side Effects
APX_ACTIVE
Enables all associated classes and connections
Tearing Down Ports: apexPortTeardown
This function tears down a port and all additional classes and connections associated with the port.
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
74
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Prototype Inputs
INT4 apexPortTeardown(APEX apex, sAPX_PORT_ID *psPortId)
apex: Device handle psPortId: Port to be torn down
Outputs Returns
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_PORT_ID APX_ERR_PORT_NOT_CFG APX_ERR_POLL_TIMEOUT
Valid States Side Effects
APX_ACTIVE
Tears down associated classes and connections
Updating Port Congestion Thresholds: apexSetPrtCongThrsh
This function updates the congestion thresholds for a port, which has already been set up. Prototype
INT4 apexSetPrtCongThrsh(APEX apex, sAPX_PORT_ID *psPortId, UINT1 u1Clp0Thrsh, UINT1 u1Clp1Thrsh, UINT1 u1MaxThrsh) apex: Device handle psPortId: Port id u1Clp0Thrsh: Value for CLP0 threshold u1Clp0Thrsh: Value for CLP1 threshold u1MaxThrsh: Value for max threshold
Inputs
Outputs
None
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
75
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Returns
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_PORT_ID APX_ERR_PORT_NOT_CFG APX_ERR_INVALID_PORT_THRSH
Valid States
APX_INIT APX_ACTIVE
Updating Class Scheduling Parameters: apexSetClSchd
This function updates the class scheduling parameters for a port, which has already been setup. Prototype
INT4 apexSetClSchd(APEX apex, sAPX_PORT_ID *psPortId, sAPX_CS_VECT *psCsVect) apex: Device handle psPortId: Port id psCsVect: Pointer to structure containing class scheduling parameters
Inputs
Outputs Returns
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_PORT_ID APX_ERR_PORT_NOT_CFG APX_ERR_INVALID_CL_SCHD
Valid States
APX_INIT APX_ACTIVE
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
76
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
8.15 Class Functions
This section describes how to set up, disable, re-enable, tear down classes and updating class congestion thresholds for a class which has already been set up.
Setting Up Classes: apexClassSetup
This function configures and enables a class that is based on a class-parameters-vector passed by the application. Alternatively, the application can pass the profile number of a class-vector already registered with the driver. Note: The driver will not allow a class setup operation until your application enables the associated port. Prototype
INT4 apexClassSetup(APEX apex, sAPX_CLASS_ID *psClassId, sAPX_CLASS_VECT *psClassVect, UINT4 u4ProfileNum)
Inputs
apex: Device handle psClassId: Port class to be configured psClassVect: Class vector that the driver uses to program the class context record. You should set this pointer to NULL if you are using a class vector profile. u4ProfileNum: Profile number the driver will use to get the port
vector from the GDD. You should set this variable to 0xffffffff if you are directly passing a port vector. Outputs Returns None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_CLASS_ID APX_ERR_PORT_NOT_ENABLED APX_ERR_CLASS_NOT_FREE APX_ERR_PROFILE_VECTOR_BOTH_VALID APX_ERR_INVALID_CLASS_VECTOR APX_ERR_INVALID_PROFILE_NUM APX_ERR_POLL_TIMEOUT
Valid States
APX_INIT APX_ACTIVE
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
77
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Disabling Classes: apexClassDisable
This function disables a configured class. Prototype Inputs
INT4 apexClassDisable(APEX apex, sAPX_CLASS_ID *psClassId)
apex: Device handle psClassId: Class to be disabled
Outputs Returns
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_CLASS_ID APX_ERR_CLASS_NOT_CFG APX_ERR_POLL_TIMEOUT
Valid States Side Effects
APX_ACTIVE
Disables all associated connections
Re-Enabling Classes: apexClassEnable
This function enables a disabled class. If the class is enabled, the function returns without doing anything. Note: The driver will not allow a class-enable operation unless your application has enabled the associated port. Prototype Inputs
INT4 apexClassEnable(APEX apex, sAPX_CLASS_ID *psClassId)
apex: Device handle psClassId: Class to be enabled
Outputs
None
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
78
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Returns
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_CLASS_ID APX_ERR_PORT_NOT_ENABLED APX_ERR_CLASS_NOT_CFG APX_ERR_POLL_TIMEOUT
Valid States Side Effects
APX_ACTIVE
Enables all associated connections
Tearing Down Classes: apexClassTeardown
This function first tears down all connections associated with this class, thereafter tearing down the class itself. Prototype Inputs
INT4 apexClassTeardown(APEX apex, sAPX_CLASS_ID *psClassId)
apex: Device handle psClassId: Class to be torn down
Outputs Returns
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_CLASS_ID APX_ERR_CLASS_NOT_CFG APX_ERR_POLL_TIMEOUT
Valid States Side Effects
APX_ACTIVE
Tears down all associated connections
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
79
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Updating Class Congestion Thresholds: apexSetClCongThrsh
This function updates the congestion thresholds for a class, which has already been set up. Prototype
INT4 apexSetClCongThrsh(APEX apex, sAPX_CLASS_ID *psClassId, UINT1 u1Clp0Thrsh, UINT1 u1Clp1Thrsh, UINT1 u1MaxThrsh) apex: Device handle psClassId: Class id u1Clp0Thrsh: Value for CLP0 threshold u1Clp0Thrsh: Value for CLP1 threshold u1MaxThrsh: Value for max threshold
Inputs
Outputs Returns
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_CLASS_ID APX_ERR_CLASS_NOT_CFG APX_ERR_INVALID_CLASS_THRSH
Valid States
APX_INIT APX_ACTIVE
8.16 Shaper Functions
This section describes the functions that set up and tear down shapers.
Setting Up Shapers: apexShprSetup
This function configures and enables a shaper based on a shaper parameters-vector passed by the application. Note: Your application should configure shapers before activating a device and before configuring the associated port-classes
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
80
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Prototype
INT4 apexShprSetup(APEX apex, UINT1 u1ShprId, sAPX_SHPR_VECT *psShprVect)
Inputs
apex: Device handle u1ShprId: Shaper to be configured (0-3) psShprVect: Shaper parameters vector the driver uses to program the port context records
Outputs Returns
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_SHPR_ID APX_ERR_SHPR_NOT_FREE APX_ERR_INVALID_SHPR_VECTOR APX_ERR_POLL_TIMEOUT
Valid States
APX_INIT
Tearing Down Shapers: apexShprTeardown
This function tears down a shaper. Shapers can only be torn down if the queue engine is disabled (the device is de-activated). Note: A shaper should be torn down only after its associated port-class is torn down. Prototype Inputs
INT4 apexShprTeardown(APEX apex, UINT1 u1ShprId)
apex: Device handle u1ShprId: Shaper to be torn down (0-3)
Outputs
None
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
81
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Returns
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_SHPR_ID APX_ERR_SHPR_NOT_FREE APX_ERR_POLL_TIMEOUT
Valid States
APX_INIT
8.17 Connection Functions
This section describes how to set up, disable, re-enable, and tear down connections. It also describes how to update the congestion thresholds, WFQ weights and shape single rate parameters for connections that have already been set up.
Setting Up Connections: apexConnSetup
This function configures and enables a connection based on a connection-parameters vector passed by the application. Alternatively, the application can pass the profile number of a connection-vector already registered with the driver. Note: The driver will not allow a connection setup operation until your application has enabled the associated port and class. The connection vector must contain shape fair queue (SFQ) parameters if the class has been configured to be shaped. Prototype
INT4 apexConnSetup(APEX apex, sAPX_CONN_ID *psConnId, sAPX_CONN_VECT *psConnVect, UINT4 u4ProfileNum)
Inputs
apex: Device handle psConnId: Connection to be configured psConnVect: Connection vector that the driver uses to program the VC context records. You should set this pointer to NULL if you are using a connection vector profile. u4ProfileNum: The driver uses this profile number to get the
connection vector from the GDD. You should set this variable to 0xffffffff if you are directly passing a connection vector. Outputs None
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
82
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Returns
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_CONN_ID APX_ERR_INVALID_CONN_VECTOR APX_ERR_INVALID_PROFILE_NUM APX_ERR_PROFILE_VECTOR_BOTH_VALID APX_ERR_PORT_NOT_ENABLED APX_ERR_CLASS_NOT_ENABLED APX_ERR_CONN_NOT_FREE APX_ERR_POLL_TIMEOUT
Valid States
APX_INIT APX_ACTIVE
Disabling Connections: apexConnDisable
This function disables a configured connection. Prototype Inputs
INT4 apexConnDisable(APEX apex, UINT4 u4ICI)
apex: Device handle u4ICI: ICI of the connection to be disabled
Outputs Returns
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_ICI APX_ERR_CONN_NOT_CFG APX_ERR_POLL_TIMEOUT
Valid States
APX_ACTIVE
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
83
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Re-Enabling Connections: apexConnEnable
This function enables a disabled connection. If the connection is already enabled, the function returns without doing anything. Note: The driver will not allow a connection enable operation unless your application has enabled the associated port and class. Prototype Inputs
INT4 apexConnEnable(APEX apex, UINT4 u4ICI)
apex: Device handle u4ICI: ICI of the connection to be enabled
Outputs Returns
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_PORT_NOT_ENABLED APX_ERR_CLASS_NOT_ENABLED APX_ERR_CONN_NOT_CFG APX_ERR_INVALID_ICI APX_ERR_POLL_TIMEOUT
Valid States
APX_ACTIVE
Tearing Down Connections: apexConnTeardown
This function tears down a configured connection. If the connection is currently active, the driver first disables it, and then tears it down. Prototype Inputs
INT4 apexConnTeardown(APEX apex, UINT4 u4ICI)
apex: Device handle u4ICI: ICI of the connection to be disabled
Outputs
None
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
84
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Returns
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_ICI APX_ERR_CONN_NOT_CFG APX_ERR_POLL_TIMEOUT
Valid States
APX_ACTIVE
Updating Connection Congestion Thresholds: apexSetConnCongThrsh
This function updates the congestion thresholds for an already set-up connection. Prototype
INT4 apexSetConnCongThrsh(APEX apex, UINT4 u4ICI, UINT1 u1Clp0Thrsh, UINT1 u1Clp1Thrsh, UINT1 u1MaxThrsh) apex: Device handle u4Ici: Connection id u1Clp0Thrsh: Value for CLP0 threshold u1Clp0Thrsh: Value for CLP1 threshold u1MaxThrsh: Value for max threshold
Inputs
Outputs Returns
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_ICI APX_ERR_CONN_NOT_CFG APX_ERR_INVALID_CONN_THRSH
Valid States
APX_INIT APX_ACTIVE
Updating Class Queuing Weight: apexSetConnWfqWt
This function updates the class queuing weight for a connection with queue type WFQ.
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
85
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Prototype Inputs
INT4 apexSetConnWfqWt(APEX apex, UINT4 u4ICI, UINT1 u1Wt) apex: Device handle u4Ici: Connection id u1Wt: Class queue weight for WFQ connection
Outputs Returns
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_ICI APX_ERR_CONN_NOT_CFG APX_ERR_INVALID_CONN_TYPE APX_ERR_INVALID_WFQ_WT
Valid States
APX_INIT APX_ACTIVE
Updating Shaped Single Rate Parameters: apexSetConnShpSnglRt
This function updates the shape single rate parameters for a shaped connection. Prototype
INT4 apexSetConnShpSnglRt(APEX apex, UINT4 u4ICI, UINT1 u1ShpPrescale, UINT2 u2ShpLateBits, UINT2 u2ShpCdvt, UINT2 u2ShpIncr) apex: Device handle u4ICI: Connection id u1ShpPrescale: Determines resolution of shape increment u2ShpLateBits: Number of bits required to represent
Inputs
ShpTxSlotLate field u2ShpCdvt: Cell delay variance tolerance u2ShpIncr: Shape increment Outputs None
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
86
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Returns
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_ICI APX_ERR_CONN_NOT_CFG APX_ERR_INVALID_CONN_TYPE APX_ERR_INVALID_SHP_PARAM
Valid States
APX_INIT APX_ACTIVE
8.18 Watchdog Patrol Functions
Setting Watchdog Patrol Parameters: apexSetWdgPatrolRng
This function sets the ICI watchdog patrol range. Prototype
INT4 apexSetWdgPatrolRng(APEX apex, UINT2 u2StartICI, UINT2 u2EndICI)
Inputs
apex: Device handle u2StartICI: First ICI in watchdog patrol range u2EndICI: Last ICI in watchdog patrol range
Outputs Returns
None.
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_RANGE APX_ERR_INVALID_ICI APX_ERR_WDG_PTRL_BUSY
Valid States
APX_INIT APX_ACTIVE
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
87
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Getting Watchdog Patrol Parameters: apexGetWdgPatrolRng
This function gets the current settings for the ICI watchdog patrol range. Prototype
INT4 apexGetWdgPatrolRng(APEX apex, UINT2 *pu2StartICI, UINT2 *pu2EndICI)
Inputs Outputs
apex: Device handle
pu2StartICI: Pointer to first ICI in watchdog patrol range pu2EndICI: Pointer to last ICI in watchdog patrol range
Returns
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE
Valid States
APX_INIT APX_ACTIVE
Initiating a Watchdog Patrol: apexWatchdogPatrol
This function can be used to invoke the APEX watchdog macro that checks a specified range of ICIs (frame continuous queuing VCs) for frame re-assembly timeouts. If at least one VC has timed out, the APEX generates an interrupt and stores the last found ICI in the miscellaneous context record. Prototype Inputs Outputs Returns
INT4 apexWatchdogPatrol(APEX apex)
apex: Device handle
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_POLL_TIMEOUT APX_ERR_WDG_PTRL_BUSY
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
88
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Valid States
APX_ACTIVE
8.19 Segmentation and Re-assembly Assist Functions
This section describes the segmentation and re-assembly (SAR) assist functions.
Transmitting Cells: apexTxCell
Your application can use this function to transmit cells from the device's SAR interface. This function encapsulates the cell information (header, payload, and so on) in a message structure and sends it to the driver's SAR transmit task. The SAR transmit task transmits the cell and sends a transmit-cell indication, indTxCell, back to your application. Prototype
INT4 apexTxCell(APEX apex, UINT4 u4ICI, sAPX_CELL_HDR *psHdr, UINT1 *pu1Pyld, UINT1 u1CrcFlg)
Inputs
apex: Device handle u4ICI: ICI of the connection psHdr: Pointer to the cell header structure that contains the header
bytes.
pu1Pyld: Pointer to first byte of cell payload (48 contiguous bytes) u1CrcFlg: A control flag, which can be:
* * Outputs Returns
0: No CRC protection required 1: Overwrite end-of-cell with CRC-10
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_SAR_TX_MSG APX_ERR_INVALID_ICI APX_ERR_CONN_NOT_CFG
Valid States
APX_ACTIVE
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
89
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Transmitting AAL5 Frames: apexTxFrm
Your application can use this function to transmit AAL5 frames using the device's SAR interface. This function forms an AAL5 PDU from the frames you provide (padding, CRC, and AAL5 trailer) for transmission on a specified connection. The AAL5 PDU is then queued for transmission. After the driver completes transmission, it reports the results of the transmission via the indication call back, indTxFrm. Prototype
INT4 apexTxFrm(APEX apex, UINT4 u4ICI, sAPX_CELL_HDR *psHdr, UINT1 *pu1Frm, UINT4 u4Len)
Inputs
apex: Device handle u4ICI: ICI of the connection that will carry the frame psHdr: Cell header that will ride with each cell in the frame pu1Frm: Pointer to first byte of frame (buffer chain) u4Len: Frame length (in bytes)
Outputs Returns
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_SAR_TX_FRM_LENGTH APX_ERR_INVALID_ICI APX_ERR_CONN_NOT_CFG APX_ERR_SAR_TX_MSG
Valid States
APX_ACTIVE
SAR Transmit Task Function: apexSarTxTaskFn
This function represents the SAR transmit operation. It executes in the context of a separate task within the RTOS. Your implementation of the system-specific function, sysApexSarTxTaskFn, should invoke this function. This function will determine whether the information passed to it is cell information or frame information and will call the relevant functions to transmit a cell or a frame. After the transmission is complete, it will report the results of the transmission via the indication callback, indTxCell or
indTxFrm.
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
90
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Prototype Inputs
INT4 apexSarTxTaskFn(APX_TX_CTXT sTxCtxt)
sTxCtxt: Structure containing the following information:
* * * * Outputs Returns
apex: Device handle txType: Determines whether information is for cell or frame cellInfo: Cell information if txType indicates a cell frmInfo: Frame information if txType indicates a frame
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_SAR_TX_TYPE APX_ERR_SAR_TX_BUSY APX_ERR_SAR_TX_NXT_FRM_BUF
Valid States
APX_ACTIVE
SAR Receive Task Function: apexSarRxTaskFn
This function represents the SAR receive operation. It executes in the context of a separate task within the RTOS. Your implementation of the system-specific function, sysApexSarRxTaskFn, should invoke this function. The function will go through the four class queues in the order of priority that you specify. It will then read the cell header to determine whether it has to read a cell or an AAL5 frame and call the appropriate function to extract the cell or frame. After the extraction is complete, the function will invoke the indication callback function, indRxCell or indRxFrm, to notify the application. Prototype Inputs Outputs
INT4 apexSarRxTaskFn(APEX apex)
apex: Device handle
None
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
91
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Returns
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_SAR_RX_CRC10_FAIL APX_ERR_SAR_RX_BUF_FULL
Valid States
APX_ACTIVE
8.20 Multicasting Support Functions
This section describes the functions that install and reset the multicasting callback function.
Installing the Multicasting Callback Function: apexInstallMulticastFn
Installs a user provided function pointer as the multicast callback function. The installed function is invoked each time a cell/frame is received by the SAR Rx task. The callback function is responsible for determining whether the connection on which the cell/frame is received is part of a multicasting group. If so, it returns a list of connection IDs for the outgoing connections. The SAR Rx task then transmits the received cell/frame on these outgoing connections. Prototype
INT4 apexInstallMulticastFn(APEX apex, APX_MULTICAST_CB_FN multicastCbFn)
Inputs
apex: Device handle multicastFn: pointer to the multicasting callback function
Outputs Returns
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE
Valid States
APX_INIT APX_ACTIVE
Side Effects
Enables the multicasting support provided by the driver
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
92
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Resetting the Multicasting Callback Function: apexResetMulticastFn
This function is used to reset the multicasting callback function to a null pointer. Prototype Inputs Outputs Returns
INT4 apexResetMulticastFn(APEX apex) apex: Device handle
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE
Valid States
APX_INIT APX_ACTIVE
Side Effects
Disables the multicasting support provided by the driver
8.21 Loop Port Scheduler Functions
Setting Contents of the Port-Weight Table: apexLpsSetPortWts
This function sets the LPS port weight table contents. Prototype
INT4 apexLpsSetPortWts(APEX apex, UINT4 u4NumPorts, sAPX_PORT_WT *psPortWtTable)
Inputs
apex: Device handle u4NumPorts: Number of ports psPortWtTable: Pointer to structure containing port numbers and the
corresponding weights Outputs None
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
93
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Returns
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_PORT_ID APX_ERR_PORT_NOT_CFG APX_ERR_LPS_INVALID_WT
Valid States
APX_INIT APX_ACTIVE
Getting Contents of the Port-Weight Table: apexLpsGetPortWts
This function retrieves the contents of the LPS port weight table contents. Prototype
INT4 apexLpsGetPortWts(APEX apex, UINT4 u4NumPorts, UINT4 u4PortStart, sAPX_PORT_WT *psPortWtTable)
Inputs
apex: Device handle u4NumPorts: Number of ports u4PortStart: Starting port number
Outputs
psPortWtTable: Pointer to the port weight table, which contains the
port numbers and weights Returns
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_PORT_ID
Valid States
APX_INIT APX_ACTIVE
Setting Contents of the Poll Sequence Table: apexLpsSetPollSeq
This function sets the LPS port weight table contents. Prototype
INT4 apexLpsSetPollSeq(APEX apex, UINT4 u4NumPorts, sAPX_PORT_SEQ *psPortSeqTable)
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
94
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Inputs
apex: Device handle u4NumPorts: Number of ports psPortSeqTable: Pointer to structure containing port numbers and the corresponding sequence numbers
Outputs Returns
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_PORT_ID APX_ERR_PORT_NOT_CFG APX_ERR_LPS_INVALID_SEQ
Valid States
APX_INIT APX_ACTIVATE
Getting Contents of the Poll Sequence Table: apexLpsGetPollSeq
This function retrieves the contents of the LPS port weight table contents. Prototype
INT4 apexLpsGetPollSeq(APEX apex, UINT4 u4NumPorts, UINT4 u4PortStart, sAPX_PORT_SEQ *psPortSeqTable)
Inputs
apex: Device handle u4NumPorts: Number of ports u4PortStart: Starting port number
Outputs
psPortSeqTable: Pointer to the port sequence table, which contains the port numbers and sequence numbers. If the port is not configured, then the poll sequence is set to 0xff.
Returns
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_PORT_ID
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
95
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Valid States
APX_INIT APX_ACTIVE
8.22 WAN Port Scheduler Functions
Setting Contents of the Port-Weight Table: apexWpsSetPortWts
This function sets the WPS port weight table contents. Prototype
UINT4 apexWpsSetPortWts(APEX apex, UINT4 u4NumPorts, sAPX_PORT_WT *psPortWtTable)
Inputs
apex: Device handle u4NumPorts: Number of ports psPortWtTable: Pointer to structure containing port numbers and the
corresponding weights Outputs Returns None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_PORT_ID APX_ERR_PORT_NOT_CFG APX_ERR_WPS_INVALID_WT
Valid States
APX_INIT APX_ACTIVE
Getting Contents of the Port-Weight Table: apexWpsGetPortWts
This function retrieves the contents of the WPS port weight table contents. Prototype Inputs
UINT4 apexWpsGetPortWts(APEX apex, sAPX_PORT_WT *psPortWtTable)
apex: Device handle
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
96
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Outputs
psPortWtTable: Pointer to the port weight table, which contains the port numbers and weights. If the port is not configured then the port weight is set to 0xff.
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE
Returns
Valid States
APX_INIT APX_ACTIVE
8.23 Statistic Functions
The S/UNI-APEX device provides two types of device counts: statistical counts and congestion counts. The statistical counts are counts that increase monotonically as they accumulate over time. The congestion counts are snapshots of the current congestion counts. They need not increase monotonically. The following functions retrieve these device counts for the application. By periodically invoking these functions, the application can maintain a steady count of the types mentioned.
8.24 Statistical Counts
Getting Cell Discard Counts: apexGetStatDiscardCnts
This function retrieves the discarded cell counts accumulated by the S/UNI-APEX device. These counts include the number of CLP0 and CLP1 cells discarded to congestion, as well as the number cells discarded for reasons other than congestion. Prototype
INT4 apexGetDiscardCnts(APEX apex, UINT4 *pu4DiscardCnt, UINT4 *pu4Clp0DiscardCnt, UINT4 *pu4Clp1DiscardCnt)
Inputs
apex: Device handle
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
97
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Outputs
pu4DiscardCnt: General discard count of all cells that have been
discarded due to reasons other than congestion (such as re-assembly timeout and re-assembly maximum-length error)
pu4Clp0DiscardCnt: Count of all CLP0 cells discarded due to
congestion
pu4Clp1DiscardCnt: Count of all CLP1 cells discarded due to
congestion Returns
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_POLL_TIMEOUT
Valid States
APX_INIT APX_ACTIVE
Getting Connection-Level Cell-Transmission Counts: apexGetStatConnTxCnts
This function retrieves the connection-level cell-transmission counts. Prototype
INT4 apexGetStatConnTxCnts(APEX apex, UINT4 u4ICI, UINT4 *pu4VcClp0TxCnt, UINT4 *pu4VcClp1TxCnt)
Inputs
apex: Device handle u4ICI: ICI of the connection
Outputs
pu4VcClp0TxCnt: Count of all CLP0 cells transmitted pu4VcClp1TxCnt: Count of all CLP1 cells transmitted
Returns
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_ICI APX_ERR_CONN_NOT_CFG APX_ERR_POLL_TIMEOUT
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
98
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Valid States
APX_INIT APX_ACTIVE
8.25 Congestion Counts
Getting Device-Level Congestion Counts: apexGetCongDevCnt
This function returns the total number of cells available for buffering in the device (FreeCnt). Prototype Inputs Outputs Returns
INT4 apexGetCongDevCnt(APEX apex, UINT4 *pu4Cnt)
apex: Device handle
pu4Cnt: Snapshot of FreeCnt
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_POLL_TIMEOUT
Valid States
APX_INIT APX_ACTIVE
Getting Direction-Level Congestion Counts: apexGetCongDirCnt
This function retrieves the count of cells queued for all loop and WAN ports. Prototype Inputs
INT4 apexGetCongDirCnt(APEX apex, UINT1 u1Dir, UINT4 *pu4Cnt)
apex: Device handle u1Dir:
* * Outputs
1: Loop 2: WAN
pu4Cnt: Loop/WAN cells queue count
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
99
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Returns
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_PORT_ID APX_ERR_POLL_TIMEOUT
Valid States
APX_INIT APX_ACTIVE
Getting Port-Level Congestion Counts: apexGetCongPortCnt
This function retrieves the count of all cells queued for the specified port. Prototype
INT4 apexGetCongPortCnt(APEX apex, sAPX_PORT_ID *psPortId, UINT4 *pu4Cnt)
Inputs
apex: Device handle psPortId: Port type (loop, WAN, uP) and number
Outputs Returns
pu4Cnt: Cells queued for this port
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_PORT_ID APX_ERR_PORT_NOT_CFG APX_ERR_POLL_TIMEOUT
Valid States
APX_INIT APX_ACTIVE
Getting Class-Level Congestion Counts: apexGetCongClassCnt
This function retrieves the count of all cells queued for the specified class. Prototype
INT4 apexGetCongClassCnt(APEX apex, sAPX_CLASS_ID *psClassId, UINT4 *pu4Cnt)
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
100
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Inputs
apex: Device handle psClassId: Port-class identifier
Outputs Returns
pu4Cnt: Cells queued for this class
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_CLASS_ID APX_ERR_CLASS_NOT_CFG APX_ERR_POLL_TIMEOUT
Valid States
APX_INIT APX_ACTIVE
Getting Connection-Level Congestion Counts: apexGetCongConnCnts
This function retrieves the following congested-connection counts: * * * All CLP0 cells in both VC and class queue (VcCLP0Cnt) All CLP01 cells in VC queue (VcQCLP01Cnt) All CLP01 cells in class queue (VcClassQCLP01Cnt)
INT4 apexGetCongConnCnts(APEX apex, UINT4 u4ICI, UINT4 *pu4VcClp0Cnt, UINT4 *pu4VcQClp01Cnt, UINT4 *pu4VcClassQClp01Cnt)
Prototype
Inputs
apex: Device handle u4ICI: ICI of the connection
Outputs
pu4VcClp0Cnt: Snapshot of VcCLP0Cnt pu4VcQClp01Cnt: Snapshot of VcQCLP01Cnt pu4VcClassQClp01Cnt: Snapshot of VcClassQCLP01Cnt
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
101
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Returns
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_ICI APX_ERR_CONN_NOT_CFG APX_ERR_POLL_TIMEOUT
Valid States
APX_INIT APX_ACTIVE
8.26 Interrupt Service Functions
This section describes interrupt service functions that perform the following tasks: * * * * * * Read and process high-priority interrupt-status registers Read and process low-priority interrupt-status registers Set and get interrupt masks Enable and disable interrupts Get and reset interrupt counts Set interrupt-count thresholds
Servicing High-Priority Interrupts: apexHiISR
This function reads the high priority interrupt status register of the interrupting device and compares it with the mask that you define for this register (logical AND operation). If there are any valid bits set in this register, this function returns a value greater than zero. If there are no bits set, this function returns a zero. The system-specific interrupt handler routine, sysApexHiIntHandler, invokes this function. Prototype Inputs Outputs
UINT4 apexHiISR (APEX apex, UINT4 *pu4Stat)
apex: Device handle
pu4Stat: Valid interrupt conditions detected in high-priority interrupt
status register
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
102
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Returns
= 0: No valid interrupt conditions detected > 0: At least one valid interrupt condition detected
Valid States Side Effects
APX_ACTIVE
If this function returns a non-zero value (meaning the driver detected an interrupt condition) then all high-priority device interrupts are disabled
Servicing Low-Priority Interrupts: apexLoISR
This function reads the low priority interrupt error and status registers of the interrupting device and compares the contents with the corresponding masks that you define (logical AND operations). If there are any bits set in these registers, this function returns a value greater than zero. Otherwise, it returns a zero. The system-specific interrupt handler routine, sysApexLoIntHandler, invokes this function. Prototype Inputs Outputs
UINT4 apexLoISR(APEX apex, UINT4 *pu4Err, UINT4 *pu4Stat)
apex: Device handle
pu4Err: Valid interrupt conditions detected in low-priority interrupt error-register pu4Stat: Valid interrupt conditions detected in low-priority interrupt
status-register Returns = 0: No valid interrupt conditions detected > 0: At least one valid interrupt condition detected Valid States Side Effects
APX_ACTIVE
If this function returns a non-zero value (meaning the driver detected an interrupt condition), then all low-priority device interrupts are disabled
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
103
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Processing High-Priority Interrupt-Status Information: apexHiDPR
This function processes the high-priority interrupt status information sent to the DPR task by the hi-priority ISR routine. Processing involves updating the interrupt counters corresponding to the interrupt events sent by the ISR. It also involves invoking the indCritical callback, which informs the application of the events that have crossed their thresholds. The system-specific DPR function, sysApexDPRtask, invokes this function. Prototype Inputs
UINT4 apexHiDPR(APEX apex, UINT4 u4Stat)
apex: Device handle u4Stat: Interrupt conditions detected by apexHiISR in the
high-priority interrupt-status register Outputs Returns Valid States Side Effects None
APX_SUCCESS
APX_ACTIVE
Enables high-priority interrupts processing after servicing all existing interrupt conditions
Processing Low-Priority Interrupt-Status Information: apexLoDPR
This function processes the low-priority interrupt error information sent to the DPR task by the low-priority ISR routine. Processing involves updating the interrupt counters corresponding to the interrupt events sent by the ISR. It also involves invoking the indError callback, which informs the application of the events that before have crossed their thresholds. The system-specific DPR task routine, sysApexDPRtask, invokes this function. Prototype Inputs
UINT4 apexLoDPR(APEX apex, UINT4 u4Err)
apex: Device handle u4Err: Interrupt conditions detected by apexLoISR in the low-priority interrupt-error register
Outputs
None
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
104
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Returns Valid States Side Effects
APX_SUCCESS
APX_ACTIVE
Enables low-priority interrupts processing after servicing all existing interrupt conditions
Setting Interrupt Masks: apexSetIntMsk
This function sets the desired interrupt masks for the device's interrupt registers located in the ISM control block. The driver writes these masks to the device registers when the driver enables interrupt processing for the device. Note: The driver masks MpIdle, SarRxRdy, and SarRxEmpty, as well as all the reserved bits in the mask specified by your application. Prototype
INT4 apexSetIntMsk(APEX apex, UINT1 u1Ctrl, sAPX_INTS *psMskVal)
Inputs
apex: Device handle u1Ctrl: Specifies which mask register(s) to set: * * * * APX_HI_INT APX_LO_ERROR_INT APX_LO_STAT_INT APX_ALL_INTS
psMskVal: Mask value(s) to be set. Only those masks will be set that the driver specifies in u1Ctrl.
Outputs Returns
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_MSK_ID
Valid States
APX_INIT APX_ACTIVE
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
105
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Getting Interrupt Masks: apexGetIntMsk
This function returns the interrupt masks set by the application from the ISM control block. Prototype Inputs Outputs
INT4 apexGetIntMsk(APEX apex, sAPX_INTS *psMskVal)
apex: Device handle
psMskVal: Mask values for the three interrupt-mask registers (you
allocate this structure) Returns
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE
Valid States
APX_INIT APX_ACTIVE
Enabling and Disabling Interrupts: apexIntCtrl
This function enables and disables device interrupts by directly writing to the interrupt mask registers of the S/UNI-APEX device. Prototype Inputs
INT4 apexIntCtrl(APEX apex, UINT1 u1EnFlg, UINT1 u1Ctrl)
apex: Device handle
u1EnFlg:
* * APX_ENABLE APX_DISABLE
u1Ctrl: Specifies which interrupt to enable or disable: * * * * APX_HI_INT APX_LO_ERROR_INT APX_LO_STAT_INT APX_ALL_INTS
Outputs
None
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
106
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Returns
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_FLAG APX_ERR_INVALID_CTRL_PARAM
Valid States
APX_INIT APX_ACTIVE
Getting Interrupt Counts: apexGetIntCnts
This function returns the interrupt event counts for the high-priority status and low-priority error interrupt event-counters. Prototype
INT4 apexGetIntCnts(APEX apex, UINT4 *pu4HiCnts, UINT4 *pu4LoErrCnts)
Inputs Outputs
apex: Device handle
pu4HiCnts: Pointer to an array of 32 words, which you allocate. The
driver fills in the elements of the array corresponding to the valid high-priority interrupt events.
pu4LoErrCnts: Pointer to an array of 32 words, which you allocate.
The driver fills in the elements of the array corresponding to the valid low-priority error interrupt events. Note: The application should retrieve the valid counts from the array by using the valid interrupt event definitions (apx_api.h) corresponding to enabled interrupts. Returns
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE
Valid States
APX_INIT APX_ACTIVE
Resetting Interrupt Counters: apexResetIntCnts
This function resets the interrupt event counters to zero.
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
107
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Prototype Inputs Outputs Returns
INT4 apexResetIntCnts(APEX apex)
apex: Device handle
None
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE
Valid States
APX_INIT APX_ACTIVE
Setting Interrupt-Count Thresholds: apexSetIntThresh
This function sets thresholds for the interrupt event counters corresponding to the interrupt bits in the high-priority status and low-priority error interrupt registers. When an interrupt event-counter crosses its threshold, the driver's DPR task invokes a callback (indCritical for hi-priority, indError for low-priority interrupt events) that informs the application about the event(s) that crossed their thresholds. Prototype
INT4 apexSetIntThresh(APEX apex, UINT1 u1IntType, UINT1 u1EvtId, UINT4 u4Thrsh)
Inputs
apex: Device handle u1IntType: * * APX_HI_INT APX_LO_ERR_INT
u1EvtId: Event for which threshold is to be set u2Thrsh: Threshold value to be set for the event
Outputs
None
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
108
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Returns
APX_SUCCESS APX_ERR_INVALID_DEV APX_ERR_INVALID_STATE APX_ERR_INVALID_INT_TYPE
Valid States
APX_INIT APX_ACTIVE
8.27 Application Callback Functions
The S/UNI-APEX driver uses the following application callback functions to notify the application of events within the device and driver.
Indicating the Success or Failure of Cell Transmissions: indTxCell
The segmentation and re-assembly (SAR) assist transmit task uses this callback to confirm the success or failure of a cell transmission request made by the application. Pointers to the cell header and payload are passed to the application. The application should de-allocate the cell buffer payload and header. Prototype
void indTxCell(USR_CTXT usrCtxt, UINT4 u4ICI, sAPX_CELL_HDR *psHdr, UINT1 *pu1Pyld, INT4 result)
Inputs
usrCtxt: Pointer to device context information, which the application
maintains
u4ICI: ICI on which cell was transmitted psHdr: Header of the transmitted cell psPyld: Payload of the transmitted cell result:
* *
0 : Success <0 : Failure - APX_ERR_SAR_TX_BUSY (SAR TX is busy)
Outputs Returns
None None
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
109
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Indicating the Success or Failure of Cell Receptions: indRxCell
This function is invoked by the SAR receive task after it extracts a cell from the microprocessor interface. The application should free the cell header and payload buffers. Prototype
void indRxCell(USR_CTXT usrCtxt, UINT4 u4ECI, sAPX_CELL_HDR *psHdr, UINT1 *pu1Pyld, INT4 result)
Inputs
usrCtxt: Pointer to device context information, which the application
maintains
u4ECI: ICI of the connection on which cell was received psHdr: Header of the received cell psPyld: Payload of the received cell
result: * * 0 : Success <0 : Failure - APX_ERR_SAR_RX_CELL_BUF_FULL (Cell buffers are full) - APX_ERR_SAR_RX_CRC10_FAIL (CRC10 failure in OAM cell) Outputs Returns None None
Indicating the Success or Failure of Frame Transmissions: indTxFrm
This function is used by the SAR transmit task to confirm the success/failure of an AAL5 frame transmission request made by the application. A pointer to the first byte of the AAL5 frame buffer chain, the header of the last cell in the payload and the ICI of the connection is passed to the application. The application should de-allocate the frame payload chain buffer and the frame header buffer. Prototype
void indTxFrm(USR_CTXT usrCtxt, UINT4 u4ICI, sAPX_CELL_HDR *psHdr, UINT1 *pu1Frm, INT4 result)
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
110
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Inputs
usrCtxt: Pointer to device context information, which the application
maintains
u4ICI: ICI on which frame was transmitted psHdr: Header of the transmitted frame psPyld: Points to the first buffer in the frame payload buffer chain result:
* *
0: Success <0: Failure
- APX_ERR_SAR_TX_BUSY (SAR TX is busy) - APX_ERR_SAR_TX_NXT_FRM_BUF (Error in accessing next
buffer in the frame payload buffer chain) Outputs Returns None None
Indicating the Success or Failure of Frame Receptions: indRxFrm
The SAR receive task invokes this function after it extracts an AAL5 frame from the microprocessor interface. A pointer to the first byte of the AAL5 frame buffer chain, the header of the last cell in the payload and the ECI of the connection is passed to the application. The application should de-allocate the frame buffer chain and the cell header buffer, except for the case when the result returned is APX_ERR_SAR_RX_FRM_BUF_FULL (returned when frame buffers not available and frame was discarded) Prototype
void indRxFrm(USR_CTXT usrCtxt, UINT4 u4ECI, sAPX_CELL_HDR *psHdr, UINT1 *pu1Frm, UINT4 u4Len, INT4 result)
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
111
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Inputs
usrCtxt: Pointer to device context information, which the application
maintains
u4ECI: ICI of the connection on which frame was received psHdr: Header of the last cell in frame
0 if result is APX_ERR_SAR_RX_FRM_BUF_FULL
pu1Frm: Points to the first buffer in the frame payload buffer chain
0 if result is APX_ERR_SAR_RX_FRM_BUF_FULL
u4Len: Length of the frame in bytes
0 if result is APX_ERR_SAR_RX_FRM_BUF_FULL
result:
* *
0: Success <0: Failure
- APX_ERR_SAR_RX_CRC32_FAIL (CRC32 failure in frame) - APX_ERR_SAR_RX_FRM_BUF_FULL (Frame buffers are full) - APX_ERR_SAR_RX_FRM_LENGTH (Mismatch in frame length
received by SAR module and frame length in AAL5 trailer)
- APX_ERR_SAR_RX_TIMEOUT (Timeout error while assembling
AAL5 frame) Outputs Returns None None
Inquiring Whether the Received Cell or Frame is part of Multicasting Group: isVcMulticast
The multicasting support feature in the driver is enabled when this callback function is installed by invoking apexInstallMulticastFn. Thereafter this callback function is invoked within the context of the SAR receive task, each time it receives a cell or frame. Based on the connection ID of the incoming cell or frame, the application will then decide whether this cell or frame has to be forwarded to certain outgoing connections. If so, the function will return the number of outgoing connections and the connection ID for each connection. If the application does not want the cell to be forwarded, it should set the number of outgoing connections to 0.
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
112
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Prototype
void isVcMulticast(USR_CTXT usrCtxt, UINT2 u2ICI, UINT2 *pu2NumICI, UINT2 **ppu2ICIList)
Inputs
usrCtxt: Pointer to device context information, which the application
maintains
u4ICI: ICI on which cell or frame was received
Outputs
pu2NumICI: Pointer to a variable specifying the number of outgoing
connections on which the application wants the cell/frame to be forwarded. If the application does not want the cell to be forwarded, then the number of outgoing connections should be set to 0.
ppu2ICIList: Pointer to an array of connection IDs of the outgoing connections on which the application wants the cell/frame to be forwarded. Note that after multicasting the cell or frame the driver will de-allocate, the memory allocated by the application code for the array of connection id's.
Returns
None
Indicating Critical Events: indCritical
apexHiDPR, which executes in the context of the DPR task, invokes this function
whenever a high priority interrupt count exceed the corresponding threshold value set by the user. The DPR task provides the application with an eventId, which identifies the interrupt counter that crossed the threshold. Prototype
void indCritical(USR_CTXT usrCtxt, UINT4 u4EventId, UINT4 u4Arg1, UINT4 u4Arg2, UINT4 u4Arg3)
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
113
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Inputs
usrCtxt: Pointer to device context information, which the application
maintains
u4EventId: ID of the critical event as listed below APX_EVT_SDRAM_CRC_ERR APX_EVT_SSRAM_PAR_ERR APX_EVT_Q_FREE_CNT_ZERO_ERR APX_EVT_LR_PAR_ERR APX_EVT_LR_RUNT_CELL_ERR APX_EVT_LT_CELL_XF_ERR APX_EVT_WR_PAR_ERR APX_EVT_WR_RUNT_CELL_ERR APX_EVT_WR_CELL_XF_ERR u4Arg1: not used u4Arg2: not used u4Arg3: not used
Outputs Returns
None None
Indicating Errors: indError
apexLoDPR, which executes in the context of the DPR task, invokes this function
whenever a low priority error interrupt count exceed the corresponding threshold value set by the user. The DPR task provides the application with an eventId, which identifies the interrupt counter that crossed the threshold. Based on the event the DPR task will provide additional information relevant to the interrupt, for example the ICI of the connection, which caused the interrupt. Prototype
void indError(USR_CTXT usrCtxt, UINT4 u4EventId, UINT4 u4Arg1, UINT4 u4Arg2, UINT4 u4Arg3)
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
114
S/UNI-APEX (PM7326) Driver Manual Application Programming Interface
Inputs
usrCtxt: Pointer to device context information, which the application
maintains
u4EventId: ID of the error event as listed below u4Arg1 : value depends on error event as shown below u4Arg2 : value depends on error event as shown below u4Arg3 : value depends on error event as shown below
Event ID
APX_EVT_Q_VC_REAS_TIME_ERR APX_EVT_Q_VC_REAS_LEN_ERR APX_EVT_Q_CELL_RX_ERR APX_EVT_Q_VC_MAX_THRESH_ERR
Arg1
ICI ICI ICI ICI
Arg2
-
Arg3
-
APX_EVT_Q_CLASS_MAX_THRESH_ERR portType portNum classNum APX_EVT_Q_PORT_MAX_THRESH_ERR APX_EVT_Q_DIR_MAX_THRESH_ERR APX_EVT_Q_SHP0_ICTR_ERR APX_EVT_Q_SHP1_ICTR_ERR APX_EVT_Q_SHP2_ICTR_ERR APX_EVT_Q_SHP3_ICTR_ERR portType portNum loopCnt wanCnt -
Outputs Returns
None None
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
115
S/UNI-APEX (PM7326) Driver Manual Hardware Interface
9
9.1
HARDWARE INTERFACE
Device Input and Output Functions
Reading the Contents of Address Locations: sysApexRawRead
This low-level macro reads the contents of a specific address location. Define this macro to reflect the application's addressing logic. Prototype Inputs Outputs Returns
UINT4 sysApexRawRead(UINT4 addr)
addr: Address location to be read
None Value read from the address location
Writing the Contents of Address Locations: sysApexRawWrite
This low-level macro writes the contents of a specific address location. Define this macro to reflect the application's addressing logic. Prototype Inputs
void sysApexRawWrite(UINT4 addr, UINT4 val)
addr: Address location to write val: Value to be written
Outputs Returns
None None
Detecting New Devices: sysApexDeviceDetect
This function detects the device in the underlying hardware and retrieves system-specific information about the device (such as the base address of device). The function is called within the apexAdd API function.
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
116
S/UNI-APEX (PM7326) Driver Manual Hardware Interface
Prototype
INT4 sysApexDeviceDetect(APX_USR_CTXT usrCtxt, void **ppSysInfo, UINT4 *pu4BaseAddr)
Inputs
usrCtxt: Pointer to device context information, which the application
maintains Outputs
ppSysInfo: Application information that you maintain (such as PCI
slot and IRQ). The driver stores this pointer.
pu4BaseAddr: Base address of device
Returns
= 0: Device detected successfully < 0: Device detection failed
9.2
Interrupt Service Functions
This section describes the functions that the driver needs for interrupt processing. For details on the interrupt service architecture, go to page 26.
ISR Installation and Removal Functions
The following functions install and remove the system-specific interrupt handlers (sysApexHiIntHandler and sysApexLoIntHandler) and deferred processing routines for the S/UNI-APEX devices.
Installing System-Specific Interrupt Handlers: sysApexIntInstallHandler
This function installs the functions sysApexHiIntHandler and sysApexLoIntHandler, in the processor's interrupt vector table. It also spawns the DPR and creates the message queue. The ISR routines use the message queue to send interrupt context information to the DPR task. Prototype Inputs Outputs
INT4 sysApexIntInstallHandler(sAPX_DDB *psDdb)
psDdb: Device handle
None
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
117
S/UNI-APEX (PM7326) Driver Manual Hardware Interface
Returns
= 0: Interrupts installed successfully < 0: Interrupt installation failed
Removing System-Specific Interrupt Handlers: sysApexIntRemoveHandler
This function removes interrupt processing for the device. If the device is the last device for which the driver has enabled interrupt processing, it removes sysApexHiIntHandler and sysApexLoIntHandler from the processor's interrupt vector table. Then it deletes the sysApexDPRtask task and its associated message queue. Prototype Inputs Outputs Returns
INT4 sysApexIntRemoveHandler(sAPX_DDB *psDdb)
psDdb: Device handle
None = 0: Interrupts removed successfully < 0: Interrupt removal failed
System-Specific ISR Functions
The driver invokes the system-specific ISR functions, sysApexHiIntHandler and sysApexLoIntHandler, when the device(s) raise high priority and low priority interrupts respectively. You should implement these routines as described below:
Handling High-Priority Interrupts: sysApexHiIntHandler
The driver invokes this function when one or more devices raise the high-priority interrupt line to the microprocessor. This function invokes the driver-provided function, apexHiISR, for each device registered with the driver. Prototype Inputs Outputs Returns
void sysApexHiIntHandler(UINT4 u4IntId)
u4IntId: System-specific interrupt identifier (such as IRQ)
None None
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
118
S/UNI-APEX (PM7326) Driver Manual Hardware Interface
Handling Low-Priority Interrupts: sysApexLoIntHandler
The driver invokes this function when one or more devices raise the low-priority interrupt to the microprocessor. This function invokes apexLoISR for each device registered with the driver. If apexLoISR detects at least one valid pending interrupt condition, then sysApexLoIntHandler queues the interrupt context information (output by apexLoISR) for later processing by sysApexDPRtask and/or sysApexSarRxTask depending on the nature of the interrupt conditions detected. Prototype Inputs Outputs Returns
void sysApexLoIntHandler(UINT4 u4IntId)
u4IntId: System-specific interrupt identifier (such as IRQ)
None None
System-Specific DPR Functions Deferred Interrupt Processing: sysApexDPRtaskFn
The driver spawns this function as a separate task within the RTOS. It retrieves interrupt status information saved for it by the sysApexLoIntHandler function and invokes the apexDPR routine for the appropriate device. Prototype Inputs Outputs Returns
void sysApexDPRtaskFn(void)
None None None
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
119
S/UNI-APEX (PM7326) Driver Manual RTOS Interface
10 RTOS INTERFACE
The S/UNI-APEX driver uses the following macros to access RTOS services.
10.1 Memory Allocation and De-allocation Functions
This section describes the functions that allocate and free memory.
Allocating Memory: sysApexMemAlloc
This function allocates the specified number of bytes. Prototype Inputs Outputs Returns
void *sysApexMemAlloc(UINT4 u4Bytes)
u4Bytes: Number of bytes to be allocated
None Pointer to first byte of allocated memory NULL pointer (memory allocation failed)
Freeing Memory: sysApexMemFree
This function frees allocated memory. Prototype Inputs
void sysApexMemFree(UINT1 *pu1First)
pu1First: Pointer to first byte of the memory region being
de-allocated Outputs Returns None None
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
120
S/UNI-APEX (PM7326) Driver Manual RTOS Interface
10.2 Buffer Management Functions
Cell Buffer Functions Allocating Cell Header Structures and Buffers: sysApexAllocCellBuf
This function allocates a cell header structure and a cell payload buffer. Prototype
INT4 sysApexAllocCellBuf(sAPX_CELL_HDR **ppsHdr, UINT1 **ppu1Pyld)
Inputs Outputs
None
ppsHdr: Contains pointer to allocated cell header buffer ppu1Pyld: Contains pointer to allocated cell payload buffer
Returns
= 0: Success < 0: Failure
Freeing Cell Header Structures and Buffers: sysApexFreeCell
This function returns a cell header structure and payload buffer pair to the free pool. Prototype Inputs
void sysApexFreeCell(sAPX_CELL_HDR *pHdr, UINT1 *pu1Pyld)
psHdr: Pointer to cell header buffer pu1Pyld: Pointer to cell payload buffer
Outputs Returns
None None
Frame Buffer Functions Allocating the First Frame Buffer in a Chain: sysApexAllocFrmBuf
This function allocates the first buffer of a frame buffer chain.
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
121
S/UNI-APEX (PM7326) Driver Manual RTOS Interface
Prototype
INT4 sysApexAllocFrmBuf(UINT4 u4Size, sAPX_CELL_HDR **ppsHdr, UINT1 **ppu1Buf)
Inputs Outputs
u4Size: Size of buffer in bytes
ppsHdr: Contains pointer to allocated cell-header buffer ppu1Pyld: Contains pointer to allocated cell-payload buffer
Returns
= 0: Success < 0: Failure
Adding the Next Frame Buffer to a Chain: sysApexAllocNxtFrmBuf
This function allocates and chains a new buffer to the tail of a frame-buffer-chain. In doing so it provides a pointer to the last buffer of the frame chain. Prototype Inputs
UINT1 *sysApexAllocNxtFrmBuf(UINT4 u4Size, UINT1 *pu1PrevBuf)
u4Size: Size of buffer in bytes pu1PrevBuf: Pointer to last buffer of current frame chain
Outputs Returns
None Pointer to first data byte in the new frame buffer (chained to the previous buffer) NULL pointer (buffer unavailable)
Getting a Frame Buffer's Size: sysApexGetFrmBufSz
This function retrieves the size of a frame buffer given a pointer to the first byte of the buffer. Prototype Inputs Outputs
UINT4 sysApexGetFrmBufSz(UINT1 *pu1Buf)
pu1Buf: Pointer to first data byte in buffer
None
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
122
S/UNI-APEX (PM7326) Driver Manual RTOS Interface
Returns
Size in bytes (zero if buffer is invalid)
Getting the Next Frame Buffer's Size: sysApexGetNxtFrmBuf
This function retrieves the pointer to the first byte of the next frame buffer, given the first byte pointer of the previous buffer in the buffer chain. Prototype Inputs Outputs Returns
UINT1 *sysApexGetNxtFrmBuf(UINT1 *pu1PrevBuf, UINT4 *pu4Size)
pu1PrevBuf: Pointer to last buffer of current frame chain
pu4Size: Size of the next buffer in bytes
Pointer to first data byte in the next frame buffer (chained to the previous buffer) NULL pointer (buffer unavailable)
Freeing Frame Buffers: sysApexFreeFrm
This function frees all frame buffers in the frame buffer chain. Prototype Inputs
void sysApexFreeFrm(UINT1 *pu1FirstBuf)
pu1FirstBuf: Pointer to the first data byte of the first buffer in the frame buffer chain
Outputs Returns
None None
10.3 Timer Functions
This section describes the timer-related service needed by the driver.
Delaying Tasks: sysApexTaskDelay
This function suspends execution of the calling task for a specified time. Prototype
INT4 sysApexTaskDelay(UINT4 u4Msecs)
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
123
S/UNI-APEX (PM7326) Driver Manual RTOS Interface
Inputs Outputs Returns
u4Msecs: Delay length in milliseconds
None = 0: Success < 0: Failure
10.4 Semaphore Functions
This section describes the functions that perform the following semaphore tasks: * * * * Create semaphores Delete semaphores Take semaphores Release semaphores
Creating Semaphores: sysApexSemCreate
This function creates a mutual-exclusion semaphore. Prototype Inputs Outputs Returns
void *sysApexSemCreate(void)
None None Pointer to semaphore object or null
Deleting Semaphores: sysApexSemDelete
This function deletes a semaphore. Prototype Inputs Outputs
void sysApexSemDelete(void *semId)
semId: Semaphore identifier
None
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
124
S/UNI-APEX (PM7326) Driver Manual RTOS Interface
Returns
None
Taking Semaphores: sysApexSemTake
This function acquires a semaphore. Prototype Inputs Outputs Returns
INT4 sysApexSemTake(void *semId)
semId: Semaphore identifier
None = 0: Success < 0: Failure
Releasing Semaphores: sysApexSemGive
This function relinquishes a semaphore. Prototype Inputs Outputs Returns
INT4 sysApexSemGive(void *semId)
semId: Semaphore identifier
None = 0: Success < 0: Failure
10.5 Pre-Emption Control Functions
This section describes the functions used to disable and enable pre-emption of the currently executing task.
Disabling Task Pre-emption: sysApexPreemptDis
This function disables possible pre-emption of the currently executing task by other tasks or the interrupt handler. Prototype
INT4 sysApexPreemptDis(void)
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
125
S/UNI-APEX (PM7326) Driver Manual RTOS Interface
Inputs Outputs Returns
None None Pre-emption key (this is passed back as an input argument when reenabling pre-emption)
Enabling Task Pre-Emption: sysApexPreemptEn
This function enables pre-emption of the currently executing task. Prototype Inputs
void sysApexPreemptEn(INT4 i4Key)
i4Key: Pre-emption key returned by sysApexPreemptDis when
disabling preemption for this task Outputs Returns None None
10.6 Segmentation and Re-Assembly Assist Functions
This section describes the segmentation and re-assembly (SAR) assist component functions.
Creating SAR Tasks: sysApexSarInstall
This function creates the apxSarTx and the apxSarRx tasks. The role of apxSarTx is to transmit cells and frames to the microprocessor port of the S/UNI-APEX device. The apxSarRx receives cells and frames from the microprocessor port of the device. The function also creates the message queues, SarTxMsgQ and the SarRxMsgQ. Prototype Inputs Outputs
INT4 sysApexSarInstall(void)
None None
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
126
S/UNI-APEX (PM7326) Driver Manual RTOS Interface
Returns
= 0: Success < 0: Failure
Removing SAR Tasks: sysApexSarRemove
This function deletes the apxSarTx and apxSarRx tasks and the corresponding message queues, SarTxMsgQ and SarRxMsgQ. Prototype Inputs Outputs Returns
INT4 sysApexSarRemove(void)
None None = 0: Success < 0: Failure
SAR Transmit Task Function: sysApexSarTxTaskFn
The driver spawns this function as a separate task within the RTOS. It waits for a cell or frame transmission-request message on the SarTxMsgQ. Upon receiving a message, it invokes apexSarTxTaskFn for the appropriate device. Prototype Inputs Outputs Returns
void sysApexSarTxTaskFn(void)
None None None
SAR Receive Task Function: sysApexSarRxTaskFn
The driver spawns this function as a separate task within the RTOS. It retrieves interrupt status information saved for it by the sysApexLoIntHandler function and invokes the apexSarRxTaskFn function for each device handle received in the message. Prototype
void sysApexSarRxTask(void)
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
127
S/UNI-APEX (PM7326) Driver Manual RTOS Interface
Inputs Outputs Returns
None None None
Sending Transmission Request Messages: sysApexSarTxMsg
This function is invoked by apexTxCell and apexTxFrame API functions in order to send cell and frame transmission requests to the SAR Tx task. The function puts the cell/frame information into a message structure and queues it in the SarTxMsgQ. Prototype Inputs Outputs Returns
INT4 sysApexSarTxMsg(sAPX_TX_CTXT sTxMsg)
sTxMsg: Cell/frame transmission-request information
None = 0: Success < 0: Failure
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
128
S/UNI-APEX (PM7326) Driver Manual Porting Drivers
11 PORTING DRIVERS
This section outlines how to port the S/UNI-APEX device driver to your hardware and OS platform. However, this manual can offer only guidelines for porting the S/UNIAPEX driver because each platform and application is unique.
11.1 Driver Source Files
The C source files listed in Table 21 and Table 22 contain the code for the S/UNI-APEX driver. You may need to modify the code or develop additional code. The code is in the form of constants, macros, and functions. For ease of porting, the code is grouped into source files (src) and include files (inc). The src files contain the functions and the inc files contain the constants and macros. A makefile is also included. Table 21: Source Files File
apx_api1.c apx_api2.c apx_hw.c apx_rtos.c apx_io.c apx_ism.c apx_qe.c apx_sar.c apx_stat.c apx_util.c apx_lps.c apx_prof.c apx_eg.c
Description Top-level API functions Low-level utility API functions Hardware interface functions RTOS interface functions Input/Output functions Interrupt control functions Queue engine operations SAR-assist operations Statistics functions Commonly used utility functions Loop port and WAN port scheduler functions Profile management routines Example implementation of callback and other functions
Table 22: Include Files File
apx_api.h
Description API function prototypes, data structures, constants, and definitions
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
129
S/UNI-APEX (PM7326) Driver Manual Porting Drivers
File
apx_typs.h apx_hw.h apx_rtos.h apx_err.h apx_defs.h apx_strs.h apx_fns.h apx_eg.h
Description Variable type definitions Hardware interface constants and macro definitions RTOS interface constants and macro definitions Error codes returned by the driver Driver's internal constants and macro definitions Driver's internal data structures Prototypes of driver's internal functions Data structures, constants, and definitions used by sample code in
apx_eg.c
11.2 Porting Procedure
The following procedures summarize how to port the S/UNI-APEX driver to your platform. The subsequent sections describe these procedures in more detail. To port the S/UNI-APEX driver to your platform: Step 1: Port the driver's hardware interface (page 130): Step 2: Port the driver's OS extensions (page 132): Step 3: Port the driver's application-specific elements (page 134): Step 4: Build the driver (page 135).
Step 1: Porting the Hardware Interface
This section describes how to modify the S/UNI-APEX driver for your hardware platform. To port the driver to your hardware platform: 1. Modify the variable type definitions in apx_typs.h. 2. Modify the low-level device read/write macros in the apx_hw.h file. You may need to modify the raw read/write access macros (sysApexRawRead and sysApexRawWrite) to reflect the application's addressing logic.
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
130
S/UNI-APEX (PM7326) Driver Manual Porting Drivers
3. Define the hardware system-configuration constants in the apx_hw.h file. Modify the following constants to reflect the application's hardware configuration:
Device Constant
APX_MAX_DEVS
Description The maximum number of S/UNIAPEX devices to be controlled by the driver The greatest of the per-device cell buffer requirements The greatest of the per-device VC requirements Delay between two consecutive polls of a busy bit Maximum number of times a busy bit will be polled before the operation times out The number of milliseconds the driver waits during the port disable operation for the PortCnt parameter to become 0 The number of milliseconds the driver waits during the class disable operation (shaped classes only) for the associated shaper slot table to deplete itself completely into the class queue The number of milliseconds the driver waits during the connection disable operation for the VcClassQClp01Cnt parameter to become 0 Default SDRAM refresh rate used for SDRAM tests
Default
2
APX_MAX_CELL_BUFS APX_MAX_NUM_VCS APX_POLL_DELAY APX_MAX_POLL_TRIES
256K 64K 5uS 100
APX_PORT_DISABLE_DELAY_MSECS
1
APX_CLASS_DISABLE_DELAY_MSECS
1
APX_CONN_DISABLE_DELAY_MSECS
1
APX_SDRAM_REFRESH_RT
0xf
4. Modify the sysApexDeviceDetect function in apx_hw.c as per your hardware environment. This function should output the base address of the APEX device. This function also outputs a pointer to system-specific configuration information (for example, IRQ associated with the device interrupt). This output parameter is simply stored by the driver in the DDB can be returned as NULL if not required by other system-specific functions (for example, sysApexIntInstallHandler).
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
131
S/UNI-APEX (PM7326) Driver Manual Porting Drivers
5. Modify the sysApexBusyBitPoll function if necessary. This function polls a specified busy bit APX_MAX_POLL_TRIES with a APX_POLL_DELAY polling interval. If the bit does not reach its desired value, the function returns with an error code of -1. 6. (OPTIONAL) Modify the sysApexDebugRead, sysApexDebugWrite and sysApexTrace functions. Porting these functions is only required if you want to use the debug message printing feature of register accesses and error messages (enabled by compile switch, APX_CSW_DEBUG).
Step 2: Porting the RTOS interface
The RTOS interface functions and macros consist of code that is RTOS dependent and needs to be modified as per your RTOS's characteristics. To port the driver's RTOS interface: 1. Redefine the following macros in apx_rtos.h to the corresponding system calls that your target system supports. See apx_eg.c for example implementations of the buffer management routines Service Type Memory Macro Name
sysApexMemAlloc sysApexMemFree sysApexMemSet sysApexMemCpy sysApexMemCmp
Description Allocates a memory block Frees a memory block Fills a memory block with a specified value Copies the contents of one memory block to another Compares the contents of one memory block with another Allocates a cell buffer Frees a cell buffer Allocates a frame buffer Allocates and chains a new frame buffer to the previous buffer of the specified frame Obtains the length of the payload in a frame buffer Retrieves the frame buffer (and its size) immediately following the specified frame buffer
Buffer Management
sysApexAllocCellBuf sysApexFreeCell sysApexAllocFrmBuf sysApexAllocNxtFrmBuf
sysApexGetFrmBufSz sysApexGetNxtFrmBuf
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
132
S/UNI-APEX (PM7326) Driver Manual Porting Drivers
Service Type
Macro Name
sysApexFreeFrm
Description Frees the entire chain of frame buffers that comprise the specified frame Creates a mutual-exclusion semaphore Destroys the specified semaphore Acquires the specified semaphore Relinquishes the specified semaphore
Semaphores
sysApexSemCreate sysApexSemDelete sysApexSemTake sysApexSemGive
2. Modify the system-specific interrupt handler, SAR processing and delay routines in
apx_rtos.c:
Service Type Interrupt Service/Polling
Function Name
sysApexIntInstallHandler sysApexIntRemoveHandler sysApexHiIntHandler
Description Installs the interrupt handler for the OS Removes the interrupt handler from the OS Interrupt handler for the highpriority S/UNI-APEX interrupt line Interrupt handler for the lowpriority S/UNI-APEX interrupt line Deferred processing routine that waits for interrupt context information to be sent by the ISR routines and then processes the interrupt status information Spawns the SAR Rx and Tx tasks and associated message queues Deletes the SAR Rx and Tx tasks and associated message queues
sysApexLoIntHandler
sysApexDPRTaskFn
SAR Processing
sysApexSarInstall sysApexSarRemove
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
133
S/UNI-APEX (PM7326) Driver Manual Porting Drivers
Service Type
Function Name
sysApexSarTxTaskFn
Description This function is executed in the context of the SAR Tx task. It receives cell and frame transmission requests from the application task and invokes the appropriate cell/frame transmission API function. This function is executed in the context of the SAR Rx task. It extracts cells and frames from the S/UNI-APEX SAR interface and sends them to the application task using the indRxCell/indRxFrm callback functions This routine is used by the application task to send cell/frame transmission requests to the SAR Tx task Puts the currently executing task to sleep for a specified number of milliseconds Disables pr-eemption of the currently executing task by any other task or interrupt Re-enables pre-emption of a task by other tasks and/or interrupts
sysApexSarRxTaskFn
sysApexSarTxMsg
Timer
sysApexTaskDelay
Pre-emption Lock/Unlock
sysApexPreemptDis
sysApexPreemptEn
Step 3: Porting the Application-Specific Elements
Porting the application-specific elements includes coding the indication callback functions and defining the base value from which the S/UNI-APEX driver's error codes start. To port the driver's system-specific elements: 1. Modify the base value of APX_ERR_BASE (default = 300) in apx_err.h. 2. Code the callback functions according to the application. Example implementations of these callback functions are provided in apx_eg.c. The callback functions are the following:
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
134
S/UNI-APEX (PM7326) Driver Manual Porting Drivers

void indCritical(APX_USR_CTXT usrCtxt, UINT4 u4EventId, UINT4 u4Arg1, UINT4 u4Arg2, UINT4 u4Arg3) void indError(APX_USR_CTXT usrCtxt, UINT4 u4EventId, UINT4 u4Arg1, UINT4 u4Arg2, UINT4 u4Arg3) void indTxCell(APX_USR_CTXT usrCtxt, UINT4 u4ICI, sAPX_CELL_HDR *psHdr, UINT1 *pu1Pyld, INT4 i4Result) void indRxCell(APX_USR_CTXT usrCtxt, UINT4 u4ECI, sAPX_CELL_HDR *psHdr, UINT1 *pu1Pyld, INT4 i4Result) void indTxFrm(APX_USR_CTXT usrCtxt, UINT4 u4ICI, sAPX_CELL_HDR *psHdr, UINT1 *pu1Frm, INT4 i4Result) void indRxFrm(APX_USR_CTXT usrCtxt, UINT4 u4ECI, sAPX_CELL_HDR *psHdr, UINT1 *pu1Frm, UINT4 u4Length, INT4 i4Result) void isVcMulticast(APX_USR_CTXT usrCtxt, UINT2 u2ICI, UINT2 *pu2NumICI, UINT2 **ppu2ICIList);
Step 4: Building the Driver
This section describes how to build the S/UNI-APEX driver. To build the driver: 1. Modify the Makefile to reflect the absolute path of your code, your compiler and compiler options 2. Choose from among the different compile options supported by the driver as per your requirements. 3. Compile the source files and build the S/UNI-APEX API driver library using your make utility. 4. Link the S/UNI-APEX API driver library to your application code.
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
135
S/UNI-APEX (PM7326) Driver Manual Appendix A: Driver Return Codes
APPENDIX A: DRIVER RETURN CODES
Table 23 describes the driver's return types. Table 23: Return Types Return Type
APX_ERR_CLASS_NOT_ENABLED APX_ERR_CLASS_NOT_FREE APX_ERR_DEV_ALREADY_ADDED APX_ERR_DEV_NOT_DETECTED APX_ERR_DEVS_FULL APX_ERR_INVALID_CLASS_ID APX_ERR_INVALID_CLASS_VECTOR APX_ERR_INVALID_CONN_ID APX_ERR_INVALID_CONN_VECTOR APX_ERR_INVALID_CTRL_PARAM APX_ERR_INVALID_DEV APX_ERR_INVALID_FLAG APX_ERR_INVALID_INIT_VECTOR APX_ERR_INVALID_INT_TYPE APX_ERR_INVALID_MSK_ID APX_ERR_INVALID_PORT_ID APX_ERR_INVALID_PORT_VECTOR APX_ERR_INVALID_PROFILE_NUM APX_ERR_INVALID_SHPR_ID APX_ERR_INVALID_SHPR_VECTOR APX_ERR_INVALID_STATE APX_ERR_INVALID_TEST_PARAM APX_ERR_LPS_INVALID_WT APX_ERR_WPS_INVALID_WT APX_ERR_MEM_ALLOC APX_ERR_MODULE_NOT_INIT
Description Associated class not enabled Class already configured Device already added Device was not detected Maximum number of devices already added Invalid class ID Invalid class vector Invalid connection ID Invalid connection vector Invalid control parameter Invalid device handle Invalid value for u1enflg Invalid initialization vector Invalid interrupt type Invalid mask register Invalid port ID Invalid port vector Invalid profile number Invalid shaper number Invalid shaper vector Invalid device state Invalid test parameter Invalid contents in the loop port weight table Invalid contents in the WAN port weight table Memory allocation failure Driver has not been initialized
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
136
S/UNI-APEX (PM7326) Driver Manual Appendix A: Driver Return Codes
Return Type
APX_ERR_POLL_TIMEOUT APX_ERR_PORT_NOT_CFG APX_ERR_PORT_NOT_ENABLED APX_ERR_PORT_NOT_FREE APX_ERR_PROFILES_FULL APX_ERR_PROFILE_VECTOR_BOTH_VALID APX_ERR_SAR_RX_CRC10_FAIL APX_ERR_SAR_TX_BUSY APX_ERR_SAR_TX_MSG APX_ERR_SAR_TX_TYPE APX_ERR_SHPR_NOT_FREE APX_FAILURE APX_SUCCESS APX_ERR_DLL_PHASE_LOCK APX_ERR_SEMAPHORE APX_ERR_INVALID_EVENT_ID APX_ERR_MODULE_ALREADY_INIT APX_ERR_INVALID_TYPE_ID APX_ERR_INT_INSTALL APX_ERR_INT_REMOVE APX_ERR_INVALID_MODE APX_ERR_INVALID_REG APX_ERR_INVALID_ADDR APX_ERR_INVALID_MSKDATA APX_ERR_INVALID_MP_CTRL APX_ERR_INVALID_CELL_START APX_ERR_INVALID_CELL_NUM APX_ERR_INVALID_CTXT APX_ERR_INVALID_WORD APX_ERR_INVALID_NUM_CELL_BUFS
Description Memory port access failed Port not configured Port is not enabled Port already configured All initialization profiles are in use Both vector profile number are valid CRC-10 check failed SAR transmit component is busy Error in sending message to SAR transmit message queue Error in value of txtype Associated port-class still configured Test failed The function succeeded DLL phase lock failure Semaphore allocation error Invalid event ID Driver already initialized Device detected has invalid TYPE/ID Error installing interrupts Error removing interrupts Invalid mode parameter specified Invalid register offset Invalid address Invalid mask data Invalid memory port control parameter(s) Invalid cell start address Invalid number of cells Invalid context type Invalid context word Invalid number of cell buffers
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
137
S/UNI-APEX (PM7326) Driver Manual Appendix A: Driver Return Codes
Return Type
APX_ERR_WDG_PTRL_BUSY APX_ERR_PORT_CTXT_CHK APX_ERR_CLASS_NOT_CFG APX_ERR_CLASS_CTXT_CHK APX_ERR_INVALID_TX_SLOT APX_ERR_SHPR_NOT_CFG APX_ERR_INVALID_ICI APX_ERR_CONN_NOT_CFG APX_ERR_CONN_NOT_FREE APX_ERR_INVALID_RANGE APX_ERR_CONN_CTXT_CHK APX_ERR_SAR_INSTALL APX_ERR_SAR_REMOVE APX_ERR_SAR_TX_NXT_FRM_BUF APX_ERR_SAR_TX_FRM_LENGTH APX_ERR_SAR_RX_CELL_BUF_FULL APX_ERR_SAR_RX_CRC32_FAIL APX_ERR_SAR_RX_TIMEOUT APX_ERR_SAR_RX_FRM_BUF_FULL APX_ERR_SAR_RX_FRM_LENGTH APX_ERR_LPS_INVALID_SEQ APX_ERR_INVALID_NUM_PORTS APX_ERR_INVALID_DIR_THRSH APX_ERR_INVALID_DIR APX_ERR_INVALID_PORT_THRSH APX_ERR_INVALID_CL_SCHD APX_ERR_INVALID_CLASS_THRSH APX_ERR_INVALID_SHP_PARAM APX_ERR_INVALID_CONN_THRSH APX_ERR_INVALID_WFQ_WT
Description Watchdog patrol already active Port context image mismatch Class not configured Class context image mismatch Invalid shaper txslot Shaper not configured Invalid ICI Connection not configured Connection not free Invalid ICI watchdog patrol range Connection context image mismatch SAR assist module installation error SAR assist module removal error Error getting SAR transmit frame buffer Invalid frame length SAR receive cell buffer is full SAR receive CRC32 check failure SAR receive timeout SAR receive frame buffer is full Error in receive frame length Invalid loop port sequence number Invalid number of ports Invalid direction threshold parameter Invalid direction Invalid port threshold parameter Invalid class scheduling parameter Invalid class threshold parameter Invalid shaping parameter Invalid connection threshold Invalid weight for WFQ connection
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
138
S/UNI-APEX (PM7326) Driver Manual Appendix A: Driver Return Codes
Return Type
APX_ERR_INVALID_CONN_TYPE
Description Invalid connection type
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
139
S/UNI-APEX (PM7326) Driver Manual Appendix B: Coding Conventions
APPENDIX B: CODING CONVENTIONS
This section describes the coding and naming conventions used to implement the driver software. This section also describes the variable types.
Variable Types
This section describes the variable types used by the driver code. Table 24: Variable Type Definitions Type
UINT1 UINT2 UINT4 INT1 INT2 INT4 void
Description unsigned integer - 1 byte unsigned integer - 2 bytes unsigned integer - 4 bytes signed integer - 1 byte signed integer - 2 bytes signed integer - 4 bytes void
Naming Conventions
This section describes the naming conventions for the following items in the driver code: * * * * * Macros Constants Structures Functions Variables
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
140
S/UNI-APEX (PM7326) Driver Manual Appendix B: Coding Conventions
Table 25: Naming Conventions: Macros, Constants, and Structures Type Macro Example
mAPX_WRITE
Case Upper
Prefix Lowercase "m" followed by abbreviated, uppercase device name: mAPX Abbreviated, uppercase device name: APX Lowercase "s" followed by abbreviated, uppercase device name: sAPX
Notes Separate words with an underscore "_".
Constant Structure
APX_REG sAPX_DDB
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
141
S/UNI-APEX (PM7326) Driver Manual Appendix B: Coding Conventions
Table 26: Naming Conventions: Functions and Variables Type API Function Example
apexAdd()
Case Title case, but the first letter is always lowercase
Prefix Full, lowercase device name:
apex
Notes Follow hungarian notation. Do not separate words.
Porting Function
sysApexRawRead()
Lowercase "sys" followed by full, title case device name: sysApex
Porting functions are all functions that are platform dependent. Static functions are internal functions and have no special naming conventions other than hungarian notation.
Static Function
qeIsConnShaped
Global Variable Standard Variable
apexGdd
Full, lowercase device name:
apex
u1Type, u2Num, u4Data, ret
Optionally indicate variable type using "u1, u2, u4 etc" Prefix single pointers with lowercase "p" followed by the unchanged variable name. Optionally, you can prefix double pointers with lowercase "pp" followed by the unchanged variable name.
No special naming conventions used
Pointer to Variable
pu4Data, psDdb, pcb, ppTable
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
142
S/UNI-APEX (PM7326) Driver Manual Index
INDEX
A
AAL5, 21, 38, 45, 90, 91, 110, 111, 112 aliasing, 64, 65, 67 allocating memory, 54 apexActivate, 39, 70 apexAdd, 61, 116 apexAddDev, 142 apexBaseAddress, 142 apexCellBufTest, 67 apexClassDisable, 78 apexClassEnable, 78 apexClassSetup, 77 apexClassTeardown, 79 apexClrClassProfile, 59 apexClrConnProfile, 60 apexClrInitProfile, 56 apexClrPortProfile, 57 apexConnDisable, 83 apexConnEnable, 84 apexConnSetup, 82 apexConnTeardown, 84 apexCtxtMemCheck, 68 apexDeactivate, 70, 71 apexDelete, 61, 62 apexDPR, 119 apexExtQCtxtTest, 64 apexGetClassProfile, 58 apexGetCongClassCnt, 100 apexGetCongConnCnts, 101 apexGetCongDevCnt, 99 apexGetCongDirCnt, 99 apexGetCongPortCnt, 100 apexGetConnProfile, 60 apexGetDiscardCnts, 97 apexGetInitProfile, 56 apexGetIntCnts, 107 apexGetIntMsk, 106 apexGetPortProfile, 57 apexGetStatConnTxCnts, 98 apexGetStatDiscardCnts, 97 apexGetWdgPatrolRng, 88 apexHiDPR, 27, 28, 104, 113 apexHiISR, 27, 28, 102, 104, 118 apexInit, 69 apexIntCtrl, 106 apexIntQCtxtTest, 64 apexLoDPR, 28, 104, 114 apexLoISR, 27, 28, 103, 104, 119 apexLpsCtxtTest, 65 apexLpsGetPollSeq, 95 apexLpsGetPortWts, 94 apexLpsSetPollSeq, 94 apexLpsSetPortWts, 93 apexModuleInit, 54, 55, 56, 57, 58, 59, 61 apexModuleShutdown, 54 apexPortDisable, 73 apexPortEnable, 74 apexPortSetup, 71, 72 apexPortTeardown, 74, 75, 76, 80, 85, 86 apexRegisterTest, 63 apexReset, 68 apexResetIntCnts, 107, 108 apexSarRxTaskFn, 27, 28, 91, 127 apexSarTxTaskFn, 90, 91, 127 apexSetClassProfile, 58 apexSetConnProfile, 59 apexSetInitProfile, 55 apexSetIntMsk, 105 apexSetIntThresh, 108 apexSetPortProfile, 57 apexSetWdgPatrolRng, 87 apexShprSetup, 80, 81 apexShprTeardown, 81 apexTxCell, 89, 128 apexTxFrame, 128 apexTxFrm, 90 apexWatchdogPatrol, 88 apexWpsCtxtTest, 66 apexWpsGetPortWts, 96 apexWpsSetPortWts, 96 APX_ACTIVATE, 95
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
143
S/UNI-APEX (PM7326) Driver Manual Index
APX_ACTIVE, 23, 42, 52, 67, 68, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109 APX_ALL_INTS, 105, 106 apx_api.h, 107, 129 apx_api1.c, 129 apx_api2.c, 129 APX_CSW_DEBUG, 132 apx_defs.h, 130 APX_DISABLE, 106 apx_eg.c, 129, 130, 132, 134 apx_eg.h, 130 APX_ENABLE, 106 apx_err.h, 130, 134 APX_ERR_BASE, 134 APX_ERR_CLASS_NOT_CFG, 78, 79 APX_ERR_CLASS_NOT_ENABLED, 83, 84, 136 APX_ERR_CLASS_NOT_FREE, 77, 136 APX_ERR_CONN_NOT_CFG, 83, 84, 85, 98 APX_ERR_CONN_NOT_FREE, 83 APX_ERR_DEV_ALREADY_ADDED, 61, 136 APX_ERR_DEV_NOT_DETECTED, 61, 136 APX_ERR_DEVS_FULL, 61, 136 APX_ERR_ICI_NOT_FREE, 83 APX_ERR_INVALID_ADDR, 65 APX_ERR_INVALID_CLASS, 58, 77, 78, 79, 101, 136 APX_ERR_INVALID_CLASS_ID, 77, 78, 79, 136 APX_ERR_INVALID_CLASS_VECTOR, 58, 77, 136 APX_ERR_INVALID_CONN_ID, 83, 136 APX_ERR_INVALID_CONN_VECTOR, 60, 83, 136 APX_ERR_INVALID_CTRL_PARAM, 107, 136
APX_ERR_INVALID_DEV, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 105, 106, 107, 108, 109, 136 APX_ERR_INVALID_FLAG, 107, 136 APX_ERR_INVALID_ICI, 83, 84, 85, 87, 98, 102 APX_ERR_INVALID_INIT_VECTOR, 55, 136 APX_ERR_INVALID_INT_TYPE, 109, 136 APX_ERR_INVALID_MSK_ID, 105, 136 APX_ERR_INVALID_PORT, 57, 73, 74, 75, 76, 94, 95, 96, 100, 136 APX_ERR_INVALID_PORT_ID, 72, 73, 74, 75, 76, 80, 85, 86, 87, 94, 95, 96, 136 APX_ERR_INVALID_PORT_VECTOR, 57, 73, 136 APX_ERR_INVALID_PROFILE, 56, 57, 58, 59, 60, 69, 73, 77, 83, 136 APX_ERR_INVALID_PROFILE_NUM, 56, 57, 58, 59, 60, 69, 73, 77, 83 APX_ERR_INVALID_RANGE, 87 APX_ERR_INVALID_SHPR_ID, 81, 82, 136 APX_ERR_INVALID_SHPR_VECTOR, 81, 136 APX_ERR_INVALID_STATE, 62, 63, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 105, 106, 107, 108, 109, 136 APX_ERR_INVALID_TEST_PARAM, 64, 65, 66, 67, 136 APX_ERR_INVALID_VECTOR, 69 APX_ERR_MEM_ALLOC, 54, 55, 136 APX_ERR_MODULE_ALREADY_INIT, 54 APX_ERR_MODULE_NOT_INIT, 55, 56, 57, 58, 59, 60, 61, 136
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
144
S/UNI-APEX (PM7326) Driver Manual Index
APX_ERR_POLL_TIMEOUT, 64, 65, 66, 67, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 98, 137 APX_ERR_PORT_NOT_CFG, 74, 75, 76, 80, 85, 86, 87, 94, 95, 96, 137 APX_ERR_PORT_NOT_ENABLED, 77, 79, 83, 84, 137 APX_ERR_PORT_NOT_FREE, 72, 73, 137 APX_ERR_PROFILE_FULL, 55, 137 APX_ERR_PROFILE_VECTOR_BOTH _VALID, 69, 73, 77, 83, 137 APX_ERR_SAR_RX_BUF_FULL, 92 APX_ERR_SAR_RX_CELL_BUF_FULL , 110 APX_ERR_SAR_RX_CRC10_FAIL, 92, 110, 137 APX_ERR_SAR_RX_CRC32_FAIL, 112 APX_ERR_SAR_RX_FRM_BUF_FULL, 111, 112 APX_ERR_SAR_RX_FRM_LENGTH, 112 APX_ERR_SAR_RX_TIMEOUT, 112 APX_ERR_SAR_TX_BUSY, 91, 109, 111, 137 APX_ERR_SAR_TX_FRM_LENGTH, 90 APX_ERR_SAR_TX_MSG, 89, 137 APX_ERR_SAR_TX_NXT_FRM_BUF, 111 APX_ERR_SAR_TX_TYPE, 91, 137 APX_ERR_SHPR_NOT_FREE, 82, 137 APX_ERR_TEST_IN_PROGRESS, 68 APX_ERR_WDG_PTRL_BUSY, 88 APX_EVT_LR_PAR_ERR, 114 APX_EVT_LR_RUNT_CELL_ERR, 114 APX_EVT_LT_CELL_XF_ERR, 114 APX_EVT_Q_CELL_RX_ERR, 115 APX_EVT_Q_CLASS_MAX_THRESH_ ERR, 115 APX_EVT_Q_DIR_MAX_THRESH_ER R, 115 APX_EVT_Q_FREE_CNT_ZERO_ERR, 114 APX_EVT_Q_PORT_MAX_THRESH_E RR, 115
APX_EVT_Q_SHP0_ICTR_ERR, 115 APX_EVT_Q_SHP1_ICTR_ERR, 115 APX_EVT_Q_SHP2_ICTR_ERR, 115 APX_EVT_Q_SHP3_ICTR_ERR, 115 APX_EVT_Q_VC_MAX_THRESH_ERR , 115 APX_EVT_Q_VC_REAS_LEN_ERR, 115 APX_EVT_Q_VC_REAS_TIME_ERR, 115 APX_EVT_SDRAM_CRC_ERR, 114 APX_EVT_SSRAM_PAR_ERR, 114 APX_EVT_WR_CELL_XF_ERR, 114 APX_EVT_WR_PAR_ERR, 114 APX_EVT_WR_RUNT_CELL_ERR, 114 APX_FAILURE, 63, 64, 65, 66, 67, 137 apx_fns.h, 130 APX_HI_INT, 105, 106, 108 apx_hw.c, 129, 131 apx_hw.h, 130, 131 apx_ici_rec, 29 APX_IND_INTR, 45 APX_IND_RX_CELL, 45 APX_IND_RX_FRM, 45 APX_IND_TX_CELL, 45 APX_IND_TX_FRM, 45 APX_INVALID, 45, 46, 47, 48, 67 APX_INVALID_TEST_PARAM, 67 apx_io.c, 129 apx_ism.c, 129 APX_LO_ERR_INT, 108 APX_LO_ERROR_INT, 105, 106 APX_LO_STAT_INT, 105, 106 APX_LOOP_INVALID_SEQ, 95 APX_LOOP_INVALID_WT, 94 APX_LOOP_PORT, 49, 50 apx_lps.c, 129 APX_MAX_CELL_BUFS, 131 APX_MAX_DEVS, 131 APX_MAX_NUM_VCS, 31, 131 APX_MAX_POLL_TRIES, 131, 132 APX_NUM_CLASSES, 30 APX_NUM_LOOP_PORTS, 31 APX_NUM_PORT_TYPES, 31 APX_NUM_WAN_PORTS, 31 APX_POLL_DELAY, 131, 132
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
145
S/UNI-APEX (PM7326) Driver Manual Index
apx_poll_seq_rec, 34 APX_PORT_DISABLE_DELAY_MSECS , 131 APX_PRESENT, 23, 42, 61, 62, 63, 64, 65, 66, 67, 69, 70 apx_prof.c, 129 apx_prt_class_rec, 30 apx_prt_class_tbl, 31 apx_qe.c, 129 apx_qe_cb, 31 APX_REG, 141 apx_rtos.c, 129, 133 apx_rtos.h, 130, 132 apx_sar.c, 129 APX_SDRAM_REFRESH_RT, 131 APX_SEM_ID, 41 apx_stat.c, 129 apx_strs.h, 130 APX_SUCCESS, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 104, 105, 106, 107, 108, 109, 137 APX_TX_CTXT, 91 apx_typs.h, 130 APX_UP_PORT, 49, 50 APX_USR_CTXT, 43, 61, 117, 135 apx_util.c, 129 APX_VALID, 42, 45, 46, 47, 48 APX_WAN_PORT, 49, 50 APX_WPS_INVALID_WT, 96 apxSarRx, 126, 127 apxSarTx, 126, 127
CLP0, 46, 47, 97, 98, 101 CLP01, 101 CLP1, 46, 47, 97, 98 congestion counts, 22, 97 conn, 29, 30 CRC, 89, 90 CRC10, 110 CRC32, 112
D
data structures, 2, 29, 33, 41, 54, 129, 130 deleting devices, 25 deregisters, 42 dest, 132 device information structure, 52 driver functions, 23 driver library, 17, 20, 135
E
eAPX_DEV_STATE, 42 eAPX_Q_TYPE, 48 eAPX_SAR_TX_TYPE, 53 ECI, 43, 52, 111 eDevState, 42 EFCI, 47 egApexIndRxFrm, 135 eng, 1 eQtype, 48 eventId, 113, 114
F
FCQ, 48 FreeCnt, 99 frmInfo, 91
B
baseAddress, 142
G
GFR, 47
C
CB_DIAG_DISABLED, 43 CB_DIAG_READ, 43 CB_DIAG_WRITE, 43 cellInfo, 91 ClassCnt, 131 classNum, 115
H
hardware interface, 18 HEC, 43, 52, 53 HSS, 4 hungarian, 142
I
i4Key, 126
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
146
S/UNI-APEX (PM7326) Driver Manual Index
i4Result, 135 ICI, 29, 31, 50, 51, 83, 84, 87, 88, 89, 90, 98, 101, 109, 110, 111, 112, 113, 114, 115 ICIs, 88 inc, 15, 129 include files, 15, 129 indCritical, 27, 45, 104, 108, 113, 135 indError, 28, 45, 104, 108, 113, 114, 135 indication callback functions, 15, 27, 134 indRxCell, 45, 91, 110, 134, 135 indRxFrm, 45, 91, 111, 134 indTxCell, 45, 89, 90, 109, 135 indTxFrm, 45, 90, 110, 135 Input/Output, 21, 129 input/output component, 21 interrupt service model, 26 interrupt servicing, 20 IRQ, 42, 117, 118, 119, 131
L
loop port scheduler, 21, 32 loopCnt, 115 lp, 31 LPS, 21, 32, 33, 35, 44, 46, 65, 66, 93, 94, 95
M
makefile, 129 mAPX, 141 mAPX_WRITE, 141 module information structure, 51 MpIdle, 105
N
numICIs, 30
O
OAM, 47, 110
P
pApex, 61 pbaseAddress, 142 PCI, 42, 117 PDU, 90 pHdr, 121 PM7326, 1, 2
poll sequence database, 33, 34, 36 port sequence structure, 51 port sequence table, 32, 33, 36, 37, 95 port weight structure, 50 PortCnt, 131 portNum, 115 portType, 115 ppbaseAddress, 142 ppsHdr, 121, 122 ppSysInfo, 117 ppu1Buf, 122 ppu1Pyld, 121, 122 prec, 31 prepend, 43, 52, 53 prev, 29, 30 psClassId, 77, 78, 79, 100, 101 psClassProfs, 42 psClassVect, 77 psConnId, 82 psConnProfs, 42 psConnVect, 82 psDdb, 41, 117, 118 psHdr, 89, 90, 109, 110, 111, 112, 121, 135 psIciLstHead, 30 psIciLstTail, 30 psInitProfs, 41 psInitVect, 69 psMiv, 54 psMskVal, 105, 106 psPattern, 64, 65 psPortId, 72, 73, 74, 75, 100 psPortProfs, 42 psPortSeqTable, 94, 95 psPortVect, 72, 73 psPortWtTable, 93, 94, 96, 97 psProfile, 55, 56, 57, 58, 59, 60 psPyld, 109, 110, 111 psShprVect, 81 pSysInfo, 42 pu1Buf, 122 pu1First, 120 pu1FirstBuf, 123 pu1Frm, 90, 110, 111, 112, 135 pu1PrevBuf, 122, 123 pu1Pyld, 89, 109, 110, 121, 135
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
147
S/UNI-APEX (PM7326) Driver Manual Index
pu2EndICI, 87, 88 pu2StartICI, 87, 88 pu4BaseAddr, 117 pu4Clp0DiscardCnt, 97, 98 pu4Clp1DiscardCnt, 97, 98 pu4Cnt, 99, 100, 101 pu4DiscardCnt, 97, 98 pu4Err, 103 pu4HiCnts, 107 pu4LoErrCnts, 107 pu4ProfileNum, 55, 57, 58, 59, 60 pu4Size, 123 pu4Stat, 102, 103 pu4VcClassQClp01Cnt, 101 pu4VcClp0Cnt, 101 pu4VcClp0TxCnt, 98 pu4VcClp1TxCnt, 98 pu4VcQClp01Cnt, 101
Q
queue control block, 31 queue engine functions, 20, 71 queue-module information structure, 51
R
remap, 48 remapping, 47
S
sAPX, 29, 30, 31, 34, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 64, 69, 72, 73, 74, 75, 77, 78, 79, 81, 82, 89, 90, 93, 94, 95, 96, 100, 105, 106, 109, 110, 111, 117, 118, 121, 122, 128, 135, 141 sAPX_CELL_HDR, 89, 90, 109, 110, 111, 121, 122, 135 sAPX_CELL_INFO, 53 sAPX_CLASS_ID, 49, 77, 78, 79, 100 sAPX_CLASS_VECT, 42, 46, 58, 77 sAPX_CONN_ID, 50, 82 sAPX_CONN_VECT, 42, 47, 59, 60, 82 sAPX_CS_VECT, 46 sAPX_CTXT_IMG, 43 sAPX_DATA34, 64
sAPX_DDB, 41, 42, 117, 118, 141 sAPX_DEV_INFO, 52 sAPX_FRM_INFO, 53 sAPX_GDD, 41 sAPX_ICI_REC, 29, 30, 31 sAPX_INIT_VECT, 41, 43, 44, 45, 55, 56, 69 sAPX_INTS, 105, 106 sAPX_ISM_CB, 44 sAPX_LPS_CB, 44 sAPX_MIV, 41, 44, 54 sAPX_MODULE_INFO, 51 sAPX_POLL_SEQ_REC, 34 sAPX_PORT_ID, 49, 72, 73, 74, 75, 100 sAPX_PORT_SEQ, 51, 94, 95 sAPX_PORT_VECT, 42, 46, 57, 72 sAPX_PORT_WT, 50, 93, 94, 96 sAPX_PRT_CLASS_REC, 30, 31 sAPX_PRT_CLASS_TBL, 31 sAPX_QE_CB, 31, 44 sAPX_QE_INFO, 51 sAPX_REGS, 45 sAPX_SAR_CB, 44 sAPX_SEQ_WT, 51 sAPX_SHPR_VECT, 48, 81 sAPX_TX_CTXT, 53, 128 sAPX_VC_REMAP, 48 SarRxEmpty, 105 SarRxMsgQ, 126, 127 SarRxRdy, 105 SarTxMsgQ, 126, 127, 128 sCschd, 46 sCtxt, 43 SDRAM, 67, 131 semApex, 41 semId, 124, 125 SFQ, 48, 82 sIciTbl, 31 sInitVect, 43 sIsmCb, 44 sLpsCb, 44 sMiv, 41 software states, 22 software_pd, 1 source files, 15, 129, 135 sPrtClTbl, 31
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
148
S/UNI-APEX (PM7326) Driver Manual Index
sQeCb, 44 src, 15, 129 sRegs, 45 sRemap, 48 sSarCb, 44 SSRAM, 64 statistical counts, 97 statistics component, 19, 22 struct, 29, 30, 31, 34 sTxCtxt, 91 sTxMsg, 128 sysApex, 26, 142 sysApexAllocCellBuf, 121, 132 sysApexAllocFrmBuf, 121, 122, 132 sysApexAllocNxtFrmBuf, 122, 132 sysApexBusyBitPoll, 132 sysApexDebugRead, 132 sysApexDebugWrite, 132 sysApexDeviceDetect, 116, 117, 131 sysApexDPRtask, 27, 28, 104, 118, 119 sysApexDPRtaskFn, 119 sysApexDPRTaskFn, 133 sysApexFreeCell, 121, 132 sysApexFreeFrm, 123, 133 sysApexGetFrmBufSz, 122, 132 sysApexGetNxtFrmBuf, 123, 132 sysApexHiIntHandler, 26, 27, 28, 102, 117, 118, 133 sysApexIntInstallHandler, 28, 117, 131, 133 sysApexIntRemoveHandler, 28, 118, 133 sysApexLoIntHandler, 26, 27, 28, 103, 117, 118, 119, 127, 133 sysApexMemAlloc, 120, 132 sysApexMemCmp, 132 sysApexMemCpy, 132 sysApexMemFree, 120, 132 sysApexMemSet, 132 sysApexPreemptDis, 125, 126, 134 sysApexPreemptEn, 126, 134 sysApexRawRead, 116, 130, 142 sysApexRawWrite, 116, 130 sysApexSarInstall, 126, 133 sysApexSarRemove, 127, 133 sysApexSarRxTask, 119, 127
sysApexSarRxTaskFn, 27, 91, 127, 134 sysApexSarTaskFn, 27 sysApexSarTxMsg, 128, 134 sysApexSarTxTaskFn, 90, 127, 134 sysApexSemCreate, 124, 133 sysApexSemDelete, 124, 133 sysApexSemGive, 125, 133 sysApexSemTake, 125, 133 sysApexTaskDelay, 123, 134 sysApexTrace, 132
T
teardown, 71 transmitting cells, 39 txInfo, 53 TxSlot, 43, 52 txtype, 137 txType, 53, 91 typedef, 29, 30, 31, 34
U
u1Class, 48, 49, 50 u1Clp0MinThrsh, 47 u1Clp0Thrsh, 46, 47 u1Clp1Thrsh, 46, 47 u1CrcFlg, 89 u1Ctrl, 105, 106 u1Ctxt, 65, 66 u1Dir, 99 u1EfciMd, 47 u1EndSegOam, 47 u1enflg, 136 u1EnFlg, 106 u1EvtId, 108 u1GfrMd, 47 u1inttype, 136 u1IntType, 108 u1LpTxECIPreEn, 43, 52 u1LpTxHecDis, 43, 52 u1MaxThrsh, 46, 47 u1MeasInt, 48 u1Port, 48 u1PortSeq, 34, 51 u1PortWt, 34, 50 u1RedFact, 48 u1SarRxPri, 45
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
149
S/UNI-APEX (PM7326) Driver Manual Index
u1ShpFlg, 46 u1ShprId, 81 u1SlowDnEn, 48 u1TestType, 64, 65, 66, 67 u1ThrshEn, 48 u1ThrshVal, 48 u1Type, 49, 50 u1Valid, 46, 48 u1VcVpc, 47 u1WanTxECIPreEn, 43, 52 u1WanTxHecDis, 43, 53 u2ClCfgCnt, 31, 51 u2EndICI, 87 u2LpTxSwPreEn, 43, 53 u2MaxDevs, 41 u2MaxInitProfs, 44 u2MaxPortProfs, 44 u2Num, 49 u2NumDevs, 41, 51 u2NumDevsActive, 41, 52 u2Port, 50 u2PortNum, 34, 50, 51 u2PrtCfgCnt, 31, 51 u2StartICI, 87 u2Thrsh, 108 u2Type, 49 u2WanTxSwPreEn, 43, 53 u2WdgEndIci, 31, 51 u2WdgStartIci, 31, 51 u4Arg1, 113, 114, 115, 135 u4Arg2, 113, 114, 115, 135 u4Arg3, 113, 114, 115, 135 u4BaseAddr, 42, 52 u4Bytes, 120 u4CbDiagMd, 43, 52 u4CellStartAddr, 43, 52, 67 u4ConnCfgCnt, 31, 51 u4DevState, 52 u4ECI, 110, 111, 112, 135 u4Err, 104 u4EventId, 113, 114, 115, 135 u4ICI, 50, 83, 84, 89, 90, 98, 101, 109, 110, 111, 113, 135 u4ImgRd, 41, 52 u4IntId, 118, 119 u4Len, 90, 111, 112
u4Length, 135 u4LpClStartAddr, 52 u4MaxCellBufs, 43, 45, 52 u4MaxClassProfs, 44 u4MaxConnProfs, 44 u4MaxVCs, 43, 45, 52 u4MemSz, 41, 52 u4Mode, 41, 52 u4Msecs, 123, 124 u4NumCells, 67 u4NumPorts, 93, 94, 95, 96 u4Pattern, 65, 66, 67 u4PollSeq, 46 u4PollWt, 46 u4PortStart, 94, 95 u4ProfileNum, 56, 57, 58, 59, 60, 69, 72, 73, 77, 82 u4QLClsStartAddr, 43 u4QuadNum, 64, 65 u4QuadStart, 64, 65 u4RemapMd, 47 u4RtRate, 48 u4ShprStartAddr, 43, 52 u4Size, 122 u4Stat, 104 u4Valid, 42, 45, 46, 47 uAPX_VC_Q_INFO, 48 UDF, 43, 52, 53 uP, 20, 31, 42, 45, 47, 49, 50, 51, 100 uQinfo, 48 USR_CTXT, 109, 110, 111, 113, 114
V
variable type definitions, 130 variable types, 140 VC, 28, 29, 47, 48, 82, 88, 101, 131 VcClassQClp01Cnt, 131 VcClassQCLP01Cnt, 101 VcCLP0Cnt, 101 VcQCLP01Cnt, 101 VCs, 29, 43, 45, 48, 52, 88 VPC, 47
W
wanCnt, 115 WFQ, 48
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
150
S/UNI-APEX (PM7326) Driver Manual Index
wp, 31 WPS, 21, 46, 66, 96 WrRd, 64, 65, 66
Z
ZBT, 64
Proprietary and Confidential to PMC-Sierra, Inc., and for its Customers' Internal Use Document ID: PMC-991727, Issue 1
151


▲Up To Search▲   

 
Price & Availability of 1991727

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X