]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/ppc/exception.h
xnu-792.6.70.tar.gz
[apple/xnu.git] / osfmk / ppc / exception.h
index 1994d53a83bbee583e64e065c04faec8d5e98971..41ccba26b5dcf555f6e9f1405f3b1a0deb473265 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@
  * 
@@ -44,6 +44,8 @@
 #include <pexpert/pexpert.h>
 #include <IOKit/IOInterrupts.h>
 #include <ppc/machine_routines.h>
+#include <ppc/pms.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 */
@@ -344,13 +344,7 @@ struct per_proc_info {
        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;
+       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