1132956Smarkm/*- 2132956Smarkm * Copyright (c) 2004 Mark R V Murray 3132956Smarkm * All rights reserved. 4132956Smarkm * 5132956Smarkm * Redistribution and use in source and binary forms, with or without 6132956Smarkm * modification, are permitted provided that the following conditions 7132956Smarkm * are met: 8132956Smarkm * 1. Redistributions of source code must retain the above copyright 9132956Smarkm * notice, this list of conditions and the following disclaimer 10132956Smarkm * in this position and unchanged. 11132956Smarkm * 2. Redistributions in binary form must reproduce the above copyright 12132956Smarkm * notice, this list of conditions and the following disclaimer in the 13132956Smarkm * documentation and/or other materials provided with the distribution. 14132956Smarkm * 15132956Smarkm * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR 16132956Smarkm * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17132956Smarkm * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18132956Smarkm * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19132956Smarkm * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20132956Smarkm * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21132956Smarkm * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22132956Smarkm * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23132956Smarkm * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24132956Smarkm * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25132956Smarkm */ 26132956Smarkm 27132956Smarkm#include <sys/cdefs.h> 28132956Smarkm__FBSDID("$FreeBSD$"); 29132956Smarkm 30132956Smarkm#include <sys/param.h> 31132956Smarkm#include <sys/proc.h> 32132956Smarkm 33132956Smarkm#include <machine/frame.h> 34207329Sattilio#include <machine/iodev.h> 35132956Smarkm#include <machine/psl.h> 36132956Smarkm 37132956Smarkmint 38207329Sattilioiodev_open(struct thread *td) 39132956Smarkm{ 40132956Smarkm 41132956Smarkm td->td_frame->tf_rflags |= PSL_IOPL; 42132956Smarkm return (0); 43132956Smarkm} 44132956Smarkm 45132956Smarkmint 46207329Sattilioiodev_close(struct thread *td) 47132956Smarkm{ 48207329Sattilio 49132956Smarkm td->td_frame->tf_rflags &= ~PSL_IOPL; 50132956Smarkm return (0); 51132956Smarkm} 52202097Smarcel 53202097Smarcel/* ARGSUSED */ 54202097Smarcelint 55207329Sattilioiodev_ioctl(u_long cmd __unused, caddr_t data __unused) 56202097Smarcel{ 57202097Smarcel 58207329Sattilio return (ENOIOCTL); 59202097Smarcel} 60