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