drmach.h revision 8fabb5d7aaaa6f5d6e0fce4d27e0347860320f6b
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 _SYS_DRMACH_H_
#define _SYS_DRMACH_H_
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/processor.h>
#include <sys/sbd_ioctl.h>
#include <sys/sysevent.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Starcat platform specific routines currently only defined
* in starcat.c and referenced by DR.
*/
extern int plat_max_boards();
extern int plat_max_cpu_units_per_board();
extern int plat_max_io_units_per_board();
#define MAX_BOARDS plat_max_boards()
#define MAX_MEM_UNITS_PER_BOARD 1
#define MAX_CMP_UNITS_PER_BOARD 4
#define MAX_CORES_PER_CMP 2
/* flags for drmach_configure() and drmach_unconfigure() */
#define DRMACH_DEVI_FORCE 1
#define DRMACH_DEVI_REMOVE 2
/* returned with drmach_board_find_devices callback */
#define DRMACH_DEVTYPE_CMP "cmp"
#define DRMACH_DEVTYPE_CPU "cpu"
#define DRMACH_DEVTYPE_MEM "memory"
#define DRMACH_DEVTYPE_PCI "pci"
#define DRMACH_DEVTYPE_SBUS "sbus"
#define DRMACH_DEVTYPE_WCI "wci"
/* number of bytes in smallest coherency unit of this machine */
#define DRMACH_COHERENCY_UNIT 64
typedef void *drmachid_t;
typedef struct {
char type[MAXNAMELEN];
typedef struct {
int size;
char *copts;
extern sbd_error_t *drmach_copy_rename_init(
drmachid_t *pgm_id);
int force);
extern void drmach_cpu_flush_ecache_sync(void);
int verbose);
extern void drmach_suspend_last();
extern void drmach_resume_first();
#ifdef __cplusplus
}
#endif
#endif /* _SYS_DRMACH_H_ */