*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#if defined(__sparc)
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "xf86.h"
#include "xf86_OSproc.h"
#include "xf86cmap.h"
#include "compiler.h"
#include "vgaHW.h"
#include "mipointer.h"
#include "micmap.h"
#include "fb.h"
#include "regionstr.h"
#include "xf86xv.h"
#include "vbe.h"
#include "xf86PciInfo.h"
#include "xf86Pci.h"
/* framebuffer offscreen manager */
#include "xf86fbman.h"
/* include xaa includes */
#ifdef HAVE_XAA
#include "xaa.h"
#endif
#include "xaarop.h"
/* H/W cursor support */
#include "xf86Cursor.h"
#include "ast.h"
#include "ast_vgatool.h"
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#define PCI_MAP_IS64BITMEM(b) \
(((b) & PCI_MAP_MEMORY_TYPE) == PCI_MAP_MEMORY_TYPE_64BIT)
#define PCIGETMEMORY64(b) \
{
int status;
int i;
int bar;
!= -1) {
for (i = 0; i < 6; i++) {
if (bar != 0) {
if (bar & PCI_MAP_IO) {
} else {
if (PCI_MAP_IS64BITMEM(bar)) {
if (i == 5) {
} else {
/* 64 bit architecture */
++i; /* Step over the next BAR */
}
}
}
}
}
}
return pciInfo;
}
static ScrnInfoPtr
{
return pScrn;
}
{
int i;
char * dev;
int entity;
int fd;
}
foundScreen = TRUE;
}
} else {
"Cannot open device %s\n", dev);
return NULL;
}
}
return pScrn;
}
{
int BUS_BASE = 0;
int fdd;
unsigned long realSize;
int pageSize;
pageSize = getpagesize();
#ifdef DEBUG
printf("base: %lx, realBase: %lx, alignOff: %lx \n",
#endif /* DEBUG */
if (memBase == MAP_FAILED) {
#ifdef DEBUG
printf("ASTMapVidMem: Could not map framebuffer\n");
#endif /* DEBUG */
return NULL;
}
}
void
{
return;
}
void
{
int status;
} else {
}
}
void
{
int i, icount=0;
/* Save Misc */
/* Save SR */
for (i=0; i<4; i++)
/* Save CR */
for (i=0; i<25; i++)
/* Save GR */
for (i=0; i<9; i++)
/* Save AR */
for (i=0; i<20; i++)
/* Save DAC */
for (i=0; i<256; i++)
}
void
{
int i, icount=0;
/* Restore Misc */
/* Restore SR */
for (i=0; i<4; i++)
/* Restore CR */
for (i=0; i<25; i++)
/* Restore GR */
for (i=0; i<9; i++)
/* Restore AR */
for (i=0; i<20; i++)
{
}
/* Restore DAC */
for (i=0; i<256; i++)
}
#endif /* __sparc__ */