drmach.h revision a31148363f598def767ac48c5d82e1572e44b935
/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright (c) 2010, Intel Corporation.
* All rights reserved.
*/
#ifndef _SYS_DRMACH_H_
#define _SYS_DRMACH_H_
#include <sys/ddi_impldefs.h>
#include <sys/sysevent.h>
#include <sys/x86_archext.h>
#include <sys/sbd_ioctl.h>
#ifdef __cplusplus
extern "C" {
#endif
#define MAX_BOARDS drmach_max_boards()
/* DR uses MAX_CORES_PER_CMP as number of logical CPUs within a CMP. */
#define MAX_CORES_PER_CMP drmach_max_core_per_cmp()
/* Maximum possible logical CPUs per board. */
/* CPU implementation ID for Intel Nehalem CPU. */
#define X86_CPU_IMPL_NEHALEM_EX 0x062E0000
#define X86_CPU_IMPL_UNKNOWN 0x00000000
/* returned with drmach_board_find_devices callback */
#define DRMACH_DEVTYPE_CPU "cpu"
#define DRMACH_DEVTYPE_MEM "memory"
#define DRMACH_DEVTYPE_PCI "pci"
/*
* x86 platform specific routines currently only defined
* in drmach_acpi.c and referenced by DR.
*/
typedef void *drmachid_t;
typedef struct {
char type[SBD_TYPE_LEN];
char info[SBD_MAX_INFO];
typedef struct {
int size;
char *copts;
typedef struct {
extern uint_t drmach_max_boards(void);
extern uint_t drmach_max_io_units_per_board(void);
extern uint_t drmach_max_cmp_units_per_board(void);
extern uint_t drmach_max_mem_units_per_board(void);
extern uint_t drmach_max_core_per_cmp(void);
int force);
extern int drmach_board_is_floating(drmachid_t);
extern sbd_error_t *drmach_copy_rename_init(
struct memlist *src_copy_ml,
drmachid_t *pgm_id);
int verbose);
extern void drmach_suspend_last();
extern void drmach_resume_first();
#ifdef __cplusplus
}
#endif
#endif /* _SYS_DRMACH_H_ */