xref: /titanic_51/usr/src/uts/common/sys/physmem.h (revision 8b464eb836173b92f2b7a65623cd06c8c3c59289)
1*8b464eb8Smec /*
2*8b464eb8Smec  * CDDL HEADER START
3*8b464eb8Smec  *
4*8b464eb8Smec  * The contents of this file are subject to the terms of the
5*8b464eb8Smec  * Common Development and Distribution License (the "License").
6*8b464eb8Smec  * You may not use this file except in compliance with the License.
7*8b464eb8Smec  *
8*8b464eb8Smec  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*8b464eb8Smec  * or http://www.opensolaris.org/os/licensing.
10*8b464eb8Smec  * See the License for the specific language governing permissions
11*8b464eb8Smec  * and limitations under the License.
12*8b464eb8Smec  *
13*8b464eb8Smec  * When distributing Covered Code, include this CDDL HEADER in each
14*8b464eb8Smec  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*8b464eb8Smec  * If applicable, add the following below this CDDL HEADER, with the
16*8b464eb8Smec  * fields enclosed by brackets "[]" replaced with your own identifying
17*8b464eb8Smec  * information: Portions Copyright [yyyy] [name of copyright owner]
18*8b464eb8Smec  *
19*8b464eb8Smec  * CDDL HEADER END
20*8b464eb8Smec  */
21*8b464eb8Smec 
22*8b464eb8Smec /*
23*8b464eb8Smec  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24*8b464eb8Smec  * Use is subject to license terms.
25*8b464eb8Smec  */
26*8b464eb8Smec #ifndef	_PHYSMEM_H
27*8b464eb8Smec #define	_PHYSMEM_H
28*8b464eb8Smec 
29*8b464eb8Smec #pragma ident	"%Z%%M%	%I%	%E% SMI"
30*8b464eb8Smec 
31*8b464eb8Smec #ifdef	__cplusplus
32*8b464eb8Smec extern "C" {
33*8b464eb8Smec #endif
34*8b464eb8Smec 
35*8b464eb8Smec /* ioctl values */
36*8b464eb8Smec #define	PHYSMEM_SETUP 1
37*8b464eb8Smec #define	PHYSMEM_MAP 2
38*8b464eb8Smec #define	PHYSMEM_DESTROY 3
39*8b464eb8Smec 
40*8b464eb8Smec /* flags values */
41*8b464eb8Smec #define	PHYSMEM_CAGE	(1 << 0)
42*8b464eb8Smec #define	PHYSMEM_RETIRED	(1 << 1)
43*8b464eb8Smec 
44*8b464eb8Smec struct physmem_setup_param {
45*8b464eb8Smec 	uint64_t req_paddr;	/* requested physical address */
46*8b464eb8Smec 	uint64_t len;		/* length of memory to be allocated */
47*8b464eb8Smec 	uint64_t user_va;	/* VA to associate with req_paddr */
48*8b464eb8Smec 	uint64_t cookie;	/* cookie returned for destroy function */
49*8b464eb8Smec };
50*8b464eb8Smec 
51*8b464eb8Smec struct physmem_map_param {
52*8b464eb8Smec 	uint64_t req_paddr;	/* requested physical address */
53*8b464eb8Smec 	uint64_t ret_va;	/* VA which mapped req_paddr */
54*8b464eb8Smec 	uint32_t flags;		/* flags for cage or retired pages */
55*8b464eb8Smec };
56*8b464eb8Smec 
57*8b464eb8Smec #ifdef	__cplusplus
58*8b464eb8Smec }
59*8b464eb8Smec #endif
60*8b464eb8Smec 
61*8b464eb8Smec #endif	/* _PHYSMEM_H */
62