public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Hugo 'NOx' Tyson <hmt@cygnus.co.ukx>
To: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] ARM cpu modes
Date: Wed, 05 Sep 2001 00:09:00 -0000	[thread overview]
Message-ID: <ptya6sg1y8.fsf@masala.cygnus.co.uk> (raw)
Message-ID: <20010905000900.nx8pFX7WHYbCzIeewfaPc59bbvagTpMucwgrm_9V7h4@z> (raw)
In-Reply-To: <852568B8.0037BA5A.00@kanmta01.software.mitel.com>


Colin_Helliwell@Mitel.COM writes:
> Jesper said in a message yesterday that "[ARM] Application threads run in
> supervisor mode in eCos". I've heard/seen it said somewhere that the ARM's
> privileged Supervisor mode was intended for OS-type operations, whilst the
> non-privileged User mode was intended for application-level code. I was curious
> about the rationale behind the choice made in eCos, and whether it is felt that
> there are actually any pros and/or cons of running application threads in
> supervisor mode.

Those distinctions are only pointful if you do stuff like memory protection
(including of IO device) and therefore have a SWI interface to *all* system
services. 
"Big" OS's with processes (=> memory protection and VM) would do this.
"Small" OS's ie. eCos, with threads and one uniform memory space do not.

eCos apps are fully linked, there is no SWI interface, and for performance
reasons, we *want* appliction object files to contain "privilidged"
operations from eCos macros or inline functions.  Device driver code is not
"special" in any way.  For example, cache flushing or sync'ing is usually a
coprocessor operation, which you can only do in a non-User mode.  But it's
only a couple of instructions, so there's no need to put in a clunking
great function with mode changes surrounding it; just put it inline with
the app code.  So it all must run in Supervisor mode.

Actually, we have considered moving to System mode (User mode reg set with
SVC mode privilidges) but it's not available on all ARMs and there ain't
much to gain...

HTH,
	- Huge

-- 
The 20th Century brought unprecedented increases in worldwide numeracy and
literacy and incredible advances in technology, science and mathematics.
It was also the only century in the past or in any reasonable predictable
future apparently to contain only 99 years.

  reply	other threads:[~2001-09-05  0:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-05  3:09 Colin_Helliwell
2000-04-05  5:45 ` Hugo 'NOx' Tyson [this message]
2001-09-05  0:09   ` Hugo 'NOx' Tyson
2000-04-05  5:58 ` Gary Thomas

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=ptya6sg1y8.fsf@masala.cygnus.co.uk \
    --to=hmt@cygnus.co.ukx \
    --cc=ecos-discuss@sources.redhat.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).