public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] ARM Assabet software interrupts
@ 2001-03-28 18:33 Vlasios Tsiatsis
  2001-03-29 11:50 ` Hugo Tyson
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Vlasios Tsiatsis @ 2001-03-28 18:33 UTC (permalink / raw)
  To: ecos-discuss

Hi,

I would like to define an interrupt handler (ISR and DSR) for a software
interrupt for the ARM processor on the assabet board.
If i use the cyg_interrupt_create() function what should i do so that i
install an interrupt
handler for, say, the software interrupt #5 ?
My problem is that i don't understand (i haven't looked at the source
code yet) how the demultiplexing of software interrupts is done. Should
i give the number 5 as the interrupt handler data to the
cyg_interrupt_create() function ?

thank you,
vlasios


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] ARM Assabet software interrupts
  2001-03-28 18:33 [ECOS] ARM Assabet software interrupts Vlasios Tsiatsis
@ 2001-03-29 11:50 ` Hugo Tyson
  2001-03-29 18:25   ` Chris Morrow
  2001-03-29 18:26 ` Jonathan Larmour
  2001-03-30  1:17 ` [ECOS] " Richard Panton
  2 siblings, 1 reply; 5+ messages in thread
From: Hugo Tyson @ 2001-03-29 11:50 UTC (permalink / raw)
  To: ecos-discuss


Vlasios Tsiatsis <tsiatsis@ee.ucla.edu> writes:
> I would like to define an interrupt handler (ISR and DSR) for a software
> interrupt for the ARM processor on the assabet board.
> If i use the cyg_interrupt_create() function what should i do so that i
> install an interrupt
> handler for, say, the software interrupt #5 ?
> My problem is that i don't understand (i haven't looked at the source
> code yet) how the demultiplexing of software interrupts is done. Should
> i give the number 5 as the interrupt handler data to the
> cyg_interrupt_create() function ?

ARM SWIs (software interrupts) are not treated as interrupts in eCos - they
are exceptions.

"Interrupts" refers to hardware interrupts, IRQ and FIQ.  eCos does not use
FIQ.  The interrupt numbers refer to different interrupt sources.  For the
assabet and other SA11x0 targets, these are listed in
        hal/arm/sa11x0/var/VERSION/include/hal_var_ints.h

We don't use SWIs because there is no separation between "OS" and
"application" - eCos applications are fully linked, and run in a
priviledged mode throughout.

	- Huge

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] ARM Assabet software interrupts
  2001-03-29 11:50 ` Hugo Tyson
@ 2001-03-29 18:25   ` Chris Morrow
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Morrow @ 2001-03-29 18:25 UTC (permalink / raw)
  To: ecos-discuss

Hugo Tyson wrote:
> We don't use SWIs because there is no separation between "OS" and
> "application" - eCos applications are fully linked, and run in a
> priviledged mode throughout.
> 
>         - Huge
This same reasoning applies to the MIPS architecture?

While testing somethings around nested interrupts, I found it
useful to generate software interrupts and have eCos handle them.
This way I could do testing without having to get actual devices
involved.

-- 
Chris Morrow	YottaYotta Inc.
email:		cmorrow@yottayotta.com
phone:		(780) 439 9000 ext 227
web:		http://www.yottayotta.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] ARM Assabet software interrupts
  2001-03-28 18:33 [ECOS] ARM Assabet software interrupts Vlasios Tsiatsis
  2001-03-29 11:50 ` Hugo Tyson
@ 2001-03-29 18:26 ` Jonathan Larmour
  2001-03-30  1:17 ` [ECOS] " Richard Panton
  2 siblings, 0 replies; 5+ messages in thread
From: Jonathan Larmour @ 2001-03-29 18:26 UTC (permalink / raw)
  To: Vlasios Tsiatsis; +Cc: ecos-discuss

Vlasios Tsiatsis wrote:
> 
> Hi,
> 
> I would like to define an interrupt handler (ISR and DSR) for a software
> interrupt for the ARM processor on the assabet board.
> If i use the cyg_interrupt_create() function what should i do so that i
> install an interrupt
> handler for, say, the software interrupt #5 ?

You can probably find the interrupt in question by looking at (in this
case) hal/arm/sa11x0/var/current/include/hal_var_ints.h file.

> My problem is that i don't understand (i haven't looked at the source
> code yet) how the demultiplexing of software interrupts is done. Should
> i give the number 5 as the interrupt handler data to the
> cyg_interrupt_create() function ?

The data argument is whatever you want to be delivered at the point the ISR
is called. It's up to you.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ECOS] Re: ARM Assabet software interrupts
  2001-03-28 18:33 [ECOS] ARM Assabet software interrupts Vlasios Tsiatsis
  2001-03-29 11:50 ` Hugo Tyson
  2001-03-29 18:26 ` Jonathan Larmour
@ 2001-03-30  1:17 ` Richard Panton
  2 siblings, 0 replies; 5+ messages in thread
From: Richard Panton @ 2001-03-30  1:17 UTC (permalink / raw)
  To: Vlasios Tsiatsis; +Cc: ecos-discuss

On Wed, 28 Mar 2001, Vlasios Tsiatsis wrote:

> I would like to define an interrupt handler (ISR and DSR) for a software
> interrupt for the ARM processor on the assabet board.
> If i use the cyg_interrupt_create() function what should i do so that i
> install an interrupt
> handler for, say, the software interrupt #5 ?
> My problem is that i don't understand (i haven't looked at the source
> code yet) how the demultiplexing of software interrupts is done. Should
> i give the number 5 as the interrupt handler data to the
> cyg_interrupt_create() function ?

On ARM processors, you have three interrupt mechanisms - SWI (software),
IRQ (hardware, normal) and FIQ (hardware - fast). If you examine the
hal/arm/arch/current/src/vectors.S file, you will see that IRQ and FIQ are
handled by the same routine (after some initial separate glue code),
whereas SWI calls the exception handler. The IRQ/FIQ code goes on to
check the source of the interrupt, encoding this as a (small) number -
commonly called the interrupt number. This is COMPLETELY DIFFERENT from
the SWI number, which is simply a 24 bit integer encoded into the SWI
instruction.

You COULD modify the cyg_hal_report_software_interrupt() function in
hal/arm/arch/current/src/hal_misc.c to examine the register dump, extract
the address of the SWI instruction, read the instruction and extract the
SWI index, and then branch to one of various routines based upon that, but
you'll still need to modify vectors.S to allow the SWI call to return to
the main program.

-- 
Richard Panton              Systems Architect          3G Lab Ltd.
richard.panton@3glab.com    http://www.3glab.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-03-30  1:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-28 18:33 [ECOS] ARM Assabet software interrupts Vlasios Tsiatsis
2001-03-29 11:50 ` Hugo Tyson
2001-03-29 18:25   ` Chris Morrow
2001-03-29 18:26 ` Jonathan Larmour
2001-03-30  1:17 ` [ECOS] " Richard Panton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).