mem_config.h revision ae115bc77f6fcde83175c75b4206dc2e50747966
/*
* 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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_MEM_CONFIG_H
#define _SYS_MEM_CONFIG_H
#pragma ident "%Z%%M% %I% %E% SMI"
/*
*/
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _KERNEL
/*
*/
typedef void *memhandle_t;
/*
* Managed pages have associated page structures ('page_t's).
* The difference between phys_pages and managed is accounted for by
* boot time memory allocation for the kernel text and data, and also
* for page structures.
*/
typedef struct {
} memquery_t;
typedef struct {
} memdelstat_t;
extern int kphysm_del_gethandle(memhandle_t *);
extern int kphysm_del_start(memhandle_t,
extern int kphysm_del_release(memhandle_t);
extern int kphysm_del_cancel(memhandle_t);
/*
* Error returns.
*/
#define KPHYSM_OK 0 /* Success */
/*
* Memory system change call-back interface.
*/
#define KPHYSM_SETUP_VECTOR_VERSION 1
typedef struct {
int cancelled);
/*
* successfully.
* The error returns are:
* EINVAL if the vector version is not supported.
* ENOMEM if the registration could not be stored.
*
* A return of EEXIST should be considered a program logic error by
* the caller.
*/
/*
* These interfaces should not be used by drivers.
*/
extern int arch_kphysm_del_supported(void);
extern int pfn_is_being_deleted(pfn_t);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_MEM_CONFIG_H */