<div dir="ltr">I had another thought that we need to be sure that the<div>reason for adjusting the starting FP context pointer</div><div>to not be the base address of the FP context area</div><div>should be clear.</div><div><br></div><div>For architectures where you are just linearly saving the FPU</div><div>registers, it is just a normal structure.</div><div><br></div><div>For architectures like the m68k where the FPU state is saved</div><div>as a stack which grows down, the adjustment should have</div><div>a comment to explain it. Even if it is done inline in the</div><div>context initialization.</div><div><br></div><div>--joel</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 25, 2017 at 10:18 AM, Joel Sherrill <span dir="ltr"><<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Wed, Jan 25, 2017 at 10:13 AM, Gedare Bloom <span dir="ltr"><<a href="mailto:gedare@rtems.org" target="_blank">gedare@rtems.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I guess the CPU Supplement must be updated too.<br>
<div class="m_-4108466756297073686HOEnZb"><div class="m_-4108466756297073686h5"><br>
<br></div></div></blockquote><div><br></div></span><div>Equally likely to impact the porting guide as well.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>--joel</div></font></span><div><div class="h5"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_-4108466756297073686HOEnZb"><div class="m_-4108466756297073686h5">
<br>
On Wed, Jan 25, 2017 at 8:35 AM, Sebastian Huber<br>
<<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brai<wbr>ns.de</a>> wrote:<br>
> Since the FP area pointer is passed by reference in<br>
> _CPU_Context_Initialize_fp() the optional FP area adjustment via<br>
> _CPU_Context_Fp_start() is superfluous.  It is also wrong with respect<br>
> to memory management, e.g. pointer passed to _Workspace_Free() may be<br>
> not the one returned by _Workspace_Allocate().<br>
><br>
> Close #1400.<br>
> ---<br>
>  cpukit/score/cpu/arm/rtems/sco<wbr>re/cpu.h      |  3 ---<br>
>  cpukit/score/cpu/bfin/rtems/sc<wbr>ore/cpu.h     | 25 -------------------------<br>
>  cpukit/score/cpu/epiphany/rtem<wbr>s/score/cpu.h | 18 ------------------<br>
>  cpukit/score/cpu/i386/rtems/sc<wbr>ore/cpu.h     |  3 ---<br>
>  cpukit/score/cpu/lm32/rtems/sc<wbr>ore/cpu.h     | 27 ---------------------------<br>
>  cpukit/score/cpu/m32c/rtems/sc<wbr>ore/cpu.h     | 26 --------------------------<br>
>  cpukit/score/cpu/m68k/rtems/sc<wbr>ore/cpu.h     | 20 ++------------------<br>
>  cpukit/score/cpu/mips/rtems/sc<wbr>ore/cpu.h     | 17 -----------------<br>
>  cpukit/score/cpu/moxie/rtems/s<wbr>core/cpu.h    | 20 --------------------<br>
>  cpukit/score/cpu/no_cpu/rtems/<wbr>score/cpu.h   | 26 --------------------------<br>
>  cpukit/score/cpu/or1k/rtems/sc<wbr>ore/cpu.h     | 18 +++++++-----------<br>
>  cpukit/score/cpu/powerpc/rtems<wbr>/score/cpu.h  | 17 -----------------<br>
>  cpukit/score/cpu/sh/rtems/scor<wbr>e/cpu.h       | 17 -----------------<br>
>  cpukit/score/cpu/sparc/rtems/s<wbr>core/cpu.h    |  7 -------<br>
>  cpukit/score/cpu/sparc64/rtems<wbr>/score/cpu.h  |  8 --------<br>
>  cpukit/score/cpu/v850/rtems/sc<wbr>ore/cpu.h     | 28 ----------------------------<br>
>  cpukit/score/include/rtems/sco<wbr>re/context.h  | 16 ----------------<br>
>  cpukit/score/src/threadinitial<wbr>ize.c         |  1 -<br>
>  18 files changed, 9 insertions(+), 288 deletions(-)<br>
><br>
> diff --git a/cpukit/score/cpu/arm/rtems/s<wbr>core/cpu.h b/cpukit/score/cpu/arm/rtems/s<wbr>core/cpu.h<br>
> index cdffc9c..9f321ac 100644<br>
> --- a/cpukit/score/cpu/arm/rtems/s<wbr>core/cpu.h<br>
> +++ b/cpukit/score/cpu/arm/rtems/s<wbr>core/cpu.h<br>
> @@ -458,9 +458,6 @@ void _CPU_Context_Initialize(<br>
>  #define _CPU_Context_Restart_self( _the_context ) \<br>
>     _CPU_Context_restore( (_the_context) );<br>
><br>
> -#define _CPU_Context_Fp_start( _base, _offset ) \<br>
> -   ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )<br>
> -<br>
>  #define _CPU_Context_Initialize_fp( _destination ) \<br>
>    do { \<br>
>      *(*(_destination)) = _CPU_Null_fp_context; \<br>
> diff --git a/cpukit/score/cpu/bfin/rtems/<wbr>score/cpu.h b/cpukit/score/cpu/bfin/rtems/<wbr>score/cpu.h<br>
> index cdefedf..7c90fc6 100644<br>
> --- a/cpukit/score/cpu/bfin/rtems/<wbr>score/cpu.h<br>
> +++ b/cpukit/score/cpu/bfin/rtems/<wbr>score/cpu.h<br>
> @@ -734,31 +734,6 @@ void _CPU_Context_Initialize(<br>
>  #define _CPU_Context_Restart_self( _the_context ) \<br>
>     _CPU_Context_restore( (_the_context) );<br>
><br>
> -/**<br>
> - * @ingroup CPUContext<br>
> - * The purpose of this macro is to allow the initial pointer into<br>
> - * a floating point context area (used to save the floating point<br>
> - * context) to be at an arbitrary place in the floating point<br>
> - * context area.<br>
> - *<br>
> - * This is necessary because some FP units are designed to have<br>
> - * their context saved as a stack which grows into lower addresses.<br>
> - * Other FP units can be saved by simply moving registers into offsets<br>
> - * from the base of the context area.  Finally some FP units provide<br>
> - * a "dump context" instruction which could fill in from high to low<br>
> - * or low to high based on the whim of the CPU designers.<br>
> - *<br>
> - * @param[in] _base is the lowest physical address of the floating point<br>
> - *        context area<br>
> - * @param[in] _offset is the offset into the floating point area<br>
> - *<br>
> - * Port Specific Information:<br>
> - *<br>
> - * XXX document implementation including references if appropriate<br>
> - */<br>
> -#define _CPU_Context_Fp_start( _base, _offset ) \<br>
> -   ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )<br>
> -<br>
>  #define _CPU_Context_Initialize_fp( _destination ) \<br>
>    memset( *( _destination ), 0, CPU_CONTEXT_FP_SIZE );<br>
><br>
> diff --git a/cpukit/score/cpu/epiphany/rt<wbr>ems/score/cpu.h b/cpukit/score/cpu/epiphany/rt<wbr>ems/score/cpu.h<br>
> index 55faefa..020d949 100644<br>
> --- a/cpukit/score/cpu/epiphany/rt<wbr>ems/score/cpu.h<br>
> +++ b/cpukit/score/cpu/epiphany/rt<wbr>ems/score/cpu.h<br>
> @@ -624,24 +624,6 @@ void _CPU_Context_Initialize(<br>
>  #define _CPU_Context_Restart_self( _the_context ) \<br>
>     _CPU_Context_restore( (_the_context) )<br>
><br>
> -/*<br>
> - *  The purpose of this macro is to allow the initial pointer into<br>
> - *  a floating point context area (used to save the floating point<br>
> - *  context) to be at an arbitrary place in the floating point<br>
> - *  context area.<br>
> - *<br>
> - *  This is necessary because some FP units are designed to have<br>
> - *  their context saved as a stack which grows into lower addresses.<br>
> - *  Other FP units can be saved by simply moving registers into offsets<br>
> - *  from the base of the context area.  Finally some FP units provide<br>
> - *  a "dump context" instruction which could fill in from high to low<br>
> - *  or low to high based on the whim of the CPU designers.<br>
> - *<br>
> - */<br>
> -<br>
> -#define _CPU_Context_Fp_start( _base, _offset ) \<br>
> -   ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )<br>
> -<br>
>  #define _CPU_Context_Initialize_fp( _destination ) \<br>
>    memset( *( _destination ), 0, CPU_CONTEXT_FP_SIZE );<br>
><br>
> diff --git a/cpukit/score/cpu/i386/rtems/<wbr>score/cpu.h b/cpukit/score/cpu/i386/rtems/<wbr>score/cpu.h<br>
> index 052e53f..ace26f3 100644<br>
> --- a/cpukit/score/cpu/i386/rtems/<wbr>score/cpu.h<br>
> +++ b/cpukit/score/cpu/i386/rtems/<wbr>score/cpu.h<br>
> @@ -508,9 +508,6 @@ uint32_t   _CPU_ISR_Get_level( void );<br>
>    }<br>
>  #endif<br>
><br>
> -#define _CPU_Context_Fp_start( _base, _offset ) \<br>
> -   ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )<br>
> -<br>
>  #define _CPU_Context_Initialize_fp( _fp_area ) \<br>
>    { \<br>
>      memcpy( *_fp_area, &_CPU_Null_fp_context, CPU_CONTEXT_FP_SIZE ); \<br>
> diff --git a/cpukit/score/cpu/lm32/rtems/<wbr>score/cpu.h b/cpukit/score/cpu/lm32/rtems/<wbr>score/cpu.h<br>
> index 87cfd9e..9d22994 100644<br>
> --- a/cpukit/score/cpu/lm32/rtems/<wbr>score/cpu.h<br>
> +++ b/cpukit/score/cpu/lm32/rtems/<wbr>score/cpu.h<br>
> @@ -749,33 +749,6 @@ extern char _gp[];<br>
>     _CPU_Context_restore( (_the_context) );<br>
><br>
>  /**<br>
> - * @ingroup CPUContext<br>
> - * The purpose of this macro is to allow the initial pointer into<br>
> - * a floating point context area (used to save the floating point<br>
> - * context) to be at an arbitrary place in the floating point<br>
> - * context area.<br>
> - *<br>
> - * This is necessary because some FP units are designed to have<br>
> - * their context saved as a stack which grows into lower addresses.<br>
> - * Other FP units can be saved by simply moving registers into offsets<br>
> - * from the base of the context area.  Finally some FP units provide<br>
> - * a "dump context" instruction which could fill in from high to low<br>
> - * or low to high based on the whim of the CPU designers.<br>
> - *<br>
> - * @param[in] _base is the lowest physical address of the floating point<br>
> - *        context area<br>
> - * @param[in] _offset is the offset into the floating point area<br>
> - *<br>
> - * Port Specific Information:<br>
> - *<br>
> - * XXX document implementation including references if appropriate<br>
> - */<br>
> -#define _CPU_Context_Fp_start( _base, _offset )<br>
> -#if 0<br>
> -   ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )<br>
> -#endif<br>
> -<br>
> -/**<br>
>   * This routine initializes the FP context area passed to it to.<br>
>   * There are a few standard ways in which to initialize the<br>
>   * floating point context.  The code included for this macro assumes<br>
> diff --git a/cpukit/score/cpu/m32c/rtems/<wbr>score/cpu.h b/cpukit/score/cpu/m32c/rtems/<wbr>score/cpu.h<br>
> index 8dd8c41..af1c341 100644<br>
> --- a/cpukit/score/cpu/m32c/rtems/<wbr>score/cpu.h<br>
> +++ b/cpukit/score/cpu/m32c/rtems/<wbr>score/cpu.h<br>
> @@ -740,32 +740,6 @@ void _CPU_Context_Restart_self(<br>
>  ) RTEMS_NO_RETURN;<br>
><br>
>  /**<br>
> - * @ingroup CPUContext<br>
> - *<br>
> - * The purpose of this macro is to allow the initial pointer into<br>
> - * a floating point context area (used to save the floating point<br>
> - * context) to be at an arbitrary place in the floating point<br>
> - * context area.<br>
> - *<br>
> - * This is necessary because some FP units are designed to have<br>
> - * their context saved as a stack which grows into lower addresses.<br>
> - * Other FP units can be saved by simply moving registers into offsets<br>
> - * from the base of the context area.  Finally some FP units provide<br>
> - * a "dump context" instruction which could fill in from high to low<br>
> - * or low to high based on the whim of the CPU designers.<br>
> - *<br>
> - * @param[in] _base is the lowest physical address of the floating point<br>
> - *        context area<br>
> - * @param[in] _offset is the offset into the floating point area<br>
> - *<br>
> - * Port Specific Information:<br>
> - *<br>
> - * XXX document implementation including references if appropriate<br>
> - */<br>
> -#define _CPU_Context_Fp_start( _base, _offset ) \<br>
> -   ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )<br>
> -<br>
> -/**<br>
>   * This routine initializes the FP context area passed to it to.<br>
>   * There are a few standard ways in which to initialize the<br>
>   * floating point context.  The code included for this macro assumes<br>
> diff --git a/cpukit/score/cpu/m68k/rtems/<wbr>score/cpu.h b/cpukit/score/cpu/m68k/rtems/<wbr>score/cpu.h<br>
> index 0b9aa2d..ec6fd2e 100644<br>
> --- a/cpukit/score/cpu/m68k/rtems/<wbr>score/cpu.h<br>
> +++ b/cpukit/score/cpu/m68k/rtems/<wbr>score/cpu.h<br>
> @@ -172,12 +172,6 @@ typedef struct {<br>
>      } _operand2;<br>
>    } Context_Control_fp;<br>
><br>
> -  /*<br>
> -   *  This software FP implementation is only for GCC.<br>
> -   */<br>
> -  #define _CPU_Context_Fp_start( _base, _offset ) \<br>
> -     ((void *) _Addresses_Add_offset( (_base), (_offset) ) )<br>
> -<br>
>    #define _CPU_Context_Initialize_fp( _fp_area ) \<br>
>       { \<br>
>         Context_Control_fp *_fp; \<br>
> @@ -234,9 +228,6 @@ typedef struct {<br>
>        #endif<br>
>      } Context_Control_fp;<br>
><br>
> -    #define _CPU_Context_Fp_start( _base, _offset ) \<br>
> -      ((void *) _Addresses_Add_offset( (_base), (_offset) ))<br>
> -<br>
>      /*<br>
>       * The reset value for all context relevant registers except the FP data<br>
>       * registers is zero.  The reset value of the FP data register is NAN.  The<br>
> @@ -260,17 +251,10 @@ typedef struct {<br>
>        uint8_t fp_save_area [M68K_FP_STATE_SIZE + 112];<br>
>      } Context_Control_fp;<br>
><br>
> -    #define _CPU_Context_Fp_start( _base, _offset ) \<br>
> -       ( \<br>
> -         (void *) _Addresses_Add_offset( \<br>
> -            (_base), \<br>
> -            (_offset) + CPU_CONTEXT_FP_SIZE - 4 \<br>
> -         ) \<br>
> -       )<br>
> -<br>
>      #define _CPU_Context_Initialize_fp( _fp_area ) \<br>
>         { \<br>
> -         uint32_t   *_fp_context = (uint32_t *)*(_fp_area); \<br>
> +         uint32_t *_fp_context = _Addresses_Add_offset( \<br>
> +           *(_fp_area), CPU_CONTEXT_FP_SIZE - 4); \<br>
>           *(--(_fp_context)) = 0; \<br>
>           *(_fp_area) = (void *)(_fp_context); \<br>
>         }<br>
> diff --git a/cpukit/score/cpu/mips/rtems/<wbr>score/cpu.h b/cpukit/score/cpu/mips/rtems/<wbr>score/cpu.h<br>
> index 9a45d0b..74afc80 100644<br>
> --- a/cpukit/score/cpu/mips/rtems/<wbr>score/cpu.h<br>
> +++ b/cpukit/score/cpu/mips/rtems/<wbr>score/cpu.h<br>
> @@ -792,23 +792,6 @@ void _CPU_Context_Initialize(<br>
>     _CPU_Context_restore( (_the_context) );<br>
><br>
>  /*<br>
> - *  The purpose of this macro is to allow the initial pointer into<br>
> - *  A floating point context area (used to save the floating point<br>
> - *  context) to be at an arbitrary place in the floating point<br>
> - *  context area.<br>
> - *<br>
> - *  This is necessary because some FP units are designed to have<br>
> - *  their context saved as a stack which grows into lower addresses.<br>
> - *  Other FP units can be saved by simply moving registers into offsets<br>
> - *  from the base of the context area.  Finally some FP units provide<br>
> - *  a "dump context" instruction which could fill in from high to low<br>
> - *  or low to high based on the whim of the CPU designers.<br>
> - */<br>
> -<br>
> -#define _CPU_Context_Fp_start( _base, _offset ) \<br>
> -   ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )<br>
> -<br>
> -/*<br>
>   *  This routine initializes the FP context area passed to it to.<br>
>   *  There are a few standard ways in which to initialize the<br>
>   *  floating point context.  The code included for this macro assumes<br>
> diff --git a/cpukit/score/cpu/moxie/rtems<wbr>/score/cpu.h b/cpukit/score/cpu/moxie/rtems<wbr>/score/cpu.h<br>
> index b77083d..a8b2263 100644<br>
> --- a/cpukit/score/cpu/moxie/rtems<wbr>/score/cpu.h<br>
> +++ b/cpukit/score/cpu/moxie/rtems<wbr>/score/cpu.h<br>
> @@ -608,26 +608,6 @@ uint32_t   _CPU_ISR_Get_level( void );<br>
>  #define _CPU_Context_Restart_self( _the_context ) \<br>
>     _CPU_Context_restore( (_the_context) );<br>
><br>
> -/*<br>
> - *  The purpose of this macro is to allow the initial pointer into<br>
> - *  a floating point context area (used to save the floating point<br>
> - *  context) to be at an arbitrary place in the floating point<br>
> - *  context area.<br>
> - *<br>
> - *  This is necessary because some FP units are designed to have<br>
> - *  their context saved as a stack which grows into lower addresses.<br>
> - *  Other FP units can be saved by simply moving registers into offsets<br>
> - *  from the base of the context area.  Finally some FP units provide<br>
> - *  a "dump context" instruction which could fill in from high to low<br>
> - *  or low to high based on the whim of the CPU designers.<br>
> - *<br>
> - *  MOXIE Specific Information:<br>
> - *<br>
> - *  XXX<br>
> - */<br>
> -#define _CPU_Context_Fp_start( _base, _offset ) \<br>
> -   ( (void *) (_base) + (_offset) )<br>
> -<br>
>  #define _CPU_Context_Initialize_fp( _destination ) \<br>
>    memset( *( _destination ), 0, CPU_CONTEXT_FP_SIZE );<br>
><br>
> diff --git a/cpukit/score/cpu/no_cpu/rtem<wbr>s/score/cpu.h b/cpukit/score/cpu/no_cpu/rtem<wbr>s/score/cpu.h<br>
> index 372b01f..62e1a91 100644<br>
> --- a/cpukit/score/cpu/no_cpu/rtem<wbr>s/score/cpu.h<br>
> +++ b/cpukit/score/cpu/no_cpu/rtem<wbr>s/score/cpu.h<br>
> @@ -876,32 +876,6 @@ uint32_t   _CPU_ISR_Get_level( void );<br>
>     _CPU_Context_restore( (_the_context) );<br>
><br>
>  /**<br>
> - * @ingroup CPUContext<br>
> - *<br>
> - * The purpose of this macro is to allow the initial pointer into<br>
> - * a floating point context area (used to save the floating point<br>
> - * context) to be at an arbitrary place in the floating point<br>
> - *context area.<br>
> - *<br>
> - * This is necessary because some FP units are designed to have<br>
> - * their context saved as a stack which grows into lower addresses.<br>
> - * Other FP units can be saved by simply moving registers into offsets<br>
> - * from the base of the context area.  Finally some FP units provide<br>
> - * a "dump context" instruction which could fill in from high to low<br>
> - * or low to high based on the whim of the CPU designers.<br>
> - *<br>
> - * @param[in] _base is the lowest physical address of the floating point<br>
> - *        context area<br>
> - * @param[in] _offset is the offset into the floating point area<br>
> - *<br>
> - * Port Specific Information:<br>
> - *<br>
> - * XXX document implementation including references if appropriate<br>
> - */<br>
> -#define _CPU_Context_Fp_start( _base, _offset ) \<br>
> -   ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )<br>
> -<br>
> -/**<br>
>   * This routine initializes the FP context area passed to it to.<br>
>   * There are a few standard ways in which to initialize the<br>
>   * floating point context.  The code included for this macro assumes<br>
> diff --git a/cpukit/score/cpu/or1k/rtems/<wbr>score/cpu.h b/cpukit/score/cpu/or1k/rtems/<wbr>score/cpu.h<br>
> index 4a643c7..3d4a6e0 100644<br>
> --- a/cpukit/score/cpu/or1k/rtems/<wbr>score/cpu.h<br>
> +++ b/cpukit/score/cpu/or1k/rtems/<wbr>score/cpu.h<br>
> @@ -620,10 +620,11 @@ void _CPU_Context_Initialize(<br>
>     _CPU_Context_restore( (_the_context) );<br>
><br>
>  /*<br>
> - *  The purpose of this macro is to allow the initial pointer into<br>
> - *  a floating point context area (used to save the floating point<br>
> - *  context) to be at an arbitrary place in the floating point<br>
> - *  context area.<br>
> + *  This routine is responsible to initialize the FP context.<br>
> + *<br>
> + *  The FP area pointer is passed by reference to allow the initial pointer<br>
> + *  into a floating point context area (used to save the floating point<br>
> + *  context) to be at an arbitrary place in the floating point context area.<br>
>   *<br>
>   *  This is necessary because some FP units are designed to have<br>
>   *  their context saved as a stack which grows into lower addresses.<br>
> @@ -631,14 +632,9 @@ void _CPU_Context_Initialize(<br>
>   *  from the base of the context area.  Finally some FP units provide<br>
>   *  a "dump context" instruction which could fill in from high to low<br>
>   *  or low to high based on the whim of the CPU designers.<br>
> - *<br>
>   */<br>
> -<br>
> -#define _CPU_Context_Fp_start( _base, _offset ) \<br>
> -   ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )<br>
> -<br>
> -#define _CPU_Context_Initialize_fp( _destination ) \<br>
> -  memset( *( _destination ), 0, CPU_CONTEXT_FP_SIZE );<br>
> +#define _CPU_Context_Initialize_fp( _fp_area_p ) \<br>
> +  memset( *( _fp_area_p ), 0, CPU_CONTEXT_FP_SIZE )<br>
><br>
>  /* end of Context handler macros */<br>
><br>
> diff --git a/cpukit/score/cpu/powerpc/rte<wbr>ms/score/cpu.h b/cpukit/score/cpu/powerpc/rte<wbr>ms/score/cpu.h<br>
> index 93d620e..a847667 100644<br>
> --- a/cpukit/score/cpu/powerpc/rte<wbr>ms/score/cpu.h<br>
> +++ b/cpukit/score/cpu/powerpc/rte<wbr>ms/score/cpu.h<br>
> @@ -831,23 +831,6 @@ void _CPU_Context_Initialize(<br>
>     _CPU_Context_restore( (_the_context) );<br>
><br>
>  /*<br>
> - *  The purpose of this macro is to allow the initial pointer into<br>
> - *  a floating point context area (used to save the floating point<br>
> - *  context) to be at an arbitrary place in the floating point<br>
> - *  context area.<br>
> - *<br>
> - *  This is necessary because some FP units are designed to have<br>
> - *  their context saved as a stack which grows into lower addresses.<br>
> - *  Other FP units can be saved by simply moving registers into offsets<br>
> - *  from the base of the context area.  Finally some FP units provide<br>
> - *  a "dump context" instruction which could fill in from high to low<br>
> - *  or low to high based on the whim of the CPU designers.<br>
> - */<br>
> -<br>
> -#define _CPU_Context_Fp_start( _base, _offset ) \<br>
> -   ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )<br>
> -<br>
> -/*<br>
>   *  This routine initializes the FP context area passed to it to.<br>
>   *  There are a few standard ways in which to initialize the<br>
>   *  floating point context.  The code included for this macro assumes<br>
> diff --git a/cpukit/score/cpu/sh/rtems/sc<wbr>ore/cpu.h b/cpukit/score/cpu/sh/rtems/sc<wbr>ore/cpu.h<br>
> index 0ad3829..c2b7081 100644<br>
> --- a/cpukit/score/cpu/sh/rtems/sc<wbr>ore/cpu.h<br>
> +++ b/cpukit/score/cpu/sh/rtems/sc<wbr>ore/cpu.h<br>
> @@ -550,23 +550,6 @@ void _CPU_Context_Initialize(<br>
>     _CPU_Context_restore( (_the_context) );<br>
><br>
>  /*<br>
> - *  The purpose of this macro is to allow the initial pointer into<br>
> - *  a floating point context area (used to save the floating point<br>
> - *  context) to be at an arbitrary place in the floating point<br>
> - *  context area.<br>
> - *<br>
> - *  This is necessary because some FP units are designed to have<br>
> - *  their context saved as a stack which grows into lower addresses.<br>
> - *  Other FP units can be saved by simply moving registers into offsets<br>
> - *  from the base of the context area.  Finally some FP units provide<br>
> - *  a "dump context" instruction which could fill in from high to low<br>
> - *  or low to high based on the whim of the CPU designers.<br>
> - */<br>
> -<br>
> -#define _CPU_Context_Fp_start( _base, _offset ) \<br>
> -   ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )<br>
> -<br>
> -/*<br>
>   *  This routine initializes the FP context area passed to it to.<br>
>   *  There are a few standard ways in which to initialize the<br>
>   *  floating point context.  The code included for this macro assumes<br>
> diff --git a/cpukit/score/cpu/sparc/rtems<wbr>/score/cpu.h b/cpukit/score/cpu/sparc/rtems<wbr>/score/cpu.h<br>
> index a59fc36..7c81f07 100644<br>
> --- a/cpukit/score/cpu/sparc/rtems<wbr>/score/cpu.h<br>
> +++ b/cpukit/score/cpu/sparc/rtems<wbr>/score/cpu.h<br>
> @@ -956,13 +956,6 @@ void _CPU_Context_Initialize(<br>
>     _CPU_Context_restore( (_the_context) );<br>
><br>
>  /**<br>
> - * The FP context area for the SPARC is a simple structure and nothing<br>
> - * special is required to find the "starting load point"<br>
> - */<br>
> -#define _CPU_Context_Fp_start( _base, _offset ) \<br>
> -   ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )<br>
> -<br>
> -/**<br>
>   * This routine initializes the FP context area passed to it to.<br>
>   *<br>
>   * The SPARC allows us to use the simple initialization model<br>
> diff --git a/cpukit/score/cpu/sparc64/rte<wbr>ms/score/cpu.h b/cpukit/score/cpu/sparc64/rte<wbr>ms/score/cpu.h<br>
> index 9926ebb..47041e7 100644<br>
> --- a/cpukit/score/cpu/sparc64/rte<wbr>ms/score/cpu.h<br>
> +++ b/cpukit/score/cpu/sparc64/rte<wbr>ms/score/cpu.h<br>
> @@ -824,14 +824,6 @@ void _CPU_Context_Initialize(<br>
>     _CPU_Context_restore( (_the_context) );<br>
><br>
>  /*<br>
> - *  The FP context area for the SPARC is a simple structure and nothing<br>
> - *  special is required to find the "starting load point"<br>
> - */<br>
> -<br>
> -#define _CPU_Context_Fp_start( _base, _offset ) \<br>
> -   ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )<br>
> -<br>
> -/*<br>
>   *  This routine initializes the FP context area passed to it to.<br>
>   *<br>
>   *  The SPARC allows us to use the simple initialization model<br>
> diff --git a/cpukit/score/cpu/v850/rtems/<wbr>score/cpu.h b/cpukit/score/cpu/v850/rtems/<wbr>score/cpu.h<br>
> index 6c77f51..d3cdf05 100644<br>
> --- a/cpukit/score/cpu/v850/rtems/<wbr>score/cpu.h<br>
> +++ b/cpukit/score/cpu/v850/rtems/<wbr>score/cpu.h<br>
> @@ -699,34 +699,6 @@ void _CPU_Context_Initialize(<br>
>  /* XXX this should be possible to remove */<br>
>  #if 0<br>
>  /**<br>
> - * @ingroup CPUContext<br>
> - * The purpose of this macro is to allow the initial pointer into<br>
> - * a floating point context area (used to save the floating point<br>
> - * context) to be at an arbitrary place in the floating point<br>
> - * context area.<br>
> - *<br>
> - * This is necessary because some FP units are designed to have<br>
> - * their context saved as a stack which grows into lower addresses.<br>
> - * Other FP units can be saved by simply moving registers into offsets<br>
> - * from the base of the context area.  Finally some FP units provide<br>
> - * a "dump context" instruction which could fill in from high to low<br>
> - * or low to high based on the whim of the CPU designers.<br>
> - *<br>
> - * @param[in] _base is the lowest physical address of the floating point<br>
> - *        context area<br>
> - * @param[in] _offset is the offset into the floating point area<br>
> - *<br>
> - * Port Specific Information:<br>
> - *<br>
> - * XXX document implementation including references if appropriate<br>
> - */<br>
> -#define _CPU_Context_Fp_start( _base, _offset ) \<br>
> -   ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )<br>
> -#endif<br>
> -<br>
> -/* XXX this should be possible to remove */<br>
> -#if 0<br>
> -/**<br>
>   * This routine initializes the FP context area passed to it to.<br>
>   * There are a few standard ways in which to initialize the<br>
>   * floating point context.  The code included for this macro assumes<br>
> diff --git a/cpukit/score/include/rtems/s<wbr>core/context.h b/cpukit/score/include/rtems/s<wbr>core/context.h<br>
> index 7e59f05..46cb460 100644<br>
> --- a/cpukit/score/include/rtems/s<wbr>core/context.h<br>
> +++ b/cpukit/score/include/rtems/s<wbr>core/context.h<br>
> @@ -111,22 +111,6 @@ extern "C" {<br>
>     _CPU_Context_Restart_self( _the_context )<br>
><br>
>  /**<br>
> - *  @brief Return starting address of floating point context.<br>
> - *<br>
> - *  This function returns the starting address of the floating<br>
> - *  point context save area.  It is assumed that the are reserved<br>
> - *  for the floating point save area is large enough.<br>
> - *<br>
> - *  @param[in] _base is lowest physical address of the floating point<br>
> - *         context save area.<br>
> - *  @param[in] _offset is the offset into the floating point area<br>
> - *<br>
> - *  @retval the initial FP context pointer<br>
> - */<br>
> -#define _Context_Fp_start( _base, _offset ) \<br>
> -   _CPU_Context_Fp_start( (_base), (_offset) )<br>
> -<br>
> -/**<br>
>   *  @brief Initialize floating point context area.<br>
>   *<br>
>   *  This routine initializes the floating point context save<br>
> diff --git a/cpukit/score/src/threadiniti<wbr>alize.c b/cpukit/score/src/threadiniti<wbr>alize.c<br>
> index 9ae2acb..5725c6e 100644<br>
> --- a/cpukit/score/src/threadiniti<wbr>alize.c<br>
> +++ b/cpukit/score/src/threadiniti<wbr>alize.c<br>
> @@ -137,7 +137,6 @@ bool _Thread_Initialize(<br>
>        fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );<br>
>        if ( !fp_area )<br>
>          goto failed;<br>
> -      fp_area = _Context_Fp_start( fp_area, 0 );<br>
>      }<br>
>      the_thread->fp_context       = fp_area;<br>
>      the_thread->Start.fp_context = fp_area;<br>
> --<br>
> 1.8.4.5<br>
><br>
> ______________________________<wbr>_________________<br>
> devel mailing list<br>
> <a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
> <a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman<wbr>/listinfo/devel</a><br>
______________________________<wbr>_________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman<wbr>/listinfo/devel</a><br>
</div></div></blockquote></div></div></div><br></div></div>
</blockquote></div><br></div>