1dfe64dd3Smacallan/* 2dfe64dd3Smacallan * OS depending defines 3dfe64dd3Smacallan * 4dfe64dd3Smacallan * Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria 5dfe64dd3Smacallan * 6dfe64dd3Smacallan * If distributed as part of the Linux kernel, the following license terms 7dfe64dd3Smacallan * apply: 8dfe64dd3Smacallan * 9dfe64dd3Smacallan * * This program is free software; you can redistribute it and/or modify 10dfe64dd3Smacallan * * it under the terms of the GNU General Public License as published by 11dfe64dd3Smacallan * * the Free Software Foundation; either version 2 of the named License, 12dfe64dd3Smacallan * * or any later version. 13dfe64dd3Smacallan * * 14dfe64dd3Smacallan * * This program is distributed in the hope that it will be useful, 15dfe64dd3Smacallan * * but WITHOUT ANY WARRANTY; without even the implied warranty of 16dfe64dd3Smacallan * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17dfe64dd3Smacallan * * GNU General Public License for more details. 18dfe64dd3Smacallan * * 19dfe64dd3Smacallan * * You should have received a copy of the GNU General Public License 20dfe64dd3Smacallan * * along with this program; if not, write to the Free Software 21dfe64dd3Smacallan * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA 22dfe64dd3Smacallan * 23dfe64dd3Smacallan * Otherwise, the following license terms apply: 24dfe64dd3Smacallan * 25dfe64dd3Smacallan * * Redistribution and use in source and binary forms, with or without 26dfe64dd3Smacallan * * modification, are permitted provided that the following conditions 27dfe64dd3Smacallan * * are met: 28dfe64dd3Smacallan * * 1) Redistributions of source code must retain the above copyright 29dfe64dd3Smacallan * * notice, this list of conditions and the following disclaimer. 30dfe64dd3Smacallan * * 2) Redistributions in binary form must reproduce the above copyright 31dfe64dd3Smacallan * * notice, this list of conditions and the following disclaimer in the 32dfe64dd3Smacallan * * documentation and/or other materials provided with the distribution. 33dfe64dd3Smacallan * * 3) The name of the author may not be used to endorse or promote products 34dfe64dd3Smacallan * * derived from this software without specific prior written permission. 35dfe64dd3Smacallan * * 36dfe64dd3Smacallan * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR 37dfe64dd3Smacallan * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 38dfe64dd3Smacallan * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 39dfe64dd3Smacallan * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 40dfe64dd3Smacallan * * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 41dfe64dd3Smacallan * * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 42dfe64dd3Smacallan * * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 43dfe64dd3Smacallan * * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 44dfe64dd3Smacallan * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 45dfe64dd3Smacallan * * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 46dfe64dd3Smacallan * 47dfe64dd3Smacallan * Author: Thomas Winischhofer <thomas@winischhofer.net> 48dfe64dd3Smacallan * Silicon Integrated Systems, Inc. (used by permission) 49dfe64dd3Smacallan * 50dfe64dd3Smacallan */ 51dfe64dd3Smacallan 52dfe64dd3Smacallan/* The choices are: */ 53dfe64dd3Smacallan/* #define LINUX_KERNEL */ /* Kernel framebuffer */ 54dfe64dd3Smacallan#define LINUX_XF86 /* XFree86 */ 55dfe64dd3Smacallan 56dfe64dd3Smacallan#define XGI_MemoryCopy(Destination,Soruce,Length) memcpy(Destination,Soruce,Length) 57dfe64dd3Smacallan 58dfe64dd3Smacallan#ifdef LINUX_XF86 59dfe64dd3Smacallan#define XGI_SetMemory(MemoryAddress,MemorySize,value) memset(MemoryAddress, value, MemorySize) 60dfe64dd3Smacallan#endif 61dfe64dd3Smacallan#ifdef LINUX_KERNEL 62dfe64dd3Smacallan#include <linux/config.h> 63dfe64dd3Smacallan#include <linux/version.h> 64dfe64dd3Smacallan 65dfe64dd3Smacallan#define XGI_SetMemory(MemoryAddress,MemorySize,value) memset_io(MemoryAddress, value, MemorySize) 66dfe64dd3Smacallan#endif 67