+/*
+ *
+ * Various performance counters
+ */
+#pragma pack(4) /* Make sure the structure stays as we defined it */
+struct hwCtrs {
+
+ unsigned int hwInVains; /* In vain */
+ unsigned int hwResets; /* Reset */
+ unsigned int hwMachineChecks; /* Machine check */
+ unsigned int hwDSIs; /* DSIs */
+ unsigned int hwISIs; /* ISIs */
+ unsigned int hwExternals; /* Externals */
+ unsigned int hwAlignments; /* Alignment */
+ unsigned int hwPrograms; /* Program */
+ unsigned int hwFloatPointUnavailable; /* Floating point */
+ unsigned int hwDecrementers; /* Decrementer */
+ unsigned int hwIOErrors; /* I/O error */
+ unsigned int hwrsvd0; /* Reserved */
+ unsigned int hwSystemCalls; /* System call */
+ unsigned int hwTraces; /* Trace */
+ unsigned int hwFloatingPointAssists; /* Floating point assist */
+ unsigned int hwPerformanceMonitors; /* Performance monitor */
+ unsigned int hwAltivecs; /* VMX */
+ unsigned int hwrsvd1; /* Reserved */
+ unsigned int hwrsvd2; /* Reserved */
+ unsigned int hwrsvd3; /* Reserved */
+ unsigned int hwInstBreakpoints; /* Instruction breakpoint */
+ unsigned int hwSystemManagements; /* System management */
+ unsigned int hwAltivecAssists; /* Altivec Assist */
+ unsigned int hwThermal; /* Thermals */
+ unsigned int hwrsvd5; /* Reserved */
+ unsigned int hwrsvd6; /* Reserved */
+ unsigned int hwrsvd7; /* Reserved */
+ unsigned int hwrsvd8; /* Reserved */
+ unsigned int hwrsvd9; /* Reserved */
+ unsigned int hwrsvd10; /* Reserved */
+ unsigned int hwrsvd11; /* Reserved */
+ unsigned int hwrsvd12; /* Reserved */
+ unsigned int hwrsvd13; /* Reserved */
+ unsigned int hwTrace601; /* Trace */
+ unsigned int hwSIGPs; /* SIGP */
+ unsigned int hwPreemptions; /* Preemption */
+ unsigned int hwContextSwitchs; /* Context switch */
+ unsigned int hwShutdowns; /* Shutdowns */
+ unsigned int hwChokes; /* System ABENDs */
+ unsigned int hwDataSegments; /* Data Segment Interruptions */
+ unsigned int hwInstructionSegments; /* Instruction Segment Interruptions */
+ unsigned int hwSoftPatches; /* Soft Patch interruptions */
+ unsigned int hwMaintenances; /* Maintenance interruptions */
+ unsigned int hwInstrumentations; /* Instrumentation interruptions */
+ unsigned int hwrsvd14; /* Reswerved */
+/* 0x0B4 */
+
+ unsigned int hwspare0[17]; /* Reserved */
+ unsigned int hwRedrives; /* Number of redriven interrupts */
+ unsigned int hwSteals; /* PTE Steals */
+/* 0x100 */
+
+ unsigned int hwMckHang; /* ? */
+ unsigned int hwMckSLBPE; /* ? */
+ unsigned int hwMckTLBPE; /* ? */
+ unsigned int hwMckERCPE; /* ? */
+ unsigned int hwMckL1DPE; /* ? */
+ unsigned int hwMckL1TPE; /* ? */
+ unsigned int hwMckUE; /* ? */
+ unsigned int hwMckIUE; /* ? */
+ unsigned int hwMckIUEr; /* ? */
+ unsigned int hwMckDUE; /* ? */
+ unsigned int hwMckDTW; /* ? */
+ unsigned int hwMckUnk; /* ? */
+ unsigned int hwMckExt; /* ? */
+ unsigned int hwMckICachePE; /* ? */
+ unsigned int hwMckITagPE; /* ? */
+ unsigned int hwMckIEratPE; /* ? */
+ unsigned int hwMckDEratPE; /* ? */
+ unsigned int hwspare2[15]; /* Pad to next 128 bndry */
+/* 0x180 */
+
+ unsigned int napStamp[2]; /* Time base when we napped */
+ unsigned int napTotal[2]; /* Total nap time in ticks */
+ unsigned int numSIGPast; /* Number of SIGP asts recieved */
+ unsigned int numSIGPcpureq; /* Number of SIGP cpu requests recieved */
+ unsigned int numSIGPdebug; /* Number of SIGP debugs recieved */
+ unsigned int numSIGPwake; /* Number of SIGP wakes recieved */
+ unsigned int numSIGPtimo; /* Number of SIGP send timeouts */
+ unsigned int numSIGPmast; /* Number of SIGPast messages merged */
+ unsigned int numSIGPmwake; /* Number of SIGPwake messages merged */
+
+ unsigned int hwspare3[21]; /* Pad to 512 */
+
+};
+#pragma pack()
+
+typedef struct hwCtrs hwCtrs;
+
+struct patch_entry {
+ unsigned int *addr;
+ unsigned int data;
+ unsigned int type;
+ unsigned int value;
+};
+
+typedef struct patch_entry patch_entry_t;
+
+#define PATCH_INVALID 0
+#define PATCH_PROCESSOR 1
+#define PATCH_FEATURE 2
+
+#define PATCH_TABLE_SIZE 12
+
+#define PatchExt32 0x80000000
+#define PatchExt32b 0
+#define PatchLwsync 0x40000000
+#define PatchLwsyncb 1
+