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