/*
- * Copyright (c) 2003-2008 Apple Inc. All rights reserved.
+ * Copyright (c) 2003-2010 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
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; /* when etimer wants a timer pop */
- uint64_t rtcDeadline;
+ uint64_t rtcPop; /* next timer pop programmed */
+ uint64_t rtcDeadline; /* next etimer-requested deadline */
x86_cpu_cache_t *caches[MAX_CACHE_DEPTH];
- struct pmc *pmc; /* Pointer to perfmon data */
void *pmStats; /* Power management stats for lcpu */
void *pmState; /* Power management state for lcpu */
} x86_lcpu_t;
#define X86CORE_FL_HAS_HPET 0x10000000 /* core has HPET assigned */
#define X86CORE_FL_HALTED 0x00008000 /* core is halted */
#define X86CORE_FL_IDLE 0x00004000 /* core is idle */
-#define X86CORE_FL_WAKEUP 0x00002000 /* wakeup is pending */
typedef struct x86_core
{
void *pmStats; /* Power Management stats for package*/
void *pmState; /* Power Management state for package*/
struct mca_state *mca_state; /* MCA state for memory errors */
+ uint64_t package_idle_exits;
+ uint32_t num_idle;
} x86_pkg_t;
extern x86_pkg_t *x86_pkgs; /* root of all CPU packages */
-
+
typedef struct x86_topology_parameters
{
uint32_t LLCDepth;
uint32_t nLCoresPerPackage;
uint32_t nPCoresPerPackage;
uint32_t nPackages;
+ boolean_t stable;
} x86_topology_parameters_t;
/* Called after cpu discovery */
-extern void cpu_topology_start(void);
+extern void cpu_topology_sort(int ncpus);
+extern kern_return_t cpu_topology_start_cpu(int cpunum);
+
#endif /* _I386_CPU_TOPOLOGY_H_ */
#endif /* KERNEL_PRIVATE */