2006-11-26 11:13:41 -07:00
|
|
|
|
|
|
|
#ifdef HAVE_XORG_CONFIG_H
|
|
|
|
#include <xorg-config.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <X11/X.h>
|
|
|
|
#include "input.h"
|
|
|
|
#include "scrnintstr.h"
|
|
|
|
#include "compiler.h"
|
|
|
|
|
|
|
|
#include "xf86.h"
|
|
|
|
#include "xf86Priv.h"
|
|
|
|
#include "xf86_OSlib.h"
|
|
|
|
#include "xf86OSpriv.h"
|
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
#include <machine/bwx.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The following functions are used only on EV56 and greater CPUs,
|
|
|
|
* and the assembler requires going to EV56 mode in order to emit
|
|
|
|
* these instructions.
|
|
|
|
*/
|
|
|
|
__asm(".arch ev56");
|
|
|
|
|
2014-09-27 11:52:59 -06:00
|
|
|
int readDense8(void *Base, register unsigned long Offset);
|
|
|
|
int readDense16(void *Base, register unsigned long Offset);
|
|
|
|
int readDense32(void *Base, register unsigned long Offset);
|
2006-11-26 11:13:41 -07:00
|
|
|
void
|
2014-09-27 11:52:59 -06:00
|
|
|
writeDense8(int Value, void *Base, register unsigned long Offset);
|
2006-11-26 11:13:41 -07:00
|
|
|
void
|
2014-09-27 11:52:59 -06:00
|
|
|
writeDense16(int Value, void *Base, register unsigned long Offset);
|
2006-11-26 11:13:41 -07:00
|
|
|
void
|
2014-09-27 11:52:59 -06:00
|
|
|
writeDense32(int Value, void *Base, register unsigned long Offset);
|
2006-11-26 11:13:41 -07:00
|
|
|
|
|
|
|
int
|
2014-09-27 11:52:59 -06:00
|
|
|
readDense8(void *Base, register unsigned long Offset)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
|
|
|
mem_barrier();
|
2014-09-27 11:52:59 -06:00
|
|
|
return (alpha_ldbu((void *) ((unsigned long) Base + (Offset))));
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
2014-09-27 11:52:59 -06:00
|
|
|
readDense16(void *Base, register unsigned long Offset)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
|
|
|
mem_barrier();
|
2014-09-27 11:52:59 -06:00
|
|
|
return (alpha_ldwu((void *) ((unsigned long) Base + (Offset))));
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
2014-09-27 11:52:59 -06:00
|
|
|
readDense32(void *Base, register unsigned long Offset)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
|
|
|
mem_barrier();
|
2012-06-10 07:21:05 -06:00
|
|
|
return *(volatile CARD32 *) ((unsigned long) Base + (Offset));
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2014-09-27 11:52:59 -06:00
|
|
|
writeDense8(int Value, void *Base, register unsigned long Offset)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
|
|
|
write_mem_barrier();
|
2014-09-27 11:52:59 -06:00
|
|
|
alpha_stb((void *) ((unsigned long) Base + (Offset)), Value);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2014-09-27 11:52:59 -06:00
|
|
|
writeDense16(int Value, void *Base, register unsigned long Offset)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
|
|
|
write_mem_barrier();
|
2014-09-27 11:52:59 -06:00
|
|
|
alpha_stw((void *) ((unsigned long) Base + (Offset)), Value);
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2014-09-27 11:52:59 -06:00
|
|
|
writeDense32(int Value, void *Base, register unsigned long Offset)
|
2006-11-26 11:13:41 -07:00
|
|
|
{
|
|
|
|
write_mem_barrier();
|
2012-06-10 07:21:05 -06:00
|
|
|
*(volatile CARD32 *) ((unsigned long) Base + (Offset)) = Value;
|
2006-11-26 11:13:41 -07:00
|
|
|
}
|