|
|
/home/brennan/n-sim/OrbisQuartus/server/xen/backend/sdev_back.cGo to the documentation of this file.00001 00012 /* 00013 * Copyright (c) 2002-2005, K A Fraser 00014 * 00015 * Copyright 2006. Los Alamos National Security, LLC. This material 00016 * was produced under U.S. Government contract DE-AC52-06NA25396 for 00017 * Los Alamos National Laboratory (LANL), which is operated by Los 00018 * Alamos National Security, LLC, for the Department of Energy. The 00019 * U.S. Government has rights to use, reproduce, and distribute this 00020 * software. NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY, 00021 * LLC, MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL 00022 * LIABILITY FOR THE USE OF THIS SOFTWARE. If software is modified to 00023 * produce derivative works, such modified software should be clearly 00024 * marked, so as not to confuse it with the version available from LANL. 00025 * 00026 * Additionally, this program is free software; you can redistribute it 00027 * and/or modify it under the terms of the GNU General Public License as 00028 * published by the Free Software Foundation; either version 2 of the 00029 * License, or (at your option) any later version. Accordingly, this 00030 * program is distributed in the hope it will be useful, but WITHOUT ANY 00031 * WARRANTY; without even the implied warranty of MERCHANTABILITY or 00032 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00033 * for more details. 00034 ****************************** 00035 * 00036 * This program is free software; you can redistribute it and/or 00037 * modify it under the terms of the GNU General Public License version 2 00038 * as published by the Free Software Foundation; or, when distributed 00039 * separately from the Linux kernel or incorporated into other 00040 * software packages, subject to the following license: 00041 * 00042 * Permission is hereby granted, free of charge, to any person obtaining a copy 00043 * of this source file (the "Software"), to deal in the Software without 00044 * restriction, including without limitation the rights to use, copy, modify, 00045 * merge, publish, distribute, sublicense, and/or sell copies of the Software, 00046 * and to permit persons to whom the Software is furnished to do so, subject to 00047 * the following conditions: 00048 * 00049 * The above copyright notice and this permission notice shall be included in 00050 * all copies or substantial portions of the Software. 00051 * 00052 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00053 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00054 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 00055 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00056 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 00057 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 00058 * IN THE SOFTWARE. 00059 * 00060 * You should have received a copy of the GNU General Public License 00061 * along with this program; if not, write to the Free Software 00062 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00063 */ 00064 00065 00066 #include "sim.h" 00067 #include "oq_kmod.h" 00068 #include "sdev.h" 00069 #include <xen/balloon.h> 00070 #include <xen/interface/memory.h> 00071 00072 00073 MODULE_LICENSE("GPL"); 00074 MODULE_DESCRIPTION("OrbisQuartus Simulated Sensor Device Module"); 00075 MODULE_AUTHOR("Sean M. Brennan"); 00076 00077 00078 extern struct req_resp *req_resp_lists; /* from the orbisquartus module */ 00079 00080 00081 static int sdev_test = 0; 00082 module_param(sdev_test, bool, S_IRUGO); 00083 00084 00086 00087 static int __init sdev_backend_init(void) 00088 { 00089 sdev_xenbus_init(); 00090 00091 if (req_resp_lists == NULL) 00092 request_module("orbisquartus"); 00093 return 0; 00094 } 00095 00096 00097 static void __exit sdev_backend_shutdown(void) 00098 { 00099 sdev_xenbus_exit(); 00100 } 00101 00102 00103 module_init(sdev_backend_init); 00104 module_exit(sdev_backend_shutdown); |