2 \ Copyright 2007 Sun Microsystems, Inc. All rights reserved.
3 \ Use is subject to license terms.
7 \ The contents of this file are subject to the terms of the
8 \ Common Development and Distribution License (the "License").
9 \ You may not use this file except in compliance with the License.
11 \ You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12 \ or http://www.opensolaris.org/os/licensing.
13 \ See the License for the specific language governing permissions
14 \ and limitations under the License.
16 \ When distributing Covered Code, include this CDDL HEADER in each
17 \ file and include the License file at usr/src/OPENSOLARIS.LICENSE.
18 \ If applicable, add the following below this CDDL HEADER, with the
19 \ fields enclosed by brackets "[]" replaced with your own identifying
20 \ information: Portions Copyright [yyyy] [name of copyright owner]
24 \ ident "%Z%%M% %I% %E% SMI"
26 \ CPU-save structure offsets for use in assembly code.
28 \ Keep in sync with kdi_state.h
31 #include <sys/cpuvar.h>
32 #include <sys/kdi_impl.h>
34 kdi_memrange_t MR_SIZE
56 kdi_cpusave_t KRS_SIZE
59 krs_dr.dr_ctl KRS_DRCTL
60 krs_dr.dr_stat KRS_DRSTAT
81 \#define DRADDR_IDX(num) _CONST(_MUL(num, DR_ADDR_INCR))
82 \#define DRADDR_OFF(num) _CONST(DRADDR_IDX(num) + DR_ADDR)
83 \#define KRS_DROFF(num) _CONST(DRADDR_OFF(num) + KRS_DR)
84 \#define REG_OFF(reg) _CONST(_CONST(reg) << REG_SHIFT)
85 \#define KDIREG_OFF(reg) _CONST(_MUL(KREG_SIZE, reg) + KRS_GREGS)