15254Sgavinm/* 25254Sgavinm * CDDL HEADER START 35254Sgavinm * 45254Sgavinm * The contents of this file are subject to the terms of the 55254Sgavinm * Common Development and Distribution License (the "License"). 65254Sgavinm * You may not use this file except in compliance with the License. 75254Sgavinm * 85254Sgavinm * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 95254Sgavinm * or http://www.opensolaris.org/os/licensing. 105254Sgavinm * See the License for the specific language governing permissions 115254Sgavinm * and limitations under the License. 125254Sgavinm * 135254Sgavinm * When distributing Covered Code, include this CDDL HEADER in each 145254Sgavinm * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 155254Sgavinm * If applicable, add the following below this CDDL HEADER, with the 165254Sgavinm * fields enclosed by brackets "[]" replaced with your own identifying 175254Sgavinm * information: Portions Copyright [yyyy] [name of copyright owner] 185254Sgavinm * 195254Sgavinm * CDDL HEADER END 205254Sgavinm */ 215254Sgavinm 225254Sgavinm/* 237197Sstephh * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 245254Sgavinm * Use is subject to license terms. 255254Sgavinm */ 265254Sgavinm 275254Sgavinm/* 285254Sgavinm * eversholt rules for generic x86 MCA 295254Sgavinm * 305254Sgavinm * Most propogations are generated by preprocessor macros. The event 315254Sgavinm * declarations are deliberately not part of the propogation macros 325254Sgavinm * so that we know we have full coverage - propogations defined without 335254Sgavinm * events, or events not used in propogations, will produce compiler 345254Sgavinm * whinges. 355254Sgavinm */ 365254Sgavinm 375254Sgavinm#pragma dictionary "GMCA" 385254Sgavinm 395254Sgavinm/* 405254Sgavinm * Ereports for Simple error codes. 415254Sgavinm */ 425254Sgavinm 435254Sgavinm#define SMPL_EVENT(leafclass) \ 447349SAdrian.Frost@Sun.COM event ereport.cpu.generic-x86.leafclass@chip/core/strand { within(1s) } 455254Sgavinm 465254SgavinmSMPL_EVENT(unknown); 475254SgavinmSMPL_EVENT(unclassified); 485254SgavinmSMPL_EVENT(microcode_rom_parity); 495254SgavinmSMPL_EVENT(external); 505254SgavinmSMPL_EVENT(frc); 515254SgavinmSMPL_EVENT(internal_timer); 527349SAdrian.Frost@Sun.COMSMPL_EVENT(internal_parity); 535254SgavinmSMPL_EVENT(internal_unclassified); 545254Sgavinm 555254Sgavinm/* 565254Sgavinm * Propogations for all but "external" and "unknown" simple errors. 577197Sstephh * If the error is uncorrected we produce a fault immediately by incrementing 587197Sstephh * by N+1, otherwise we declare a fault when the SERD engine trips. 595254Sgavinm */ 605254Sgavinm 617197Sstephh#define SMPL_N 3 625254Sgavinm 637349SAdrian.Frost@Sun.COMengine serd.cpu.generic-x86.simple@chip/core/strand, N=SMPL_N, T=72h; 647349SAdrian.Frost@Sun.COMevent fault.cpu.generic-x86.internal@chip/core/strand, 657349SAdrian.Frost@Sun.COM engine=serd.cpu.generic-x86.simple@chip/core/strand; 665254Sgavinm 677349SAdrian.Frost@Sun.COMprop fault.cpu.generic-x86.internal@chip/core/strand 687349SAdrian.Frost@Sun.COM { payloadprop("error_uncorrected") == 1 ? 697349SAdrian.Frost@Sun.COM setserdincrement(SMPL_N + 1) : 1 } (1)-> 707349SAdrian.Frost@Sun.COM ereport.cpu.generic-x86.microcode_rom_parity@chip/core/strand, 717349SAdrian.Frost@Sun.COM ereport.cpu.generic-x86.internal_timer@chip/core/strand, 727349SAdrian.Frost@Sun.COM ereport.cpu.generic-x86.internal_parity@chip/core/strand, 737349SAdrian.Frost@Sun.COM ereport.cpu.generic-x86.unclassified@chip/core/strand, 747349SAdrian.Frost@Sun.COM ereport.cpu.generic-x86.internal_unclassified@chip/core/strand, 757349SAdrian.Frost@Sun.COM ereport.cpu.generic-x86.frc@chip/core/strand; 765254Sgavinm 775254Sgavinm/* 785254Sgavinm * Ereports for Compound error codes. These are in pairs "foo" and "foo_uc" 795254Sgavinm * for the corrected and uncorrected version of each error type. All are 80*7532SSean.Ye@Sun.COM * detected at chip/core[/strand]. 815254Sgavinm */ 825254Sgavinm 835254Sgavinm#define CMPND_EVENT(leafclass) \ 847349SAdrian.Frost@Sun.COM event ereport.cpu.generic-x86.leafclass@chip/core/strand \ 857349SAdrian.Frost@Sun.COM { within(1s) }; \ 867349SAdrian.Frost@Sun.COM event ereport.cpu.generic-x86.leafclass/**/_uc@chip/core/strand \ 877349SAdrian.Frost@Sun.COM { within(1s) } 885254Sgavinm 895254Sgavinm/* 905254Sgavinm * Ereports for Compound error codes - generic memory hierarchy errors 915254Sgavinm */ 925254SgavinmCMPND_EVENT(l0cache); 935254SgavinmCMPND_EVENT(l1cache); 945254SgavinmCMPND_EVENT(l2cache); 955254SgavinmCMPND_EVENT(cache); 965254Sgavinm 975254Sgavinm/* 985254Sgavinm * Ereports for Compound error codes - TLB errors 995254Sgavinm */ 1005254SgavinmCMPND_EVENT(l0dtlb); 1015254SgavinmCMPND_EVENT(l1dtlb); 1025254SgavinmCMPND_EVENT(l2dtlb); 1035254SgavinmCMPND_EVENT(dtlb); 1045254Sgavinm 1055254SgavinmCMPND_EVENT(l0itlb); 1065254SgavinmCMPND_EVENT(l1itlb); 1075254SgavinmCMPND_EVENT(l2itlb); 1085254SgavinmCMPND_EVENT(itlb); 1095254Sgavinm 1105254SgavinmCMPND_EVENT(l0tlb); 1115254SgavinmCMPND_EVENT(l1tlb); 1125254SgavinmCMPND_EVENT(l2tlb); 1135254SgavinmCMPND_EVENT(tlb); 1145254Sgavinm 1155254Sgavinm/* 1165254Sgavinm * Ereports for Compound error codes - memory hierarchy errors 1175254Sgavinm */ 1185254SgavinmCMPND_EVENT(l0dcache); 1195254SgavinmCMPND_EVENT(l1dcache); 1205254SgavinmCMPND_EVENT(l2dcache); 1215254SgavinmCMPND_EVENT(dcache); 1225254Sgavinm 1235254SgavinmCMPND_EVENT(l0icache); 1245254SgavinmCMPND_EVENT(l1icache); 1255254SgavinmCMPND_EVENT(l2icache); 1265254SgavinmCMPND_EVENT(icache); 1275254Sgavinm 1285254Sgavinm/* 1295254Sgavinm * Ereports for Compound error codes - bus and interconnect errors 1305254Sgavinm */ 1315254SgavinmCMPND_EVENT(bus_interconnect); 1325254SgavinmCMPND_EVENT(bus_interconnect_memory); 1335254SgavinmCMPND_EVENT(bus_interconnect_io); 1347349SAdrian.Frost@Sun.COMCMPND_EVENT(mc); 1355254Sgavinm 1365254Sgavinm/* 1377197Sstephh * Compound error propogations 1385254Sgavinm * 1395254Sgavinm * We resist the temptation propogate, for example, a single dcache fault 1405254Sgavinm * to all ereports mentioning dcache (l0dcache, l1dcache, l2dcache, dcache). 1415254Sgavinm * Instead we will diagnose a distinct fault for each possible cache level, 1425254Sgavinm * whether or not current chips have dcaches at all levels. 1435254Sgavinm * 1445254Sgavinm * Corrected errors are SERDed and produce a fault when the engine fires; 1455254Sgavinm * the same fault is diagnosed immediately for a corresponding uncorrected 1467197Sstephh * error by incrementing the serd engine by n + 1. 1475254Sgavinm */ 1485254Sgavinm 1495254Sgavinm#define CMPND_FLT_PROP_1(erptleaf, fltleaf, n, t) \ 1507349SAdrian.Frost@Sun.COM engine serd.cpu.generic-x86.fltleaf@chip/core/strand, N=n, T=t; \ 1517349SAdrian.Frost@Sun.COM event fault.cpu.generic-x86.fltleaf@chip/core/strand, \ 1527349SAdrian.Frost@Sun.COM engine=serd.cpu.generic-x86.fltleaf@chip/core/strand; \ 1535254Sgavinm \ 1547349SAdrian.Frost@Sun.COM prop fault.cpu.generic-x86.fltleaf@chip/core/strand (0)-> \ 1557349SAdrian.Frost@Sun.COM ereport.cpu.generic-x86.erptleaf@chip/core/strand; \ 1567349SAdrian.Frost@Sun.COM prop fault.cpu.generic-x86.fltleaf@chip/core/strand \ 1577349SAdrian.Frost@Sun.COM { setserdincrement(n + 1) } (0)-> \ 1587349SAdrian.Frost@Sun.COM ereport.cpu.generic-x86.erptleaf/**/_uc@chip/core/strand 1595254Sgavinm 1607197Sstephh#define CMPND_FLT_PROP_2(erptleaf, fltleaf, n, t) \ 1617349SAdrian.Frost@Sun.COM engine serd.cpu.generic-x86.fltleaf@chip/core/strand, N=n, T=t; \ 1627349SAdrian.Frost@Sun.COM event fault.cpu.generic-x86.fltleaf@chip/core/strand, retire=0, \ 1637349SAdrian.Frost@Sun.COM response=0, engine=serd.cpu.generic-x86.fltleaf@chip/core/strand;\ 1647197Sstephh \ 1657349SAdrian.Frost@Sun.COM prop fault.cpu.generic-x86.fltleaf@chip/core/strand (0)-> \ 1667349SAdrian.Frost@Sun.COM ereport.cpu.generic-x86.erptleaf@chip/core/strand; \ 1677349SAdrian.Frost@Sun.COM prop fault.cpu.generic-x86.fltleaf@chip/core/strand \ 1687349SAdrian.Frost@Sun.COM { setserdincrement(n + 1) } (0)-> \ 1697349SAdrian.Frost@Sun.COM ereport.cpu.generic-x86.erptleaf/**/_uc@chip/core/strand 1705254Sgavinm 1715254SgavinmCMPND_FLT_PROP_1(l0cache, l0cache, 3, 72h); 1725254SgavinmCMPND_FLT_PROP_1(l1cache, l1cache, 3, 72h); 1735254SgavinmCMPND_FLT_PROP_1(l2cache, l2cache, 3, 72h); 1745254SgavinmCMPND_FLT_PROP_1(cache, cache, 12, 72h); 1755254Sgavinm 1765254SgavinmCMPND_FLT_PROP_1(l0dtlb, l0dtlb, 3, 72h); 1775254SgavinmCMPND_FLT_PROP_1(l1dtlb, l1dtlb, 3, 72h); 1785254SgavinmCMPND_FLT_PROP_1(l2dtlb, l2dtlb, 3, 72h); 1795254SgavinmCMPND_FLT_PROP_1(dtlb, dtlb, 12, 72h); 1805254Sgavinm 1815254SgavinmCMPND_FLT_PROP_1(l0itlb, l0itlb, 3, 72h); 1825254SgavinmCMPND_FLT_PROP_1(l1itlb, l1itlb, 3, 72h); 1835254SgavinmCMPND_FLT_PROP_1(l2itlb, l2itlb, 3, 72h); 1845254SgavinmCMPND_FLT_PROP_1(itlb, itlb, 12, 72h); 1855254Sgavinm 1865254SgavinmCMPND_FLT_PROP_1(l0tlb, l0tlb, 3, 72h); 1875254SgavinmCMPND_FLT_PROP_1(l1tlb, l1tlb, 3, 72h); 1885254SgavinmCMPND_FLT_PROP_1(l2tlb, l2tlb, 3, 72h); 1895254SgavinmCMPND_FLT_PROP_1(tlb, tlb, 12, 72h); 1905254Sgavinm 1915254SgavinmCMPND_FLT_PROP_1(l0dcache, l0dcache, 3, 72h); 1925254SgavinmCMPND_FLT_PROP_1(l1dcache, l1dcache, 3, 72h); 1935254SgavinmCMPND_FLT_PROP_1(l2dcache, l2dcache, 3, 72h); 1945254SgavinmCMPND_FLT_PROP_1(dcache, dcache, 12, 72h); 1955254Sgavinm 1965254SgavinmCMPND_FLT_PROP_1(l0icache, l0icache, 3, 72h); 1975254SgavinmCMPND_FLT_PROP_1(l1icache, l1icache, 3, 72h); 1985254SgavinmCMPND_FLT_PROP_1(l2icache, l2icache, 3, 72h); 1995254SgavinmCMPND_FLT_PROP_1(icache, icache, 12, 72h); 2005254Sgavinm 2015254SgavinmCMPND_FLT_PROP_2(bus_interconnect, bus_interconnect, 10, 72h); 2025254SgavinmCMPND_FLT_PROP_2(bus_interconnect_memory, bus_interconnect_memory, 10, 72h); 2035254SgavinmCMPND_FLT_PROP_2(bus_interconnect_io, bus_interconnect_io, 10, 72h); 2045254Sgavinm 2057349SAdrian.Frost@Sun.COMCMPND_FLT_PROP_2(mc, mc, 10, 72h); 2067349SAdrian.Frost@Sun.COM 2075254Sgavinm/* 2085254Sgavinm * Discards - not enough info to diagnose. 2095254Sgavinm */ 2107349SAdrian.Frost@Sun.COMevent upset.discard@chip/core/strand; 2117349SAdrian.Frost@Sun.COM 2127349SAdrian.Frost@Sun.COMprop upset.discard@chip/core/strand (0)-> 2137349SAdrian.Frost@Sun.COM ereport.cpu.generic-x86.external@chip/core/strand, 2147349SAdrian.Frost@Sun.COM ereport.cpu.generic-x86.unknown@chip/core/strand; 215