17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*a98e9dbfSaguzovsk * Common Development and Distribution License (the "License"). 6*a98e9dbfSaguzovsk * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 217c478bd9Sstevel@tonic-gate /* 22*a98e9dbfSaguzovsk * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate * Use is subject to license terms. 247c478bd9Sstevel@tonic-gate */ 257c478bd9Sstevel@tonic-gate /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ 267c478bd9Sstevel@tonic-gate /* All Rights Reserved */ 277c478bd9Sstevel@tonic-gate 287c478bd9Sstevel@tonic-gate /* 297c478bd9Sstevel@tonic-gate * Portions of this source code were derived from Berkeley 4.3 BSD 307c478bd9Sstevel@tonic-gate * under license from the Regents of the University of California. 317c478bd9Sstevel@tonic-gate */ 327c478bd9Sstevel@tonic-gate 337c478bd9Sstevel@tonic-gate #ifndef _VM_SEG_ENUM_H 347c478bd9Sstevel@tonic-gate #define _VM_SEG_ENUM_H 357c478bd9Sstevel@tonic-gate 367c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 377c478bd9Sstevel@tonic-gate 387c478bd9Sstevel@tonic-gate #ifdef __cplusplus 397c478bd9Sstevel@tonic-gate extern "C" { 407c478bd9Sstevel@tonic-gate #endif 417c478bd9Sstevel@tonic-gate 427c478bd9Sstevel@tonic-gate /* 437c478bd9Sstevel@tonic-gate * These enumerations are needed in both <vm/seg.h> and 447c478bd9Sstevel@tonic-gate * <sys/vnode.h> in order to declare function prototypes. 457c478bd9Sstevel@tonic-gate */ 467c478bd9Sstevel@tonic-gate 477c478bd9Sstevel@tonic-gate /* 487c478bd9Sstevel@tonic-gate * Fault information passed to the seg fault handling routine. 497c478bd9Sstevel@tonic-gate * The F_SOFTLOCK and F_SOFTUNLOCK are used by software 507c478bd9Sstevel@tonic-gate * to lock and unlock pages for physical I/O. 517c478bd9Sstevel@tonic-gate */ 527c478bd9Sstevel@tonic-gate enum fault_type { 537c478bd9Sstevel@tonic-gate F_INVAL, /* invalid page */ 547c478bd9Sstevel@tonic-gate F_PROT, /* protection fault */ 557c478bd9Sstevel@tonic-gate F_SOFTLOCK, /* software requested locking */ 567c478bd9Sstevel@tonic-gate F_SOFTUNLOCK /* software requested unlocking */ 577c478bd9Sstevel@tonic-gate }; 587c478bd9Sstevel@tonic-gate 597c478bd9Sstevel@tonic-gate /* 607c478bd9Sstevel@tonic-gate * Lock information passed to the seg pagelock handling routine. 617c478bd9Sstevel@tonic-gate */ 627c478bd9Sstevel@tonic-gate enum lock_type { 637c478bd9Sstevel@tonic-gate L_PAGELOCK, /* lock pages */ 64*a98e9dbfSaguzovsk L_PAGEUNLOCK /* unlock pages */ 657c478bd9Sstevel@tonic-gate }; 667c478bd9Sstevel@tonic-gate 677c478bd9Sstevel@tonic-gate /* 687c478bd9Sstevel@tonic-gate * seg_rw gives the access type for a fault operation 697c478bd9Sstevel@tonic-gate */ 707c478bd9Sstevel@tonic-gate enum seg_rw { 717c478bd9Sstevel@tonic-gate S_OTHER, /* unknown or not touched */ 727c478bd9Sstevel@tonic-gate S_READ, /* read access attempted */ 737c478bd9Sstevel@tonic-gate S_WRITE, /* write access attempted */ 747c478bd9Sstevel@tonic-gate S_EXEC, /* execution access attempted */ 757c478bd9Sstevel@tonic-gate S_CREATE, /* create if page doesn't exist */ 767c478bd9Sstevel@tonic-gate S_READ_NOCOW /* read access, don't do a copy on write */ 777c478bd9Sstevel@tonic-gate }; 787c478bd9Sstevel@tonic-gate 791bd5c35fSelowe /* 801bd5c35fSelowe * Capabilities for capability segment op. 811bd5c35fSelowe */ 821bd5c35fSelowe typedef enum { 831bd5c35fSelowe S_CAPABILITY_NOMINFLT /* supports non-faulting page renaming */ 841bd5c35fSelowe } segcapability_t; 851bd5c35fSelowe 867c478bd9Sstevel@tonic-gate #ifdef __cplusplus 877c478bd9Sstevel@tonic-gate } 887c478bd9Sstevel@tonic-gate #endif 897c478bd9Sstevel@tonic-gate 907c478bd9Sstevel@tonic-gate #endif /* _VM_SEG_ENUM_H */ 91