10.07.2015 Views

Intel 80310 I/O Processor Chipset AAU Coding Techniques

Intel 80310 I/O Processor Chipset AAU Coding Techniques

Intel 80310 I/O Processor Chipset AAU Coding Techniques

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Intel</strong> ® <strong>80310</strong> I/O <strong>Processor</strong> <strong>Chipset</strong> <strong>AAU</strong> <strong>Coding</strong> <strong>Techniques</strong>Low-Level Design DocumentThe <strong>AAU</strong> descriptor data structure is filled out by the user. It maps over the first portion of the softwaredescriptor sw_aau_t data structure. Casting eliminates a copy of values from one data structure toanother. When the user passes a correct user SGL list, all the API has to do is re-cast the list intosoftware descriptors and feed it to the processing queue. This requires a slight bit more knowledge of the<strong>AAU</strong> fields on the users part, but improves performance of the <strong>AAU</strong> operation considerably.Table 10.<strong>AAU</strong> User SGL Structurestruct_aau_sgl_t{aau_desc_taau_desc;u32status;struct_aau_sgl_t *next_sgl; /* Pointer to next SG */void*dest;void *src[4] ; /* Source group 1 */void *src_ext[4]; /* Source group 2 */u32 total_src; /* Total number of sources passed down */} aau_sgl_t;3.1.5 Data PathThe following is required for an application to utilize the <strong>AAU</strong> hardware through the <strong>AAU</strong> API. Theapplication must first attempt to request the usage of the <strong>AAU</strong> by calling the aau_request()function. This function requests and registers an interrupt for the <strong>AAU</strong>. When successful, theapplication is allowed to use the <strong>AAU</strong>. The API also keeps track of the usage of the <strong>AAU</strong> by using areference count method. When unsuccessful the error –EBUSY is returned to the caller.The driver applications are required to create a scattered gather list (SGL) defined in the format ofaau_sgl_t format with all information for <strong>AAU</strong> operation completed. The driver application isresponsible for allocating and keeping track of the memory to store the <strong>AAU</strong> input data and result. Theapplication calls the aau_queue_buffer() function to pass down the user SGL. The <strong>AAU</strong> APIgenerates an <strong>AAU</strong> descriptor chain from the passed down SGL using the <strong>AAU</strong> software descriptorsfrom the free <strong>AAU</strong> resource stack. When no free software descriptors are available the API goes to sleepfor a short period of time, and then tries again ten times before giving up and returning –ENOMEMerror. The Interrupt Enable bit is set by the function in the DC field of the last hardware descriptor in thechain to indicate end of chain. The <strong>AAU</strong> chain is queued into the processing queue by the functionwhich then calls aau_start() for the application. The aau_start() function checks to determineif the <strong>AAU</strong> is active. If not active then this is a new operation and which requires setting the appropriatebits, links accordingly and starting the <strong>AAU</strong>. If active then it is an ongoing operation which requiresappending to the existing chain and setting the chain resume bit. At this point theaau_queue_buffer()returns the control to the application while the <strong>AAU</strong> is doing its work.The application has two choices in handling the result of <strong>AAU</strong> completion:1. Sleep on the <strong>AAU</strong>s wait queue until being notified by the bottom half interrupt handler later onwhen operation is complete2. Continue and be notified by a callback function when the operation on the chain is completevia the SGL passed down.The <strong>AAU</strong> meanwhile processes the chain and triggers an interrupt when it encounters the InterruptEnable Bit being set in a descriptor being processed or an error condition is encountered.White Paper 15

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!