User Extensions, TCB Extension area, and TCBs in general

Wu, Mark H. Mark.H.Wu at disney.com
Mon May 18 19:47:19 UTC 2015


I'm not actually using it yet, but am basing the comments on the current master. I am currently in the investigation stage before I start any work, but looking at some of the implementation issues I might run into. 

-----Original Message-----
From: Sebastian Huber [mailto:sebastian.huber at embedded-brains.de] 
Sent: Monday, May 18, 2015 11:49
To: Wu, Mark H.
Cc: users at rtems.org
Subject: RE: User Extensions, TCB Extension area, and TCBs in general

Hello Mark,

which RTEMS version do you use?  The fatal extension changed considerably between 4.10 and the master.

----- Wu, Mark H. <Mark.H.Wu at disney.com> schrieb:
> I guess I'm a little confused, then. I want to install a global fatal exception handler at configuration time, and I would like to enable the stack bounds checker. But I would also like to add other extensions in addition to those. So what I'm wondering is:
> 
> 1. Will enabling the stack bounds check overwrite the fatal exception handler?
> 2. Will my extension set overwrite the stack bounds check?
> 3. If the answer to those questions is "yes," then how do I work around it? 

You can have as many initial extensions as you like, they are installed via a read-only table in confdefs.h.  A global fata exception handler is a typical use case for this, see also test sptests/spfatal26.  One limitation is that you have no data field for initial extensions in the TCB.  With the support for thread-local storage, this is not really a problem.

But how does the stack bounds check interact with the initial extensions? Or are they incorporated into the initial extensions at configuration time? I still need a way to call-back the stack bounds check functions if I need to augment one or more of the extension functions, so I still need a way to "retrieve" its pointer from the current set.

> 
> My thought was to query the current set, and then 
> 
> 1. Copy the existing set first.
> 2. Add new extension functions to those that I need and are currently NULL.
> 3. For any functions that are not NULL that I need to extend, augment the existing ones by calling them first as part of my own extension function(s).
> 
> But there seems to be no way to get the current set, so I am stuck.
>  
> 
> -----Original Message-----
> From: Sebastian Huber [mailto:sebastian.huber at embedded-brains.de] 
> Sent: Monday, May 18, 2015 00:09
> To: Wu, Mark H.; users at rtems.org
> Subject: Re: User Extensions, TCB Extension area, and TCBs in general
> 
> On 15/05/15 16:46, Wu, Mark H. wrote:
> > I understand that you use rtems_extension_create(), but some of that is done "quietly." Specifically, the static extension set is created by configure, and the stack bounds checking is created similarly (if you use the mechanism described in the documentation). How do I get the object identifiers that are created/returned by that configuration/initialization code?
> 
> The statically configured extensions have no object identifier and there 
> is no field for them in the TCB. If you use the Git master on ARM, 
> PowerPC or SPARC, then I would use thread-local storage for your extension.
> 
> -- 
> Sebastian Huber, embedded brains GmbH
> 
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone   : +49 89 189 47 41-16
> Fax     : +49 89 189 47 41-09
> E-Mail  : sebastian.huber at embedded-brains.de
> PGP     : Public key available on request.
> 
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.


More information about the users mailing list