public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Richard Panton <rpanton@3glab.com>
To: Tony Armitstead <tonya@noral.com>
Cc: ecos-discuss@sourceware.cygnus.com
Subject: [ECOS] Re: Downloadable tasks?
Date: Wed, 24 Jan 2001 08:12:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.10.10101241544340.838-100000@rpanton.3glab.com> (raw)
In-Reply-To: <5.0.2.1.0.20010123160652.00a66090@mail.noral.co.uk>

On Tue, 23 Jan 2001, Tony Armitstead wrote:

> Hi,
> 
> I am considering using eCos in a KS32C50100 (ARM) application which 
> requires down-loadable code images each of which contains 2 threads. My 
> ideas are:
> 
> 2. The eCos kernel would be extended to support a 'remote' kernel API 
> interface accessed via SWI 'calls'
> 
> 3. The downloaded images would be downloaded and their threads created 
> within eCos. Each image would have a table giving the location, stack ..... 
> of the threads within the image. Or maybe just an initialisation call which 
> would create the threads using the remote API interface. Each downloaded 
> image would be linked with a library of eCos API calls which just SWI down 
> to the resident eCos kernel.
> 
> So, does anyone have any thoughts on this - or maybe already done it (for ARM)!

I've been looking at similar enhancements. Some of the issues you may wish
to consider:

*	SWI handler needs to be enhanced to take and return arguments.

*	Do you need to support THUMB SWIs (have range of 0-255 maximum)?

	( I have a code fragment that can be used to support THUMB or ARM
          SWIs - you're welcome to take this )

*	What mode are the downloadable threads to run in: USER, SYSTEM or
SVC? Anything other than SVC mode requires changes to the context switch
code.

*	What level of protection is there to be between the downloadable
threads. This will be somewhere between none, and complete isolation.

*	You'll need to preallocate SWI numbers to specific functions. What
if a new kernel variant does not support some of these calls?

*	Are the downloadable images re-locateable, or do you have separate
binaries for the same process that can execute in (download space 0) and
(download space 1)?

*	On a similar note, will your eCos kernel pre-allocate memory for
each downloadable task, or will it use some sort of memory allocation to
partition the system at extension load-time?

*	What sort of protection from errant (i.e. buggy) or malicious
downloadable programs are you to have? Note that any thread can execute
the following code sequence to bring down the entire OS:
		
		mov	sp, #0		// Point to invalid stack
		stmfd	sp, {r0-lr}	// cause data fault

	The first action of the data fault routine is to attempt to
	preserve the registers on the (now invalid) stack, hence causing
	another data fault, etc. 

PS. Watch out for alarm functions.....

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


  reply	other threads:[~2001-01-24  8:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-23  8:38 [ECOS] " Tony Armitstead
2001-01-24  8:12 ` Richard Panton [this message]
2001-01-25  7:59   ` [ECOS] " Tony Armitstead

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=Pine.LNX.4.10.10101241544340.838-100000@rpanton.3glab.com \
    --to=rpanton@3glab.com \
    --cc=ecos-discuss@sourceware.cygnus.com \
    --cc=tonya@noral.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).