/*
* 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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SBDP_PRIV_H
#define _SBDP_PRIV_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/sbdp_mbox.h>
#include <sys/ddi_impldefs.h>
#include <sys/serengeti.h>
#ifdef DEBUG
extern uint_t sbdp_debug;
#else /* DEBUG */
#define SBDP_DBG_ALL
#define SBDP_DBG_STATE
#define SBDP_DBG_QR
#define SBDP_DBG_CPU
#define SBDP_DBG_MEM
#define SBDP_DBG_IO
#define SBDP_DBG_MBOX
#define SBDP_DBG_ERR
#define SBDP_DBG_MISC
#define SBDP_DBG_FUNC
#endif /* DEBUG */
/*
* CPU present macros
*/
/*
* CPU reset macros
*/
/*
* These definitions come from the SC. Should the SC change them
* then we need to changed them
*/
int *slices;
typedef struct sbdp_bank {
int id;
} sbdp_bank_t;
typedef struct sbdp_segs {
int id;
} sbdp_seg_t;
typedef struct {
int bd;
int wnode;
int cpus_in_reset;
int cpus_present;
} sbdp_bd_t;
typedef struct sbdp_wnode {
} sbdp_wnode_t;
typedef struct {
} regspace_t;
/*
* Suspend states used internally by sbdp_suspend and
* sbdp_resume
*/
typedef enum sbd_suspend_state {
SBDP_SRSTATE_BEGIN = 0,
/*
*/
typedef struct {
typedef struct sbdp_shutdown {
extern int plat_max_boards();
typedef struct {
int board;
int num_of_nodes;
int flags;
int error;
char *errstr;
} attach_pkt_t;
sbdp_sr_handle_t *sbdp_get_sr_handle(void);
void sbdp_release_sr_handle(sbdp_sr_handle_t *);
int sbdp_suspend(sbdp_sr_handle_t *);
void sbdp_resume(sbdp_sr_handle_t *);
int sbdp_is_node_bad(pnode_t);
void sbdp_attach_bd(int, int);
int sbdp_get_bd_and_wnode_num(pnode_t, int *, int *);
void sbdp_update_bd_info(sbdp_bd_t *);
sbdp_bd_t *sbdp_get_bd_info(int, int);
int sbdp_make_bd_mem_contigous(int);
void sbdp_init_bd_banks(sbdp_bd_t *);
void sbdp_fini_bd_banks(sbdp_bd_t *);
void sbdp_print_bd_banks(sbdp_bd_t *);
void sbdp_add_new_bd_info(int, int);
void sbdp_cleanup_bd(int, int);
void sbdp_cpu_in_reset(int, int, int, int);
int sbdp_is_cpu_in_reset(int, int, int);
int sbdp_set_cpu_present(int, int, int);
int sbdp_is_cpu_present(int, int, int);
int sbdp_swap_slices(int, int);
#ifdef DEBUG
void sbdp_print_all_segs(void);
#endif
int sbdp_board_non_panther_cpus(int, int);
#ifdef __cplusplus
}
#endif
#endif /* _SBDP_PRIV_H */