]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/ppc/exception.h
xnu-792.10.96.tar.gz
[apple/xnu.git] / osfmk / ppc / exception.h
index dedad228d7bd4d91b3b4a3337367ff312a8b497a..9c4ecc0ef6de8e107e687667e5ee702afb83fdd3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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 */
@@ -129,12 +131,10 @@ struct procFeatures {
        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 */
@@ -343,14 +343,8 @@ struct per_proc_info {
        /* 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 */
@@ -377,7 +371,7 @@ struct per_proc_info {
        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;
        
@@ -518,10 +512,28 @@ struct per_proc_info {
 
        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 */
 
 };
 
@@ -529,7 +541,7 @@ struct per_proc_info {
 
 
 /*
- * 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)                                      \
@@ -540,9 +552,9 @@ extern struct per_proc_info BootProcInfo;
 #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];
@@ -550,7 +562,7 @@ 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
@@ -644,9 +656,10 @@ extern char *trap_type[];
 #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