cpr_wakecode.h revision 3d995820f4ce8cd712d97f05aae6d30d9952d298
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _CPR_WC_H
#define _CPR_WC_H
#ifdef __cplusplus
extern "C" {
#endif
#define WC_CODESIZE 0x400
#if ! defined(_ASM)
#include <sys/rm_platter.h>
#include <sys/psm_types.h>
typedef struct wc_cpu {
#if defined(__amd64)
/*
* The compiler will want to 64-bit align the 64-bit rm_gdt_base
* pointer, so we need to add an extra four bytes of padding here to
* make sure rm_gdt_lim and rm_gdt_base will align to create a proper
* ten byte GDT pseudo-descriptor.
*/
#endif
#if defined(__amd64)
/*
* The compiler will want to 64-bit align the 64-bit rm_idt_base
* pointer, so we need to add an extra four bytes of padding here to
* make sure rm_idt_lim and rm_idt_base will align to create a proper
* ten byte IDT pseudo-descriptor.
*/
#endif
#if defined(__amd64)
#else
#endif
/* temp stack grows down to here */
} wc_cpu_t;
typedef struct wc_wakecode {
/* temp stack grows down to here */
} wakecode_t;
/*
* this is NOT correctly aligned, see description of idt & gdt, limit and
* base in wc_cpu_t above
*/
typedef struct wc_desctbr {
void *base;
} wc_desctbr_t;
extern int wc_save_context(wc_cpu_t *);
extern void wc_rm_start(void);
extern void wc_rm_end(void);
extern void (*cpr_start_cpu_func)(void);
#endif /* ! defined(_ASM) */
#ifdef __cplusplus
}
#endif
#endif /* _CPR_WC_H */