> From: Nodir Qodirov > > I am trying to understand eCos interrupt mechanism (maybe interrupt > mechanism itself in general). And now I have question may seem to be > too simple, which every Embedded System developer should know. But I > couldn't figure out: > > 1) Why do we have same values assigned to the eCos interrupts names > and IRQs? Are they somehow mapped to each other through same value > (32, 33, 34...). > 2) Why value assigned starting from 32 (can't be it from "0")? > > I have found in packages\hal\i386\pcmb\current\include\pcmb_intr.h file: > > // Interrupt vectors. > #define CYGNUM_HAL_INTERRUPT_IRQ0 32 > #define CYGNUM_HAL_INTERRUPT_IRQ1 33 > #define CYGNUM_HAL_INTERRUPT_IRQ2 34 > ... > #define CYGNUM_HAL_INTERRUPT_IRQ15 47 > > > #define CYGNUM_HAL_INTERRUPT_TIMER 32 > #define CYGNUM_HAL_INTERRUPT_KEYBOARD 33 > #define CYGNUM_HAL_INTERRUPT_SLAVE8259 34 > ... > #define CYGNUM_HAL_INTERRUPT_HDD 46 > > Comment on file says "This file contains info about interrupts and > peripherals that are common on all PCs; for example, the clock always > activates irq 0 and would therefore be listed here." But I couldn't > catch idea. Any resource to get more information to get better > understanding of eCos interrupt mechanism?
Interrupt numbers are physical quantities tied to a particular architecture. In the Intel architecture, there are 256 interrupts, and by convention the external hardware ones start at 32 because lower-numbered ones are reserved for CPU traps and such. If you look at a different architecture, such as ARM, you'll see different assignments. All eCos does is provide a framework in which interrupt sources can be identified by whatever numbers are appropriate to the architecture. -- Ciao, Paul D. DeRocco Paul mailto:[email protected] -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
