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>Code Commentary4.1.5 Interrupt HandlingLinux interrupt handling is split between top and bottom halves. The top half interrupt handler iscalled when the hardware interrupt is invoked and performs only minimal critical tasks includingscheduling the bottom half handlers. Bottom half handlers are schedules by marking the handler forfuture execution.Three status registers are involved in interrupt handling. Clearing a interrupt requires clearing theinterrupt at the source which in this case is the Accelerator Status Register. The action of clearingthe interrupt requires writing a 1 to the bit to be cleared (See <strong>Intel</strong> ® 80312 I/O Companion ChipDeveloper’s Manual, page 1-7, section 1.4.2)). The three registers are:• FIQ1 Interrupt Status Register (IOP310_FIQ1ISR). Appendix A, Lines 637 & 666.This register is used to determine the cause of the interrupt. If Bit 5 is set there is a ApplicationAccelerator Interrupt Pending (See <strong>Intel</strong> ® 80312 I/O Companion Chip Developer’s Manual,page 2-12)• Accelerator Status Register (IOP310_<strong>AAU</strong>ASR) Appendix A, Lines 648 & 669.This register contains the <strong>AAU</strong> status flags. The interrupt is cleared by writing 1s to the set bits.• IRQ Interrupt Status Register (Not used in this code)Bit 10 indicates a Application Accelerator Unit Error (See <strong>Intel</strong> ® 80312 I/O Companion ChipDeveloper’s Manual, page2-15)4.1.5.1 Top Half Interrupt Handler: aau_irq_handler()See Appendix A, line 629.The following statuses are obtained:• FIQ1 Interrupt Status Register (IOP310_FIQ1ISR). Appendix A, lines 637 & 666.• Accelerator Status Register (IOP310_<strong>AAU</strong>ASR) Appendix A, lines 648 & 669.The <strong>AAU</strong> interrupt is cleared. Appendix A, Line657.When the End of Transfer or End of Chain Interrupt is set, the function aau_process() is called. Thepurpose of aau_process() is to move all the <strong>AAU</strong> descriptors in the processing queue that areconsidered done to the holding queue.The bottom half handler is marked scheduled. Appendix A, line 672.4.1.5.2 Bottom Half Interrupt Handler: aau_task()See Appendix A, Line 758. This function processes all the completed <strong>AAU</strong> chain descriptors in theholding Q, wakes up the user and frees the resource.4.1.6 Linux Kernel APIsThis code contains numerous calls to Linux kernel macros or APIs. Primarily these are Linux callsused for declaring and handling queues and stack data structures and controlling variable access.When developing custom applications users of this document will call their Operating Systemsequivalent APIs and macros.28 White Paper

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

Saved successfully!

Ooh no, something went wrong!