-typedef struct x86_lcpu
-{
- struct x86_lcpu *next; /* next logical cpu in core */
- struct x86_lcpu *lcpu; /* pointer back to self */
- struct x86_core *core; /* core containing the logical cpu */
- struct cpu_data *cpu; /* cpu_data structure */
- uint32_t lnum; /* logical cpu number */
- uint32_t pnum; /* physical cpu number */
- boolean_t master; /* logical cpu is the master (boot) CPU */
- boolean_t primary;/* logical cpu is primary CPU in package */
- boolean_t halted; /* logical cpu is halted */
- boolean_t idle; /* logical cpu is idle */
- uint64_t rtcPop; /* when etimer wants a timer pop */
- uint64_t rtcDeadline;
- x86_cpu_cache_t *caches[MAX_CACHE_DEPTH];
+/*
+ * In each topology structure there are two numbers: a logical number and a
+ * physical number.
+ *
+ * The logical numbers represent the ID of that structure
+ * relative to the enclosing structure and always starts at 0. So when using
+ * logical numbers, it is necessary to specify all elements in the topology
+ * (ie to "name" a logical CPU using logical numbers, 4 numbers are required:
+ * package, die, core, logical CPU).
+ *
+ * The physical numbers represent the ID of that structure and is unique (for
+ * that structure) across the entire topology.
+ *
+ * The logical CPU structure contains a third number which is the CPU number.
+ * This number is identical to the CPU number used in other parts of the kernel.
+ */
+typedef struct x86_lcpu {
+ struct x86_lcpu *next_in_core;/* next logical cpu in core */
+ struct x86_lcpu *next_in_die;/* next logical cpu in die */
+ struct x86_lcpu *next_in_pkg;/* next logical cpu in package */
+ struct x86_lcpu *lcpu; /* pointer back to self */
+ struct x86_core *core; /* core containing the logical cpu */
+ struct x86_die *die; /* die containing the logical cpu */
+ struct x86_pkg *package; /* package containing the logical cpu */
+ struct cpu_data *cpu; /* cpu_data structure */
+ uint32_t flags;
+ uint32_t cpu_num; /* cpu number */
+ uint32_t lnum; /* logical cpu number (within core) */
+ uint32_t pnum; /* physical cpu number */
+ boolean_t master; /* logical cpu is the master (boot) CPU */
+ boolean_t primary; /* logical cpu is primary CPU in package */
+ volatile lcpu_state_t state;/* state of the logical CPU */
+ volatile boolean_t stopped; /* used to indicate that the CPU has "stopped" */
+ uint64_t rtcPop; /* next timer pop programmed */
+ uint64_t rtcDeadline;/* next etimer-requested deadline */
+ x86_cpu_cache_t *caches[MAX_CACHE_DEPTH];
+ void *pmStats; /* Power management stats for lcpu */
+ void *pmState; /* Power management state for lcpu */