[PATCH 03/11] smp: Rely on BSS initialization

Sebastian Huber sebastian.huber at embedded-brains.de
Wed May 29 07:16:36 UTC 2013


On 05/29/2013 01:27 AM, Chris Johns wrote:
> Sebastian Huber wrote:
>> The _Per_CPU_Information is part of the BSS segment and must be zero
>> initialized.  Some processors may already poll some per-CPU fields and
>> wait for a state change at this point.
>
> Please add comment to indicate this is the expected state.

There is a comment (patch 09/11):

typedef enum {
   /**
    * @brief The per CPU controls are initialized to zero.
    *
    * In this state the only valid field of the per CPU controls for secondary
    * processors is the per CPU state.  The secondary CPUs should perform their
    * basic initialization now and change into the
    * PER_CPU_STATE_READY_TO_BEGIN_MULTITASKING state once this is complete.
    */
   PER_CPU_STATE_BEFORE_INITIALIZATION,

   /**
    * @brief Secondary CPU is ready to begin multitasking.
    *
    * The secondary CPU performed its basic initialization and is ready to
    * receive inter-processor interrupts.  Interrupt delivery must be disabled
    * in this state, but requested inter-processor interrupts must be recorded
    * and must be delivered once the secondary CPU enables interrupts for the
    * first time.  The main CPU will wait for all secondary CPUs to change into
    * this state.  In case a secondary CPU does not reach this state the system
    * will not start.  The secondary CPUs wait now for a change into the
    * PER_CPU_STATE_BEGIN_MULTITASKING state set by the main CPU once all
    * secondary CPUs reached the PER_CPU_STATE_READY_TO_BEGIN_MULTITASKING
    * state.
    */
   PER_CPU_STATE_READY_TO_BEGIN_MULTITASKING,

   /**
    * @brief Multitasking begin of secondary CPU is requested.
    *
    * The main CPU completed system initialization and performed a context
    * switch to the initialization thread.  Secondary CPUs should now issue a
    * context switch to the heir thread.  This normally enables interrupts on
    * the secondary CPU for the first time.
    */
   PER_CPU_STATE_BEGIN_MULTITASKING,

   /**
    * @brief Normal multitasking state.
    */
   PER_CPU_STATE_UP,

   /**
    * @brief This is a terminal state.
    */
   PER_CPU_STATE_SHUTDOWN
} Per_CPU_State;

-- 
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 devel mailing list