4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
34 #define WC_CODESIZE 0x400
38 #include <sys/rm_platter.h>
39 #include <sys/psm_types.h>
41 typedef struct wc_cpu
{
72 * The compiler will want to 64-bit align the 64-bit rm_gdt_base
73 * pointer, so we need to add an extra four bytes of padding here to
74 * make sure rm_gdt_lim and rm_gdt_base will align to create a proper
75 * ten byte GDT pseudo-descriptor.
80 ushort_t wc_gdt_limit
;
81 user_desc_t
*wc_gdt_base
;
85 * The compiler will want to 64-bit align the 64-bit rm_idt_base
86 * pointer, so we need to add an extra four bytes of padding here to
87 * make sure rm_idt_lim and rm_idt_base will align to create a proper
88 * ten byte IDT pseudo-descriptor.
93 ushort_t wc_idt_limit
;
94 user_desc_t
*wc_idt_base
;
115 psm_state_request_t wc_apic_state
;
116 processorid_t wc_cpu_id
; /* which CPU are we running on */
117 greg_t
*wc_saved_stack
; /* pointer to where stack contents are saved */
118 size_t wc_saved_stack_size
; /* size of the saved stack */
121 /* temp stack grows down to here */
124 typedef struct wc_wakecode
{
125 rm_platter_t wc_platter
;
128 /* temp stack grows down to here */
132 * this is NOT correctly aligned, see description of idt & gdt, limit and
133 * base in wc_cpu_t above
135 typedef struct wc_desctbr
{
140 extern int wc_save_context(wc_cpu_t
*);
141 extern void wc_rm_start(void);
142 extern void wc_rm_end(void);
143 extern void (*cpr_start_cpu_func
)(void);
145 #endif /* ! defined(_ASM) */
147 #define WC_STKSTART 0x7fc /* end of rm_platter page */
153 #endif /* _CPR_WC_H */