IBM BDM-610000049 Intel 8259 Programmable Interrupt Controller, PCI Interrupts, Sample Code

Page 94

Intel 8259 Programmable Interrupt Controller

The chip responsible for handling interrupt requests in the PC is the Intel 8259 Programmable Interrupt Controller. To use interrupts, you need to know how to read and set the Intel 8259’s interrupt mask register (IMR) and how to send the end-of-interrupt (EOI) command to the Intel 8259.

Each bit in the IMR contains the mask status of an IRQ line; bit 0 is for IRQ0, bit 1 is for IRQ1, and so on. If a bit is set (1), then the corresponding IRQ is masked and will not generate an interrupt. If a bit is clear (0), then the corresponding IRQ is unmasked and can generate interrupts. The IMR is programmed through port 21h.

Note When in APIC mode, the PIC is programmed differently, and IRQ routing behaves differently. For more information, refer to the APIC datasheets and specifications provided by Intel.

PCI Interrupts

PCI devices can share interrupts. The BIOS or operating system may assign multiple PCI devices to the same IRQ line. Any interrupt service routine (ISR) written for PCI devices must be able to handle shared interrupts. Refer to Interrupt-Driven PC System Design (ISBN: 0-929392-50-7) for more information on PCI interrupts.

Writing an Interrupt Service Routine (ISR)

The first step in adding interrupts to your software is to write the ISR. This is the routine that will automatically be executed each time an interrupt request occurs on the specified IRQ. An ISR is different than standard routines that you write. First, on entrance, the processor registers should be pushed onto the stack BEFORE you do anything else. Second, just before exiting your ISR, you must clear the interrupt status flag and write an end-of-interrupt command to the Intel 8259 controller. Finally, when exiting the ISR, in addition to popping all the registers you pushed on entrance, you must use the IRET instruction and not a plain RET. The IRET automatically pops the flags, CS, and IP that were pushed when the interrupt was called.

Most C compilers allow you to identify a procedure (function) as an interrupt type and will automatically add these instructions to your ISR, with one important exception: most compilers do not automatically add the end-of-interrupt command to the procedure; you must do this yourself. Other than this and the few exceptions discussed below, you can write your ISR just like any other routine. It can call other functions and procedures in your program and it can access global data. If you are writing your first ISR, RTD recommends focusing on the basics, such as incrementing a global variable.

Most operating systems have restrictions on what instructions can be called in your ISR. Consult your OS documentation for details on writing your ISR.

Note A complete explanation of interrupt programming is beyond the scope of this manual. For more information on interrupts, refer to the Appendix.

Sample Code

RTD’s drivers provide examples of ISR’s and interrupt handling. Refer to them as working examples. These drivers were shipped with your cpuModule, but they can also be downloaded from RTD’s website (www.rtd.com).

84 CMX158886 cpuModule

BDM-610000049 Rev G

Image 94
Contents CMX158886 cpuModules BDM-610000049 Revision GRevision History Revision Date Reason for Change 12/13/06 Initial releaseCMX158886 cpuModules Iv CMX158886 cpuModule Table of Contents MultiPort CN6 Audio CN11MultiPort Advanced Digital I/O Ports aDIO Port 1 Data register is a read/write byte directionUser Eeprom System RecoveryApplication Notes 107 CMX158886 cpuModule Chapter CMX158886 cpuModules CMX158886 cpuModule top viewThermal Monitor Error-Correction Codes Selected Models OnlyEnhanced Intel SpeedStep PX only ADIO with Wake-on-aDIOCMX158886 cpuModule CMX158886 cpuModule Model Options Ordering InformationCMX158886 Model Options Part Number DescriptionCable Kits and Accessories Board Features VGA, SVGA, XGA, SXGA, Uxga Bios 10 CMX158886 cpuModule Block Diagram CMX158886 cpuModule Simplified Block DiagramPower Consumption SpecificationsPhysical Characteristics Electrical CharacteristicsIoc Electrical CharacteristicsSymbol Parameter Test Condition Min Max VosOutput Voltage Low Common ModeOutput Voltage High Input Voltage HighContact Information 16 CMX158886 cpuModule Getting Started Connector Locations CMX158886 Connector LocationsCMX158886 Basic Connectors Connecting a Keyboard Connecting the Utility CableConnecting to the PC/104-PlusPCI Bus PCI Bus Expansion Card Power Slot Selection SwitchesPCI Bus Signaling Levels Booting the CMX158886 cpuModule for the First Time Connecting the cpuModule Proper Grounding Techniques PC/104-PlusPCI Bus 120-pin Auxiliary Power Connector CN31 Auxiliary Power CN3Pin Signal Function GND Pin Signal Function In/Out Utility Port Connector CN5Utility Port Connector CN5 SpeakerKeyboard System ResetSoft Power Button MouseBattery Svga Video Connector CN18 Svga Video Connector CN18Svga Video Resolutions Resolution Colors Refresh RatesManufacturer Model Number Resolution Color Depth Lvds Flat Panel Video Connector CN19Flat Panel Video Connector CN19 Tested Lvds PanelsEide Connector CN101 Eide Connector CN10Pin Signal ATA/IDE Disk Chip Socket U16 Installing and Configuring the ATA/IDE Disk ChipATA/IDE Disk Chip Socket U161 CMX158886 before and after ATA/IDE Disk Chip Installation Serial Port in RS-232 Mode RS-232 Serial Port DefaultSerial Port Settings Serial Port 1 CN7 and Serial Port 2 CN8Full-Duplex Connections Half-Duplex RS-485 ModeRS-422 or RS-485 Serial Port PortTransmit Data + Serial Port in RS-422/485 ModePin Signal Function In/Out DB-9 Receive Data + ResevedDual Serial Port Modes Dual Serial Port ModesDual Serial Port Connections COM a RS-232 and COM BRS-232COM a RS-422/485 and COM B RS-232 COM a RS-422/485 and COM B RS-422/485MultiPort aDIO Pinout MultiPort Configured as an Advanced Digital I/O aDIO PortMultiPort CN6 CN6 Pin FunctionMultiPort Connector CN6 as a Parallel Port MultiPort Configured as a Parallel PortCN6 Pin Signal Function In/Out DB-25 Odd pins MultiPort Configured as a Floppy Drive ControllerMultiPort Connector Floppy Pinout CN61 CN6 Pin Function DB-25 Floppy Drive PinUSB 2.0 Connector CN17 USB Connector CN1746 CMX158886 cpuModule Ethernet Connector CN20 Ethernet 10/100Base-T and -TX Connector CN20RJ-45 Pin Pin DIL Pin Signal Function In/Out Pin DIL Pin Signal Function In/Out Audio Connector CN11Audio CN11 PC/104-PlusPCI Bus CN16 PC/104-PlusBus Signal Assignments1Pin PC/104-PlusPCI Bus Signals Address and DataPower Supplies and VIO Legacy/ISA DMA Request Bridge Link CN4Bridge Link CN4 Serial Interrupt RequestOptional RTC Battery Input CN13 External Power Management CN12Fan Power, +5 V CN14 Fan Power, Switched CN15 Fan Power, Switched CN15+5 Volts DC, switched Using the cpuModule Entering the Bios Setup RTD Enhanced AMI BiosConfiguring the RTD Enhanced AMI Bios Setup KeysMain Menu Setup Fields Main Menu Setup FieldsPower On Self Test Post Codes Field Active Keys SelectionsBooting to Boot Block Flash with Fail Safe Boot ROM First Megabyte Memory Map Memory MapAddress hex Description O Addresses Reserved for the CMX158886 cpuModule Address MapAddress Range hex Bytes Device Hardware Interrupts Used on the CMX158886 cpuModule Hardware InterruptsInterrupt Normal Use Port 0 Data I/O Address 450h MultiPort Advanced Digital I/O Ports aDIODigital I/O Register Set Port 1 Data I/O Address 451hDIO-Control I/O Address 453h-Write Access DIO-Control I/O Address 453h-Read AccessMulti-Function at Address 452h1 Wake Control I/O Address 451h =Interrupt is enabledInterrupts ReservedInterrupt and Wake Event Generation WakeEnable Int Mask FunctionWake-on-aDIO No Interrupt or Wake event is generatedAC’97 Audio MultiPort Parallel Port ControlMultiPort Floppy Drive Ethernet 10/100Base-T and -TXCable Modes IDE Controller ConfigurationCable Detection Legacy Mode and Native Mode IDE Configuring the ATA/IDE Disk Chip SocketOverview Accessing the RTC RegistersReal Time Clock Control Real Time Clock Registers0Ch Registers Registers Function Hex decimal0Bh 0DhWatchdog Timer Control Watchdog Timer Control I/O Address 455hFurther Temperature Reduction Fan ModeThermal Management Power Button Modes Power ManagementAdvanced Configuration and Power Interface Acpi Low-Power Wake OptionsAT vs. ATX Power Supplies ATX Power Supply SignalsReducing Power Consumption Multi-Color LED I/O Address 456h Multi-Color LEDLED Colors Manual LED ColorsReset Status I/O Address 457h Read Access Reset Status RegisterReset Status I/O Address 457h Write Access Reset Status Description and Priorities Address Reset DescriptionDvmt Mode Select User Eeprom I/O Address 456h Bit Signal Function Read / WriteUser Eeprom Eeprom Register DescriptionFeatures and Settings That Can Affect Boot Time Loading Default Bios Settings System RecoveryBooting to the Fail Safe Boot ROM Fsbr How long does it take to respond to an interrupt? What happens when an interrupt occurs?Basic Interrupt Information for Programmers Interrupt Request LinesPCI Interrupts Writing an Interrupt Service Routine ISRIntel 8259 Programmable Interrupt Controller Sample CodeAppendix a Hardware Reference Jumper Settings and Locations JP9 JP2JP12 Jumper Pins Function DefaultJP11 JP13Onboard PCI Devices Onboard PCI DevicesDevice ID Vendor ID Description Physical Dimensions CMX158886 Physical Dimensions ±0.005 inches90 CMX158886 cpuModule Appendix B Troubleshooting Troubleshooting Common Problems and SolutionsProblem Cause Solution Troubleshooting a PC/104-PlusSystem Troubleshooting cont’dHow to Obtain Technical Support Appendix C Idan Dimensions and Pinout Idan Dimensions and Connectors IDAN-CMX158886 Connectors1Idan Pin # Signal Function PS/2 Mouse 6-Pin mini-DIN Connector femaleKeyboard 6-Pin mini-DIN Connector female External I/O ConnectionsCOM1/COM2 RS-422/485 9-Pin D Connector male COM1/COM2 RS-232 9-Pin D Connector maleIdan Pin # Signal Function Mode MultiPort 25-Pin D Connector female Idan Pin # ADIO Port Parallel Port Floppy Port CPU Pin #Panel 20-Pin mini D Connector female Idan Pin # Signal Name CPU Pin #Ground + 5 Volts Svga 15-Pin High Density D Connector femaleIdan Pin # Signal Function CPU Pin # Ground Reserved DDC Data Monitor dataIdan Pin # 10Base-T Signal CPU Pin # USB 9-Pin D Connector maleEthernet 9-Pin D Connector female Receive + Reserved Transmit + GroundAudio 9-Pin D Connector female Idan Pin # Signal CPU Pin #Idan Dimensions and Connectors BRG version only IDAN-CMX158886-BRG Connectors1External I/O Connections BRG version only ADIO 37-Pin D Connector femaleBRG Pin # Function Idan Pin # 106 CMX158886 cpuModule Drivers and Example Programs PC/104 and PC/104-PlusSpecificationsApplication Notes Interrupt Programming108 CMX158886 cpuModule Appendix E Limited Warranty 110 CMX158886 cpuModule

BDM-610000049 specifications

The IBM BDM-610000049 is a powerful and versatile device designed for advanced data processing and analytics. This model is engineered to handle large volumes of data while ensuring high-speed performance and reliability. One of the main features of the BDM-610000049 is its robust processing capabilities, enabled by a state-of-the-art multi-core CPU architecture. This allows it to perform complex calculations and data manipulations efficiently, making it ideal for big data applications.

In terms of storage, the BDM-610000049 comes equipped with high-capacity SSD drives, which not only accelerate data access speeds but also enhance the overall system responsiveness. This feature is particularly beneficial for organizations that require rapid retrieval of stored information. The device also supports a variety of storage configurations, allowing users to tailor the system according to their specific needs, balancing between performance and capacity.

Networking technologies integrated into the BDM-610000049 are designed to facilitate seamless connectivity, ensuring quick and secure data transfers. Its advanced networking capabilities include support for multiple protocols, which streamline communication between different parts of the system and external devices. This is crucial for environments that rely on real-time data processing, such as financial services, healthcare, and logistics.

The IBM BDM-610000049 is also notable for its security features, which help protect sensitive data from unauthorized access and cyber threats. It incorporates state-of-the-art encryption protocols and secure access controls, providing an additional layer of safety for businesses handling critical information.

Moreover, the scalability of the BDM-610000049 is a key characteristic that sets it apart from competitors. Organizations can easily upgrade or expand their systems to accommodate growing data requirements without significant downtime or disruption. This flexibility is indispensable for businesses in today’s fast-paced digital landscape.

In summary, the IBM BDM-610000049 is a cutting-edge device that combines powerful processing, advanced storage technologies, robust networking capabilities, and enhanced security features. Its scalability ensures that it can grow with the demands of modern enterprises, making it a worthwhile investment for companies looking to harness the full power of their data. With the BDM-610000049, businesses can confidently pursue data-driven strategies, knowing they have a reliable and sophisticated technology solution at their disposal.