public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Gary Thomas <gary@mlbassoc.com>
To: Scott Moore <smoore@powerfile.com>
Cc: ecos-discuss@ecos.sourceware.org,
	  Steve Gaskill <sgaskill@powerfile.com>
Subject: Re: [ECOS] Notification of changes required for CPU support
Date: Wed, 29 Aug 2007 19:00:00 -0000	[thread overview]
Message-ID: <46D5C242.3010405@mlbassoc.com> (raw)
In-Reply-To: <BC0348D2176B4C4EA0CBB50AEFDBD9670B11D6D4@MI8NYCMAIL14.Mi8.com>

Scott Moore wrote:
>  
> Although we are not ready yet to commit changes, I thought it
> would be good if we would give an overview of changes required
> to support a new processor/processor board combination under
> ecos, and get feedback on what the form of the changes should
> be before putting that back to the ecos project.
> 
> The lpc2xxx series from NXP (formerly Phillips) has proceeded
> through the lpc21xx and lpc22xx series to the current lpc23xx
> series. The board we are working with is the MCB2300 available
> from Keil. The current support under ecos is the MCB2100 board.
> 
> Unfortunately, unlike what the lpc2xxx directory tree under
> ecos implies, the lpc23xx series processors aren't in fact
> compatible with the lpc21xx and lpc22xx series. The method
> of handling interrupts changed. The lpc2xxx series is downward
> compatable with the ARM convention of a single IRQ vector at
> location $28 in that the vector automatically selected by the
> processor is placed in a register, which the instruction at
> $28 can move to the PC, thus accomplishing a vectored
> interrupt. This is downward compatible with ARM general
> conventions, because if the code ignores the automatic vectoring
> and simply proceeds to the the IRQ handler code from $28,
> the code will function, but simply not benefit from the
> automatic vectoring.
> 
> The lpc2xxx code in ecos ignores the automatic vectoring, but
> uses the lpc2xxx autovectoring hardware to automatically
> determine which logical vector (from 0-15) is being serviced.
> This is then passed to the IRQ service code when it reaches
> the point it needs to find the vector number, so that it can
> look it up in the hal_interrupt_data and hal_interrupt_handlers
> tables.
> 
> Since the lpc2xxx/var code depends on the hardware vectoring
> in this way, and also because the number of interrupts servicable
> by the CPU increase from 16 to 32, and because of other minor
> ways the interrupt handling changes, the lpc2xx/var code must
> change for the lpc23xx processors.
> 
> Here is a list of the files that required changes:
> 
> ../hal/arm/lpc2xxx/var/current/src/lpc2xxx_misc.c
> ../hal/arm/lpc2xxx/var/current/include/var_io.h
> 
> This gets us going, but clearly creates a conflict in ecos, 
> since the lpc2xxx tree no longer supports all processors in the
> series.
> 
> I'm open to suggestions about what to do about that before trying
> to put it back to ecos. The possibilities are:
> 
> 1. Break the lpc2xxx tree into lpc21xx_lpc22xx and lpc23xx trees.
> 
> 2. Have the lpc2xxx code automatically configure per the processor.
> 
> Other?
> 
> Right now, I am just hacking up the lpc2xxx series to get our stuff
> running without regard for lpc21xx and lpc22xx backwards compatibility.
> 
> Hey, blame Phillips for creating an incompatibility in their own
> series.

How similar are the processor(s), apart from the interrupt
handling difference you've pointed out?

My preference would be to keep the tree as it is and add
a CDL option which describes the processor.  The code you've
pointed to can then have conditional support based on this
CDL.  Precedent for this would be the PowerPC (e.g. not all
8xx processors are the same, but they are close enough to
have a common HAL) and SH (again a myriad of variants)
Have a look at how those HALs handle this.  Once you have
something that works, propose it on ecos-patches and we
can discuss making these changes to the common CVS.


-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

  reply	other threads:[~2007-08-29 19:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-29 12:03 [ECOS] timer alarm or any timer in Redboot Jacob Avraham
2007-08-29 12:53 ` Andrew Lunn
2007-08-29 18:48   ` [ECOS] Notification of changes required for CPU support Scott Moore
2007-08-29 19:00     ` Gary Thomas [this message]
2007-08-29 19:08       ` Scott Moore
2007-08-29 19:29     ` Hans Rosenfeld

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46D5C242.3010405@mlbassoc.com \
    --to=gary@mlbassoc.com \
    --cc=ecos-discuss@ecos.sourceware.org \
    --cc=sgaskill@powerfile.com \
    --cc=smoore@powerfile.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).