1*3446Smrj /* 2*3446Smrj * CDDL HEADER START 3*3446Smrj * 4*3446Smrj * The contents of this file are subject to the terms of the 5*3446Smrj * Common Development and Distribution License (the "License"). 6*3446Smrj * You may not use this file except in compliance with the License. 7*3446Smrj * 8*3446Smrj * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*3446Smrj * or http://www.opensolaris.org/os/licensing. 10*3446Smrj * See the License for the specific language governing permissions 11*3446Smrj * and limitations under the License. 12*3446Smrj * 13*3446Smrj * When distributing Covered Code, include this CDDL HEADER in each 14*3446Smrj * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*3446Smrj * If applicable, add the following below this CDDL HEADER, with the 16*3446Smrj * fields enclosed by brackets "[]" replaced with your own identifying 17*3446Smrj * information: Portions Copyright [yyyy] [name of copyright owner] 18*3446Smrj * 19*3446Smrj * CDDL HEADER END 20*3446Smrj */ 21*3446Smrj 22*3446Smrj /* 23*3446Smrj * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 24*3446Smrj * Use is subject to license terms. 25*3446Smrj */ 26*3446Smrj 27*3446Smrj #ifndef _IA32_SYS_KDI_REGS_H 28*3446Smrj #define _IA32_SYS_KDI_REGS_H 29*3446Smrj 30*3446Smrj #pragma ident "%Z%%M% %I% %E% SMI" 31*3446Smrj 32*3446Smrj #ifdef __cplusplus 33*3446Smrj extern "C" { 34*3446Smrj #endif 35*3446Smrj 36*3446Smrj #define KDIREG_NGREG 21 37*3446Smrj 38*3446Smrj /* 39*3446Smrj * %ss appears in a different place than a typical struct regs, since the 40*3446Smrj * machine won't save %ss on a trap entry from the same privilege level. 41*3446Smrj */ 42*3446Smrj 43*3446Smrj #define KDIREG_SAVFP 0 44*3446Smrj #define KDIREG_SAVPC 1 45*3446Smrj #define KDIREG_SS 2 46*3446Smrj #define KDIREG_GS 3 47*3446Smrj #define KDIREG_FS 4 48*3446Smrj #define KDIREG_ES 5 49*3446Smrj #define KDIREG_DS 6 50*3446Smrj #define KDIREG_EDI 7 51*3446Smrj #define KDIREG_ESI 8 52*3446Smrj #define KDIREG_EBP 9 53*3446Smrj #define KDIREG_ESP 10 54*3446Smrj #define KDIREG_EBX 11 55*3446Smrj #define KDIREG_EDX 12 56*3446Smrj #define KDIREG_ECX 13 57*3446Smrj #define KDIREG_EAX 14 58*3446Smrj #define KDIREG_TRAPNO 15 59*3446Smrj #define KDIREG_ERR 16 60*3446Smrj #define KDIREG_EIP 17 61*3446Smrj #define KDIREG_CS 18 62*3446Smrj #define KDIREG_EFLAGS 19 63*3446Smrj #define KDIREG_UESP 20 64*3446Smrj 65*3446Smrj #define KDIREG_PC KDIREG_EIP 66*3446Smrj #define KDIREG_SP KDIREG_ESP 67*3446Smrj #define KDIREG_FP KDIREG_EBP 68*3446Smrj 69*3446Smrj #ifdef _ASM 70*3446Smrj 71*3446Smrj /* Patch point for MSR clearing. */ 72*3446Smrj #define KDI_MSR_PATCH \ 73*3446Smrj nop; nop; nop; nop; \ 74*3446Smrj nop; nop; nop; nop; \ 75*3446Smrj nop; nop; nop; nop; \ 76*3446Smrj nop 77*3446Smrj 78*3446Smrj #endif /* _ASM */ 79*3446Smrj 80*3446Smrj #define KDI_MSR_PATCHOFF 8 /* bytes of code before patch point */ 81*3446Smrj #define KDI_MSR_PATCHSZ 13 /* bytes in KDI_MSR_PATCH, above */ 82*3446Smrj 83*3446Smrj #ifdef __cplusplus 84*3446Smrj } 85*3446Smrj #endif 86*3446Smrj 87*3446Smrj #endif /* _IA32_SYS_KDI_REGS_H */ 88