2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * CDDL HEADER START
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * The contents of this file are subject to the terms of the
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * Common Development and Distribution License (the "License").
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * You may not use this file except in compliance with the License.
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * See the License for the specific language governing permissions
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * and limitations under the License.
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * When distributing Covered Code, include this CDDL HEADER in each
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * If applicable, add the following below this CDDL HEADER, with the
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * fields enclosed by brackets "[]" replaced with your own identifying
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * information: Portions Copyright [yyyy] [name of copyright owner]
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * CDDL HEADER END
3d995820f4ce8cd712d97f05aae6d30d9952d298Joseph A Townsend * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * Use is subject to license terms.
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyfextern "C" {
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf#if ! defined(_ASM)
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * The compiler will want to 64-bit align the 64-bit rm_gdt_base
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * pointer, so we need to add an extra four bytes of padding here to
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * make sure rm_gdt_lim and rm_gdt_base will align to create a proper
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * ten byte GDT pseudo-descriptor.
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * The compiler will want to 64-bit align the 64-bit rm_idt_base
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * pointer, so we need to add an extra four bytes of padding here to
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * make sure rm_idt_lim and rm_idt_base will align to create a proper
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * ten byte IDT pseudo-descriptor.
3d995820f4ce8cd712d97f05aae6d30d9952d298Joseph A Townsend processorid_t wc_cpu_id; /* which CPU are we running on */
3d995820f4ce8cd712d97f05aae6d30d9952d298Joseph A Townsend greg_t *wc_saved_stack; /* pointer to where stack contents are saved */
3d995820f4ce8cd712d97f05aae6d30d9952d298Joseph A Townsend size_t wc_saved_stack_size; /* size of the saved stack */
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf /* temp stack grows down to here */
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf /* temp stack grows down to here */
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * this is NOT correctly aligned, see description of idt & gdt, limit and
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * base in wc_cpu_t above
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyfextern void wc_rm_start(void);
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyfextern void wc_rm_end(void);
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyfextern void (*cpr_start_cpu_func)(void);
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf#endif /* ! defined(_ASM) */
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf#define WC_STKSTART 0x7fc /* end of rm_platter page */
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf#endif /* _CPR_WC_H */