/*
- * Copyright (c) 2003-2008 Apple Inc. All rights reserved.
+ * Copyright (c) 2003-2010 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
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 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_PRESENT 0x80000000 /* core is present */
#define X86CORE_FL_READY 0x40000000 /* core struct is init'd */
+#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 */
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 */