/*
- * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
#include <mach/boolean.h>
#include <kern/ast.h>
#include <kern/cpu_data.h>
+#include <kern/pms.h>
#include <pexpert/pexpert.h>
#include <IOKit/IOInterrupts.h>
#include <ppc/machine_routines.h>
+#include <ppc/rtclock.h>
/* Per processor CPU features */
#pragma pack(4) /* Make sure the structure stays as we defined it */
unsigned int pfPowerModes; /* 0x07C */
#define pmDPLLVmin 0x00010000
#define pmDPLLVminb 15
-#define pmPowerTune 0x00000004
-#define pmPowerTuneb 29
+#define pmType 0x000000FF
+#define pmPowerTune 0x00000003
#define pmDFS 0x00000002
-#define pmDFSb 30
#define pmDualPLL 0x00000001
-#define pmDualPLLb 31
unsigned int pfPowerTune0; /* 0x080 */
unsigned int pfPowerTune1; /* 0x084 */
unsigned int rsrvd88[6]; /* 0x088 */
/* PPC cache line boundary here - 140 */
void * pp_cbfr;
void * pp_chud;
- uint64_t rtclock_tick_deadline;
- struct rtclock_timer {
- uint64_t deadline;
- uint32_t
- /*boolean_t*/ is_set:1,
- has_expired:1,
- :0;
- } rtclock_timer;
+ uint64_t rtclock_intr_deadline;
+ rtclock_timer_t rtclock_timer;
unsigned int ppbbTaskEnv; /* BlueBox Task Environment */
/* PPC cache line boundary here - 160 */
ppnum_t VMMareaPhys; /* vmm state page physical addr */
unsigned int VMMXAFlgs; /* vmm extended flags */
unsigned int FAMintercept; /* vmm FAM Exceptions to intercept */
- unsigned int ppinfo_reserved1;
+ unsigned int hibernate; /* wake from hibernate */
uint32_t save_tbl;
uint32_t save_tbu;
hwCtrs hwCtr; /* Hardware exception counters */
/* - A00 */
-
- unsigned int processor[384]; /* processor structure */
+ addr64_t pp2ndPage; /* Physical address of the second page of the per_proc */
+ uint32_t pprsvd0A08[6];
+/* - A20 */
+ pmsd pms; /* Power Management Stepper control */
+ unsigned int pprsvd0A40[368]; /* Reserved out to next page boundary */
/* - 1000 */
+/*
+ * This is the start of the second page of the per_proc block. Because we do not
+ * allocate physically contiguous memory, it may be physically discontiguous from the
+ * first page. Currently there isn't anything here that is accessed translation off,
+ * but if we need it, pp2ndPage contains the physical address.
+ *
+ * Note that the boot processor's per_proc is statically allocated, so it will be a
+ * V=R contiguous area. That allows access during early boot before we turn translation on
+ * for the first time.
+ */
+
+ unsigned int processor[384]; /* processor structure */
+
+ unsigned int pprsvd1[640]; /* Reserved out to next page boundary */
+/* - 2000 */
};
/*
- * Macro to conver a processor_t processor to its attached per_proc_info_t per_proc
+ * Macro to convert a processor_t processor to its attached per_proc_info_t per_proc
*/
#define PROCESSOR_TO_PER_PROC(x) \
((struct per_proc_info*)((unsigned int)(x) \
#define MAX_CPUS 256
struct per_proc_entry {
- addr64_t ppe_paddr;
+ addr64_t ppe_paddr; /* Physical address of the first page of per_proc, 2nd is in pp2ndPage. */
unsigned int ppe_pad4[1];
- struct per_proc_info *ppe_vaddr;
+ struct per_proc_info *ppe_vaddr; /* Virtual address of the per_proc */
};
extern struct per_proc_entry PerProcTable[MAX_CPUS-1];
extern char *trap_type[];
-#endif /* ndef ASSEMBLER */ /* with this savearea should be redriven */
+#endif /* ndef ASSEMBLER */ /* with this savearea should be redriven */
/* cpu_flags defs */
#define SIGPactive 0x8000
#define failSkipLists 7
#define failUnalignedStk 8
#define failPmap 9
+#define failTimeout 10
/* Always must be last - update failNames table in model_dep.c as well */
-#define failUnknown 10
+#define failUnknown 11
#ifndef ASSEMBLER