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 #ifdef __cplusplus 30*8b464eb8Smec extern "C" { 31*8b464eb8Smec #endif 32*8b464eb8Smec 33*8b464eb8Smec /* ioctl values */ 34*8b464eb8Smec #define PHYSMEM_SETUP 1 35*8b464eb8Smec #define PHYSMEM_MAP 2 36*8b464eb8Smec #define PHYSMEM_DESTROY 3 37*8b464eb8Smec 38*8b464eb8Smec /* flags values */ 39*8b464eb8Smec #define PHYSMEM_CAGE (1 << 0) 40*8b464eb8Smec #define PHYSMEM_RETIRED (1 << 1) 41*8b464eb8Smec 42*8b464eb8Smec struct physmem_setup_param { 43*8b464eb8Smec uint64_t req_paddr; /* requested physical address */ 44*8b464eb8Smec uint64_t len; /* length of memory to be allocated */ 45*8b464eb8Smec uint64_t user_va; /* VA to associate with req_paddr */ 46*8b464eb8Smec uint64_t cookie; /* cookie returned for destroy function */ 47*8b464eb8Smec }; 48*8b464eb8Smec 49*8b464eb8Smec struct physmem_map_param { 50*8b464eb8Smec uint64_t req_paddr; /* requested physical address */ 51*8b464eb8Smec uint64_t ret_va; /* VA which mapped req_paddr */ 52*8b464eb8Smec uint32_t flags; /* flags for cage or retired pages */ 53*8b464eb8Smec }; 54*8b464eb8Smec 55*8b464eb8Smec #ifdef __cplusplus 56*8b464eb8Smec } 57*8b464eb8Smec #endif 58*8b464eb8Smec 59*8b464eb8Smec #endif /* _PHYSMEM_H */ 60