mpo.h revision 183ef8a1713ca188e24d970f22c6f9cc333007fd
/*
* 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 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_MPO_H
#define _SYS_MPO_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* mpo.h - Sun4v MPO common header file
*
*/
#define PROP_LG_CPU_ID "id"
#define PROP_LG_MASK "address-mask"
#define PROP_LG_LATENCY "latency"
#define PROP_LG_MATCH "address-match"
#define PROP_LG_MEM_LG "memory-latency-group"
#define PROP_LG_CPU "cpu"
#define PROP_LG_MBLOCK "mblock"
#define PROP_LG_BASE "base"
#define PROP_LG_SIZE "size"
#define PROP_LG_RA_PA_OFFSET "address-congruence-offset"
/* Macro to set the correspending bit if an mem-lg homeid is a member */
/* Macro to check if an mem_lg homeid is a member of the homeset */
/* Structure to store CPU information from the MD */
struct cpu_md {
int lgrp_index;
};
/* Structure to store mem-lg information from the MD */
struct lgrp_md {
int ncpu;
};
/* Structure to store mblock information retrieved from the MD */
typedef struct mblock_md {
} mblock_md_t;
/* Structure for memnode information for use by plat_pfn_to_mem_node */
struct mnode_info {
};
/* A stripe defines the portion of a mem_node that falls in one mblock */
typedef struct {
int exists; /* set to 1 if mblock has memory in this mnode stripe */
} mem_stripe_t;
/* Configuration including allocation state of mblocks and stripes */
typedef struct {
int mc_nmblocks; /* number in array */
int mc_nstripes; /* number in array */
int mc_alloc_sz; /* size in bytes of mc_mblocks if */
/* it was kmem_alloc'd, else 0 */
} mpo_config_t;
/* These are used when MPO requires preallocated kvseg32 space */
extern caddr_t mpo_heap32_buf;
extern size_t mpo_heap32_bufsz;
extern void mpo_cpu_remove(int cpuid);
#ifdef __cplusplus
}
#endif
#endif /* _SYS_MPO_H */