2003-11-14 17:48:57 +01:00
|
|
|
|
2005-07-03 09:02:09 +02:00
|
|
|
#ifdef HAVE_XORG_CONFIG_H
|
|
|
|
#include <xorg-config.h>
|
|
|
|
#endif
|
|
|
|
|
2005-04-20 14:25:48 +02:00
|
|
|
#include <X11/X.h>
|
2003-11-14 17:48:57 +01:00
|
|
|
#include "input.h"
|
|
|
|
#include "scrnintstr.h"
|
|
|
|
#include "compiler.h"
|
|
|
|
|
|
|
|
#include "xf86.h"
|
|
|
|
#include "xf86Priv.h"
|
|
|
|
#include "xf86_OSlib.h"
|
|
|
|
#include "xf86OSpriv.h"
|
|
|
|
|
2009-02-01 18:14:19 +01: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");
|
|
|
|
|
2003-11-14 17:48:57 +01:00
|
|
|
int readDense8(pointer Base, register unsigned long Offset);
|
|
|
|
int readDense16(pointer Base, register unsigned long Offset);
|
|
|
|
int readDense32(pointer Base, register unsigned long Offset);
|
|
|
|
void
|
|
|
|
writeDenseNB8(int Value, pointer Base, register unsigned long Offset);
|
|
|
|
void
|
|
|
|
writeDenseNB16(int Value, pointer Base, register unsigned long Offset);
|
|
|
|
void
|
|
|
|
writeDenseNB32(int Value, pointer Base, register unsigned long Offset);
|
|
|
|
void
|
|
|
|
writeDense8(int Value, pointer Base, register unsigned long Offset);
|
|
|
|
void
|
|
|
|
writeDense16(int Value, pointer Base, register unsigned long Offset);
|
|
|
|
void
|
|
|
|
writeDense32(int Value, pointer Base, register unsigned long Offset);
|
|
|
|
|
|
|
|
int
|
|
|
|
readDense8(pointer Base, register unsigned long Offset)
|
|
|
|
{
|
|
|
|
mem_barrier();
|
2009-02-01 18:14:19 +01:00
|
|
|
return (alpha_ldbu((pointer)((unsigned long)Base+(Offset))));
|
2003-11-14 17:48:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
readDense16(pointer Base, register unsigned long Offset)
|
|
|
|
{
|
|
|
|
mem_barrier();
|
2009-02-01 18:14:19 +01:00
|
|
|
return (alpha_ldwu((pointer)((unsigned long)Base+(Offset))));
|
2003-11-14 17:48:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
readDense32(pointer Base, register unsigned long Offset)
|
|
|
|
{
|
|
|
|
mem_barrier();
|
|
|
|
return *(volatile CARD32*)((unsigned long)Base+(Offset));
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
writeDenseNB8(int Value, pointer Base, register unsigned long Offset)
|
|
|
|
{
|
2009-02-01 18:14:19 +01:00
|
|
|
alpha_stb((pointer)((unsigned long)Base+(Offset)), Value);
|
2003-11-14 17:48:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
writeDenseNB16(int Value, pointer Base, register unsigned long Offset)
|
|
|
|
{
|
2009-02-01 18:14:19 +01:00
|
|
|
alpha_stw((pointer)((unsigned long)Base + (Offset)), Value);
|
2003-11-14 17:48:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
writeDenseNB32(int Value, pointer Base, register unsigned long Offset)
|
|
|
|
{
|
|
|
|
*(volatile CARD32*)((unsigned long)Base+(Offset)) = Value;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
writeDense8(int Value, pointer Base, register unsigned long Offset)
|
|
|
|
{
|
|
|
|
write_mem_barrier();
|
2009-02-01 18:14:19 +01:00
|
|
|
alpha_stb((pointer)((unsigned long)Base+(Offset)), Value);
|
2003-11-14 17:48:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
writeDense16(int Value, pointer Base, register unsigned long Offset)
|
|
|
|
{
|
|
|
|
write_mem_barrier();
|
2009-02-01 18:14:19 +01:00
|
|
|
alpha_stw((pointer)((unsigned long)Base + (Offset)), Value);
|
2003-11-14 17:48:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
writeDense32(int Value, pointer Base, register unsigned long Offset)
|
|
|
|
{
|
|
|
|
write_mem_barrier();
|
|
|
|
*(volatile CARD32 *)((unsigned long)Base+(Offset)) = Value;
|
|
|
|
}
|