X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/593a1d5fd87cdf5b46dd5fcb84467b432cea0f91..143464d58d2bd6378e74eec636961ceb0d32fb91:/osfmk/i386/cpu_topology.h diff --git a/osfmk/i386/cpu_topology.h b/osfmk/i386/cpu_topology.h index f5cbbefb4..715a25420 100644 --- a/osfmk/i386/cpu_topology.h +++ b/osfmk/i386/cpu_topology.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2008 Apple Inc. All rights reserved. + * Copyright (c) 2003-2010 Apple Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * @@ -133,6 +133,7 @@ typedef struct x86_lcpu 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 */ @@ -140,16 +141,16 @@ typedef struct x86_lcpu 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 */ @@ -206,10 +207,12 @@ typedef struct x86_pkg 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; @@ -229,10 +232,13 @@ typedef struct x86_topology_parameters 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 */