17aec1d6eScindi/*
27aec1d6eScindi * CDDL HEADER START
37aec1d6eScindi *
47aec1d6eScindi * The contents of this file are subject to the terms of the
55f25dc2aSgavinm * Common Development and Distribution License (the "License").
65f25dc2aSgavinm * You may not use this file except in compliance with the License.
77aec1d6eScindi *
87aec1d6eScindi * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97aec1d6eScindi * or http://www.opensolaris.org/os/licensing.
107aec1d6eScindi * See the License for the specific language governing permissions
117aec1d6eScindi * and limitations under the License.
127aec1d6eScindi *
137aec1d6eScindi * When distributing Covered Code, include this CDDL HEADER in each
147aec1d6eScindi * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157aec1d6eScindi * If applicable, add the following below this CDDL HEADER, with the
167aec1d6eScindi * fields enclosed by brackets "[]" replaced with your own identifying
177aec1d6eScindi * information: Portions Copyright [yyyy] [name of copyright owner]
187aec1d6eScindi *
197aec1d6eScindi * CDDL HEADER END
207aec1d6eScindi */
217aec1d6eScindi
227aec1d6eScindi/*
23*5667185bSSrihari Venkatesan * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
247aec1d6eScindi * Use is subject to license terms.
257aec1d6eScindi */
267aec1d6eScindi
277aec1d6eScindi#pragma dictionary "AMD"
287aec1d6eScindi
297aec1d6eScindi/*
307aec1d6eScindi * Eversholt rules for the AMD Opteron CPU/Memory
317aec1d6eScindi */
327aec1d6eScindi
338a40a695Sgavinm#define	MAX(x, y) ((x) >= (y) ? (x) : (y))
348a40a695Sgavinm#define	MIN(x, y) ((x) <= (y) ? (x) : (y))
358a40a695Sgavinm
367aec1d6eScindi/*
378a40a695Sgavinm * SET_ADDR and SET_OFFSET are used to set a payload value in the fault that
388a40a695Sgavinm * we diagnose for page faults, to record the physical address of the faulting
39b7d3956bSstephh * page.
407aec1d6eScindi */
4120c794b3Sgavinm#define	SET_ADDR (setpayloadprop("asru-physaddr", payloadprop("IA32_MCi_ADDR")))
427aec1d6eScindi
43b5016cbbSstephh#define	SET_OFFSET (setpayloadprop("asru-offset", \
44b5016cbbSstephh	payloadprop("resource[0].hc-specific.offset")))
457aec1d6eScindi
467aec1d6eScindi/*
478a40a695Sgavinm * RESOURCE_EXISTS is true if a member with name "resource" exists in the
48