Merge branch 'origin'
This commit is contained in:
commit
124a81eb38
|
@ -2,10 +2,12 @@ Makefile
|
||||||
Makefile.in
|
Makefile.in
|
||||||
.deps
|
.deps
|
||||||
.libs
|
.libs
|
||||||
|
.msg
|
||||||
*.lo
|
*.lo
|
||||||
*.la
|
*.la
|
||||||
*.a
|
*.a
|
||||||
*.o
|
*.o
|
||||||
|
*~
|
||||||
aclocal.m4
|
aclocal.m4
|
||||||
autom4te.cache
|
autom4te.cache
|
||||||
compile
|
compile
|
||||||
|
@ -23,12 +25,6 @@ xorg-server.pc
|
||||||
stamp-h?
|
stamp-h?
|
||||||
do-not-use-config.h
|
do-not-use-config.h
|
||||||
do-not-use-config.h.in
|
do-not-use-config.h.in
|
||||||
XpConfig/C/print/Xprinters.ghostscript
|
|
||||||
Xprint/Xprt
|
|
||||||
Xprint/doc/Xprt.1x
|
|
||||||
Xprint/doc/Xprt.man
|
|
||||||
Xprint/dpmsstubs-wrapper.c
|
|
||||||
Xprint/miinitext-wrapper.c
|
|
||||||
afb/afbbltC.c
|
afb/afbbltC.c
|
||||||
afb/afbbltCI.c
|
afb/afbbltCI.c
|
||||||
afb/afbbltG.c
|
afb/afbbltG.c
|
||||||
|
@ -120,6 +116,24 @@ hw/dmx/examples/xdmx
|
||||||
hw/dmx/examples/xinput
|
hw/dmx/examples/xinput
|
||||||
hw/dmx/examples/xled
|
hw/dmx/examples/xled
|
||||||
hw/dmx/examples/xtest
|
hw/dmx/examples/xtest
|
||||||
|
hw/kdrive/ati/Xati
|
||||||
|
hw/kdrive/chips/Xchips
|
||||||
|
hw/kdrive/ephyr/Xephyr
|
||||||
|
hw/kdrive/epson/Xepson
|
||||||
|
hw/kdrive/fake/Xfake
|
||||||
|
hw/kdrive/fbdev/Xfbdev
|
||||||
|
hw/kdrive/i810/Xi810
|
||||||
|
hw/kdrive/mach64/Xmach64
|
||||||
|
hw/kdrive/mga/Xmga
|
||||||
|
hw/kdrive/neomagic/Xneomagic
|
||||||
|
hw/kdrive/nvidia/Xnvidia
|
||||||
|
hw/kdrive/pm2/Xpm2
|
||||||
|
hw/kdrive/r128/Xr128
|
||||||
|
hw/kdrive/sdl/Xsdl
|
||||||
|
hw/kdrive/sis300/Xsis
|
||||||
|
hw/kdrive/smi/Xsmi
|
||||||
|
hw/kdrive/vesa/Xvesa
|
||||||
|
hw/kdrive/via/Xvia
|
||||||
hw/vfb/Xvfb
|
hw/vfb/Xvfb
|
||||||
hw/vfb/Xvfb.1x
|
hw/vfb/Xvfb.1x
|
||||||
hw/vfb/Xvfb.man
|
hw/vfb/Xvfb.man
|
||||||
|
@ -130,6 +144,8 @@ hw/xfree86/doc/man/Xorg.1x
|
||||||
hw/xfree86/doc/man/Xorg.man
|
hw/xfree86/doc/man/Xorg.man
|
||||||
hw/xfree86/doc/man/xorg.conf.5x
|
hw/xfree86/doc/man/xorg.conf.5x
|
||||||
hw/xfree86/doc/man/xorg.conf.man
|
hw/xfree86/doc/man/xorg.conf.man
|
||||||
|
hw/xfree86/exa/exa.4
|
||||||
|
hw/xfree86/exa/exa.man
|
||||||
hw/xfree86/fbdevhw/fbdevhw.4x
|
hw/xfree86/fbdevhw/fbdevhw.4x
|
||||||
hw/xfree86/fbdevhw/fbdevhw.man
|
hw/xfree86/fbdevhw/fbdevhw.man
|
||||||
hw/xfree86/getconfig/cfg.man
|
hw/xfree86/getconfig/cfg.man
|
||||||
|
@ -216,6 +232,12 @@ hw/xfree86/xorg.c
|
||||||
hw/xnest/Xnest
|
hw/xnest/Xnest
|
||||||
hw/xnest/Xnest.1x
|
hw/xnest/Xnest.1x
|
||||||
hw/xnest/Xnest.man
|
hw/xnest/Xnest.man
|
||||||
|
hw/xprint/Xprt
|
||||||
|
hw/xprint/config/C/print/Xprinters.ghostscript
|
||||||
|
hw/xprint/doc/Xprt.1x
|
||||||
|
hw/xprint/doc/Xprt.man
|
||||||
|
hw/xprint/dpmsstubs-wrapper.c
|
||||||
|
hw/xprint/miinitext-wrapper.c
|
||||||
include/dix-config.h
|
include/dix-config.h
|
||||||
include/kdrive-config.h
|
include/kdrive-config.h
|
||||||
include/xgl-config.h
|
include/xgl-config.h
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
indirect_size.h
|
||||||
|
glcontextmodes.c
|
||||||
|
glcontextmodes.h
|
||||||
|
glapi.c
|
||||||
|
glthread.c
|
|
@ -1263,6 +1263,7 @@ int DoCreateGLXPixmap(__GLXclientState *cl, VisualID visual,
|
||||||
pGlxPixmap->pGlxScreen = pGlxScreen;
|
pGlxPixmap->pGlxScreen = pGlxScreen;
|
||||||
pGlxPixmap->pScreen = pScreen;
|
pGlxPixmap->pScreen = pScreen;
|
||||||
pGlxPixmap->idExists = True;
|
pGlxPixmap->idExists = True;
|
||||||
|
pGlxPixmap->pDamage = NULL;
|
||||||
pGlxPixmap->refcnt = 0;
|
pGlxPixmap->refcnt = 0;
|
||||||
|
|
||||||
pGlxPixmap->modes = modes;
|
pGlxPixmap->modes = modes;
|
||||||
|
|
|
@ -41,6 +41,8 @@
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <damage.h>
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
|
@ -49,7 +51,7 @@ typedef struct {
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
Bool idExists;
|
Bool idExists;
|
||||||
int refcnt;
|
int refcnt;
|
||||||
|
DamagePtr pDamage;
|
||||||
} __GLXpixmap;
|
} __GLXpixmap;
|
||||||
|
|
||||||
struct __GLXdrawable {
|
struct __GLXdrawable {
|
||||||
|
|
138
GL/glx/glxdri.c
138
GL/glx/glxdri.c
|
@ -296,24 +296,18 @@ glxCountBits(int word)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
glxFillAlphaChannel (PixmapPtr pixmap)
|
glxFillAlphaChannel (PixmapPtr pixmap, int x, int y, int width, int height)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i;
|
||||||
CARD32 *pixels = (CARD32 *)pixmap->devPrivate.ptr;
|
CARD32 *p, *end, *pixels = (CARD32 *)pixmap->devPrivate.ptr;
|
||||||
CARD32 rowstride = pixmap->devKind / 4;
|
CARD32 rowstride = pixmap->devKind / 4;
|
||||||
CARD32 x, y;
|
|
||||||
|
|
||||||
x = pixmap->drawable.x;
|
|
||||||
y = pixmap->drawable.y;
|
|
||||||
|
|
||||||
for (i = y; i < pixmap->drawable.height + y; ++i)
|
for (i = y; i < y + height; i++)
|
||||||
{
|
{
|
||||||
for (j = x; j < pixmap->drawable.width + x; ++j)
|
p = &pixels[i * rowstride + x];
|
||||||
{
|
end = p + width;
|
||||||
int index = i * rowstride + j;
|
while (p < end)
|
||||||
|
*p++ |= 0xFF000000;
|
||||||
pixels[index] |= 0xFF000000;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -326,7 +320,6 @@ glxFillAlphaChannel (PixmapPtr pixmap)
|
||||||
* - No fbconfig handling for TEXTURE_TARGET
|
* - No fbconfig handling for TEXTURE_TARGET
|
||||||
* - No fbconfig exposure of Y inversion state
|
* - No fbconfig exposure of Y inversion state
|
||||||
* - No GenerateMipmapEXT support (due to no FBO support)
|
* - No GenerateMipmapEXT support (due to no FBO support)
|
||||||
* - No damage tracking between binds
|
|
||||||
* - No support for anything but 16bpp and 32bpp-sparse pixmaps
|
* - No support for anything but 16bpp and 32bpp-sparse pixmaps
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -335,38 +328,103 @@ __glXDRIbindTexImage(__GLXcontext *baseContext,
|
||||||
int buffer,
|
int buffer,
|
||||||
__GLXpixmap *glxPixmap)
|
__GLXpixmap *glxPixmap)
|
||||||
{
|
{
|
||||||
|
RegionPtr pRegion;
|
||||||
PixmapPtr pixmap;
|
PixmapPtr pixmap;
|
||||||
int bpp;
|
int bpp;
|
||||||
Bool npot;
|
GLenum target, format, type;
|
||||||
|
|
||||||
pixmap = (PixmapPtr) glxPixmap->pDraw;
|
pixmap = (PixmapPtr) glxPixmap->pDraw;
|
||||||
bpp = pixmap->drawable.depth >= 24 ? 4 : 2; /* XXX 24bpp packed, 8, etc */
|
if (!glxPixmap->pDamage) {
|
||||||
|
glxPixmap->pDamage = DamageCreate(NULL, NULL, DamageReportNone,
|
||||||
|
TRUE, glxPixmap->pScreen, NULL);
|
||||||
|
if (!glxPixmap->pDamage)
|
||||||
|
return BadAlloc;
|
||||||
|
|
||||||
|
DamageRegister ((DrawablePtr) pixmap, glxPixmap->pDamage);
|
||||||
|
pRegion = NULL;
|
||||||
|
} else {
|
||||||
|
pRegion = DamageRegion(glxPixmap->pDamage);
|
||||||
|
if (REGION_NIL(pRegion))
|
||||||
|
return Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* XXX 24bpp packed, 8, etc */
|
||||||
|
if (pixmap->drawable.depth >= 24) {
|
||||||
|
bpp = 4;
|
||||||
|
format = GL_BGRA;
|
||||||
|
type = GL_UNSIGNED_BYTE;
|
||||||
|
} else {
|
||||||
|
bpp = 2;
|
||||||
|
format = GL_RGB;
|
||||||
|
type = GL_UNSIGNED_SHORT_5_6_5;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(glxCountBits(pixmap->drawable.width) == 1 &&
|
||||||
|
glxCountBits(pixmap->drawable.height) == 1)
|
||||||
|
/* || strstr(CALL_GetString(GL_EXTENSIONS,
|
||||||
|
"GL_ARB_texture_non_power_of_two")) */)
|
||||||
|
target = GL_TEXTURE_RECTANGLE_ARB;
|
||||||
|
else
|
||||||
|
target = GL_TEXTURE_2D;
|
||||||
|
|
||||||
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,
|
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,
|
||||||
pixmap->devKind / bpp) );
|
pixmap->devKind / bpp) );
|
||||||
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,
|
if (pRegion == NULL)
|
||||||
pixmap->drawable.y) );
|
{
|
||||||
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,
|
if (pixmap->drawable.depth == 24)
|
||||||
pixmap->drawable.x) );
|
glxFillAlphaChannel(pixmap,
|
||||||
|
pixmap->drawable.x,
|
||||||
|
pixmap->drawable.y,
|
||||||
|
pixmap->drawable.width,
|
||||||
|
pixmap->drawable.height);
|
||||||
|
|
||||||
if (pixmap->drawable.depth == 24)
|
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,
|
||||||
glxFillAlphaChannel(pixmap);
|
pixmap->drawable.x) );
|
||||||
|
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,
|
||||||
|
pixmap->drawable.y) );
|
||||||
|
|
||||||
npot = !(glxCountBits(pixmap->drawable.width) == 1 &&
|
CALL_TexImage2D( GET_DISPATCH(),
|
||||||
glxCountBits(pixmap->drawable.height) == 1) /* ||
|
(target,
|
||||||
strstr(CALL_GetString(GL_EXTENSIONS,
|
0,
|
||||||
"GL_ARB_texture_non_power_of_two")) */ ;
|
bpp == 4 ? 4 : 3,
|
||||||
|
pixmap->drawable.width,
|
||||||
CALL_TexImage2D( GET_DISPATCH(),
|
pixmap->drawable.height,
|
||||||
( npot ? GL_TEXTURE_RECTANGLE_ARB : GL_TEXTURE_2D,
|
0,
|
||||||
0,
|
format,
|
||||||
bpp == 4 ? 4 : 3,
|
type,
|
||||||
pixmap->drawable.width,
|
pixmap->devPrivate.ptr) );
|
||||||
pixmap->drawable.height,
|
} else {
|
||||||
0,
|
int i, numRects;
|
||||||
bpp == 4 ? GL_BGRA : GL_RGB,
|
BoxPtr p;
|
||||||
bpp == 4 ? GL_UNSIGNED_BYTE : GL_UNSIGNED_SHORT_5_6_5,
|
|
||||||
pixmap->devPrivate.ptr ) );
|
numRects = REGION_NUM_RECTS (pRegion);
|
||||||
|
p = REGION_RECTS (pRegion);
|
||||||
|
for (i = 0; i < numRects; i++)
|
||||||
|
{
|
||||||
|
if (pixmap->drawable.depth == 24)
|
||||||
|
glxFillAlphaChannel(pixmap,
|
||||||
|
pixmap->drawable.x + p[i].x1,
|
||||||
|
pixmap->drawable.y + p[i].y1,
|
||||||
|
p[i].x2 - p[i].x1,
|
||||||
|
p[i].y2 - p[i].y1);
|
||||||
|
|
||||||
|
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,
|
||||||
|
pixmap->drawable.x + p[i].x1) );
|
||||||
|
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,
|
||||||
|
pixmap->drawable.y + p[i].y1) );
|
||||||
|
|
||||||
|
CALL_TexSubImage2D( GET_DISPATCH(),
|
||||||
|
(target,
|
||||||
|
0,
|
||||||
|
p[i].x1, p[i].y1,
|
||||||
|
p[i].x2 - p[i].x1, p[i].y2 - p[i].y1,
|
||||||
|
format,
|
||||||
|
type,
|
||||||
|
pixmap->devPrivate.ptr) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DamageEmpty(glxPixmap->pDamage);
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,6 +141,10 @@ static int PixmapGone(__GLXpixmap *pGlxPixmap, XID id)
|
||||||
|
|
||||||
pGlxPixmap->idExists = False;
|
pGlxPixmap->idExists = False;
|
||||||
if (!pGlxPixmap->refcnt) {
|
if (!pGlxPixmap->refcnt) {
|
||||||
|
if (pGlxPixmap->pDamage) {
|
||||||
|
DamageUnregister (pGlxPixmap->pDraw, pGlxPixmap->pDamage);
|
||||||
|
DamageDestroy(pGlxPixmap->pDamage);
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
** The DestroyPixmap routine should decrement the refcount and free
|
** The DestroyPixmap routine should decrement the refcount and free
|
||||||
** only if it's zero.
|
** only if it's zero.
|
||||||
|
|
|
@ -185,8 +185,8 @@ __glXSendReplySwap( ClientPtr client, const void * data, size_t elements,
|
||||||
}
|
}
|
||||||
|
|
||||||
__glXReply.length = bswap_32( reply_ints );
|
__glXReply.length = bswap_32( reply_ints );
|
||||||
__glXReply.type = bswap_32( X_Reply );
|
__glXReply.type = X_Reply;
|
||||||
__glXReply.sequenceNumber = bswap_32( client->sequence );
|
__glXReply.sequenceNumber = bswap_16( client->sequence );
|
||||||
__glXReply.size = bswap_32( elements );
|
__glXReply.size = bswap_32( elements );
|
||||||
__glXReply.retval = bswap_32( retval );
|
__glXReply.retval = bswap_32( retval );
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
X/drivers
|
||||||
|
X/glxheader.h
|
||||||
|
X/xmesaP.h
|
||||||
|
X/xm*.c
|
||||||
|
array_cache/*.c
|
||||||
|
array_cache/*.h
|
||||||
|
mesa/drivers
|
||||||
|
mesa/glxheader.h
|
||||||
|
mesa/xm*.c
|
||||||
|
glapi/*.c
|
||||||
|
glapi/*.h
|
||||||
|
main/*.c
|
||||||
|
main/*.h
|
||||||
|
math/*.c
|
||||||
|
math/*.h
|
||||||
|
ppc
|
||||||
|
shader/*.c
|
||||||
|
shader/*.h
|
||||||
|
shader/slang/*.c
|
||||||
|
shader/slang/*.h
|
||||||
|
shader/slang/library
|
||||||
|
shader/grammar/*.c
|
||||||
|
shader/grammar/*.h
|
||||||
|
sparc
|
||||||
|
swrast/*.c
|
||||||
|
swrast/*.h
|
||||||
|
swrast_setup/*.c
|
||||||
|
swrast_setup/*.h
|
||||||
|
tnl/*.c
|
||||||
|
tnl/*.h
|
||||||
|
x86
|
||||||
|
x86-64
|
|
@ -29,6 +29,7 @@ nodist_libmain_la_SOURCES = accum.c \
|
||||||
api_loopback.c \
|
api_loopback.c \
|
||||||
api_noop.c \
|
api_noop.c \
|
||||||
api_validate.c \
|
api_validate.c \
|
||||||
|
arrayobj.c \
|
||||||
attrib.c \
|
attrib.c \
|
||||||
blend.c \
|
blend.c \
|
||||||
bufferobj.c \
|
bufferobj.c \
|
||||||
|
|
|
@ -88,6 +88,8 @@ symlink_mesa_main() {
|
||||||
action api_noop.h
|
action api_noop.h
|
||||||
action api_validate.c
|
action api_validate.c
|
||||||
action api_validate.h
|
action api_validate.h
|
||||||
|
action arrayobj.c
|
||||||
|
action arrayobj.h
|
||||||
action attrib.c
|
action attrib.c
|
||||||
action attrib.h
|
action attrib.h
|
||||||
action bitset.h
|
action bitset.h
|
||||||
|
|
13
Makefile.am
13
Makefile.am
|
@ -26,11 +26,6 @@ if GLX
|
||||||
GLX_DIR=GL
|
GLX_DIR=GL
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if XPRINT
|
|
||||||
XPDDX_DIR=Xprint
|
|
||||||
XPCONFIG_DIR=XpConfig
|
|
||||||
endif
|
|
||||||
|
|
||||||
if XINPUT
|
if XINPUT
|
||||||
XINPUT_DIR=Xi
|
XINPUT_DIR=Xi
|
||||||
endif
|
endif
|
||||||
|
@ -64,9 +59,7 @@ SUBDIRS = \
|
||||||
$(COMPOSITE_DIR) \
|
$(COMPOSITE_DIR) \
|
||||||
$(GLX_DIR) \
|
$(GLX_DIR) \
|
||||||
exa \
|
exa \
|
||||||
hw \
|
hw
|
||||||
$(XPDDX_DIR) \
|
|
||||||
$(XPCONFIG_DIR)
|
|
||||||
|
|
||||||
aclocaldir = $(datadir)/aclocal
|
aclocaldir = $(datadir)/aclocal
|
||||||
aclocal_DATA = xorg-server.m4
|
aclocal_DATA = xorg-server.m4
|
||||||
|
@ -101,9 +94,7 @@ DIST_SUBDIRS = \
|
||||||
composite \
|
composite \
|
||||||
GL \
|
GL \
|
||||||
exa \
|
exa \
|
||||||
hw \
|
hw
|
||||||
Xprint \
|
|
||||||
XpConfig
|
|
||||||
|
|
||||||
# gross hack
|
# gross hack
|
||||||
relink: all
|
relink: all
|
||||||
|
|
|
@ -170,7 +170,7 @@ static ClientList cmd_clients; /* Linked-list of clients using command key */
|
||||||
/*----------------------------*
|
/*----------------------------*
|
||||||
* Forward Declarations
|
* Forward Declarations
|
||||||
*----------------------------*/
|
*----------------------------*/
|
||||||
static void _SwapProc (int (**f1 )(), int (**f2 )());
|
static void _SwapProc (int (**f1 )(void), int (**f2 )(void));
|
||||||
static void sXETrapEvent (xETrapDataEvent *from , xETrapDataEvent *to );
|
static void sXETrapEvent (xETrapDataEvent *from , xETrapDataEvent *to );
|
||||||
static int add_accelerator_node (ClientPtr client , ClientList *accel );
|
static int add_accelerator_node (ClientPtr client , ClientList *accel );
|
||||||
static void remove_accelerator_node (ClientPtr client , ClientList *accel );
|
static void remove_accelerator_node (ClientPtr client , ClientList *accel );
|
||||||
|
@ -886,14 +886,14 @@ int XETrapConfig(xXTrapConfigReq *request, ClientPtr client)
|
||||||
{ /* Client wants the XTrap rtn */
|
{ /* Client wants the XTrap rtn */
|
||||||
if (++(vectored_requests[i]) <= 1L)
|
if (++(vectored_requests[i]) <= 1L)
|
||||||
{ /* first client, so do it */
|
{ /* first client, so do it */
|
||||||
_SwapProc(&(XETrapProcVector[i]), &(ProcVector[i]));
|
_SwapProc(&(XETrapProcVector[i]), (int_function *)&(ProcVector[i]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ /* Client wants the *real* rtn */
|
{ /* Client wants the *real* rtn */
|
||||||
if (--(vectored_requests[i]) <= 0L)
|
if (--(vectored_requests[i]) <= 0L)
|
||||||
{ /* No more clients using, so do it */
|
{ /* No more clients using, so do it */
|
||||||
_SwapProc(&(XETrapProcVector[i]), &(ProcVector[i]));
|
_SwapProc(&(XETrapProcVector[i]), (int_function *)&(ProcVector[i]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (status == Success)
|
if (status == Success)
|
||||||
|
@ -1787,9 +1787,9 @@ static void update_protocol(xXTrapGetReq *reqptr, ClientPtr client)
|
||||||
* lint from complaining about mixed types. It seems to work, but I would
|
* lint from complaining about mixed types. It seems to work, but I would
|
||||||
* probably classify this as a hack.
|
* probably classify this as a hack.
|
||||||
*/
|
*/
|
||||||
static void _SwapProc( register int (**f1)(), register int (**f2)())
|
static void _SwapProc( register int (**f1)(void), register int (**f2)(void))
|
||||||
{
|
{
|
||||||
register int (*t1)() = *f1;
|
register int (*t1)(void) = *f1;
|
||||||
*f1 = *f2;
|
*f1 = *f2;
|
||||||
*f2 = t1;
|
*f2 = t1;
|
||||||
|
|
||||||
|
|
|
@ -374,13 +374,13 @@ void XETSwSendEvent(register xSendEventReq *data)
|
||||||
{
|
{
|
||||||
register char n;
|
register char n;
|
||||||
xEvent eventT;
|
xEvent eventT;
|
||||||
void (*proc)();
|
EventSwapPtr proc;
|
||||||
swapl(&(data->destination), n);
|
swapl(&(data->destination), n);
|
||||||
swapl(&(data->eventMask), n);
|
swapl(&(data->eventMask), n);
|
||||||
|
|
||||||
/* Swap event */
|
/* Swap event */
|
||||||
proc = EventSwapVector[data->event.u.u.type & 0177];
|
proc = EventSwapVector[data->event.u.u.type & 0177];
|
||||||
if (!proc || (int (*)()) proc == (int (*)()) NotImplemented)
|
if (!proc || proc == NotImplemented)
|
||||||
(*proc)(&(data->event), &eventT);
|
(*proc)(&(data->event), &eventT);
|
||||||
data->event = eventT;
|
data->event = eventT;
|
||||||
swaps(&(data->length), n);
|
swaps(&(data->length), n);
|
||||||
|
|
|
@ -43,9 +43,7 @@ from The Open Group.
|
||||||
#include "servermd.h"
|
#include "servermd.h"
|
||||||
#define _XAG_SERVER_
|
#define _XAG_SERVER_
|
||||||
#include <X11/extensions/Xagstr.h>
|
#include <X11/extensions/Xagstr.h>
|
||||||
#include <X11/extensions/Xagsrv.h>
|
#include "securitysrv.h"
|
||||||
#define _SECURITY_SERVER
|
|
||||||
#include <X11/extensions/security.h>
|
|
||||||
#include <X11/Xfuncproto.h>
|
#include <X11/Xfuncproto.h>
|
||||||
|
|
||||||
#define XSERV_t
|
#define XSERV_t
|
||||||
|
@ -77,10 +75,6 @@ static int ProcXagDispatch(ClientPtr client);
|
||||||
static int SProcXagDispatch(ClientPtr client);
|
static int SProcXagDispatch(ClientPtr client);
|
||||||
static void XagResetProc(ExtensionEntry* extEntry);
|
static void XagResetProc(ExtensionEntry* extEntry);
|
||||||
|
|
||||||
#if 0
|
|
||||||
static unsigned char XagReqCode = 0;
|
|
||||||
static int XagErrorBase;
|
|
||||||
#endif
|
|
||||||
static int XagCallbackRefCount = 0;
|
static int XagCallbackRefCount = 0;
|
||||||
|
|
||||||
static RESTYPE RT_APPGROUP;
|
static RESTYPE RT_APPGROUP;
|
||||||
|
@ -233,19 +227,6 @@ void XagClientStateChange(
|
||||||
void
|
void
|
||||||
XagExtensionInit(INITARGS)
|
XagExtensionInit(INITARGS)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
ExtensionEntry* extEntry;
|
|
||||||
|
|
||||||
if ((extEntry = AddExtension (XAGNAME,
|
|
||||||
0,
|
|
||||||
XagNumberErrors,
|
|
||||||
ProcXagDispatch,
|
|
||||||
SProcXagDispatch,
|
|
||||||
XagResetProc,
|
|
||||||
StandardMinorOpcode))) {
|
|
||||||
XagReqCode = (unsigned char)extEntry->base;
|
|
||||||
XagErrorBase = extEntry->errorBase;
|
|
||||||
#else
|
|
||||||
if (AddExtension (XAGNAME,
|
if (AddExtension (XAGNAME,
|
||||||
0,
|
0,
|
||||||
XagNumberErrors,
|
XagNumberErrors,
|
||||||
|
@ -253,7 +234,6 @@ XagExtensionInit(INITARGS)
|
||||||
SProcXagDispatch,
|
SProcXagDispatch,
|
||||||
XagResetProc,
|
XagResetProc,
|
||||||
StandardMinorOpcode)) {
|
StandardMinorOpcode)) {
|
||||||
#endif
|
|
||||||
RT_APPGROUP = CreateNewResourceType (XagAppGroupFree);
|
RT_APPGROUP = CreateNewResourceType (XagAppGroupFree);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,87 @@
|
||||||
/* $XFree86$ */
|
/*
|
||||||
|
Copyright 1996, 1998 The Open Group
|
||||||
|
|
||||||
void XagClientStateChange(
|
Permission to use, copy, modify, distribute, and sell this software and its
|
||||||
|
documentation for any purpose is hereby granted without fee, provided that
|
||||||
|
the above copyright notice appear in all copies and that both that
|
||||||
|
copyright notice and this permission notice appear in supporting
|
||||||
|
documentation.
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice 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 OPEN GROUP 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.
|
||||||
|
|
||||||
|
Except as contained in this notice, the name of The Open Group shall
|
||||||
|
not be used in advertising or otherwise to promote the sale, use or
|
||||||
|
other dealings in this Software without prior written authorization
|
||||||
|
from The Open Group.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _APPGROUP_SRV_H_
|
||||||
|
#define _APPGROUP_SRV_H_
|
||||||
|
|
||||||
|
#include <X11/Xfuncproto.h>
|
||||||
|
|
||||||
|
_XFUNCPROTOBEGIN
|
||||||
|
|
||||||
|
extern void XagConnectionInfo(
|
||||||
|
ClientPtr /* client */,
|
||||||
|
xConnSetupPrefix** /* conn_prefix */,
|
||||||
|
char** /* conn_info */,
|
||||||
|
int* /* num_screens */
|
||||||
|
);
|
||||||
|
|
||||||
|
extern VisualID XagRootVisual(
|
||||||
|
ClientPtr /* client */
|
||||||
|
);
|
||||||
|
|
||||||
|
extern Colormap XagDefaultColormap(
|
||||||
|
ClientPtr /* client */
|
||||||
|
);
|
||||||
|
|
||||||
|
extern ClientPtr XagLeader(
|
||||||
|
ClientPtr /* client */
|
||||||
|
);
|
||||||
|
|
||||||
|
extern void XagCallClientStateChange(
|
||||||
|
ClientPtr /* client */
|
||||||
|
);
|
||||||
|
|
||||||
|
extern Bool XagIsControlledRoot (
|
||||||
|
ClientPtr /* client */,
|
||||||
|
WindowPtr /* pParent */
|
||||||
|
);
|
||||||
|
|
||||||
|
extern XID XagId (
|
||||||
|
ClientPtr /* client */
|
||||||
|
);
|
||||||
|
|
||||||
|
extern void XagGetDeltaInfo (
|
||||||
|
ClientPtr /* client */,
|
||||||
|
CARD32* /* buf */
|
||||||
|
);
|
||||||
|
|
||||||
|
extern void XagClientStateChange(
|
||||||
CallbackListPtr* pcbl,
|
CallbackListPtr* pcbl,
|
||||||
pointer nulldata,
|
pointer nulldata,
|
||||||
pointer calldata);
|
pointer calldata);
|
||||||
int ProcXagCreate (
|
|
||||||
|
extern int ProcXagCreate (
|
||||||
register ClientPtr client);
|
register ClientPtr client);
|
||||||
int ProcXagDestroy(
|
|
||||||
|
extern int ProcXagDestroy(
|
||||||
register ClientPtr client);
|
register ClientPtr client);
|
||||||
|
|
||||||
|
_XFUNCPROTOEND
|
||||||
|
|
||||||
|
#endif /* _APPGROUP_SRV_H_ */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -39,12 +39,12 @@ in this Software without prior written authorization from The Open Group.
|
||||||
#include "gcstruct.h"
|
#include "gcstruct.h"
|
||||||
#include "colormapst.h"
|
#include "colormapst.h"
|
||||||
#include "propertyst.h"
|
#include "propertyst.h"
|
||||||
#define _SECURITY_SERVER
|
#include "securitysrv.h"
|
||||||
#include <X11/extensions/securstr.h>
|
#include <X11/extensions/securstr.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#ifdef XAPPGROUP
|
#ifdef XAPPGROUP
|
||||||
#include <X11/extensions/Xagsrv.h>
|
#include "appgroup.h"
|
||||||
#endif
|
#endif
|
||||||
#include <stdio.h> /* for file reading operations */
|
#include <stdio.h> /* for file reading operations */
|
||||||
#include <X11/Xatom.h> /* for XA_STRING */
|
#include <X11/Xatom.h> /* for XA_STRING */
|
||||||
|
|
|
@ -0,0 +1,133 @@
|
||||||
|
/*
|
||||||
|
Copyright 1996, 1998 The Open Group
|
||||||
|
|
||||||
|
Permission to use, copy, modify, distribute, and sell this software and its
|
||||||
|
documentation for any purpose is hereby granted without fee, provided that
|
||||||
|
the above copyright notice appear in all copies and that both that
|
||||||
|
copyright notice and this permission notice appear in supporting
|
||||||
|
documentation.
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice 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 OPEN GROUP 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.
|
||||||
|
|
||||||
|
Except as contained in this notice, the name of The Open Group shall
|
||||||
|
not be used in advertising or otherwise to promote the sale, use or
|
||||||
|
other dealings in this Software without prior written authorization
|
||||||
|
from The Open Group.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Xserver internals for Security extension - moved here from
|
||||||
|
_SECURITY_SERVER section of <X11/extensions/security.h> */
|
||||||
|
|
||||||
|
#ifndef _SECURITY_SRV_H
|
||||||
|
#define _SECURITY_SRV_H
|
||||||
|
|
||||||
|
/* Allow client side portions of <X11/extensions/security.h> to compile */
|
||||||
|
#ifndef Status
|
||||||
|
# define Status int
|
||||||
|
# define NEED_UNDEF_Status
|
||||||
|
#endif
|
||||||
|
#ifndef Display
|
||||||
|
# define Display void
|
||||||
|
# define NEED_UNDEF_Display
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <X11/extensions/security.h>
|
||||||
|
|
||||||
|
#ifdef NEED_UNDEF_Status
|
||||||
|
# undef Status
|
||||||
|
# undef NEED_UNDEF_Status
|
||||||
|
#endif
|
||||||
|
#ifdef NEED_UNDEF_Display
|
||||||
|
# undef Display
|
||||||
|
# undef NEED_UNDEF_Display
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#include "input.h" /* for DeviceIntPtr */
|
||||||
|
#include "property.h" /* for PropertyPtr */
|
||||||
|
#include "pixmap.h" /* for DrawablePtr */
|
||||||
|
#include "resource.h" /* for RESTYPE */
|
||||||
|
|
||||||
|
/* resource type to pass in LookupIDByType for authorizations */
|
||||||
|
extern RESTYPE SecurityAuthorizationResType;
|
||||||
|
|
||||||
|
/* this is what we store for an authorization */
|
||||||
|
typedef struct {
|
||||||
|
XID id; /* resource ID */
|
||||||
|
CARD32 timeout; /* how long to live in seconds after refcnt == 0 */
|
||||||
|
unsigned int trustLevel; /* trusted/untrusted */
|
||||||
|
XID group; /* see embedding extension */
|
||||||
|
unsigned int refcnt; /* how many clients connected with this auth */
|
||||||
|
unsigned int secondsRemaining; /* overflow time amount for >49 days */
|
||||||
|
OsTimerPtr timer; /* timer for this auth */
|
||||||
|
struct _OtherClients *eventClients; /* clients wanting events */
|
||||||
|
} SecurityAuthorizationRec, *SecurityAuthorizationPtr;
|
||||||
|
|
||||||
|
/* The following callback is called when a GenerateAuthorization request
|
||||||
|
* is processed to sanity check the group argument. The call data will
|
||||||
|
* be a pointer to a SecurityValidateGroupInfoRec (below).
|
||||||
|
* Functions registered on this callback are expected to examine the
|
||||||
|
* group and set the valid field to TRUE if they recognize the group as a
|
||||||
|
* legitimate group. If they don't recognize it, they should not change the
|
||||||
|
* valid field.
|
||||||
|
*/
|
||||||
|
extern CallbackListPtr SecurityValidateGroupCallback;
|
||||||
|
typedef struct {
|
||||||
|
XID group; /* the group that was sent in GenerateAuthorization */
|
||||||
|
Bool valid; /* did anyone recognize it? if so, set to TRUE */
|
||||||
|
} SecurityValidateGroupInfoRec;
|
||||||
|
|
||||||
|
/* Proc vectors for untrusted clients, swapped and unswapped versions.
|
||||||
|
* These are the same as the normal proc vectors except that extensions
|
||||||
|
* that haven't declared themselves secure will have ProcBadRequest plugged
|
||||||
|
* in for their major opcode dispatcher. This prevents untrusted clients
|
||||||
|
* from guessing extension major opcodes and using the extension even though
|
||||||
|
* the extension can't be listed or queried.
|
||||||
|
*/
|
||||||
|
extern int (*UntrustedProcVector[256])(ClientPtr client);
|
||||||
|
extern int (*SwappedUntrustedProcVector[256])(ClientPtr client);
|
||||||
|
|
||||||
|
extern Bool SecurityCheckDeviceAccess(ClientPtr client, DeviceIntPtr dev,
|
||||||
|
Bool fromRequest);
|
||||||
|
|
||||||
|
extern void SecurityAudit(char *format, ...);
|
||||||
|
|
||||||
|
extern int XSecurityOptions(int argc, char **argv, int i);
|
||||||
|
|
||||||
|
/* Give this value or higher to the -audit option to get security messages */
|
||||||
|
#define SECURITY_AUDIT_LEVEL 4
|
||||||
|
|
||||||
|
extern void SecurityCensorImage(
|
||||||
|
ClientPtr client,
|
||||||
|
RegionPtr pVisibleRegion,
|
||||||
|
long widthBytesLine,
|
||||||
|
DrawablePtr pDraw,
|
||||||
|
int x, int y, int w, int h,
|
||||||
|
unsigned int format,
|
||||||
|
char * pBuf);
|
||||||
|
|
||||||
|
#define SecurityAllowOperation 0
|
||||||
|
#define SecurityIgnoreOperation 1
|
||||||
|
#define SecurityErrorOperation 2
|
||||||
|
|
||||||
|
extern char
|
||||||
|
SecurityCheckPropertyAccess(
|
||||||
|
ClientPtr client,
|
||||||
|
WindowPtr pWin,
|
||||||
|
ATOM propertyName,
|
||||||
|
Mask access_mode);
|
||||||
|
|
||||||
|
#define SECURITY_POLICY_FILE_VERSION "version-1"
|
||||||
|
|
||||||
|
extern char **SecurityGetSitePolicyStrings(int *n);
|
||||||
|
|
||||||
|
#endif /* _SECURITY_SRV_H */
|
|
@ -85,8 +85,8 @@ copyright holders.
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
#include <X11/extensions/Print.h>
|
#include <X11/extensions/Print.h>
|
||||||
#include <X11/extensions/Printstr.h>
|
#include <X11/extensions/Printstr.h>
|
||||||
#include "../Xprint/DiPrint.h"
|
#include "../hw/xprint/DiPrint.h"
|
||||||
#include "../Xprint/attributes.h"
|
#include "../hw/xprint/attributes.h"
|
||||||
#include "modinit.h"
|
#include "modinit.h"
|
||||||
|
|
||||||
static void XpResetProc(ExtensionEntry *);
|
static void XpResetProc(ExtensionEntry *);
|
||||||
|
|
|
@ -1,85 +0,0 @@
|
||||||
/* $Xorg: PclPixmap.c,v 1.3 2000/08/17 19:48:08 cpqbld Exp $ */
|
|
||||||
/*******************************************************************
|
|
||||||
**
|
|
||||||
** *********************************************************
|
|
||||||
** *
|
|
||||||
** * File: PclPixmap.c
|
|
||||||
** *
|
|
||||||
** * Contents:
|
|
||||||
** * Pixmap handling code for the PCL DDX driver
|
|
||||||
** *
|
|
||||||
** * Created: 2/19/96
|
|
||||||
** *
|
|
||||||
** *********************************************************
|
|
||||||
**
|
|
||||||
********************************************************************/
|
|
||||||
/*
|
|
||||||
(c) Copyright 1996 Hewlett-Packard Company
|
|
||||||
(c) Copyright 1996 International Business Machines Corp.
|
|
||||||
(c) Copyright 1996 Sun Microsystems, Inc.
|
|
||||||
(c) Copyright 1996 Novell, Inc.
|
|
||||||
(c) Copyright 1996 Digital Equipment Corp.
|
|
||||||
(c) Copyright 1996 Fujitsu Limited
|
|
||||||
(c) Copyright 1996 Hitachi, Ltd.
|
|
||||||
|
|
||||||
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, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice 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
|
|
||||||
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.
|
|
||||||
|
|
||||||
Except as contained in this notice, the names of the copyright holders shall
|
|
||||||
not be used in advertising or otherwise to promote the sale, use or other
|
|
||||||
dealings in this Software without prior written authorization from said
|
|
||||||
copyright holders.
|
|
||||||
*/
|
|
||||||
/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclPixmap.c,v 1.3 1999/12/16 02:26:27 robin Exp $ */
|
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "Pcl.h"
|
|
||||||
#include "cfb.h"
|
|
||||||
#include "cfb32.h"
|
|
||||||
#include "mfb.h"
|
|
||||||
#include "pixmapstr.h"
|
|
||||||
|
|
||||||
PixmapPtr
|
|
||||||
PclCreatePixmap(ScreenPtr pScreen,
|
|
||||||
int width,
|
|
||||||
int height,
|
|
||||||
int depth)
|
|
||||||
{
|
|
||||||
if( depth == 1 )
|
|
||||||
return mfbCreatePixmap( pScreen, width, height, depth );
|
|
||||||
else if( depth <= 8 )
|
|
||||||
return cfbCreatePixmap( pScreen, width, height, depth );
|
|
||||||
else if( depth <= 32 )
|
|
||||||
return cfb32CreatePixmap( pScreen, width, height, depth );
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Bool
|
|
||||||
PclDestroyPixmap(PixmapPtr pPixmap)
|
|
||||||
{
|
|
||||||
if( pPixmap->drawable.depth == 1 )
|
|
||||||
return mfbDestroyPixmap( pPixmap );
|
|
||||||
else if( pPixmap->drawable.depth <= 8 )
|
|
||||||
return cfbDestroyPixmap( pPixmap );
|
|
||||||
else if( pPixmap->drawable.depth <= 32 )
|
|
||||||
return cfb32DestroyPixmap( pPixmap );
|
|
||||||
return 0;
|
|
||||||
}
|
|
87
configure.ac
87
configure.ac
|
@ -294,9 +294,9 @@ AC_DEFINE_UNQUOTED(OSNAME, "$OSNAME",
|
||||||
DEFAULT_VENDOR_NAME="The X.Org Foundation"
|
DEFAULT_VENDOR_NAME="The X.Org Foundation"
|
||||||
DEFAULT_VENDOR_NAME_SHORT="X.Org"
|
DEFAULT_VENDOR_NAME_SHORT="X.Org"
|
||||||
DEFAULT_VERSION_MAJOR=7
|
DEFAULT_VERSION_MAJOR=7
|
||||||
DEFAULT_VERSION_MINOR=0
|
DEFAULT_VERSION_MINOR=1
|
||||||
DEFAULT_VERSION_PATCH=0
|
DEFAULT_VERSION_PATCH=99
|
||||||
DEFAULT_VERSION_SNAP=0
|
DEFAULT_VERSION_SNAP=1
|
||||||
DEFAULT_RELEASE_DATE="21 December 2005"
|
DEFAULT_RELEASE_DATE="21 December 2005"
|
||||||
DEFAULT_VENDOR_WEB="http://wiki.x.org"
|
DEFAULT_VENDOR_WEB="http://wiki.x.org"
|
||||||
|
|
||||||
|
@ -843,7 +843,7 @@ PKG_CHECK_MODULES([XSERVERCFLAGS], [$REQUIRED_MODULES $REQUIRED_LIBS])
|
||||||
PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS])
|
PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS])
|
||||||
|
|
||||||
XSERVER_CFLAGS="${XSERVERCFLAGS_CFLAGS}"
|
XSERVER_CFLAGS="${XSERVERCFLAGS_CFLAGS}"
|
||||||
XSERVER_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} -lm -lz"
|
XSERVER_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} -lm"
|
||||||
AC_SUBST([XSERVER_LIBS])
|
AC_SUBST([XSERVER_LIBS])
|
||||||
AC_SUBST([SYS_LIBS])
|
AC_SUBST([SYS_LIBS])
|
||||||
|
|
||||||
|
@ -1028,9 +1028,12 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then
|
||||||
XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
|
XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
|
||||||
XORG_INCS="$XORG_DDXINCS $XORG_OSINCS"
|
XORG_INCS="$XORG_DDXINCS $XORG_OSINCS"
|
||||||
XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H"
|
XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H"
|
||||||
XORG_LIBS="$MI_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB"
|
XORG_LIBS="$COMPOSITE_LIB $MI_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XPSTUBS_LIB $OS_LIB"
|
||||||
|
|
||||||
AC_CHECK_LIB([dl], [dlopen], XORG_LIBS="$XORG_LIBS -ldl")
|
dnl Check to see if dlopen is in default libraries (like Solaris, which
|
||||||
|
dnl has it in libc), or if libdl is needed to get it.
|
||||||
|
AC_CHECK_FUNC([dlopen], [],
|
||||||
|
AC_CHECK_LIB([dl], [dlopen], XORG_LIBS="$XORG_LIBS -ldl"))
|
||||||
|
|
||||||
case $host_os in
|
case $host_os in
|
||||||
linux*)
|
linux*)
|
||||||
|
@ -1727,41 +1730,41 @@ hw/kdrive/smi/Makefile
|
||||||
hw/kdrive/src/Makefile
|
hw/kdrive/src/Makefile
|
||||||
hw/kdrive/vesa/Makefile
|
hw/kdrive/vesa/Makefile
|
||||||
hw/kdrive/via/Makefile
|
hw/kdrive/via/Makefile
|
||||||
Xprint/Makefile
|
hw/xprint/Makefile
|
||||||
Xprint/doc/Makefile
|
hw/xprint/doc/Makefile
|
||||||
Xprint/pcl/Makefile
|
hw/xprint/pcl/Makefile
|
||||||
Xprint/pcl-mono/Makefile
|
hw/xprint/pcl-mono/Makefile
|
||||||
Xprint/raster/Makefile
|
hw/xprint/raster/Makefile
|
||||||
Xprint/ps/Makefile
|
hw/xprint/ps/Makefile
|
||||||
Xprint/etc/Makefile
|
hw/xprint/etc/Makefile
|
||||||
Xprint/etc/Xsession.d/Makefile
|
hw/xprint/etc/Xsession.d/Makefile
|
||||||
Xprint/etc/init.d/Makefile
|
hw/xprint/etc/init.d/Makefile
|
||||||
Xprint/etc/profile.d/Makefile
|
hw/xprint/etc/profile.d/Makefile
|
||||||
XpConfig/Makefile
|
hw/xprint/config/Makefile
|
||||||
XpConfig/C/print/attributes/Makefile
|
hw/xprint/config/C/print/attributes/Makefile
|
||||||
XpConfig/C/print/ddx-config/Makefile
|
hw/xprint/config/C/print/ddx-config/Makefile
|
||||||
XpConfig/C/print/ddx-config/raster/Makefile
|
hw/xprint/config/C/print/ddx-config/raster/Makefile
|
||||||
XpConfig/C/print/models/CANONBJ10E-GS/Makefile
|
hw/xprint/config/C/print/models/CANONBJ10E-GS/Makefile
|
||||||
XpConfig/C/print/models/PSdefault/fonts/Makefile
|
hw/xprint/config/C/print/models/PSdefault/fonts/Makefile
|
||||||
XpConfig/C/print/models/PSdefault/Makefile
|
hw/xprint/config/C/print/models/PSdefault/Makefile
|
||||||
XpConfig/C/print/models/PSspooldir/Makefile
|
hw/xprint/config/C/print/models/PSspooldir/Makefile
|
||||||
XpConfig/C/print/models/SPSPARC2/Makefile
|
hw/xprint/config/C/print/models/SPSPARC2/Makefile
|
||||||
XpConfig/C/print/models/SPSPARC2/fonts/Makefile
|
hw/xprint/config/C/print/models/SPSPARC2/fonts/Makefile
|
||||||
XpConfig/C/print/models/GSdefault/Makefile
|
hw/xprint/config/C/print/models/GSdefault/Makefile
|
||||||
XpConfig/C/print/models/HPLJ4050-PS/Makefile
|
hw/xprint/config/C/print/models/HPLJ4050-PS/Makefile
|
||||||
XpConfig/C/print/models/HPLJ4050-PS/fonts/Makefile
|
hw/xprint/config/C/print/models/HPLJ4050-PS/fonts/Makefile
|
||||||
XpConfig/C/print/models/Makefile
|
hw/xprint/config/C/print/models/Makefile
|
||||||
XpConfig/C/print/models/PS2PDFspooldir-GS/Makefile
|
hw/xprint/config/C/print/models/PS2PDFspooldir-GS/Makefile
|
||||||
XpConfig/C/print/models/CANONC3200-PS/Makefile
|
hw/xprint/config/C/print/models/CANONC3200-PS/Makefile
|
||||||
XpConfig/C/print/models/CANONC3200-PS/fonts/Makefile
|
hw/xprint/config/C/print/models/CANONC3200-PS/fonts/Makefile
|
||||||
XpConfig/C/print/models/HPLJ4family/fonts/Makefile
|
hw/xprint/config/C/print/models/HPLJ4family/fonts/Makefile
|
||||||
XpConfig/C/print/models/HPLJ4family/Makefile
|
hw/xprint/config/C/print/models/HPLJ4family/Makefile
|
||||||
XpConfig/C/print/models/HPDJ1600C/Makefile
|
hw/xprint/config/C/print/models/HPDJ1600C/Makefile
|
||||||
XpConfig/C/print/models/HPDJ1600C/fonts/Makefile
|
hw/xprint/config/C/print/models/HPDJ1600C/fonts/Makefile
|
||||||
XpConfig/C/print/Makefile
|
hw/xprint/config/C/print/Makefile
|
||||||
XpConfig/C/Makefile
|
hw/xprint/config/C/Makefile
|
||||||
XpConfig/en_US/print/attributes/Makefile
|
hw/xprint/config/en_US/print/attributes/Makefile
|
||||||
XpConfig/en_US/print/Makefile
|
hw/xprint/config/en_US/print/Makefile
|
||||||
XpConfig/en_US/Makefile
|
hw/xprint/config/en_US/Makefile
|
||||||
xorg-server.pc
|
xorg-server.pc
|
||||||
])
|
])
|
||||||
|
|
|
@ -73,8 +73,7 @@ SOFTWARE.
|
||||||
#include <X11/extensions/XKBsrv.h>
|
#include <X11/extensions/XKBsrv.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef XCSECURITY
|
#ifdef XCSECURITY
|
||||||
#define _SECURITY_SERVER
|
#include "securitysrv.h"
|
||||||
#include <X11/extensions/security.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "dispatch.h"
|
#include "dispatch.h"
|
||||||
|
|
|
@ -108,11 +108,10 @@ int ProcInitialConnection();
|
||||||
#include "panoramiXsrv.h"
|
#include "panoramiXsrv.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef XCSECURITY
|
#ifdef XCSECURITY
|
||||||
#define _SECURITY_SERVER
|
#include "securitysrv.h"
|
||||||
#include <X11/extensions/security.h>
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef XAPPGROUP
|
#ifdef XAPPGROUP
|
||||||
#include <X11/extensions/Xagsrv.h>
|
#include "appgroup.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef XKB
|
#ifdef XKB
|
||||||
#ifndef XKB_IN_SERVER
|
#ifndef XKB_IN_SERVER
|
||||||
|
|
|
@ -98,8 +98,7 @@ Author: Adobe Systems Incorporated
|
||||||
#define XK_LATIN1
|
#define XK_LATIN1
|
||||||
#include <X11/keysymdef.h>
|
#include <X11/keysymdef.h>
|
||||||
#ifdef XCSECURITY
|
#ifdef XCSECURITY
|
||||||
#define _SECURITY_SERVER
|
#include "securitysrv.h"
|
||||||
#include <X11/extensions/security.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -139,8 +139,7 @@ extern Bool XkbFilterEvents(ClientPtr, int, xEvent *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef XCSECURITY
|
#ifdef XCSECURITY
|
||||||
#define _SECURITY_SERVER
|
#include "securitysrv.h"
|
||||||
#include <X11/extensions/security.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef XEVIE
|
#ifdef XEVIE
|
||||||
|
|
|
@ -62,8 +62,7 @@ SOFTWARE.
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
#include "dispatch.h"
|
#include "dispatch.h"
|
||||||
#ifdef XCSECURITY
|
#ifdef XCSECURITY
|
||||||
#define _SECURITY_SERVER
|
#include "securitysrv.h"
|
||||||
#include <X11/extensions/security.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define EXTENSION_BASE 128
|
#define EXTENSION_BASE 128
|
||||||
|
|
|
@ -61,8 +61,7 @@ SOFTWARE.
|
||||||
#include "dispatch.h"
|
#include "dispatch.h"
|
||||||
#include "swaprep.h"
|
#include "swaprep.h"
|
||||||
#ifdef XCSECURITY
|
#ifdef XCSECURITY
|
||||||
#define _SECURITY_SERVER
|
#include "securitysrv.h"
|
||||||
#include <X11/extensions/security.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*****************************************************************
|
/*****************************************************************
|
||||||
|
|
|
@ -127,11 +127,10 @@ Equipment Corporation.
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
|
|
||||||
#ifdef XAPPGROUP
|
#ifdef XAPPGROUP
|
||||||
#include <X11/extensions/Xagsrv.h>
|
#include "appgroup.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef XCSECURITY
|
#ifdef XCSECURITY
|
||||||
#define _SECURITY_SERVER
|
#include "securitysrv.h"
|
||||||
#include <X11/extensions/security.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/******
|
/******
|
||||||
|
|
|
@ -35,6 +35,9 @@ from The Open Group.
|
||||||
#include <X11/fonts/font.h>
|
#include <X11/fonts/font.h>
|
||||||
#ifdef XPRINT
|
#ifdef XPRINT
|
||||||
#include "DiPrint.h"
|
#include "DiPrint.h"
|
||||||
|
#else
|
||||||
|
extern Bool XpClientIsBitmapClient(ClientPtr client);
|
||||||
|
extern Bool XpClientIsPrintClient(ClientPtr client, FontPathElementPtr fpe);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
Xserver.1
|
||||||
|
Xserver.1x
|
27
exa/exa.c
27
exa/exa.c
|
@ -158,7 +158,7 @@ exaLog2(int val)
|
||||||
{
|
{
|
||||||
int bits;
|
int bits;
|
||||||
|
|
||||||
if (!val)
|
if (val <= 0)
|
||||||
return 0;
|
return 0;
|
||||||
for (bits = 0; val != 0; bits++)
|
for (bits = 0; val != 0; bits++)
|
||||||
val >>= 1;
|
val >>= 1;
|
||||||
|
@ -523,6 +523,9 @@ exaDriverInit (ScreenPtr pScreen,
|
||||||
ExaDriverPtr pScreenInfo)
|
ExaDriverPtr pScreenInfo)
|
||||||
{
|
{
|
||||||
ExaScreenPrivPtr pExaScr;
|
ExaScreenPrivPtr pExaScr;
|
||||||
|
#ifdef RENDER
|
||||||
|
PictureScreenPtr ps;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (pScreenInfo->exa_major != EXA_VERSION_MAJOR ||
|
if (pScreenInfo->exa_major != EXA_VERSION_MAJOR ||
|
||||||
pScreenInfo->exa_minor > EXA_VERSION_MINOR)
|
pScreenInfo->exa_minor > EXA_VERSION_MINOR)
|
||||||
|
@ -536,7 +539,7 @@ exaDriverInit (ScreenPtr pScreen,
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef RENDER
|
#ifdef RENDER
|
||||||
PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
|
ps = GetPictureScreenIfSet(pScreen);
|
||||||
#endif
|
#endif
|
||||||
if (exaGeneration != serverGeneration)
|
if (exaGeneration != serverGeneration)
|
||||||
{
|
{
|
||||||
|
@ -623,6 +626,10 @@ exaDriverInit (ScreenPtr pScreen,
|
||||||
|
|
||||||
pExaScr->SavedDestroyPixmap = pScreen->DestroyPixmap;
|
pExaScr->SavedDestroyPixmap = pScreen->DestroyPixmap;
|
||||||
pScreen->DestroyPixmap = exaDestroyPixmap;
|
pScreen->DestroyPixmap = exaDestroyPixmap;
|
||||||
|
|
||||||
|
LogMessage(X_INFO, "EXA(%d): Offscreen pixmap area of %d bytes\n",
|
||||||
|
pScreen->myNum,
|
||||||
|
pExaScr->info->memorySize - pExaScr->info->offScreenBase);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -641,6 +648,22 @@ exaDriverInit (ScreenPtr pScreen,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LogMessage(X_INFO, "EXA(%d): Driver registered support for the following"
|
||||||
|
" operations:\n", pScreen->myNum);
|
||||||
|
assert(pScreenInfo->PrepareSolid != NULL);
|
||||||
|
LogMessage(X_INFO, " Solid\n");
|
||||||
|
assert(pScreenInfo->PrepareCopy != NULL);
|
||||||
|
LogMessage(X_INFO, " Copy\n");
|
||||||
|
if (pScreenInfo->PrepareComposite != NULL) {
|
||||||
|
LogMessage(X_INFO, " Composite (RENDER acceleration)\n");
|
||||||
|
}
|
||||||
|
if (pScreenInfo->UploadToScreen != NULL) {
|
||||||
|
LogMessage(X_INFO, " UploadToScreen\n");
|
||||||
|
}
|
||||||
|
if (pScreenInfo->DownloadFromScreen != NULL) {
|
||||||
|
LogMessage(X_INFO, " DownloadFromScreen\n");
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#include "windowstr.h"
|
#include "windowstr.h"
|
||||||
#include "gcstruct.h"
|
#include "gcstruct.h"
|
||||||
#include "picturestr.h"
|
#include "picturestr.h"
|
||||||
|
#include "fb.h"
|
||||||
|
|
||||||
#define EXA_VERSION_MAJOR 2
|
#define EXA_VERSION_MAJOR 2
|
||||||
#define EXA_VERSION_MINOR 0
|
#define EXA_VERSION_MINOR 0
|
||||||
|
@ -715,4 +716,12 @@ exaGetPixmapSize(PixmapPtr pPix);
|
||||||
void
|
void
|
||||||
exaEnableDisableFBAccess (int index, Bool enable);
|
exaEnableDisableFBAccess (int index, Bool enable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns TRUE if the given planemask covers all the significant bits in the
|
||||||
|
* pixel values for pDrawable.
|
||||||
|
*/
|
||||||
|
#define EXA_PM_IS_SOLID(_pDrawable, _pm) \
|
||||||
|
(((_pm) & FbFullMask((_pDrawable)->depth)) == \
|
||||||
|
FbFullMask((_pDrawable)->depth))
|
||||||
|
|
||||||
#endif /* EXA_H */
|
#endif /* EXA_H */
|
||||||
|
|
|
@ -435,6 +435,8 @@ exaAssertNotDirty (PixmapPtr pPixmap)
|
||||||
if (memcmp(dst, src, data_row_bytes) != 0) {
|
if (memcmp(dst, src, data_row_bytes) != 0) {
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
dst += dst_pitch;
|
||||||
|
src += src_pitch;
|
||||||
}
|
}
|
||||||
exaFinishAccess(&pPixmap->drawable, EXA_PREPARE_SRC);
|
exaFinishAccess(&pPixmap->drawable, EXA_PREPARE_SRC);
|
||||||
}
|
}
|
||||||
|
|
|
@ -413,7 +413,6 @@ exaOffscreenInit (ScreenPtr pScreen)
|
||||||
if (!area)
|
if (!area)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
|
||||||
area->state = ExaOffscreenAvail;
|
area->state = ExaOffscreenAvail;
|
||||||
area->base_offset = pExaScr->info->offScreenBase;
|
area->base_offset = pExaScr->info->offScreenBase;
|
||||||
area->offset = area->base_offset;
|
area->offset = area->base_offset;
|
||||||
|
@ -422,10 +421,6 @@ exaOffscreenInit (ScreenPtr pScreen)
|
||||||
area->next = NULL;
|
area->next = NULL;
|
||||||
area->score = 0;
|
area->score = 0;
|
||||||
|
|
||||||
#if DEBUG_OFFSCREEN
|
|
||||||
ErrorF("============ initial memory block of %d\n", area->size);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Add it to the free areas */
|
/* Add it to the free areas */
|
||||||
pExaScr->info->offScreenAreas = area;
|
pExaScr->info->offScreenAreas = area;
|
||||||
|
|
||||||
|
|
|
@ -137,14 +137,6 @@ extern int exaPixmapPrivateIndex;
|
||||||
/** Align an offset to a power-of-two alignment */
|
/** Align an offset to a power-of-two alignment */
|
||||||
#define EXA_ALIGN2(offset, align) (((offset) + (align) - 1) & ~((align) - 1))
|
#define EXA_ALIGN2(offset, align) (((offset) + (align) - 1) & ~((align) - 1))
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns TRUE if the given planemask covers all the significant bits in the
|
|
||||||
* pixel values for pDrawable.
|
|
||||||
*/
|
|
||||||
#define EXA_PM_IS_SOLID(_pDrawable, _pm) \
|
|
||||||
(((_pm) & FbFullMask((_pDrawable)->depth)) == \
|
|
||||||
FbFullMask((_pDrawable)->depth))
|
|
||||||
|
|
||||||
#define EXA_PIXMAP_SCORE_MOVE_IN 10
|
#define EXA_PIXMAP_SCORE_MOVE_IN 10
|
||||||
#define EXA_PIXMAP_SCORE_MAX 20
|
#define EXA_PIXMAP_SCORE_MAX 20
|
||||||
#define EXA_PIXMAP_SCORE_MOVE_OUT -10
|
#define EXA_PIXMAP_SCORE_MOVE_OUT -10
|
||||||
|
|
|
@ -282,8 +282,12 @@ exaTryDriverSolidFill(PicturePtr pSrc,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
exaGetPixelFromRGBA(&pixel, red, green, blue, alpha,
|
if (!exaGetPixelFromRGBA(&pixel, red, green, blue, alpha,
|
||||||
pDst->format);
|
pDst->format))
|
||||||
|
{
|
||||||
|
REGION_UNINIT(pDst->pDrawable->pScreen, ®ion);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (!(*pExaScr->info->PrepareSolid) (pDstPix, GXcopy, 0xffffffff, pixel))
|
if (!(*pExaScr->info->PrepareSolid) (pDstPix, GXcopy, 0xffffffff, pixel))
|
||||||
{
|
{
|
||||||
|
|
|
@ -267,11 +267,11 @@ fbFetch_a4b4g4r4 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe
|
||||||
CARD32 r,g,b, a;
|
CARD32 r,g,b, a;
|
||||||
|
|
||||||
a = ((p & 0xf000) | ((p & 0xf000) >> 4)) << 16;
|
a = ((p & 0xf000) | ((p & 0xf000) >> 4)) << 16;
|
||||||
b = ((p & 0x0f00) | ((p & 0x0f00) >> 4)) << 12;
|
b = ((p & 0x0f00) | ((p & 0x0f00) >> 4)) >> 4;
|
||||||
g = ((p & 0x00f0) | ((p & 0x00f0) >> 4)) << 8;
|
g = ((p & 0x00f0) | ((p & 0x00f0) >> 4)) << 8;
|
||||||
r = ((p & 0x000f) | ((p & 0x000f) << 4));
|
r = ((p & 0x000f) | ((p & 0x000f) << 4)) << 16;
|
||||||
*buffer++ = (a | r | g | b);
|
*buffer++ = (a | r | g | b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static FASTCALL void
|
static FASTCALL void
|
||||||
|
@ -283,11 +283,11 @@ fbFetch_x4b4g4r4 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe
|
||||||
CARD32 p = *pixel++;
|
CARD32 p = *pixel++;
|
||||||
CARD32 r,g,b;
|
CARD32 r,g,b;
|
||||||
|
|
||||||
b = ((p & 0x0f00) | ((p & 0x0f00) >> 4)) << 12;
|
b = ((p & 0x0f00) | ((p & 0x0f00) >> 4)) >> 4;
|
||||||
g = ((p & 0x00f0) | ((p & 0x00f0) >> 4)) << 8;
|
g = ((p & 0x00f0) | ((p & 0x00f0) >> 4)) << 8;
|
||||||
r = ((p & 0x000f) | ((p & 0x000f) << 4));
|
r = ((p & 0x000f) | ((p & 0x000f) << 4)) << 16;
|
||||||
*buffer++ = (0xff000000 | r | g | b);
|
*buffer++ = (0xff000000 | r | g | b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static FASTCALL void
|
static FASTCALL void
|
||||||
|
@ -573,9 +573,9 @@ static fetchProc fetchProcForPicture (PicturePtr pict)
|
||||||
/* 1bpp formats */
|
/* 1bpp formats */
|
||||||
case PICT_a1: return fbFetch_a1;
|
case PICT_a1: return fbFetch_a1;
|
||||||
case PICT_g1: return fbFetch_g1;
|
case PICT_g1: return fbFetch_g1;
|
||||||
default:
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -758,9 +758,9 @@ fbFetchPixel_a4b4g4r4 (const FbBits *bits, int offset, miIndexedPtr indexed)
|
||||||
CARD32 a,r,g,b;
|
CARD32 a,r,g,b;
|
||||||
|
|
||||||
a = ((pixel & 0xf000) | ((pixel & 0xf000) >> 4)) << 16;
|
a = ((pixel & 0xf000) | ((pixel & 0xf000) >> 4)) << 16;
|
||||||
b = ((pixel & 0x0f00) | ((pixel & 0x0f00) >> 4)) << 12;
|
b = ((pixel & 0x0f00) | ((pixel & 0x0f00) >> 4)) >> 4;
|
||||||
g = ((pixel & 0x00f0) | ((pixel & 0x00f0) >> 4)) << 8;
|
g = ((pixel & 0x00f0) | ((pixel & 0x00f0) >> 4)) << 8;
|
||||||
r = ((pixel & 0x000f) | ((pixel & 0x000f) << 4));
|
r = ((pixel & 0x000f) | ((pixel & 0x000f) << 4)) << 16;
|
||||||
return (a | r | g | b);
|
return (a | r | g | b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -770,9 +770,9 @@ fbFetchPixel_x4b4g4r4 (const FbBits *bits, int offset, miIndexedPtr indexed)
|
||||||
CARD32 pixel = ((CARD16 *) bits)[offset];
|
CARD32 pixel = ((CARD16 *) bits)[offset];
|
||||||
CARD32 r,g,b;
|
CARD32 r,g,b;
|
||||||
|
|
||||||
b = ((pixel & 0x0f00) | ((pixel & 0x0f00) >> 4)) << 12;
|
b = ((pixel & 0x0f00) | ((pixel & 0x0f00) >> 4)) >> 4;
|
||||||
g = ((pixel & 0x00f0) | ((pixel & 0x00f0) >> 4)) << 8;
|
g = ((pixel & 0x00f0) | ((pixel & 0x00f0) >> 4)) << 8;
|
||||||
r = ((pixel & 0x000f) | ((pixel & 0x000f) << 4));
|
r = ((pixel & 0x000f) | ((pixel & 0x000f) << 4)) << 16;
|
||||||
return (0xff000000 | r | g | b);
|
return (0xff000000 | r | g | b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -849,6 +849,14 @@ fbFetchPixel_c8 (const FbBits *bits, int offset, miIndexedPtr indexed)
|
||||||
return indexed->rgba[pixel];
|
return indexed->rgba[pixel];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static FASTCALL CARD32
|
||||||
|
fbFetchPixel_x4a4 (const FbBits *bits, int offset, miIndexedPtr indexed)
|
||||||
|
{
|
||||||
|
CARD32 pixel = ((CARD8 *) bits)[offset];
|
||||||
|
|
||||||
|
return ((pixel & 0xf) | ((pixel & 0xf) << 4)) << 24;
|
||||||
|
}
|
||||||
|
|
||||||
#define Fetch8(l,o) (((CARD8 *) (l))[(o) >> 2])
|
#define Fetch8(l,o) (((CARD8 *) (l))[(o) >> 2])
|
||||||
#if IMAGE_BYTE_ORDER == MSBFirst
|
#if IMAGE_BYTE_ORDER == MSBFirst
|
||||||
#define Fetch4(l,o) ((o) & 2 ? Fetch8(l,o) & 0xf : Fetch8(l,o) >> 4)
|
#define Fetch4(l,o) ((o) & 2 ? Fetch8(l,o) & 0xf : Fetch8(l,o) >> 4)
|
||||||
|
@ -988,6 +996,7 @@ static fetchPixelProc fetchPixelProcForPicture (PicturePtr pict)
|
||||||
case PICT_a2b2g2r2: return fbFetchPixel_a2b2g2r2;
|
case PICT_a2b2g2r2: return fbFetchPixel_a2b2g2r2;
|
||||||
case PICT_c8: return fbFetchPixel_c8;
|
case PICT_c8: return fbFetchPixel_c8;
|
||||||
case PICT_g8: return fbFetchPixel_c8;
|
case PICT_g8: return fbFetchPixel_c8;
|
||||||
|
case PICT_x4a4: return fbFetchPixel_x4a4;
|
||||||
|
|
||||||
/* 4bpp formats */
|
/* 4bpp formats */
|
||||||
case PICT_a4: return fbFetchPixel_a4;
|
case PICT_a4: return fbFetchPixel_a4;
|
||||||
|
@ -1001,9 +1010,9 @@ static fetchPixelProc fetchPixelProcForPicture (PicturePtr pict)
|
||||||
/* 1bpp formats */
|
/* 1bpp formats */
|
||||||
case PICT_a1: return fbFetchPixel_a1;
|
case PICT_a1: return fbFetchPixel_a1;
|
||||||
case PICT_g1: return fbFetchPixel_g1;
|
case PICT_g1: return fbFetchPixel_g1;
|
||||||
default:
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2717,8 +2726,9 @@ static void fbFetchSourcePict(PicturePtr pict, int x, int y, int width, CARD32 *
|
||||||
xFixed_32_32 l;
|
xFixed_32_32 l;
|
||||||
xFixed_48_16 dx, dy, a, b, off;
|
xFixed_48_16 dx, dy, a, b, off;
|
||||||
|
|
||||||
v.vector[0] = IntToxFixed(x);
|
/* reference point is the center of the pixel */
|
||||||
v.vector[1] = IntToxFixed(y);
|
v.vector[0] = IntToxFixed(x) + xFixed1/2;
|
||||||
|
v.vector[1] = IntToxFixed(y) + xFixed1/2;
|
||||||
v.vector[2] = xFixed1;
|
v.vector[2] = xFixed1;
|
||||||
if (pict->transform) {
|
if (pict->transform) {
|
||||||
if (!PictureTransformPoint3d (pict->transform, &v))
|
if (!PictureTransformPoint3d (pict->transform, &v))
|
||||||
|
@ -2784,8 +2794,9 @@ static void fbFetchSourcePict(PicturePtr pict, int x, int y, int width, CARD32 *
|
||||||
|
|
||||||
if (pict->transform) {
|
if (pict->transform) {
|
||||||
PictVector v;
|
PictVector v;
|
||||||
v.vector[0] = IntToxFixed(x);
|
/* reference point is the center of the pixel */
|
||||||
v.vector[1] = IntToxFixed(y);
|
v.vector[0] = IntToxFixed(x) + xFixed1/2;
|
||||||
|
v.vector[1] = IntToxFixed(y) + xFixed1/2;
|
||||||
v.vector[2] = xFixed1;
|
v.vector[2] = xFixed1;
|
||||||
if (!PictureTransformPoint3d (pict->transform, &v))
|
if (!PictureTransformPoint3d (pict->transform, &v))
|
||||||
return;
|
return;
|
||||||
|
@ -2905,8 +2916,9 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
|
||||||
dx = pict->pDrawable->x;
|
dx = pict->pDrawable->x;
|
||||||
dy = pict->pDrawable->y;
|
dy = pict->pDrawable->y;
|
||||||
|
|
||||||
v.vector[0] = IntToxFixed(x - dx);
|
/* reference point is the center of the pixel */
|
||||||
v.vector[1] = IntToxFixed(y - dy);
|
v.vector[0] = IntToxFixed(x - dx) + xFixed1 / 2;
|
||||||
|
v.vector[1] = IntToxFixed(y - dy) + xFixed1 / 2;
|
||||||
v.vector[2] = xFixed1;
|
v.vector[2] = xFixed1;
|
||||||
|
|
||||||
/* when using convolution filters one might get here without a transform */
|
/* when using convolution filters one might get here without a transform */
|
||||||
|
@ -3011,6 +3023,12 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (pict->filter == PictFilterBilinear) {
|
} else if (pict->filter == PictFilterBilinear) {
|
||||||
|
/* adjust vector for maximum contribution at 0.5, 0.5 of each texel. */
|
||||||
|
v.vector[0] -= v.vector[2] / 2;
|
||||||
|
v.vector[1] -= v.vector[2] / 2;
|
||||||
|
unit.vector[0] -= unit.vector[2] / 2;
|
||||||
|
unit.vector[1] -= unit.vector[2] / 2;
|
||||||
|
|
||||||
if (pict->repeatType == RepeatNormal) {
|
if (pict->repeatType == RepeatNormal) {
|
||||||
if (REGION_NUM_RECTS(pict->pCompositeClip) == 1) {
|
if (REGION_NUM_RECTS(pict->pCompositeClip) == 1) {
|
||||||
for (i = 0; i < width; ++i) {
|
for (i = 0; i < width; ++i) {
|
||||||
|
@ -3271,8 +3289,8 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
|
||||||
xFixed *params = pict->filter_params;
|
xFixed *params = pict->filter_params;
|
||||||
INT32 cwidth = xFixedToInt(params[0]);
|
INT32 cwidth = xFixedToInt(params[0]);
|
||||||
INT32 cheight = xFixedToInt(params[1]);
|
INT32 cheight = xFixedToInt(params[1]);
|
||||||
int xoff = params[0] >> 1;
|
int xoff = (params[0] - xFixed1) >> 1;
|
||||||
int yoff = params[1] >> 1;
|
int yoff = (params[1] - xFixed1) >> 1;
|
||||||
params += 2;
|
params += 2;
|
||||||
for (i = 0; i < width; ++i) {
|
for (i = 0; i < width; ++i) {
|
||||||
if (!v.vector[2]) {
|
if (!v.vector[2]) {
|
||||||
|
@ -3316,6 +3334,11 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
satot >>= 16;
|
||||||
|
srtot >>= 16;
|
||||||
|
sgtot >>= 16;
|
||||||
|
sbtot >>= 16;
|
||||||
|
|
||||||
if (satot < 0) satot = 0; else if (satot > 0xff) satot = 0xff;
|
if (satot < 0) satot = 0; else if (satot > 0xff) satot = 0xff;
|
||||||
if (srtot < 0) srtot = 0; else if (srtot > 0xff) srtot = 0xff;
|
if (srtot < 0) srtot = 0; else if (srtot > 0xff) srtot = 0xff;
|
||||||
if (sgtot < 0) sgtot = 0; else if (sgtot > 0xff) sgtot = 0xff;
|
if (sgtot < 0) sgtot = 0; else if (sgtot > 0xff) sgtot = 0xff;
|
||||||
|
|
|
@ -591,7 +591,7 @@ mmxCombineSaturateU (CARD32 *dest, const CARD32 *src, int width)
|
||||||
|
|
||||||
if (sa > da) {
|
if (sa > da) {
|
||||||
__m64 msa = load8888(FbIntDiv(da, sa));
|
__m64 msa = load8888(FbIntDiv(da, sa));
|
||||||
msa = expand_alpha(msa);
|
msa = expand_alpha_rev(msa);
|
||||||
ms = pix_multiply(ms, msa);
|
ms = pix_multiply(ms, msa);
|
||||||
}
|
}
|
||||||
md = pix_add(md, ms);
|
md = pix_add(md, ms);
|
||||||
|
|
50
fb/fbpict.c
50
fb/fbpict.c
|
@ -925,6 +925,8 @@ fbComposite (CARD8 op,
|
||||||
#endif
|
#endif
|
||||||
func = fbCompositeSolidMask_nx8x8888;
|
func = fbCompositeSolidMask_nx8x8888;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PICT_a8r8g8b8:
|
case PICT_a8r8g8b8:
|
||||||
|
@ -947,6 +949,8 @@ fbComposite (CARD8 op,
|
||||||
#endif
|
#endif
|
||||||
func = fbCompositeSolidMask_nx8888x0565C;
|
func = fbCompositeSolidMask_nx8888x0565C;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -970,6 +974,8 @@ fbComposite (CARD8 op,
|
||||||
#endif
|
#endif
|
||||||
func = fbCompositeSolidMask_nx8888x0565C;
|
func = fbCompositeSolidMask_nx8888x0565C;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -985,9 +991,15 @@ fbComposite (CARD8 op,
|
||||||
case PICT_x8b8g8r8:
|
case PICT_x8b8g8r8:
|
||||||
func = fbCompositeSolidMask_nx1xn;
|
func = fbCompositeSolidMask_nx1xn;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (! srcRepeat) /* has mask and non-repeating source */
|
else if (! srcRepeat) /* has mask and non-repeating source */
|
||||||
|
@ -1016,8 +1028,12 @@ fbComposite (CARD8 op,
|
||||||
func = fbCompositeSrc_8888RevNPx0565mmx;
|
func = fbCompositeSrc_8888RevNPx0565mmx;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PICT_x8r8g8b8:
|
case PICT_x8r8g8b8:
|
||||||
|
@ -1038,10 +1054,16 @@ fbComposite (CARD8 op,
|
||||||
func = fbCompositeSrc_8888RevNPx0565mmx;
|
func = fbCompositeSrc_8888RevNPx0565mmx;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1094,8 +1116,12 @@ fbComposite (CARD8 op,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (! srcRepeat)
|
else if (! srcRepeat)
|
||||||
|
@ -1118,6 +1144,8 @@ fbComposite (CARD8 op,
|
||||||
case PICT_r5g6b5:
|
case PICT_r5g6b5:
|
||||||
func = fbCompositeSrc_8888x0565;
|
func = fbCompositeSrc_8888x0565;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PICT_x8r8g8b8:
|
case PICT_x8r8g8b8:
|
||||||
|
@ -1129,6 +1157,8 @@ fbComposite (CARD8 op,
|
||||||
func = fbCompositeCopyAreammx;
|
func = fbCompositeCopyAreammx;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case PICT_x8b8g8r8:
|
case PICT_x8b8g8r8:
|
||||||
switch (pDst->format) {
|
switch (pDst->format) {
|
||||||
|
@ -1139,6 +1169,8 @@ fbComposite (CARD8 op,
|
||||||
func = fbCompositeCopyAreammx;
|
func = fbCompositeCopyAreammx;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PICT_a8b8g8r8:
|
case PICT_a8b8g8r8:
|
||||||
|
@ -1158,6 +1190,8 @@ fbComposite (CARD8 op,
|
||||||
case PICT_b5g6r5:
|
case PICT_b5g6r5:
|
||||||
func = fbCompositeSrc_8888x0565;
|
func = fbCompositeSrc_8888x0565;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PICT_r5g6b5:
|
case PICT_r5g6b5:
|
||||||
|
@ -1165,6 +1199,8 @@ fbComposite (CARD8 op,
|
||||||
case PICT_r5g6b5:
|
case PICT_r5g6b5:
|
||||||
func = fbCompositeSrc_0565x0565;
|
func = fbCompositeSrc_0565x0565;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PICT_b5g6r5:
|
case PICT_b5g6r5:
|
||||||
|
@ -1172,8 +1208,12 @@ fbComposite (CARD8 op,
|
||||||
case PICT_b5g6r5:
|
case PICT_b5g6r5:
|
||||||
func = fbCompositeSrc_0565x0565;
|
func = fbCompositeSrc_0565x0565;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1192,6 +1232,8 @@ fbComposite (CARD8 op,
|
||||||
#endif
|
#endif
|
||||||
func = fbCompositeSrcAdd_8888x8888;
|
func = fbCompositeSrcAdd_8888x8888;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PICT_a8b8g8r8:
|
case PICT_a8b8g8r8:
|
||||||
|
@ -1204,6 +1246,8 @@ fbComposite (CARD8 op,
|
||||||
#endif
|
#endif
|
||||||
func = fbCompositeSrcAdd_8888x8888;
|
func = fbCompositeSrcAdd_8888x8888;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PICT_a8:
|
case PICT_a8:
|
||||||
|
@ -1216,6 +1260,8 @@ fbComposite (CARD8 op,
|
||||||
#endif
|
#endif
|
||||||
func = fbCompositeSrcAdd_8000x8000;
|
func = fbCompositeSrcAdd_8000x8000;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PICT_a1:
|
case PICT_a1:
|
||||||
|
@ -1223,8 +1269,12 @@ fbComposite (CARD8 op,
|
||||||
case PICT_a1:
|
case PICT_a1:
|
||||||
func = fbCompositeSrcAdd_1000x1000;
|
func = fbCompositeSrcAdd_1000x1000;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -26,6 +26,10 @@ if KDRIVE
|
||||||
KDRIVE_SUBDIRS = kdrive
|
KDRIVE_SUBDIRS = kdrive
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if XPRINT
|
||||||
|
XPRINT_SUBDIRS = xprint
|
||||||
|
endif
|
||||||
|
|
||||||
# need to add darwin support here
|
# need to add darwin support here
|
||||||
|
|
||||||
SUBDIRS = \
|
SUBDIRS = \
|
||||||
|
@ -35,9 +39,10 @@ SUBDIRS = \
|
||||||
$(XVFB_SUBDIRS) \
|
$(XVFB_SUBDIRS) \
|
||||||
$(XNEST_SUBDIRS) \
|
$(XNEST_SUBDIRS) \
|
||||||
$(DMX_SUBDIRS) \
|
$(DMX_SUBDIRS) \
|
||||||
$(KDRIVE_SUBDIRS)
|
$(KDRIVE_SUBDIRS) \
|
||||||
|
$(XPRINT_SUBDIRS)
|
||||||
|
|
||||||
DIST_SUBDIRS = dmx xfree86 vfb xnest xwin darwin kdrive xgl
|
DIST_SUBDIRS = dmx xfree86 vfb xnest xwin darwin kdrive xgl xprint
|
||||||
|
|
||||||
relink:
|
relink:
|
||||||
for i in $(SUBDIRS) ; do $(MAKE) -C $$i relink ; done
|
for i in $(SUBDIRS) ; do $(MAKE) -C $$i relink ; done
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
Xvfb.1
|
||||||
|
Xvfb.1x
|
|
@ -255,10 +255,12 @@ OsVendorFatalError()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(DDXBEFORERESET)
|
||||||
void ddxBeforeReset(void)
|
void ddxBeforeReset(void)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
ddxUseMsg()
|
ddxUseMsg()
|
||||||
|
|
|
@ -38,11 +38,15 @@ XORG_LIBS = \
|
||||||
common/libinit.a \
|
common/libinit.a \
|
||||||
loader/libloader.a \
|
loader/libloader.a \
|
||||||
libosandcommon.la \
|
libosandcommon.la \
|
||||||
|
rac/librac.a \
|
||||||
parser/libxf86config.a \
|
parser/libxf86config.a \
|
||||||
dummylib/libdummy.a \
|
dummylib/libdummy.a \
|
||||||
dixmods/libdixmods.la \
|
dixmods/libdixmods.la \
|
||||||
@XORG_LIBS@
|
@XORG_LIBS@
|
||||||
|
|
||||||
|
Xorg_DEPENDENCIES = \
|
||||||
|
$(XORG_LIBS)
|
||||||
|
|
||||||
Xorg_LDADD = $(XORG_LIBS) \
|
Xorg_LDADD = $(XORG_LIBS) \
|
||||||
@XSERVER_LIBS@ \
|
@XSERVER_LIBS@ \
|
||||||
dixmods/libxorgxkb.la
|
dixmods/libxorgxkb.la
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Bus.c,v 1.80 2004/02/05 18:24:59 eich Exp $ */
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
|
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
|
||||||
*
|
*
|
||||||
|
@ -2571,17 +2570,13 @@ xf86PostPreInit()
|
||||||
if (xf86NumScreens > 1)
|
if (xf86NumScreens > 1)
|
||||||
needRAC = TRUE;
|
needRAC = TRUE;
|
||||||
|
|
||||||
#ifdef XFree86LOADER
|
|
||||||
xf86MsgVerb(X_INFO, 3, "do I need RAC?");
|
xf86MsgVerb(X_INFO, 3, "do I need RAC?");
|
||||||
|
|
||||||
if (needRAC) {
|
if (needRAC) {
|
||||||
xf86ErrorFVerb(3, " Yes, I do.\n");
|
xf86ErrorFVerb(3, " Yes, I do.\n");
|
||||||
|
} else {
|
||||||
if (!xf86LoadOneModule("rac",NULL))
|
|
||||||
FatalError("Cannot load RAC module\n");
|
|
||||||
} else
|
|
||||||
xf86ErrorFVerb(3, " No, I don't.\n");
|
xf86ErrorFVerb(3, " No, I don't.\n");
|
||||||
#endif
|
}
|
||||||
|
|
||||||
xf86MsgVerb(X_INFO, 3, "resource ranges after preInit:\n");
|
xf86MsgVerb(X_INFO, 3, "resource ranges after preInit:\n");
|
||||||
xf86PrintResList(3, Acc);
|
xf86PrintResList(3, Acc);
|
||||||
|
@ -2594,22 +2589,12 @@ xf86PostScreenInit(void)
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
int nummem = 0, numio = 0;
|
int nummem = 0, numio = 0;
|
||||||
#ifdef XFree86LOADER
|
|
||||||
pointer xf86RACInit = NULL;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (doFramebufferMode) {
|
if (doFramebufferMode) {
|
||||||
SetSIGIOForState(OPERATING);
|
SetSIGIOForState(OPERATING);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef XFree86LOADER
|
|
||||||
if (needRAC) {
|
|
||||||
xf86RACInit = LoaderSymbol("xf86RACInit");
|
|
||||||
if (!xf86RACInit)
|
|
||||||
FatalError("Cannot resolve symbol \"xf86RACInit\"\n");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
ErrorF("PostScreenInit generation: %i\n",serverGeneration);
|
ErrorF("PostScreenInit generation: %i\n",serverGeneration);
|
||||||
#endif
|
#endif
|
||||||
|
@ -2688,12 +2673,7 @@ xf86PostScreenInit(void)
|
||||||
xf86ErrorFVerb(3, "Screen %d is using RAC for io\n", i);
|
xf86ErrorFVerb(3, "Screen %d is using RAC for io\n", i);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef XFree86LOADER
|
|
||||||
((Bool(*)(ScreenPtr,unsigned int))xf86RACInit)
|
|
||||||
(pScreen,flags);
|
|
||||||
#else
|
|
||||||
xf86RACInit(pScreen,flags);
|
xf86RACInit(pScreen,flags);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -617,6 +617,9 @@ static Bool
|
||||||
configFiles(XF86ConfFilesPtr fileconf)
|
configFiles(XF86ConfFilesPtr fileconf)
|
||||||
{
|
{
|
||||||
MessageType pathFrom = X_DEFAULT;
|
MessageType pathFrom = X_DEFAULT;
|
||||||
|
int countDirs;
|
||||||
|
char *temp_path;
|
||||||
|
char *log_buf;
|
||||||
|
|
||||||
/* FontPath */
|
/* FontPath */
|
||||||
|
|
||||||
|
@ -676,13 +679,13 @@ configFiles(XF86ConfFilesPtr fileconf)
|
||||||
FatalError("No valid FontPath could be found.");
|
FatalError("No valid FontPath could be found.");
|
||||||
|
|
||||||
/* make fontpath more readable in the logfiles */
|
/* make fontpath more readable in the logfiles */
|
||||||
int countDirs = 1;
|
countDirs = 1;
|
||||||
char *temp_path = defaultFontPath;
|
temp_path = defaultFontPath;
|
||||||
while((temp_path = index(temp_path, ',')) != NULL) {
|
while((temp_path = index(temp_path, ',')) != NULL) {
|
||||||
countDirs++;
|
countDirs++;
|
||||||
temp_path++;
|
temp_path++;
|
||||||
}
|
}
|
||||||
char *log_buf = xnfalloc(strlen(defaultFontPath) + (2 * countDirs) + 1);
|
log_buf = xnfalloc(strlen(defaultFontPath) + (2 * countDirs) + 1);
|
||||||
if(!log_buf) /* fallback to old method */
|
if(!log_buf) /* fallback to old method */
|
||||||
xf86Msg(pathFrom, "FontPath set to \"%s\"\n", defaultFontPath);
|
xf86Msg(pathFrom, "FontPath set to \"%s\"\n", defaultFontPath);
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -1255,12 +1255,8 @@ xf86InterceptSigIll(void (*sigillhandler)(void))
|
||||||
xf86SigIllHandler = sigillhandler;
|
xf86SigIllHandler = sigillhandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_EXECINFO_H
|
|
||||||
#define HAVE_BACKTRACE
|
|
||||||
#include <execinfo.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_BACKTRACE
|
#ifdef HAVE_BACKTRACE
|
||||||
|
#include <execinfo.h>
|
||||||
|
|
||||||
static __inline__ void xorg_backtrace(void)
|
static __inline__ void xorg_backtrace(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1896,7 +1896,11 @@ xf86RunVtInit(void)
|
||||||
FatalError("xf86RunVtInit: fork failed (%s)\n", strerror(errno));
|
FatalError("xf86RunVtInit: fork failed (%s)\n", strerror(errno));
|
||||||
break;
|
break;
|
||||||
case 0: /* child */
|
case 0: /* child */
|
||||||
setuid(getuid());
|
if (setuid(getuid()) == -1) {
|
||||||
|
xf86Msg(X_ERROR, "xf86RunVtInit: setuid failed (%s)\n",
|
||||||
|
strerror(errno));
|
||||||
|
exit(255);
|
||||||
|
}
|
||||||
/* set stdin, stdout to the consoleFd */
|
/* set stdin, stdout to the consoleFd */
|
||||||
for (i = 0; i < 2; i++) {
|
for (i = 0; i < 2; i++) {
|
||||||
if (xf86Info.consoleFd != i) {
|
if (xf86Info.consoleFd != i) {
|
||||||
|
|
|
@ -130,6 +130,17 @@ DDCAvailableOptions(void *unused)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attempts to probe the monitor for EDID information, if NoDDC and NoDDC1 are
|
||||||
|
* unset. EDID information blocks are interpreted and the results returned in
|
||||||
|
* an xf86MonPtr.
|
||||||
|
*
|
||||||
|
* This function does not affect the list of modes used by drivers -- it is up
|
||||||
|
* to the driver to decide policy on what to do with EDID information.
|
||||||
|
*
|
||||||
|
* @return pointer to a new xf86MonPtr containing the EDID information.
|
||||||
|
* @return NULL if no monitor attached or failure to interpret the EDID.
|
||||||
|
*/
|
||||||
xf86MonPtr
|
xf86MonPtr
|
||||||
xf86DoEDID_DDC1(
|
xf86DoEDID_DDC1(
|
||||||
int scrnIndex, DDC1SetSpeedProc DDC1SetSpeed,
|
int scrnIndex, DDC1SetSpeedProc DDC1SetSpeed,
|
||||||
|
@ -170,6 +181,17 @@ xf86DoEDID_DDC1(
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attempts to probe the monitor for EDID information, if NoDDC and NoDDC2 are
|
||||||
|
* unset. EDID information blocks are interpreted and the results returned in
|
||||||
|
* an xf86MonPtr.
|
||||||
|
*
|
||||||
|
* This function does not affect the list of modes used by drivers -- it is up
|
||||||
|
* to the driver to decide policy on what to do with EDID information.
|
||||||
|
*
|
||||||
|
* @return pointer to a new xf86MonPtr containing the EDID information.
|
||||||
|
* @return NULL if no monitor attached or failure to interpret the EDID.
|
||||||
|
*/
|
||||||
xf86MonPtr
|
xf86MonPtr
|
||||||
xf86DoEDID_DDC2(int scrnIndex, I2CBusPtr pBus)
|
xf86DoEDID_DDC2(int scrnIndex, I2CBusPtr pBus)
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Xorg.1
|
||||||
|
Xorg.1x
|
||||||
|
xorg.conf.5
|
||||||
|
xorg.conf.5x
|
|
@ -81,6 +81,7 @@ static DISPATCH_PROC(ProcXF86DRIDispatch);
|
||||||
static DISPATCH_PROC(ProcXF86DRIAuthConnection);
|
static DISPATCH_PROC(ProcXF86DRIAuthConnection);
|
||||||
|
|
||||||
static DISPATCH_PROC(SProcXF86DRIQueryVersion);
|
static DISPATCH_PROC(SProcXF86DRIQueryVersion);
|
||||||
|
static DISPATCH_PROC(SProcXF86DRIQueryDirectRenderingCapable);
|
||||||
static DISPATCH_PROC(SProcXF86DRIDispatch);
|
static DISPATCH_PROC(SProcXF86DRIDispatch);
|
||||||
|
|
||||||
static void XF86DRIResetProc(ExtensionEntry* extEntry);
|
static void XF86DRIResetProc(ExtensionEntry* extEntry);
|
||||||
|
@ -142,6 +143,9 @@ ProcXF86DRIQueryVersion(
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber, n);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length, n);
|
||||||
|
swaps(&rep.majorVersion, n);
|
||||||
|
swaps(&rep.minorVersion, n);
|
||||||
|
swapl(&rep.patchVersion, n);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xXF86DRIQueryVersionReply), (char *)&rep);
|
WriteToClient(client, sizeof(xXF86DRIQueryVersionReply), (char *)&rep);
|
||||||
return (client->noClientException);
|
return (client->noClientException);
|
||||||
|
@ -154,6 +158,7 @@ ProcXF86DRIQueryDirectRenderingCapable(
|
||||||
{
|
{
|
||||||
xXF86DRIQueryDirectRenderingCapableReply rep;
|
xXF86DRIQueryDirectRenderingCapableReply rep;
|
||||||
Bool isCapable;
|
Bool isCapable;
|
||||||
|
register int n;
|
||||||
|
|
||||||
REQUEST(xXF86DRIQueryDirectRenderingCapableReq);
|
REQUEST(xXF86DRIQueryDirectRenderingCapableReq);
|
||||||
REQUEST_SIZE_MATCH(xXF86DRIQueryDirectRenderingCapableReq);
|
REQUEST_SIZE_MATCH(xXF86DRIQueryDirectRenderingCapableReq);
|
||||||
|
@ -172,9 +177,14 @@ ProcXF86DRIQueryDirectRenderingCapable(
|
||||||
}
|
}
|
||||||
rep.isCapable = isCapable;
|
rep.isCapable = isCapable;
|
||||||
|
|
||||||
if (!LocalClient(client))
|
if (!LocalClient(client) || client->swapped)
|
||||||
rep.isCapable = 0;
|
rep.isCapable = 0;
|
||||||
|
|
||||||
|
if (client->swapped) {
|
||||||
|
swaps(&rep.sequenceNumber, n);
|
||||||
|
swapl(&rep.length, n);
|
||||||
|
}
|
||||||
|
|
||||||
WriteToClient(client,
|
WriteToClient(client,
|
||||||
sizeof(xXF86DRIQueryDirectRenderingCapableReply), (char *)&rep);
|
sizeof(xXF86DRIQueryDirectRenderingCapableReply), (char *)&rep);
|
||||||
return (client->noClientException);
|
return (client->noClientException);
|
||||||
|
@ -626,6 +636,18 @@ SProcXF86DRIQueryVersion(
|
||||||
return ProcXF86DRIQueryVersion(client);
|
return ProcXF86DRIQueryVersion(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
SProcXF86DRIQueryDirectRenderingCapable(
|
||||||
|
register ClientPtr client
|
||||||
|
)
|
||||||
|
{
|
||||||
|
register int n;
|
||||||
|
REQUEST(xXF86DRIQueryDirectRenderingCapableReq);
|
||||||
|
swaps(&stuff->length, n);
|
||||||
|
swapl(&stuff->screen, n);
|
||||||
|
return ProcXF86DRIQueryDirectRenderingCapable(client);
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXF86DRIDispatch (
|
SProcXF86DRIDispatch (
|
||||||
register ClientPtr client
|
register ClientPtr client
|
||||||
|
@ -633,16 +655,17 @@ SProcXF86DRIDispatch (
|
||||||
{
|
{
|
||||||
REQUEST(xReq);
|
REQUEST(xReq);
|
||||||
|
|
||||||
/* It is bound to be non-local when there is byte swapping */
|
/*
|
||||||
if (!LocalClient(client))
|
* Only local clients are allowed DRI access, but remote clients still need
|
||||||
return DRIErrorBase + XF86DRIClientNotLocal;
|
* these requests to find out cleanly.
|
||||||
|
*/
|
||||||
/* only local clients are allowed DRI access */
|
|
||||||
switch (stuff->data)
|
switch (stuff->data)
|
||||||
{
|
{
|
||||||
case X_XF86DRIQueryVersion:
|
case X_XF86DRIQueryVersion:
|
||||||
return SProcXF86DRIQueryVersion(client);
|
return SProcXF86DRIQueryVersion(client);
|
||||||
|
case X_XF86DRIQueryDirectRenderingCapable:
|
||||||
|
return SProcXF86DRIQueryDirectRenderingCapable(client);
|
||||||
default:
|
default:
|
||||||
return BadRequest;
|
return DRIErrorBase + XF86DRIClientNotLocal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,3 +14,15 @@ libexa_la_SOURCES = \
|
||||||
|
|
||||||
libexa_la_LIBADD = \
|
libexa_la_LIBADD = \
|
||||||
../../../exa/libexa.la
|
../../../exa/libexa.la
|
||||||
|
|
||||||
|
include $(top_srcdir)/cpprules.in
|
||||||
|
|
||||||
|
drivermandir = $(DRIVER_MAN_DIR)
|
||||||
|
driverman_DATA = exa.$(DRIVER_MAN_SUFFIX)
|
||||||
|
CLEANFILES = $(driverman_DATA) exa.man
|
||||||
|
|
||||||
|
exa.$(DRIVER_MAN_SUFFIX): exa.man
|
||||||
|
-rm -f exa.$(DRIVER_MAN_SUFFIX)
|
||||||
|
$(LN_S) exa.man exa.$(DRIVER_MAN_SUFFIX)
|
||||||
|
|
||||||
|
EXTRA_DIST = exa.man.pre README
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
.\" shorthand for double quote that works everywhere.
|
||||||
|
.ds q \N'34'
|
||||||
|
.TH EXA __drivermansuffix__ __vendorversion__
|
||||||
|
.SH NAME
|
||||||
|
exa \- new 2D acceleration architecture for X.Org
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.B EXA
|
||||||
|
provides a simple API for video drivers to implement for 2D acceleration. It
|
||||||
|
is a module loaded by drivers, and is not intended to be loaded on its own. See
|
||||||
|
your driver's manual page for how to enable
|
||||||
|
.B EXA
|
||||||
|
.
|
||||||
|
.PP
|
||||||
|
The
|
||||||
|
.B EXA
|
||||||
|
architecture is designed to make accelerating the Render extension simple and
|
||||||
|
efficient, and results in various performance tradeoffs compared to XAA. Some
|
||||||
|
options are available for debugging performance issues or driver rendering
|
||||||
|
problems. They are not intended for general use.
|
||||||
|
.TP
|
||||||
|
.BI "Option \*qEXANoComposite\*q \*q" boolean \*q
|
||||||
|
Disables acceleration of the Composite operation, which is at the heart of
|
||||||
|
the Render extension. Not related to the Composite extension. Default: No.
|
||||||
|
.TP
|
||||||
|
.BI "Option \*qEXANoUploadToScreen\*q \*q" boolean \*q
|
||||||
|
Disables acceleration of uploading pixmap data to the freamebuffer. Default: No.
|
||||||
|
.TP
|
||||||
|
.BI "Option \*qEXANoDownloadFromScreen\*q \*q" boolean \*q
|
||||||
|
Disables acceleration of downloading of pixmap data from the framebuffer.
|
||||||
|
.B NOTE:
|
||||||
|
Not usable with drivers which rely on DownloadFromScreen succeeding.
|
||||||
|
Default: No.
|
||||||
|
.TP
|
||||||
|
.BI "Option \*qMigrationHeuristic\*q \*q" anystr \*q
|
||||||
|
Chooses an alternate pixmap migration heuristic, for debugging purposes. The
|
||||||
|
default is intended to be the best performing one for general use, though others
|
||||||
|
may help with specific use cases. Available options include \*qalways\*q,
|
||||||
|
\*qgreedy\*q, and \*qsmart\*q. Default: smart.
|
||||||
|
.SH AUTHORS
|
||||||
|
Authors include: Keith Packard, Eric Anholt, Zack Rusin, and Michel Dänzer
|
|
@ -47,11 +47,22 @@ static int exaXorgScreenPrivateIndex;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
EXAOPT_MIGRATION_HEURISTIC,
|
EXAOPT_MIGRATION_HEURISTIC,
|
||||||
|
EXAOPT_NO_COMPOSITE,
|
||||||
|
EXAOPT_NO_UTS,
|
||||||
|
EXAOPT_NO_DFS,
|
||||||
} EXAOpts;
|
} EXAOpts;
|
||||||
|
|
||||||
static const OptionInfoRec EXAOptions[] = {
|
static const OptionInfoRec EXAOptions[] = {
|
||||||
{ EXAOPT_MIGRATION_HEURISTIC, "MigrationHeuristic", OPTV_ANYSTR, {0}, FALSE },
|
{ EXAOPT_MIGRATION_HEURISTIC, "MigrationHeuristic",
|
||||||
{ -1, NULL, OPTV_NONE, {0}, FALSE }
|
OPTV_ANYSTR, {0}, FALSE },
|
||||||
|
{ EXAOPT_NO_COMPOSITE, "EXANoComposite",
|
||||||
|
OPTV_BOOLEAN, {0}, FALSE },
|
||||||
|
{ EXAOPT_NO_UTS, "EXANoUploadToScreen",
|
||||||
|
OPTV_BOOLEAN, {0}, FALSE },
|
||||||
|
{ EXAOPT_NO_DFS, "EXANoDownloadFromScreen",
|
||||||
|
OPTV_BOOLEAN, {0}, FALSE },
|
||||||
|
{ -1, NULL,
|
||||||
|
OPTV_NONE, {0}, FALSE }
|
||||||
};
|
};
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
|
@ -135,6 +146,26 @@ exaDDXDriverInit(ScreenPtr pScreen)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (xf86IsOptionSet(pScreenPriv->options, EXAOPT_NO_COMPOSITE)) {
|
||||||
|
xf86DrvMsg(pScreen->myNum, X_INFO,
|
||||||
|
"EXA: Disabling Composite operation "
|
||||||
|
"(RENDER acceleration)\n");
|
||||||
|
pExaScr->info->CheckComposite = NULL;
|
||||||
|
pExaScr->info->PrepareComposite = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (xf86IsOptionSet(pScreenPriv->options, EXAOPT_NO_UTS)) {
|
||||||
|
xf86DrvMsg(pScreen->myNum, X_INFO,
|
||||||
|
"EXA: Disabling UploadToScreen\n");
|
||||||
|
pExaScr->info->UploadToScreen = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (xf86IsOptionSet(pScreenPriv->options, EXAOPT_NO_DFS)) {
|
||||||
|
xf86DrvMsg(pScreen->myNum, X_INFO,
|
||||||
|
"EXA: Disabling DownloadFromScreen\n");
|
||||||
|
pExaScr->info->DownloadFromScreen = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
pScreen->devPrivates[exaXorgScreenPrivateIndex].ptr = pScreenPriv;
|
pScreen->devPrivates[exaXorgScreenPrivateIndex].ptr = pScreenPriv;
|
||||||
|
|
||||||
pScreenPriv->SavedEnableDisableFBAccess = pScrn->EnableDisableFBAccess;
|
pScreenPriv->SavedEnableDisableFBAccess = pScrn->EnableDisableFBAccess;
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
fbdevhw.4
|
||||||
|
fbdevhw.4x
|
|
@ -0,0 +1,4 @@
|
||||||
|
getconfig.1
|
||||||
|
getconfig.1x
|
||||||
|
getconfig.5
|
||||||
|
getconfig.5x
|
|
@ -99,6 +99,7 @@ xf86DrvMsg(f->d.pI2CBus->scrnIndex, X_INFO, "MT2032: Company code 0x%02x%02x, pa
|
||||||
}
|
}
|
||||||
|
|
||||||
/* might be buggy */
|
/* might be buggy */
|
||||||
|
#if 0
|
||||||
static void MT2032_shutdown(FI1236Ptr f)
|
static void MT2032_shutdown(FI1236Ptr f)
|
||||||
{
|
{
|
||||||
CARD8 data[10];
|
CARD8 data[10];
|
||||||
|
@ -124,6 +125,7 @@ I2C_WriteRead(&(f->d), (I2CByte *)data, 4, NULL, 0);
|
||||||
|
|
||||||
usleep(15000);
|
usleep(15000);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void MT2032_dump_status(FI1236Ptr f);
|
static void MT2032_dump_status(FI1236Ptr f);
|
||||||
|
|
||||||
|
@ -131,7 +133,7 @@ static void MT2032_init(FI1236Ptr f)
|
||||||
{
|
{
|
||||||
CARD8 data[10];
|
CARD8 data[10];
|
||||||
CARD8 value;
|
CARD8 value;
|
||||||
CARD8 xogc;
|
CARD8 xogc = 0x00;
|
||||||
|
|
||||||
MT2032_getid(f);
|
MT2032_getid(f);
|
||||||
|
|
||||||
|
@ -479,7 +481,7 @@ if(type==TUNER_TYPE_MT2032){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CARD32 AFC_TimerCallback(OsTimerPtr timer, CARD32 time, pointer data){
|
static CARD32 AFC_TimerCallback(OsTimerPtr timer, CARD32 time, pointer data){
|
||||||
FI1236Ptr f=(FI1236Ptr)data;
|
FI1236Ptr f=(FI1236Ptr)data;
|
||||||
if(FI1236_AFC(f))return 150;
|
if(FI1236_AFC(f))return 150;
|
||||||
else {
|
else {
|
||||||
|
@ -517,7 +519,7 @@ void FI1236_tune(FI1236Ptr f, CARD32 frequency)
|
||||||
|
|
||||||
xf86DrvMsg(f->d.pI2CBus->scrnIndex, X_INFO, "Setting tuner band to %d\n", f->tuner_data.band);
|
xf86DrvMsg(f->d.pI2CBus->scrnIndex, X_INFO, "Setting tuner band to %d\n", f->tuner_data.band);
|
||||||
|
|
||||||
xf86DrvMsg(f->d.pI2CBus->scrnIndex, X_INFO, "Setting tuner frequency to %d\n", frequency);
|
xf86DrvMsg(f->d.pI2CBus->scrnIndex, X_INFO, "Setting tuner frequency to %d\n", (int)frequency);
|
||||||
|
|
||||||
if ((f->type == TUNER_TYPE_FM1216ME) || (f->type == TUNER_TYPE_FI1236W))
|
if ((f->type == TUNER_TYPE_FM1216ME) || (f->type == TUNER_TYPE_FI1236W))
|
||||||
{
|
{
|
||||||
|
|
|
@ -90,6 +90,7 @@ typedef struct {
|
||||||
FI1236Ptr Detect_FI1236(I2CBusPtr b, I2CSlaveAddr addr);
|
FI1236Ptr Detect_FI1236(I2CBusPtr b, I2CSlaveAddr addr);
|
||||||
void FI1236_set_tuner_type(FI1236Ptr f, int type);
|
void FI1236_set_tuner_type(FI1236Ptr f, int type);
|
||||||
void TUNER_set_frequency(FI1236Ptr f, CARD32 frequency);
|
void TUNER_set_frequency(FI1236Ptr f, CARD32 frequency);
|
||||||
|
void FI1236_tune(FI1236Ptr f, CARD32 frequency);
|
||||||
int FI1236_AFC(FI1236Ptr f);
|
int FI1236_AFC(FI1236Ptr f);
|
||||||
int TUNER_get_afc_hint(FI1236Ptr f);
|
int TUNER_get_afc_hint(FI1236Ptr f);
|
||||||
void fi1236_dump_status(FI1236Ptr f);
|
void fi1236_dump_status(FI1236Ptr f);
|
||||||
|
|
|
@ -107,6 +107,6 @@ CARD16 tda9850_getstatus(TDA9850Ptr t)
|
||||||
{
|
{
|
||||||
CARD16 status;
|
CARD16 status;
|
||||||
|
|
||||||
I2C_WriteRead(&(t->d), NULL, 0, &status, 2);
|
I2C_WriteRead(&(t->d), NULL, 0, (I2CByte *)&status, 2);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
noinst_LIBRARIES = libloader.a
|
noinst_LIBRARIES = libloader.a
|
||||||
INCLUDES = $(XORG_INCS) -I$(srcdir)/../parser -I$(srcdir)/../vbe \
|
|
||||||
-I$(srcdir)/../ddc -I$(srcdir)/../int10 -I$(srcdir)/../i2c \
|
INCLUDES = $(XORG_INCS) -I$(srcdir)/../parser -I$(srcdir)/../dixmods/extmod \
|
||||||
-I$(srcdir)/../fbdevhw -I$(srcdir)/../scanpci -I$(srcdir)/../xaa \
|
-I$(srcdir)/../vbe -I$(top_srcdir)/miext/cw -I$(srcdir)/../int10 \
|
||||||
-I$(srcdir)/../vgahw -I$(srcdir)/../ramdac -I$(srcdir)/../shadowfb \
|
-I$(srcdir)/../ddc -I$(srcdir)/../i2c
|
||||||
-I$(srcdir)/../dixmods/extmod -I$(srcdir)/../../../miext/cw \
|
|
||||||
-I$(srcdir)/../../../miext/damage
|
|
||||||
|
|
||||||
#AM_LDFLAGS = -r
|
#AM_LDFLAGS = -r
|
||||||
AM_CFLAGS = -DIN_LOADER $(XORG_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
|
AM_CFLAGS = -DIN_LOADER $(XORG_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
|
||||||
|
@ -15,10 +13,8 @@ endif
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
dlloader.h \
|
dlloader.h \
|
||||||
hash.h \
|
|
||||||
loader.h \
|
loader.h \
|
||||||
loaderProcs.h \
|
loaderProcs.h \
|
||||||
sym.h \
|
|
||||||
SparcMulDiv.S
|
SparcMulDiv.S
|
||||||
|
|
||||||
libloader_a_SOURCES = \
|
libloader_a_SOURCES = \
|
||||||
|
@ -34,5 +30,4 @@ libloader_a_SOURCES = \
|
||||||
fontsym.c \
|
fontsym.c \
|
||||||
misym.c \
|
misym.c \
|
||||||
xf86sym.c \
|
xf86sym.c \
|
||||||
hash.c \
|
|
||||||
$(SPARC_SOURCES)
|
$(SPARC_SOURCES)
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
/* $XdotOrg: xserver/xorg/hw/xfree86/loader/dixsym.c,v 1.21 2006/03/24 20:50:13 fredrik Exp $ */
|
|
||||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/dixsym.c,v 1.63 2003/12/03
|
|
||||||
* 17:11:29 tsi Exp $ */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright 1995-1998 by Metro Link, Inc.
|
* Copyright 1995-1998 by Metro Link, Inc.
|
||||||
*
|
*
|
||||||
|
@ -99,7 +95,7 @@ extern int NumCurrentSelections;
|
||||||
|
|
||||||
/* DIX things */
|
/* DIX things */
|
||||||
|
|
||||||
LOOKUP dixLookupTab[] = {
|
_X_HIDDEN void *dixLookupTab[] = {
|
||||||
|
|
||||||
/* dix */
|
/* dix */
|
||||||
/* atom.c */
|
/* atom.c */
|
||||||
|
@ -533,6 +529,4 @@ LOOKUP dixLookupTab[] = {
|
||||||
SYMFUNC(RenderEdgeInit)
|
SYMFUNC(RenderEdgeInit)
|
||||||
SYMFUNC(RenderLineFixedEdgeInit)
|
SYMFUNC(RenderLineFixedEdgeInit)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
{0, 0}
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/dlloader.c,v 1.13 2003/10/15 16:29:02 dawes Exp $ */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
|
||||||
* Copyright (c) 1997 The XFree86 Project, Inc.
|
* Copyright (c) 1997 The XFree86 Project, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software
|
* Permission to use, copy, modify, distribute, and sell this software
|
||||||
|
@ -23,7 +20,18 @@
|
||||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
|
||||||
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
||||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||||
* SOFTWARE. */
|
* SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Once upon a time, X had multiple loader backends, three of which were
|
||||||
|
* essentially libdl reimplementations. This was nonsense so we chucked
|
||||||
|
* it, but we still retain the factorization between loader API and
|
||||||
|
* platform implementation. This file is the libdl implementation, and
|
||||||
|
* currently the only backend. If you find yourself porting to a platform
|
||||||
|
* without working libdl - hpux, win32, some forsaken a.out host, etc. -
|
||||||
|
* make a new backend rather than hacking up this file.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
#ifdef HAVE_XORG_CONFIG_H
|
||||||
#include <xorg-config.h>
|
#include <xorg-config.h>
|
||||||
|
@ -36,82 +44,67 @@
|
||||||
#include <X11/Xos.h>
|
#include <X11/Xos.h>
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
|
|
||||||
#include "sym.h"
|
|
||||||
#include "loader.h"
|
#include "loader.h"
|
||||||
#include "dlloader.h"
|
#include "dlloader.h"
|
||||||
|
|
||||||
#ifdef DL_LAZY
|
#if defined(DL_LAZY)
|
||||||
#define DLOPEN_LAZY DL_LAZY
|
#define DLOPEN_LAZY DL_LAZY
|
||||||
#else
|
#elif defined(RTLD_LAZY)
|
||||||
#ifdef RTLD_LAZY
|
|
||||||
#define DLOPEN_LAZY RTLD_LAZY
|
#define DLOPEN_LAZY RTLD_LAZY
|
||||||
#else
|
#elif defined(__FreeBSD__)
|
||||||
#ifdef __FreeBSD__
|
|
||||||
#define DLOPEN_LAZY 1
|
#define DLOPEN_LAZY 1
|
||||||
#else
|
#else
|
||||||
#define DLOPEN_LAZY 0
|
#define DLOPEN_LAZY 0
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
#endif
|
#if defined(LD_GLOBAL)
|
||||||
#ifdef LD_GLOBAL
|
|
||||||
#define DLOPEN_GLOBAL LD_GLOBAL
|
#define DLOPEN_GLOBAL LD_GLOBAL
|
||||||
#else
|
#elif defined(RTLD_GLOBAL)
|
||||||
#ifdef RTLD_GLOBAL
|
|
||||||
#define DLOPEN_GLOBAL RTLD_GLOBAL
|
#define DLOPEN_GLOBAL RTLD_GLOBAL
|
||||||
#else
|
#else
|
||||||
#define DLOPEN_GLOBAL 0
|
#define DLOPEN_GLOBAL 0
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CSRG_BASED) && !defined(__ELF__)
|
#if defined(CSRG_BASED) && !defined(__ELF__)
|
||||||
#define NEED_UNDERSCORE_FOR_DLLSYM
|
#define DLSYM_PREFIX "_"
|
||||||
|
#else
|
||||||
|
#define DLSYM_PREFIX ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
* This structure contains all of the information about a module
|
|
||||||
* that has been loaded.
|
|
||||||
*/
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int handle;
|
int handle;
|
||||||
void *dlhandle;
|
void *dlhandle;
|
||||||
int flags;
|
int flags;
|
||||||
} DLModuleRec, *DLModulePtr;
|
} DLModuleRec, *DLModulePtr;
|
||||||
|
|
||||||
/*
|
/* Hooray, yet another open coded linked list! FIXME */
|
||||||
* a list of loaded modules XXX can be improved
|
|
||||||
*/
|
|
||||||
typedef struct DLModuleList {
|
typedef struct DLModuleList {
|
||||||
DLModulePtr module;
|
DLModulePtr module;
|
||||||
struct DLModuleList *next;
|
struct DLModuleList *next;
|
||||||
} DLModuleList;
|
} DLModuleList;
|
||||||
|
|
||||||
DLModuleList *dlModuleList = NULL;
|
static DLModuleList *dlModuleList = NULL;
|
||||||
|
|
||||||
void *
|
static void *
|
||||||
DLFindSymbolLocal(pointer module, const char *name)
|
DLFindSymbolLocal(pointer module, const char *name)
|
||||||
{
|
{
|
||||||
DLModulePtr dlfile = module;
|
DLModulePtr dlfile = module;
|
||||||
void *p;
|
void *p;
|
||||||
char *n;
|
char *n;
|
||||||
|
|
||||||
#ifdef NEED_UNDERSCORE_FOR_DLLSYM
|
static const char symPrefix[] = DLSYM_PREFIX;
|
||||||
static const char symPrefix[] = "_";
|
|
||||||
#else
|
|
||||||
static const char symPrefix[] = "";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
n = xf86loadermalloc(strlen(symPrefix) + strlen(name) + 1);
|
n = malloc(strlen(symPrefix) + strlen(name) + 1);
|
||||||
sprintf(n, "%s%s", symPrefix, name);
|
if (strlen(symPrefix))
|
||||||
|
sprintf(n, "%s%s", symPrefix, name);
|
||||||
|
else
|
||||||
|
sprintf(n, "%s", name);
|
||||||
p = dlsym(dlfile->dlhandle, n);
|
p = dlsym(dlfile->dlhandle, n);
|
||||||
xf86loaderfree(n);
|
free(n);
|
||||||
|
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Search a symbol in the module list
|
|
||||||
*/
|
|
||||||
void *
|
void *
|
||||||
DLFindSymbol(const char *name)
|
DLFindSymbol(const char *name)
|
||||||
{
|
{
|
||||||
|
@ -127,75 +120,59 @@ DLFindSymbol(const char *name)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* public interface
|
|
||||||
*/
|
|
||||||
void *
|
void *
|
||||||
DLLoadModule(loaderPtr modrec, int fd, LOOKUP ** ppLookup, int flags)
|
DLLoadModule(loaderPtr modrec, int fd, int flags)
|
||||||
{
|
{
|
||||||
DLModulePtr dlfile;
|
DLModulePtr dlfile;
|
||||||
DLModuleList *l;
|
DLModuleList *l;
|
||||||
int dlopen_flags;
|
int dlopen_flags;
|
||||||
|
|
||||||
if ((dlfile = xf86loadercalloc(1, sizeof(DLModuleRec))) == NULL) {
|
if ((dlfile = calloc(1, sizeof(DLModuleRec))) == NULL) {
|
||||||
ErrorF("Unable to allocate DLModuleRec\n");
|
ErrorF("Unable to allocate DLModuleRec\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
dlfile->handle = modrec->handle;
|
dlfile->handle = modrec->handle;
|
||||||
if (flags & LD_FLAG_GLOBAL)
|
if (flags & LD_FLAG_GLOBAL)
|
||||||
dlopen_flags = DLOPEN_LAZY | DLOPEN_GLOBAL;
|
dlopen_flags = DLOPEN_LAZY | DLOPEN_GLOBAL;
|
||||||
else
|
else
|
||||||
dlopen_flags = DLOPEN_LAZY;
|
dlopen_flags = DLOPEN_LAZY;
|
||||||
dlfile->dlhandle = dlopen(modrec->name, dlopen_flags);
|
dlfile->dlhandle = dlopen(modrec->name, dlopen_flags);
|
||||||
if (dlfile->dlhandle == NULL) {
|
if (dlfile->dlhandle == NULL) {
|
||||||
ErrorF("dlopen: %s\n", dlerror());
|
ErrorF("dlopen: %s\n", dlerror());
|
||||||
xf86loaderfree(dlfile);
|
free(dlfile);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
l = xf86loadermalloc(sizeof(DLModuleList));
|
l = malloc(sizeof(DLModuleList));
|
||||||
l->module = dlfile;
|
l->module = dlfile;
|
||||||
l->next = dlModuleList;
|
l->next = dlModuleList;
|
||||||
dlModuleList = l;
|
dlModuleList = l;
|
||||||
*ppLookup = NULL;
|
|
||||||
|
|
||||||
return (void *)dlfile;
|
return (void *)dlfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
DLResolveSymbols(void *mod)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
DLCheckForUnresolved(void *mod)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
DLUnloadModule(void *modptr)
|
DLUnloadModule(void *modptr)
|
||||||
{
|
{
|
||||||
DLModulePtr dlfile = (DLModulePtr) modptr;
|
DLModulePtr dlfile = (DLModulePtr) modptr;
|
||||||
DLModuleList *l, *p;
|
DLModuleList *l, *p;
|
||||||
|
|
||||||
/* remove it from dlModuleList */
|
/* remove it from dlModuleList. */
|
||||||
if (dlModuleList->module == modptr) {
|
if (dlModuleList->module == modptr) {
|
||||||
l = dlModuleList;
|
l = dlModuleList;
|
||||||
dlModuleList = l->next;
|
dlModuleList = l->next;
|
||||||
xf86loaderfree(l);
|
free(l);
|
||||||
} else {
|
} else {
|
||||||
p = dlModuleList;
|
p = dlModuleList;
|
||||||
for (l = dlModuleList->next; l != NULL; l = l->next) {
|
for (l = dlModuleList->next; l != NULL; l = l->next) {
|
||||||
if (l->module == modptr) {
|
if (l->module == modptr) {
|
||||||
p->next = l->next;
|
p->next = l->next;
|
||||||
xf86loaderfree(l);
|
free(l);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
p = l;
|
p = l;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dlclose(dlfile->dlhandle);
|
dlclose(dlfile->dlhandle);
|
||||||
xf86loaderfree(modptr);
|
free(modptr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,19 +19,15 @@
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/dlloader.h,v 1.2 1998/07/25 16:56:14 dawes Exp $ */
|
|
||||||
|
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
#ifdef HAVE_XORG_CONFIG_H
|
||||||
#include <xorg-config.h>
|
#include <xorg-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _DLLOADER_H
|
#ifndef _DLLOADER_H
|
||||||
#define _DLLOADER_H
|
#define _DLLOADER_H
|
||||||
extern void *DLLoadModule(loaderPtr, int, LOOKUP **, int flags);
|
|
||||||
extern void DLResolveSymbols(void *);
|
extern void *DLLoadModule(loaderPtr, int, int flags);
|
||||||
extern int DLCheckForUnresolved(void *);
|
|
||||||
extern void DLUnloadModule(void *);
|
extern void DLUnloadModule(void *);
|
||||||
extern void *DLFindSymbol(const char *name);
|
extern void *DLFindSymbol(const char *name);
|
||||||
extern void *DLFindSymbolLocal(pointer module, const char *name);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/extsym.c,v 1.5 2004/09/14 23:21:22 gisburn Exp $ */
|
|
||||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/extsym.c,v 1.9 2003/10/15 16:29:03 dawes Exp $ */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Copyright 1999-2003 by The XFree86 Project, Inc.
|
* Copyright 1999-2003 by The XFree86 Project, Inc.
|
||||||
|
@ -57,7 +54,7 @@ extern Bool XineramaRegisterConnectionBlockCallback(void (*func) (void));
|
||||||
extern int XineramaDeleteResource(pointer, XID);
|
extern int XineramaDeleteResource(pointer, XID);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
LOOKUP extLookupTab[] = {
|
_X_HIDDEN void *extLookupTab[] = {
|
||||||
|
|
||||||
SYMFUNC(ClientSleepUntil)
|
SYMFUNC(ClientSleepUntil)
|
||||||
|
|
||||||
|
@ -79,6 +76,4 @@ LOOKUP extLookupTab[] = {
|
||||||
SYMVAR(XRT_COLORMAP)
|
SYMVAR(XRT_COLORMAP)
|
||||||
SYMVAR(XRC_DRAWABLE)
|
SYMVAR(XRC_DRAWABLE)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
{0, 0}
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/fontsym.c,v 1.14 2003/12/20 20:04:34 dawes Exp $ */
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998-2002 by The XFree86 Project, Inc.
|
* Copyright (c) 1998-2002 by The XFree86 Project, Inc.
|
||||||
*
|
*
|
||||||
|
@ -46,7 +45,7 @@
|
||||||
#include "fontcache.h"
|
#include "fontcache.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
LOOKUP fontLookupTab[] = {
|
_X_HIDDEN void *fontLookupTab[] = {
|
||||||
|
|
||||||
SYMFUNC(TwoByteSwap)
|
SYMFUNC(TwoByteSwap)
|
||||||
SYMFUNC(FourByteSwap)
|
SYMFUNC(FourByteSwap)
|
||||||
|
@ -107,6 +106,4 @@ LOOKUP fontLookupTab[] = {
|
||||||
SYMFUNC(FontCacheInsertEntry)
|
SYMFUNC(FontCacheInsertEntry)
|
||||||
SYMFUNC(FontCacheGetBitmap)
|
SYMFUNC(FontCacheGetBitmap)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
{0, 0}
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,356 +0,0 @@
|
||||||
/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/hash.c,v 1.3 2005/04/20 12:25:34 daniels Exp $ */
|
|
||||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/hash.c,v 1.24 2003/11/17 22:20:40 dawes Exp $ */
|
|
||||||
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
* Copyright 1995-1998 by Metro Link, Inc.
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
|
||||||
* documentation for any purpose is hereby granted without fee, provided that
|
|
||||||
* the above copyright notice appear in all copies and that both that
|
|
||||||
* copyright notice and this permission notice appear in supporting
|
|
||||||
* documentation, and that the name of Metro Link, Inc. not be used in
|
|
||||||
* advertising or publicity pertaining to distribution of the software without
|
|
||||||
* specific, written prior permission. Metro Link, Inc. makes no
|
|
||||||
* representations about the suitability of this software for any purpose.
|
|
||||||
* It is provided "as is" without express or implied warranty.
|
|
||||||
*
|
|
||||||
* METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
|
||||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
|
||||||
* EVENT SHALL METRO LINK, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
|
||||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
|
||||||
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
|
||||||
#include <xorg-config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "os.h"
|
|
||||||
#include <X11/Xos.h>
|
|
||||||
#undef abs
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "sym.h"
|
|
||||||
#include "loader.h"
|
|
||||||
#include "hash.h"
|
|
||||||
|
|
||||||
#if defined(Lynx)
|
|
||||||
#define MAXINT 32000
|
|
||||||
#else
|
|
||||||
#include <limits.h>
|
|
||||||
#undef MAXINT
|
|
||||||
#define MAXINT INT_MAX
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Prototypes for static functions. */
|
|
||||||
static unsigned int hashFunc(const char *);
|
|
||||||
static itemPtr LoaderHashFindNearest(unsigned long);
|
|
||||||
|
|
||||||
static itemPtr LoaderhashTable[HASHSIZE];
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
static int hashhits[HASHSIZE];
|
|
||||||
|
|
||||||
void
|
|
||||||
DumpHashHits(void)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
int depth = 0;
|
|
||||||
int dev = 0;
|
|
||||||
|
|
||||||
for (i = 0; i < HASHSIZE; i++) {
|
|
||||||
ErrorF("hashhits[%d]=%d\n", i, hashhits[i]);
|
|
||||||
depth += hashhits[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
depth /= HASHSIZE;
|
|
||||||
ErrorF("Average hash depth=%d\n", depth);
|
|
||||||
|
|
||||||
for (i = 0; i < HASHSIZE; i++) {
|
|
||||||
if (hashhits[i] < depth)
|
|
||||||
dev += depth - hashhits[i];
|
|
||||||
else
|
|
||||||
dev += hashhits[i] - depth;
|
|
||||||
}
|
|
||||||
|
|
||||||
dev /= HASHSIZE;
|
|
||||||
ErrorF("Average hash deviation=%d\n", dev);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static unsigned int
|
|
||||||
hashFunc(const char *string)
|
|
||||||
{
|
|
||||||
int i = 0;
|
|
||||||
|
|
||||||
while (i < 10 && string[i])
|
|
||||||
i++;
|
|
||||||
|
|
||||||
if (i < 5) {
|
|
||||||
#ifdef DEBUG
|
|
||||||
hashhits[i]++;
|
|
||||||
#endif
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Original has function
|
|
||||||
#define HASH ((string[ i-4 ] * string[i-3] + string[i-2] ) & (HASHSIZE-1))
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define HASH ((string[i-5] * string[ i-4 ] + string[i-3] * string[i-2] ) & (HASHSIZE-1))
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
hashhits[HASH]++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return HASH;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
LoaderHashAdd(itemPtr entry)
|
|
||||||
{
|
|
||||||
int bucket = hashFunc(entry->name);
|
|
||||||
itemPtr oentry;
|
|
||||||
|
|
||||||
if ((oentry = LoaderHashFind(entry->name)) != NULL)
|
|
||||||
LoaderDuplicateSymbol(entry->name, oentry->handle);
|
|
||||||
|
|
||||||
entry->next = LoaderhashTable[bucket];
|
|
||||||
LoaderhashTable[bucket] = entry;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
LoaderAddSymbols(int handle, int module, LOOKUP *list)
|
|
||||||
{
|
|
||||||
LOOKUP *l = list, *exports = NULL;
|
|
||||||
itemPtr i, exportsItem = NULL;
|
|
||||||
char *modname;
|
|
||||||
|
|
||||||
if (!list)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* First look for a symbol called <name>ExportedSymbols. If it exists,
|
|
||||||
* only export the symbols that are listed in that array. Otherwise
|
|
||||||
* export all of the external symbols.
|
|
||||||
*/
|
|
||||||
modname = _LoaderHandleToCanonicalName(handle);
|
|
||||||
if (modname) {
|
|
||||||
char *exportname;
|
|
||||||
|
|
||||||
exportname = xf86loadermalloc(strlen("ExportedSymbols") +
|
|
||||||
strlen(modname) + 1);
|
|
||||||
if (exportname) {
|
|
||||||
sprintf(exportname, "%sExportedSymbols", modname);
|
|
||||||
while (l->symName) {
|
|
||||||
if (strcmp(l->symName, exportname) == 0) {
|
|
||||||
exports = l;
|
|
||||||
ErrorF("LoaderAddSymbols: %s: %s found\n", modname,
|
|
||||||
exportname);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
l++;
|
|
||||||
}
|
|
||||||
xf86loaderfree(exportname);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Allocate the exports list item first.
|
|
||||||
*/
|
|
||||||
if (exports) {
|
|
||||||
exportsItem = xf86loadermalloc(sizeof(itemRec));
|
|
||||||
exportsItem->name = exports->symName;
|
|
||||||
exportsItem->address = (char *)exports->offset;
|
|
||||||
exportsItem->handle = handle;
|
|
||||||
exportsItem->module = module;
|
|
||||||
exportsItem->exports = NULL;
|
|
||||||
LoaderHashAdd(exportsItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Visit every symbol in the lookup table, tagging it with the
|
|
||||||
* reference to the export list, if present.
|
|
||||||
*/
|
|
||||||
l = list;
|
|
||||||
while (l->symName) {
|
|
||||||
if (l != exports) {
|
|
||||||
i = xf86loadermalloc(sizeof(itemRec));
|
|
||||||
i->name = l->symName;
|
|
||||||
i->address = (char *)l->offset;
|
|
||||||
i->handle = handle;
|
|
||||||
i->module = module;
|
|
||||||
i->exports = exportsItem;
|
|
||||||
LoaderHashAdd(i);
|
|
||||||
}
|
|
||||||
l++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
itemPtr
|
|
||||||
LoaderHashDelete(const char *string)
|
|
||||||
{
|
|
||||||
int bucket = hashFunc(string);
|
|
||||||
itemPtr entry;
|
|
||||||
itemPtr *entry2;
|
|
||||||
|
|
||||||
entry = LoaderhashTable[bucket];
|
|
||||||
entry2 = &(LoaderhashTable[bucket]);
|
|
||||||
while (entry) {
|
|
||||||
if (!strcmp(entry->name, string)) {
|
|
||||||
*entry2 = entry->next;
|
|
||||||
xf86loaderfree(entry->name);
|
|
||||||
xf86loaderfree(entry);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
entry2 = &(entry->next);
|
|
||||||
entry = entry->next;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
itemPtr
|
|
||||||
LoaderHashFind(const char *string)
|
|
||||||
{
|
|
||||||
int bucket = hashFunc(string);
|
|
||||||
itemPtr entry;
|
|
||||||
|
|
||||||
entry = LoaderhashTable[bucket];
|
|
||||||
while (entry) {
|
|
||||||
if (!strcmp(entry->name, string)) {
|
|
||||||
return entry;
|
|
||||||
}
|
|
||||||
entry = entry->next;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static itemPtr
|
|
||||||
LoaderHashFindNearest(unsigned long address)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
itemPtr entry, best_entry = 0;
|
|
||||||
long best_difference = MAXINT;
|
|
||||||
|
|
||||||
for (i = 0; i < HASHSIZE; i++) {
|
|
||||||
entry = LoaderhashTable[i];
|
|
||||||
while (entry) {
|
|
||||||
long difference = (long)address - (long)entry->address;
|
|
||||||
|
|
||||||
if (difference >= 0) {
|
|
||||||
if (best_entry) {
|
|
||||||
if (difference < best_difference) {
|
|
||||||
best_entry = entry;
|
|
||||||
best_difference = difference;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
best_entry = entry;
|
|
||||||
best_difference = difference;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
entry = entry->next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return best_entry;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
LoaderPrintSymbol(unsigned long address)
|
|
||||||
{
|
|
||||||
itemPtr entry;
|
|
||||||
|
|
||||||
entry = LoaderHashFindNearest(address);
|
|
||||||
if (entry) {
|
|
||||||
const char *module, *section;
|
|
||||||
|
|
||||||
#if defined(__alpha__) || defined(__ia64__)
|
|
||||||
ErrorF("0x%016lx %s+%lx\n", (unsigned long)entry->address,
|
|
||||||
entry->name, address - (unsigned long)entry->address);
|
|
||||||
#else
|
|
||||||
ErrorF("0x%lx %s+%lx\n", (unsigned long)entry->address, entry->name,
|
|
||||||
address - (unsigned long)entry->address);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (_LoaderAddressToSection(address, &module, §ion))
|
|
||||||
ErrorF("\tModule \"%s\"\n\tSection \"%s\"\n", module, section);
|
|
||||||
} else {
|
|
||||||
ErrorF("(null)\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
LoaderPrintItem(itemPtr pItem)
|
|
||||||
{
|
|
||||||
if (pItem) {
|
|
||||||
const char *module, *section;
|
|
||||||
|
|
||||||
#if defined(__alpha__) || defined(__ia64__)
|
|
||||||
ErrorF("0x%016lx %s\n", (unsigned long)pItem->address, pItem->name);
|
|
||||||
#else
|
|
||||||
ErrorF("0x%lx %s\n", (unsigned long)pItem->address, pItem->name);
|
|
||||||
#endif
|
|
||||||
if (_LoaderAddressToSection((unsigned long)pItem->address,
|
|
||||||
&module, §ion))
|
|
||||||
ErrorF("\tModule \"%s\"\n\tSection \"%s\"\n", module, section);
|
|
||||||
} else
|
|
||||||
ErrorF("(null)\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
LoaderPrintAddress(const char *symbol)
|
|
||||||
{
|
|
||||||
itemPtr entry;
|
|
||||||
|
|
||||||
entry = LoaderHashFind(symbol);
|
|
||||||
LoaderPrintItem(entry);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
LoaderHashTraverse(void *card, int (*fnp)(void *, itemPtr))
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
itemPtr entry, last_entry = 0;
|
|
||||||
|
|
||||||
for (i = 0; i < HASHSIZE; i++) {
|
|
||||||
last_entry = 0;
|
|
||||||
entry = LoaderhashTable[i];
|
|
||||||
while (entry) {
|
|
||||||
if ((*fnp) (card, entry)) {
|
|
||||||
if (last_entry) {
|
|
||||||
last_entry->next = entry->next;
|
|
||||||
xf86loaderfree(entry->name);
|
|
||||||
xf86loaderfree(entry);
|
|
||||||
entry = last_entry->next;
|
|
||||||
} else {
|
|
||||||
LoaderhashTable[i] = entry->next;
|
|
||||||
xf86loaderfree(entry->name);
|
|
||||||
xf86loaderfree(entry);
|
|
||||||
entry = LoaderhashTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
last_entry = entry;
|
|
||||||
entry = entry->next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
LoaderDumpSymbols()
|
|
||||||
{
|
|
||||||
itemPtr entry;
|
|
||||||
int j;
|
|
||||||
|
|
||||||
for (j = 0; j < HASHSIZE; j++) {
|
|
||||||
entry = LoaderhashTable[j];
|
|
||||||
while (entry) {
|
|
||||||
LoaderPrintItem(entry);
|
|
||||||
entry = entry->next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,40 +0,0 @@
|
||||||
/*
|
|
||||||
*
|
|
||||||
* Copyright 1995-1998 by Metro Link, Inc.
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
|
||||||
* documentation for any purpose is hereby granted without fee, provided that
|
|
||||||
* the above copyright notice appear in all copies and that both that
|
|
||||||
* copyright notice and this permission notice appear in supporting
|
|
||||||
* documentation, and that the name of Metro Link, Inc. not be used in
|
|
||||||
* advertising or publicity pertaining to distribution of the software without
|
|
||||||
* specific, written prior permission. Metro Link, Inc. makes no
|
|
||||||
* representations about the suitability of this software for any purpose.
|
|
||||||
* It is provided "as is" without express or implied warranty.
|
|
||||||
*
|
|
||||||
* METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
|
||||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
|
||||||
* EVENT SHALL METRO LINK, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
|
||||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
|
||||||
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/hash.h,v 1.2.2.2 1998/07/04 13:32:45 dawes Exp $ */
|
|
||||||
|
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
|
||||||
#include <xorg-config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _HASH_H
|
|
||||||
#define _HASH_H
|
|
||||||
|
|
||||||
#include "loader.h"
|
|
||||||
|
|
||||||
typedef struct _HashIterator {
|
|
||||||
itemPtr pItem;
|
|
||||||
int bucket;
|
|
||||||
} HashIteratorRec, *HashIteratorPtr;
|
|
||||||
|
|
||||||
#endif /* _HASH_H */
|
|
|
@ -1,5 +1,3 @@
|
||||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loader.c,v 1.71 2003/11/06 18:38:13 tsi Exp $ */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright 1995-1998 by Metro Link, Inc.
|
* Copyright 1995-1998 by Metro Link, Inc.
|
||||||
*
|
*
|
||||||
|
@ -71,39 +69,18 @@
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
#include "sym.h"
|
|
||||||
#include "loader.h"
|
#include "loader.h"
|
||||||
#include "loaderProcs.h"
|
#include "loaderProcs.h"
|
||||||
#include "xf86.h"
|
#include "xf86.h"
|
||||||
#include "xf86Priv.h"
|
#include "xf86Priv.h"
|
||||||
|
|
||||||
#include "compiler.h"
|
#include "compiler.h"
|
||||||
|
#include "sym.h"
|
||||||
extern LOOKUP miLookupTab[];
|
|
||||||
extern LOOKUP xfree86LookupTab[];
|
|
||||||
extern LOOKUP dixLookupTab[];
|
|
||||||
extern LOOKUP fontLookupTab[];
|
|
||||||
extern LOOKUP extLookupTab[];
|
|
||||||
|
|
||||||
/*
|
|
||||||
#define DEBUG
|
|
||||||
#define DEBUGAR
|
|
||||||
#define DEBUGLIST
|
|
||||||
#define DEBUGMEM
|
|
||||||
*/
|
|
||||||
|
|
||||||
int check_unresolved_sema = 0;
|
|
||||||
|
|
||||||
#if defined(Lynx) && defined(sun)
|
#if defined(Lynx) && defined(sun)
|
||||||
/* Cross build machine doesn;t have strerror() */
|
/* Cross build machine doesn;t have strerror() */
|
||||||
#define strerror(err) "strerror unsupported"
|
#define strerror(err) "strerror unsupported"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __UNIXOS2__
|
|
||||||
void *os2ldcalloc(size_t, size_t);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HANDLE_IN_HASH_ENTRY
|
|
||||||
/*
|
/*
|
||||||
* handles are used to identify files that are loaded. Even archives
|
* handles are used to identify files that are loaded. Even archives
|
||||||
* are counted as a single file.
|
* are counted as a single file.
|
||||||
|
@ -113,106 +90,6 @@ void *os2ldcalloc(size_t, size_t);
|
||||||
#define HANDLE_USED 1
|
#define HANDLE_USED 1
|
||||||
static char freeHandles[MAX_HANDLE];
|
static char freeHandles[MAX_HANDLE];
|
||||||
static int refCount[MAX_HANDLE];
|
static int refCount[MAX_HANDLE];
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__sparc__) && defined(__GNUC__) && !defined(__FreeBSD__)
|
|
||||||
# define SYMFUNCDOT(func) { "." #func, (funcptr)&__sparc_dot_ ## func },
|
|
||||||
# if !defined(__OpenBSD__)
|
|
||||||
# define SYMFUNCDOT89(func) { "." #func, (funcptr)&func ## _sparcv89 },
|
|
||||||
# define DEFFUNCDOT(func) \
|
|
||||||
extern void __sparc_dot_ ## func (void) __asm__ ("." #func); \
|
|
||||||
extern void func ## _sparcv89 (void);
|
|
||||||
# else
|
|
||||||
# define SYMFUNCDOT(func) { "." #func, (funcptr)&__sparc_dot_ ## func },
|
|
||||||
# define DEFFUNCDOT(func) \
|
|
||||||
extern void __sparc_dot_ ## func (void) __asm__ ("." #func);
|
|
||||||
#endif
|
|
||||||
DEFFUNCDOT(rem)
|
|
||||||
DEFFUNCDOT(urem)
|
|
||||||
DEFFUNCDOT(mul)
|
|
||||||
DEFFUNCDOT(umul)
|
|
||||||
DEFFUNCDOT(div)
|
|
||||||
DEFFUNCDOT(udiv)
|
|
||||||
#ifdef linux
|
|
||||||
static LOOKUP SparcV89LookupTab[] = {
|
|
||||||
SYMFUNCDOT89(rem)
|
|
||||||
SYMFUNCDOT89(urem)
|
|
||||||
SYMFUNCDOT89(mul)
|
|
||||||
SYMFUNCDOT89(umul)
|
|
||||||
SYMFUNCDOT89(div)
|
|
||||||
SYMFUNCDOT89(udiv)
|
|
||||||
{0, 0}
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
static LOOKUP SparcLookupTab[] = {
|
|
||||||
SYMFUNCDOT(rem)
|
|
||||||
SYMFUNCDOT(urem)
|
|
||||||
SYMFUNCDOT(mul)
|
|
||||||
SYMFUNCDOT(umul)
|
|
||||||
SYMFUNCDOT(div)
|
|
||||||
SYMFUNCDOT(udiv)
|
|
||||||
{0, 0}
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef linux
|
|
||||||
#if defined(__GNUC__) && defined(__GLIBC__)
|
|
||||||
#define HWCAP_SPARC_MULDIV 8
|
|
||||||
extern unsigned long int _dl_hwcap;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int
|
|
||||||
sparcUseHWMulDiv(void)
|
|
||||||
{
|
|
||||||
FILE *f;
|
|
||||||
char buffer[1024];
|
|
||||||
char *p;
|
|
||||||
|
|
||||||
#if defined(__GNUC__) && defined(__GLIBC__)
|
|
||||||
unsigned long *hwcap;
|
|
||||||
|
|
||||||
__asm(".weak _dl_hwcap");
|
|
||||||
|
|
||||||
hwcap = &_dl_hwcap;
|
|
||||||
__asm("": "=r"(hwcap):"0"(hwcap));
|
|
||||||
if (hwcap) {
|
|
||||||
if (*hwcap & HWCAP_SPARC_MULDIV)
|
|
||||||
return 1;
|
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
f = fopen("/proc/cpuinfo", "r");
|
|
||||||
if (!f)
|
|
||||||
return 0;
|
|
||||||
while (fgets(buffer, 1024, f) != NULL) {
|
|
||||||
if (!strncmp(buffer, "type", 4)) {
|
|
||||||
p = strstr(buffer, "sun4");
|
|
||||||
if (p && (p[4] == 'u' || p[4] == 'd')) {
|
|
||||||
fclose(f);
|
|
||||||
return 1;
|
|
||||||
} else if (p && p[4] == 'm') {
|
|
||||||
fclose(f);
|
|
||||||
f = fopen("/proc/cpuinfo","r");
|
|
||||||
if (!f) return 0;
|
|
||||||
while (fgets(buffer, 1024, f) != NULL) {
|
|
||||||
if (!strncmp (buffer, "MMU type", 8)) {
|
|
||||||
p = strstr (buffer, "Cypress");
|
|
||||||
if (p) {
|
|
||||||
fclose(f);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fclose(f);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fclose(f);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* modules are used to identify compilation units (ie object modules).
|
* modules are used to identify compilation units (ie object modules).
|
||||||
|
@ -220,22 +97,6 @@ sparcUseHWMulDiv(void)
|
||||||
*/
|
*/
|
||||||
static int moduleseq = 0;
|
static int moduleseq = 0;
|
||||||
|
|
||||||
/*
|
|
||||||
* GDB Interface
|
|
||||||
* =============
|
|
||||||
*
|
|
||||||
* Linked list of loaded modules - gdb will traverse this to determine
|
|
||||||
* whether it needs to add the symbols for the loaded module.
|
|
||||||
*/
|
|
||||||
LDRModulePtr ModList = 0;
|
|
||||||
|
|
||||||
/* Flag which gdb sets to let us know we're being debugged */
|
|
||||||
char DebuggerPresent = 0;
|
|
||||||
|
|
||||||
/* List of common symbols */
|
|
||||||
LDRCommonPtr ldrCommons;
|
|
||||||
int nCommons;
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int num;
|
int num;
|
||||||
const char **list;
|
const char **list;
|
||||||
|
@ -253,29 +114,8 @@ static symlist reqList = { 0, NULL };
|
||||||
static int fatalReqSym = 0;
|
static int fatalReqSym = 0;
|
||||||
|
|
||||||
/* Prototypes for static functions. */
|
/* Prototypes for static functions. */
|
||||||
static int _GetModuleType(int, long);
|
|
||||||
static loaderPtr _LoaderListPush(void);
|
static loaderPtr _LoaderListPush(void);
|
||||||
static loaderPtr _LoaderListPop(int);
|
static loaderPtr _LoaderListPop(int);
|
||||||
/*ARGSUSED*/ static char *
|
|
||||||
ARCHIVEAddressToSection(void *modptr, unsigned long address)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Array containing entry points for different formats.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static loader_funcs funcs[] = {
|
|
||||||
/* LD_ELFDLOBJECT */
|
|
||||||
{DLLoadModule,
|
|
||||||
DLResolveSymbols,
|
|
||||||
DLCheckForUnresolved,
|
|
||||||
ARCHIVEAddressToSection,
|
|
||||||
DLUnloadModule},
|
|
||||||
};
|
|
||||||
|
|
||||||
int numloaders = sizeof(funcs) / sizeof(loader_funcs);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
LoaderInit(void)
|
LoaderInit(void)
|
||||||
|
@ -287,20 +127,10 @@ LoaderInit(void)
|
||||||
xf86Msg(X_ERROR, "LD_BIND_NOW is set, dlloader will NOT work!\n");
|
xf86Msg(X_ERROR, "LD_BIND_NOW is set, dlloader will NOT work!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
LoaderAddSymbols(-1, -1, miLookupTab);
|
xf86MsgVerb(X_INFO, 2, "Loader magic: %p\n", (void *)
|
||||||
LoaderAddSymbols(-1, -1, xfree86LookupTab);
|
((long)dixLookupTab ^ (long)extLookupTab
|
||||||
LoaderAddSymbols(-1, -1, dixLookupTab);
|
^ (long)fontLookupTab ^ (long)miLookupTab
|
||||||
LoaderAddSymbols(-1, -1, fontLookupTab);
|
^ (long)xfree86LookupTab));
|
||||||
LoaderAddSymbols(-1, -1, extLookupTab);
|
|
||||||
#if defined(__sparc__) && !defined(__FreeBSD__)
|
|
||||||
#ifdef linux
|
|
||||||
if (sparcUseHWMulDiv())
|
|
||||||
LoaderAddSymbols(-1, -1, SparcV89LookupTab);
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
LoaderAddSymbols(-1, -1, SparcLookupTab);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
xf86MsgVerb(X_INFO, 2, "Module ABI versions:\n");
|
xf86MsgVerb(X_INFO, 2, "Module ABI versions:\n");
|
||||||
xf86ErrorFVerb(2, "\t%s: %d.%d\n", ABI_CLASS_ANSIC,
|
xf86ErrorFVerb(2, "\t%s: %d.%d\n", ABI_CLASS_ANSIC,
|
||||||
GET_ABI_MAJOR(LoaderVersionInfo.ansicVersion),
|
GET_ABI_MAJOR(LoaderVersionInfo.ansicVersion),
|
||||||
|
@ -322,16 +152,6 @@ LoaderInit(void)
|
||||||
if (osname)
|
if (osname)
|
||||||
xf86MsgVerb(X_INFO, 2, "Loader running on %s\n", osname);
|
xf86MsgVerb(X_INFO, 2, "Loader running on %s\n", osname);
|
||||||
|
|
||||||
#if defined(linux) && \
|
|
||||||
(defined(__alpha__) || defined(__powerpc__) || defined(__ia64__) \
|
|
||||||
|| ( defined __amd64__ && ! defined UseMMAP && ! defined DoMMAPedMerge))
|
|
||||||
/*
|
|
||||||
* The glibc malloc uses mmap for large allocations anyway. This breaks
|
|
||||||
* some relocation types because the offset overflow. See loader.h for more
|
|
||||||
* details. We need to turn off this behavior here.
|
|
||||||
*/
|
|
||||||
mallopt(M_MMAP_MAX, 0);
|
|
||||||
#endif
|
|
||||||
#if defined(__UNIXWARE__) && !defined(__GNUC__)
|
#if defined(__UNIXWARE__) && !defined(__GNUC__)
|
||||||
/* For UnixWare we need to load the C Runtime libraries which are
|
/* For UnixWare we need to load the C Runtime libraries which are
|
||||||
* normally auto-linked by the compiler. Otherwise we are bound to
|
* normally auto-linked by the compiler. Otherwise we are bound to
|
||||||
|
@ -354,25 +174,12 @@ LoaderInit(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Determine what type of object is being loaded.
|
|
||||||
* This function is responsible for restoring the offset.
|
|
||||||
* The fd and offset are used here so that when Archive processing
|
|
||||||
* is enabled, individual elements of an archive can be evaluated
|
|
||||||
* so the correct loader_funcs can be determined.
|
|
||||||
*/
|
|
||||||
static int
|
|
||||||
_GetModuleType(int fd, long offset)
|
|
||||||
{
|
|
||||||
return LD_ELFDLOBJECT;
|
|
||||||
}
|
|
||||||
|
|
||||||
static loaderPtr listHead = (loaderPtr) 0;
|
static loaderPtr listHead = (loaderPtr) 0;
|
||||||
|
|
||||||
static loaderPtr
|
static loaderPtr
|
||||||
_LoaderListPush()
|
_LoaderListPush()
|
||||||
{
|
{
|
||||||
loaderPtr item = xf86loadercalloc(1, sizeof(struct _loader));
|
loaderPtr item = calloc(1, sizeof(struct _loader));
|
||||||
|
|
||||||
item->next = listHead;
|
item->next = listHead;
|
||||||
listHead = item;
|
listHead = item;
|
||||||
|
@ -493,28 +300,6 @@ _LoaderModuleToName(int module)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* _LoaderAddressToSection() will return the name of the file & section
|
|
||||||
* that contains the given address.
|
|
||||||
*/
|
|
||||||
int
|
|
||||||
_LoaderAddressToSection(const unsigned long address, const char **module,
|
|
||||||
const char **section)
|
|
||||||
{
|
|
||||||
loaderPtr item = listHead;
|
|
||||||
|
|
||||||
while (item) {
|
|
||||||
if ((*section =
|
|
||||||
item->funcs->AddressToSection(item->private, address)) != NULL) {
|
|
||||||
*module = _LoaderModuleToName(item->module);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
item = item->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add a list of symbols to the referenced list.
|
* Add a list of symbols to the referenced list.
|
||||||
*/
|
*/
|
||||||
|
@ -676,22 +461,15 @@ _LoaderHandleUnresolved(char *symbol, char *module)
|
||||||
return (fatalsym);
|
return (fatalsym);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* Public Interface to the loader. */
|
||||||
* Relocation list manipulation routines
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Public Interface to the loader.
|
|
||||||
*/
|
|
||||||
|
|
||||||
int
|
int
|
||||||
LoaderOpen(const char *module, const char *cname, int handle,
|
LoaderOpen(const char *module, const char *cname, int handle,
|
||||||
int *errmaj, int *errmin, int *wasLoaded, int flags)
|
int *errmaj, int *errmin, int *wasLoaded, int flags)
|
||||||
{
|
{
|
||||||
loaderPtr tmp;
|
loaderPtr tmp;
|
||||||
int new_handle, modtype;
|
int new_handle;
|
||||||
int fd;
|
int fd;
|
||||||
LOOKUP *pLookup;
|
|
||||||
|
|
||||||
#if defined(DEBUG)
|
#if defined(DEBUG)
|
||||||
ErrorF("LoaderOpen(%s)\n", module);
|
ErrorF("LoaderOpen(%s)\n", module);
|
||||||
|
@ -757,26 +535,15 @@ LoaderOpen(const char *module, const char *cname, int handle,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((modtype = _GetModuleType(fd, 0)) < 0) {
|
|
||||||
xf86Msg(X_ERROR, "%s is an unrecognized module type\n", module);
|
|
||||||
freeHandles[new_handle] = HANDLE_FREE;
|
|
||||||
if (errmaj)
|
|
||||||
*errmaj = LDR_UNKTYPE;
|
|
||||||
if (errmin)
|
|
||||||
*errmin = LDR_UNKTYPE;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
tmp = _LoaderListPush();
|
tmp = _LoaderListPush();
|
||||||
tmp->name = xf86loadermalloc(strlen(module) + 1);
|
tmp->name = malloc(strlen(module) + 1);
|
||||||
strcpy(tmp->name, module);
|
strcpy(tmp->name, module);
|
||||||
tmp->cname = xf86loadermalloc(strlen(cname) + 1);
|
tmp->cname = malloc(strlen(cname) + 1);
|
||||||
strcpy(tmp->cname, cname);
|
strcpy(tmp->cname, cname);
|
||||||
tmp->handle = new_handle;
|
tmp->handle = new_handle;
|
||||||
tmp->module = moduleseq++;
|
tmp->module = moduleseq++;
|
||||||
tmp->funcs = &funcs[modtype];
|
|
||||||
|
|
||||||
if ((tmp->private = funcs[modtype].LoadModule(tmp, fd, &pLookup, flags)) == NULL) {
|
if ((tmp->private = DLLoadModule(tmp, fd, flags)) == NULL) {
|
||||||
xf86Msg(X_ERROR, "Failed to load %s\n", module);
|
xf86Msg(X_ERROR, "Failed to load %s\n", module);
|
||||||
_LoaderListPop(new_handle);
|
_LoaderListPop(new_handle);
|
||||||
freeHandles[new_handle] = HANDLE_FREE;
|
freeHandles[new_handle] = HANDLE_FREE;
|
||||||
|
@ -787,11 +554,6 @@ LoaderOpen(const char *module, const char *cname, int handle,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tmp->private != (void *)-1L) {
|
|
||||||
LoaderAddSymbols(new_handle, tmp->module, pLookup);
|
|
||||||
xf86loaderfree(pLookup);
|
|
||||||
}
|
|
||||||
|
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
return new_handle;
|
return new_handle;
|
||||||
|
@ -813,50 +575,13 @@ LoaderHandleOpen(int handle)
|
||||||
_X_EXPORT void *
|
_X_EXPORT void *
|
||||||
LoaderSymbol(const char *sym)
|
LoaderSymbol(const char *sym)
|
||||||
{
|
{
|
||||||
int i;
|
return (DLFindSymbol(sym));
|
||||||
itemPtr item = NULL;
|
|
||||||
|
|
||||||
for (i = 0; i < numloaders; i++)
|
|
||||||
funcs[i].ResolveSymbols(&funcs[i]);
|
|
||||||
|
|
||||||
item = (itemPtr) LoaderHashFind(sym);
|
|
||||||
|
|
||||||
if (item)
|
|
||||||
return item->address;
|
|
||||||
else
|
|
||||||
return (DLFindSymbol(sym));
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
LoaderResolveSymbols(void)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < numloaders; i++)
|
|
||||||
funcs[i].ResolveSymbols(&funcs[i]);
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_X_EXPORT int
|
_X_EXPORT int
|
||||||
LoaderCheckUnresolved(int delay_flag)
|
LoaderCheckUnresolved(int delay_flag)
|
||||||
{
|
{
|
||||||
int i, ret = 0;
|
int ret = 0;
|
||||||
LoaderResolveOptions delayFlag = (LoaderResolveOptions)delay_flag;
|
|
||||||
|
|
||||||
LoaderResolveSymbols();
|
|
||||||
|
|
||||||
if (delayFlag == LD_RESOLV_NOW) {
|
|
||||||
if (check_unresolved_sema > 0)
|
|
||||||
check_unresolved_sema--;
|
|
||||||
else
|
|
||||||
xf86Msg(X_WARNING, "LoaderCheckUnresolved: not enough "
|
|
||||||
"MAGIC_DONT_CHECK_UNRESOLVED\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!check_unresolved_sema || delayFlag == LD_RESOLV_FORCE)
|
|
||||||
for (i = 0; i < numloaders; i++)
|
|
||||||
if (funcs[i].CheckForUnresolved(&funcs[i]))
|
|
||||||
ret = 1;
|
|
||||||
|
|
||||||
if (fatalReqSym)
|
if (fatalReqSym)
|
||||||
FatalError("Some required symbols were unresolved\n");
|
FatalError("Some required symbols were unresolved\n");
|
||||||
|
@ -864,24 +589,6 @@ LoaderCheckUnresolved(int delay_flag)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void xf86LoaderTrap(void);
|
|
||||||
|
|
||||||
void
|
|
||||||
xf86LoaderTrap(void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
_X_EXPORT void
|
|
||||||
LoaderDefaultFunc(void)
|
|
||||||
{
|
|
||||||
ErrorF("\n\n\tThis should not happen!\n"
|
|
||||||
"\tAn unresolved function was called!\n");
|
|
||||||
|
|
||||||
xf86LoaderTrap();
|
|
||||||
|
|
||||||
FatalError("\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
LoaderUnload(int handle)
|
LoaderUnload(int handle)
|
||||||
{
|
{
|
||||||
|
@ -905,10 +612,10 @@ LoaderUnload(int handle)
|
||||||
/* It is not a member of an archive */
|
/* It is not a member of an archive */
|
||||||
xf86Msg(X_INFO, "Unloading %s\n", tmp->name);
|
xf86Msg(X_INFO, "Unloading %s\n", tmp->name);
|
||||||
}
|
}
|
||||||
tmp->funcs->LoaderUnload(tmp->private);
|
DLUnloadModule(tmp->private);
|
||||||
xf86loaderfree(tmp->name);
|
free(tmp->name);
|
||||||
xf86loaderfree(tmp->cname);
|
free(tmp->cname);
|
||||||
xf86loaderfree(tmp);
|
free(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
freeHandles[handle] = HANDLE_FREE;
|
freeHandles[handle] = HANDLE_FREE;
|
||||||
|
@ -925,12 +632,6 @@ LoaderDuplicateSymbol(const char *symbol, const int handle)
|
||||||
FatalError("Module load failure\n");
|
FatalError("Module load failure\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* GDB Sync function */
|
|
||||||
void
|
|
||||||
_loader_debug_state()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned long LoaderOptions = 0;
|
unsigned long LoaderOptions = 0;
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loader.h,v 1.28 2003/11/06 18:38:14 tsi Exp $ */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
|
||||||
* Copyright 1995-1998 by Metro Link, Inc.
|
* Copyright 1995-1998 by Metro Link, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
* Permission to use, copy, modify, distribute, and sell this software and its
|
||||||
|
@ -56,134 +53,19 @@
|
||||||
#ifndef _LOADER_H
|
#ifndef _LOADER_H
|
||||||
#define _LOADER_H
|
#define _LOADER_H
|
||||||
|
|
||||||
#include "sym.h"
|
|
||||||
|
|
||||||
#if defined(Lynx) && defined(sun)
|
#if defined(Lynx) && defined(sun)
|
||||||
#define const /**/
|
#define const /**/
|
||||||
#endif
|
#endif
|
||||||
#if (defined(__i386__) || defined(__ix86)) && !defined(i386)
|
|
||||||
#define i386
|
|
||||||
#endif
|
|
||||||
#include <X11/Xosdefs.h>
|
#include <X11/Xosdefs.h>
|
||||||
#include <X11/Xfuncproto.h>
|
#include <X11/Xfuncproto.h>
|
||||||
#include <X11/Xmd.h>
|
#include <X11/Xmd.h>
|
||||||
/* For LOOKUP definition */
|
|
||||||
#include "sym.h"
|
|
||||||
#define LD_UNKNOWN -1
|
|
||||||
#define LD_ELFDLOBJECT 0
|
|
||||||
#define LD_PROCESSED_ARCHIVE -1
|
|
||||||
/* #define UNINIT_SECTION */
|
|
||||||
#define HANDLE_IN_HASH_ENTRY
|
|
||||||
|
|
||||||
/* LoadModule proc flags; LD_FLAG_GLOBAL adds symbols to global
|
/* LoadModule proc flags; LD_FLAG_GLOBAL adds symbols to global
|
||||||
* namespace, default is to keep symbols local to module. */
|
* namespace, default is to keep symbols local to module. */
|
||||||
#define LD_FLAG_GLOBAL 1
|
#define LD_FLAG_GLOBAL 1
|
||||||
|
|
||||||
#define TestFree(a) if (a) { xfree (a); a = NULL; }
|
|
||||||
#define HASHDIV 10
|
|
||||||
#define HASHSIZE (1<<HASHDIV)
|
|
||||||
|
|
||||||
typedef struct _loader_item *itemPtr;
|
|
||||||
typedef struct _loader_item {
|
|
||||||
char *name;
|
|
||||||
void *address;
|
|
||||||
itemPtr next;
|
|
||||||
int handle;
|
|
||||||
int module;
|
|
||||||
itemPtr exports;
|
|
||||||
#if defined(__powerpc__)
|
|
||||||
/*
|
|
||||||
* PowerPC file formats require special routines in some circumstances
|
|
||||||
* to assist in the linking process. See the specific loader for
|
|
||||||
* more details.
|
|
||||||
*/
|
|
||||||
union {
|
|
||||||
unsigned short plt[8]; /* ELF */
|
|
||||||
} code;
|
|
||||||
#endif
|
|
||||||
} itemRec;
|
|
||||||
|
|
||||||
/* The following structures provide an interface to GDB (note that GDB
|
|
||||||
has copies of the definitions - if you change anything here make
|
|
||||||
sure that the changes are also made to GDB */
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
char *name; /* Name of this symbol */
|
|
||||||
unsigned int namelen; /* Name of this module */
|
|
||||||
void *addr; /* Start address of the .text section */
|
|
||||||
} LDRCommon, *LDRCommonPtr;
|
|
||||||
|
|
||||||
typedef struct x_LDRModuleRec {
|
|
||||||
unsigned int version; /* Version of this struct */
|
|
||||||
char *name; /* Name of this module */
|
|
||||||
unsigned int namelen; /* Length of name */
|
|
||||||
void *text; /* Start address of the .text section */
|
|
||||||
void *data; /* Start address of the .data section */
|
|
||||||
void *rodata; /* Start address of the .rodata section */
|
|
||||||
void *bss; /* Start address of the .bss section */
|
|
||||||
LDRCommonPtr commons; /* List of commmon symbols */
|
|
||||||
int commonslen; /* Number of common symbols */
|
|
||||||
struct x_LDRModuleRec *next; /* Next module record in chain */
|
|
||||||
} LDRModuleRec, *LDRModulePtr;
|
|
||||||
|
|
||||||
extern char DebuggerPresent;
|
|
||||||
extern LDRModulePtr ModList;
|
|
||||||
extern LDRCommonPtr ldrCommons;
|
|
||||||
extern int nCommons;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The loader uses loader specific alloc/calloc/free functions that
|
|
||||||
* are mapped to either to the regular Xserver functions, or in a couple
|
|
||||||
* of special cases, mapped to the C library functions.
|
|
||||||
*/
|
|
||||||
#if !defined(PowerMAX_OS) && !(defined(linux) && (defined(__alpha__) || defined(__powerpc__) || defined(__ia64__))) && 0
|
|
||||||
#define xf86loadermalloc(size) xalloc(size)
|
|
||||||
#define xf86loaderrealloc(ptr,size) xrealloc(ptr,size)
|
|
||||||
#define xf86loadercalloc(num,size) xcalloc(num,size)
|
|
||||||
#define xf86loaderfree(ptr) xfree(ptr)
|
|
||||||
#define xf86loaderstrdup(ptr) xstrdup(ptr)
|
|
||||||
#else
|
|
||||||
/*
|
|
||||||
* On Some OSes, xalloc() et al uses mmap to allocate space for large
|
|
||||||
* allocation. This has the effect of placing the text section of some
|
|
||||||
* modules very far away from the rest which are placed on the heap.
|
|
||||||
* Certain relocations are limited in the size of the offsets that can be
|
|
||||||
* handled, and this seperation causes these relocation to overflow. This
|
|
||||||
* is fixed by just using the C library allocation functions for the loader
|
|
||||||
* to ensure that all text sections are located on the heap. OSes that have
|
|
||||||
* this problem are:
|
|
||||||
* PowerMAX_OS/PPC
|
|
||||||
* Linux/Alpha
|
|
||||||
* Linux/PPC
|
|
||||||
* Linux/IA-64
|
|
||||||
*/
|
|
||||||
#define xf86loadermalloc(size) malloc(size)
|
|
||||||
#define xf86loaderrealloc(ptr,size) realloc(ptr,size)
|
|
||||||
#define xf86loadercalloc(num,size) calloc(num,size)
|
|
||||||
#define xf86loaderfree(ptr) free(ptr)
|
|
||||||
#define xf86loaderstrdup(ptr) strdup(ptr)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct _loader *loaderPtr;
|
typedef struct _loader *loaderPtr;
|
||||||
|
|
||||||
/*
|
|
||||||
* _loader_funcs hold the entry points for a module format.
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef void *(*LoadModuleProcPtr) (loaderPtr modrec, int fd, LOOKUP **, int flags);
|
|
||||||
typedef void (*ResolveSymbolsProcPtr) (void *);
|
|
||||||
typedef int (*CheckForUnresolvedProcPtr) (void *);
|
|
||||||
typedef char *(*AddressToSectionProcPtr) (void *, unsigned long);
|
|
||||||
typedef void (*LoaderUnloadProcPtr) (void *);
|
|
||||||
|
|
||||||
typedef struct _loader_funcs {
|
|
||||||
LoadModuleProcPtr LoadModule;
|
|
||||||
ResolveSymbolsProcPtr ResolveSymbols;
|
|
||||||
CheckForUnresolvedProcPtr CheckForUnresolved;
|
|
||||||
AddressToSectionProcPtr AddressToSection;
|
|
||||||
LoaderUnloadProcPtr LoaderUnload;
|
|
||||||
} loader_funcs;
|
|
||||||
|
|
||||||
/* Each module loaded has a loaderRec */
|
/* Each module loaded has a loaderRec */
|
||||||
typedef struct _loader {
|
typedef struct _loader {
|
||||||
int handle; /* Unique id used to remove symbols from
|
int handle; /* Unique id used to remove symbols from
|
||||||
|
@ -192,7 +74,6 @@ typedef struct _loader {
|
||||||
char *name;
|
char *name;
|
||||||
char *cname;
|
char *cname;
|
||||||
void *private; /* format specific data */
|
void *private; /* format specific data */
|
||||||
loader_funcs *funcs; /* funcs for operating on this module */
|
|
||||||
loaderPtr next;
|
loaderPtr next;
|
||||||
} loaderRec;
|
} loaderRec;
|
||||||
|
|
||||||
|
@ -205,47 +86,22 @@ typedef struct {
|
||||||
int extensionVersion;
|
int extensionVersion;
|
||||||
int fontVersion;
|
int fontVersion;
|
||||||
} ModuleVersions;
|
} ModuleVersions;
|
||||||
extern ModuleVersions LoaderVersionInfo;
|
extern const ModuleVersions LoaderVersionInfo;
|
||||||
|
|
||||||
extern unsigned long LoaderOptions;
|
extern unsigned long LoaderOptions;
|
||||||
|
|
||||||
/* Internal Functions */
|
/* Internal Functions */
|
||||||
|
|
||||||
void LoaderAddSymbols(int, int, LOOKUP *);
|
|
||||||
void LoaderDefaultFunc(void);
|
|
||||||
void LoaderDuplicateSymbol(const char *, const int);
|
void LoaderDuplicateSymbol(const char *, const int);
|
||||||
|
|
||||||
#if 0
|
|
||||||
void LoaderFixups(void);
|
|
||||||
#endif
|
|
||||||
void LoaderResolve(void);
|
|
||||||
int LoaderResolveSymbols(void);
|
|
||||||
int _LoaderHandleUnresolved(char *, char *);
|
int _LoaderHandleUnresolved(char *, char *);
|
||||||
void LoaderHashAdd(itemPtr);
|
|
||||||
itemPtr LoaderHashDelete(const char *);
|
|
||||||
itemPtr LoaderHashFind(const char *);
|
|
||||||
void LoaderHashTraverse(void *, int (*)(void *, itemPtr));
|
|
||||||
void LoaderPrintAddress(const char *);
|
|
||||||
void LoaderPrintItem(itemPtr);
|
|
||||||
void LoaderPrintSymbol(unsigned long);
|
|
||||||
void LoaderDumpSymbols(void);
|
|
||||||
char *_LoaderModuleToName(int);
|
char *_LoaderModuleToName(int);
|
||||||
int _LoaderAddressToSection(const unsigned long, const char **,
|
|
||||||
const char **);
|
|
||||||
int LoaderOpen(const char *, const char *, int, int *, int *, int *, int);
|
int LoaderOpen(const char *, const char *, int, int *, int *, int *, int);
|
||||||
int LoaderHandleOpen(int);
|
int LoaderHandleOpen(int);
|
||||||
|
|
||||||
/*
|
/* object to name lookup routines */
|
||||||
* object to name lookup routines
|
|
||||||
*/
|
|
||||||
char *_LoaderHandleToName(int handle);
|
char *_LoaderHandleToName(int handle);
|
||||||
char *_LoaderHandleToCanonicalName(int handle);
|
char *_LoaderHandleToCanonicalName(int handle);
|
||||||
|
|
||||||
/*
|
/* Loader backends. */
|
||||||
* Entry points for the different loader types
|
|
||||||
*/
|
|
||||||
#include "dlloader.h"
|
#include "dlloader.h"
|
||||||
|
|
||||||
extern void _loader_debug_state(void);
|
|
||||||
|
|
||||||
#endif /* _LOADER_H */
|
#endif /* _LOADER_H */
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loaderProcs.h,v 1.21 2003/10/15 16:29:04 dawes Exp $ */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
|
||||||
* Copyright 1995-1998 by Metro Link, Inc.
|
* Copyright 1995-1998 by Metro Link, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
* Permission to use, copy, modify, distribute, and sell this software and its
|
||||||
|
@ -79,9 +76,7 @@ typedef struct module_desc {
|
||||||
const XF86ModuleVersionInfo *VersionInfo;
|
const XF86ModuleVersionInfo *VersionInfo;
|
||||||
} ModuleDesc, *ModuleDescPtr;
|
} ModuleDesc, *ModuleDescPtr;
|
||||||
|
|
||||||
/*
|
/* External API for the loader */
|
||||||
* Extenal API for the loader
|
|
||||||
*/
|
|
||||||
|
|
||||||
void LoaderInit(void);
|
void LoaderInit(void);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loadext.c,v 1.8 2003/10/15 16:29:04 dawes Exp $ */
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000 by The XFree86 Project, Inc.
|
* Copyright (c) 2000 by The XFree86 Project, Inc.
|
||||||
*
|
*
|
||||||
|
@ -37,6 +36,10 @@
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "xf86.h"
|
#include "xf86.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This should be static, but miinitext wants it. FIXME: make extension
|
||||||
|
* initialization not completely terrible.
|
||||||
|
*/
|
||||||
ExtensionModule *ExtensionModuleList = NULL;
|
ExtensionModule *ExtensionModuleList = NULL;
|
||||||
static int numExtensionModules = 0;
|
static int numExtensionModules = 0;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loadfont.c,v 1.4 2003/10/15 16:29:04 dawes Exp $ */
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998 by The XFree86 Project, Inc.
|
* Copyright (c) 1998 by The XFree86 Project, Inc.
|
||||||
*
|
*
|
||||||
|
@ -37,6 +36,7 @@
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "xf86.h"
|
#include "xf86.h"
|
||||||
|
|
||||||
|
/* XXX this should be static, but xorgcfg needs it, nngh */
|
||||||
FontModule *FontModuleList = NULL;
|
FontModule *FontModuleList = NULL;
|
||||||
static int numFontModules = 0;
|
static int numFontModules = 0;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loadmod.c,v 1.73 2003/11/03 05:11:51 tsi Exp $ */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
|
||||||
* Copyright 1995-1998 by Metro Link, Inc.
|
* Copyright 1995-1998 by Metro Link, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
* Permission to use, copy, modify, distribute, and sell this software and its
|
||||||
|
@ -73,7 +70,7 @@
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
extern int check_unresolved_sema;
|
#define TestFree(a) if (a) { xfree (a); a = NULL; }
|
||||||
|
|
||||||
typedef struct _pattern {
|
typedef struct _pattern {
|
||||||
const char *pattern;
|
const char *pattern;
|
||||||
|
@ -93,7 +90,7 @@ static ModuleDescPtr doLoadModule(const char *, const char *, const char **,
|
||||||
const XF86ModReqInfo *, int *, int *,
|
const XF86ModReqInfo *, int *, int *,
|
||||||
int flags);
|
int flags);
|
||||||
|
|
||||||
ModuleVersions LoaderVersionInfo = {
|
const ModuleVersions LoaderVersionInfo = {
|
||||||
XORG_VERSION_CURRENT,
|
XORG_VERSION_CURRENT,
|
||||||
ABI_ANSIC_VERSION,
|
ABI_ANSIC_VERSION,
|
||||||
ABI_VIDEODRV_VERSION,
|
ABI_VIDEODRV_VERSION,
|
||||||
|
@ -102,17 +99,6 @@ ModuleVersions LoaderVersionInfo = {
|
||||||
ABI_FONT_VERSION
|
ABI_FONT_VERSION
|
||||||
};
|
};
|
||||||
|
|
||||||
#if 0
|
|
||||||
void
|
|
||||||
LoaderFixups(void)
|
|
||||||
{
|
|
||||||
/* Need to call LRS here because the frame buffers get loaded last,
|
|
||||||
* and the drivers depend on them. */
|
|
||||||
|
|
||||||
LoaderResolveSymbols();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
FreeStringList(char **paths)
|
FreeStringList(char **paths)
|
||||||
{
|
{
|
||||||
|
@ -225,15 +211,15 @@ static const char *stdSubdirs[] = {
|
||||||
/*
|
/*
|
||||||
* Standard set of module name patterns to check, in order of preference
|
* Standard set of module name patterns to check, in order of preference
|
||||||
* These are regular expressions (suitable for use with POSIX regex(3)).
|
* These are regular expressions (suitable for use with POSIX regex(3)).
|
||||||
|
*
|
||||||
|
* This list assumes that you're an ELFish platform and therefore your
|
||||||
|
* shared libraries are named something.so. If we're ever nuts enough
|
||||||
|
* to port this DDX to, say, Darwin, we'll need to fix this.
|
||||||
*/
|
*/
|
||||||
static PatternRec stdPatterns[] = {
|
static PatternRec stdPatterns[] = {
|
||||||
{"^lib(.*)\\.so$",},
|
{"^lib(.*)\\.so$",},
|
||||||
{"^lib(.*)\\.a$",},
|
|
||||||
{"(.*)_drv\\.so$",},
|
{"(.*)_drv\\.so$",},
|
||||||
{"(.*)_drv\\.o$",},
|
|
||||||
{"(.*)\\.so$",},
|
{"(.*)\\.so$",},
|
||||||
{"(.*)\\.a$",},
|
|
||||||
{"(.*)\\.o$",},
|
|
||||||
{NULL,}
|
{NULL,}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -432,7 +418,6 @@ FindModule(const char *module, const char *dir, const char **subdirlist,
|
||||||
continue;
|
continue;
|
||||||
strcpy(buf, dirpath);
|
strcpy(buf, dirpath);
|
||||||
strcat(buf, *s);
|
strcat(buf, *s);
|
||||||
/*xf86Msg(X_INFO,"OS2DIAG: FindModule: buf=%s\n",buf); */
|
|
||||||
if ((stat(buf, &stat_buf) == 0) && S_ISDIR(stat_buf.st_mode)) {
|
if ((stat(buf, &stat_buf) == 0) && S_ISDIR(stat_buf.st_mode)) {
|
||||||
if (buf[dirlen - 1] != '/') {
|
if (buf[dirlen - 1] != '/') {
|
||||||
buf[dirlen++] = '/';
|
buf[dirlen++] = '/';
|
||||||
|
@ -728,19 +713,11 @@ CheckVersion(const char *module, XF86ModuleVersionInfo * data,
|
||||||
/* XXX Maybe this should be the other way around? */
|
/* XXX Maybe this should be the other way around? */
|
||||||
if (min > reqmin) {
|
if (min > reqmin) {
|
||||||
xf86MsgVerb(X_WARNING, 2, "module ABI minor version (%d) "
|
xf86MsgVerb(X_WARNING, 2, "module ABI minor version (%d) "
|
||||||
"is new than that available (%d)\n", min, reqmin);
|
"is newer than that available (%d)\n", min, reqmin);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef NOTYET
|
|
||||||
if (data->checksum) {
|
|
||||||
/* verify the checksum field */
|
|
||||||
/* TO BE DONE */
|
|
||||||
} else {
|
|
||||||
ErrorF("\t*** Checksum field is 0 - this module is untrusted!\n");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -867,7 +844,6 @@ doLoadModule(const char *module, const char *path, const char **subdirlist,
|
||||||
int noncanonical = 0;
|
int noncanonical = 0;
|
||||||
char *m = NULL;
|
char *m = NULL;
|
||||||
|
|
||||||
/*xf86Msg(X_INFO,"OS2DIAG: LoadModule: %s\n",module); */
|
|
||||||
xf86MsgVerb(X_INFO, 3, "LoadModule: \"%s\"", module);
|
xf86MsgVerb(X_INFO, 3, "LoadModule: \"%s\"", module);
|
||||||
|
|
||||||
patterns = InitPatterns(patternlist);
|
patterns = InitPatterns(patternlist);
|
||||||
|
@ -1306,7 +1282,7 @@ LoaderErrorMsg(const char *name, const char *modname, int errmaj, int errmin)
|
||||||
msg = "module-specific error";
|
msg = "module-specific error";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
msg = "uknown error";
|
msg = "unknown error";
|
||||||
}
|
}
|
||||||
if (name)
|
if (name)
|
||||||
xf86Msg(type, "%s: Failed to load module \"%s\" (%s, %d)\n",
|
xf86Msg(type, "%s: Failed to load module \"%s\" (%s, %d)\n",
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
/* $XdotOrg: xserver/xorg/hw/xfree86/loader/misym.c,v 1.9 2005/10/18 04:02:31 aplattner Exp $ */
|
|
||||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/misym.c,v 1.38 2003/10/15 16:29:04 dawes Exp $ */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Copyright 1995,96 by Metro Link, Inc.
|
* Copyright 1995,96 by Metro Link, Inc.
|
||||||
|
@ -23,7 +20,6 @@
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
|
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
|
||||||
*
|
*
|
||||||
|
@ -87,7 +83,7 @@
|
||||||
|
|
||||||
extern miPointerSpriteFuncRec miSpritePointerFuncs;
|
extern miPointerSpriteFuncRec miSpritePointerFuncs;
|
||||||
|
|
||||||
LOOKUP miLookupTab[] = {
|
_X_HIDDEN void *miLookupTab[] = {
|
||||||
SYMFUNC(miClearToBackground)
|
SYMFUNC(miClearToBackground)
|
||||||
SYMFUNC(miSendGraphicsExpose)
|
SYMFUNC(miSendGraphicsExpose)
|
||||||
SYMFUNC(miModifyPixmapHeader)
|
SYMFUNC(miModifyPixmapHeader)
|
||||||
|
@ -220,6 +216,4 @@ LOOKUP miLookupTab[] = {
|
||||||
#ifdef DAMAGE
|
#ifdef DAMAGE
|
||||||
SYMFUNC(DamageDamageRegion)
|
SYMFUNC(DamageDamageRegion)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
{0, 0}
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/os.c,v 1.4 2003/10/15 16:29:04 dawes Exp $ */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999-2002 by The XFree86 Project, Inc.
|
* Copyright (c) 1999-2002 by The XFree86 Project, Inc.
|
||||||
*
|
*
|
||||||
|
@ -35,9 +33,11 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* OSNAME is a standard form of the OS name that may be used by the
|
* OSNAME is a standard form of the OS name that may be used by the
|
||||||
* loader and by OS-specific modules.
|
* loader and by OS-specific modules. OSNAME here is different from what's in
|
||||||
|
* dix-config.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#undef OSNAME
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
#define OSNAME "linux"
|
#define OSNAME "linux"
|
||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__)
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/sym.h,v 1.6 2000/10/24 00:06:55 anderson Exp $ */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
|
||||||
* Copyright 1995,96 by Metro Link, Inc.
|
* Copyright 1995,96 by Metro Link, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
* Permission to use, copy, modify, distribute, and sell this software and its
|
||||||
|
@ -30,21 +27,15 @@
|
||||||
#ifndef _SYM_H
|
#ifndef _SYM_H
|
||||||
#define _SYM_H
|
#define _SYM_H
|
||||||
|
|
||||||
/*
|
extern void *dixLookupTab[];
|
||||||
* This structure is used to pass in symbol information that is being
|
extern void *extLookupTab[];
|
||||||
* added to the symbol table.
|
extern void *fontLookupTab[];
|
||||||
*/
|
extern void *miLookupTab[];
|
||||||
|
extern void *xfree86LookupTab[];
|
||||||
|
|
||||||
typedef void (*funcptr) (void);
|
#define SYMFUNC( func ) &func,
|
||||||
|
#define SYMFUNCALIAS( name, func ) &func,
|
||||||
typedef struct {
|
#define SYMVAR( var ) &var,
|
||||||
char *symName;
|
#define SYMVARALIAS( name, var ) &var,
|
||||||
funcptr offset;
|
|
||||||
} LOOKUP;
|
|
||||||
|
|
||||||
#define SYMFUNC( func ) { #func, (funcptr)&func },
|
|
||||||
#define SYMFUNCALIAS( name, func ) { name, (funcptr)&func },
|
|
||||||
#define SYMVAR( var ) { #var, (funcptr)&var },
|
|
||||||
#define SYMVARALIAS( name, var ) { name, (funcptr)&var },
|
|
||||||
|
|
||||||
#endif /* _SYM_H */
|
#endif /* _SYM_H */
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/xf86sym.c,v 1.242 2003/10/27 20:51:16 herrb Exp $ */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
|
||||||
* Copyright 1995,96 by Metro Link, Inc.
|
* Copyright 1995,96 by Metro Link, Inc.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
* Permission to use, copy, modify, distribute, and sell this software and its
|
||||||
|
@ -241,7 +238,7 @@ extern unsigned short ldw_brx(volatile unsigned char *, int);
|
||||||
|
|
||||||
/* XFree86 things */
|
/* XFree86 things */
|
||||||
|
|
||||||
LOOKUP xfree86LookupTab[] = {
|
_X_HIDDEN void *xfree86LookupTab[] = {
|
||||||
|
|
||||||
/* Public OSlib functions */
|
/* Public OSlib functions */
|
||||||
SYMFUNC(xf86ReadBIOS)
|
SYMFUNC(xf86ReadBIOS)
|
||||||
|
@ -746,7 +743,6 @@ LOOKUP xfree86LookupTab[] = {
|
||||||
SYMFUNC(xf86ReadPciBIOS)
|
SYMFUNC(xf86ReadPciBIOS)
|
||||||
|
|
||||||
/* Loader functions */
|
/* Loader functions */
|
||||||
SYMFUNC(LoaderDefaultFunc)
|
|
||||||
SYMFUNC(LoadSubModule)
|
SYMFUNC(LoadSubModule)
|
||||||
SYMFUNC(DuplicateModule)
|
SYMFUNC(DuplicateModule)
|
||||||
SYMFUNC(LoaderErrorMsg)
|
SYMFUNC(LoaderErrorMsg)
|
||||||
|
@ -1178,6 +1174,4 @@ LOOKUP xfree86LookupTab[] = {
|
||||||
|
|
||||||
/* Pci.c */
|
/* Pci.c */
|
||||||
SYMVAR(pciNumBuses)
|
SYMVAR(pciNumBuses)
|
||||||
|
|
||||||
{0, 0}
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -1270,7 +1270,10 @@ xf86execl(const char *pathname, const char *arg, ...)
|
||||||
#ifndef SELF_CONTAINED_WRAPPER
|
#ifndef SELF_CONTAINED_WRAPPER
|
||||||
xf86DisableIO();
|
xf86DisableIO();
|
||||||
#endif
|
#endif
|
||||||
setuid(getuid());
|
if (setuid(getuid()) == -1) {
|
||||||
|
ErrorF("xf86Execl: setuid() failed: %s\n", strerror(errno));
|
||||||
|
exit(255);
|
||||||
|
}
|
||||||
#if !defined(SELF_CONTAINED_WRAPPER)
|
#if !defined(SELF_CONTAINED_WRAPPER)
|
||||||
/* set stdin, stdout to the consoleFD, and leave stderr alone */
|
/* set stdin, stdout to the consoleFD, and leave stderr alone */
|
||||||
for (i = 0; i < 2; i++)
|
for (i = 0; i < 2; i++)
|
||||||
|
|
|
@ -1,40 +1,28 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# $XFree86$
|
|
||||||
# This is a shell archive (produced by GNU sharutils 4.2c).
|
|
||||||
# To extract the files from this archive, save it to some FILE, remove
|
|
||||||
# everything before the `!/bin/sh' line above, then type `sh FILE'.
|
|
||||||
#
|
#
|
||||||
# Made on 2002-10-04 13:41 MDT by <root@abcyxhiz>.
|
# This is a shell archive. Save it in a file, remove anything before
|
||||||
# Source directory was `/archives'.
|
# this line, and then unpack it by entering "sh file". Note, it may
|
||||||
|
# create directories; files and directories will be owned by you and
|
||||||
|
# have default permissions.
|
||||||
|
# Made on Sun Jun 25 20:24:59 CEST 2006 by Martin Bochnig at martux.org
|
||||||
#
|
#
|
||||||
# Existing files will *not* be overwritten unless `-c' is specified.
|
# This archive contains:
|
||||||
# This format requires very little intelligence at unshar time.
|
|
||||||
# "if test", "echo", "mkdir", and "sed" may be needed.
|
|
||||||
#
|
#
|
||||||
# This shar contains:
|
# ./aperture
|
||||||
# length mode name
|
#
|
||||||
# ------ ---------- ------------------------------------------
|
# ./aperture/Makefile
|
||||||
# 1521 -rw-r--r-- aperture/Makefile
|
# ./aperture/Makefile.amd64
|
||||||
# 1659 -rw-r--r-- aperture/README
|
# ./aperture/Makefile.sparcv9
|
||||||
# 7557 -rw-r--r-- aperture/aperture.c
|
# ./aperture/README
|
||||||
# 450 -rw-r--r-- aperture/aperture.conf
|
# ./aperture/aperture.c
|
||||||
# 87 -rw-r--r-- aperture/devlink.tab
|
# ./aperture/aperture.conf
|
||||||
# 1062 -rw-r--r-- aperture/Makefile.sun4u
|
# ./aperture/devlink.tab
|
||||||
#
|
#
|
||||||
echo=echo
|
echo c - ./aperture
|
||||||
shar_tty= shar_n= shar_c='
|
mkdir -p ./aperture > /dev/null 2>&1
|
||||||
'
|
#
|
||||||
mkdir _sh09806 || ( echo 'failed to create locking directory' '_sh09806'; exit 1 )
|
echo x - ./aperture/Makefile
|
||||||
# ============= aperture/Makefile ==============
|
sed 's/^X//' >./aperture/Makefile << 'END-of-./aperture/Makefile'
|
||||||
if test ! -d 'aperture'; then
|
|
||||||
$echo $echo_n 'x -' 'aperture: '$echo_c
|
|
||||||
if mkdir 'aperture'; then $echo 'created'; else $echo 'failed to create'; fi
|
|
||||||
fi
|
|
||||||
if test -f 'aperture/Makefile' && test "$first_param" != -c; then
|
|
||||||
$echo 'x -' SKIPPING 'aperture/Makefile' '(file already exists)'
|
|
||||||
else
|
|
||||||
$echo 'x -' extracting 'aperture/Makefile' '(text)'
|
|
||||||
sed 's/^X//' << 'SHAR_EOF' > 'aperture/Makefile' &&
|
|
||||||
X#
|
X#
|
||||||
X# File: makefile for aperture Framebuffer Driver
|
X# File: makefile for aperture Framebuffer Driver
|
||||||
X# Author: Doug Anson (danson@lgc.com)
|
X# Author: Doug Anson (danson@lgc.com)
|
||||||
|
@ -46,14 +34,22 @@ X# Modified: Marc Aurele La France (tsi@xfree86.org)
|
||||||
X# Date: 2001.06.08
|
X# Date: 2001.06.08
|
||||||
X# - SPARC support, cleanup and turf aptest.
|
X# - SPARC support, cleanup and turf aptest.
|
||||||
X#
|
X#
|
||||||
X# >>NOTE<< Have a look at Makefile.sun4u for sun4u specifics.
|
X# >>NOTE<< Have a look at Makefile.sparcv9 for specifics.
|
||||||
|
X#
|
||||||
|
X# Modified: Martin Bochnig (martin@martux.org)
|
||||||
|
X# Date: 2006.06.24
|
||||||
|
X# - Slightly modified to also build on Solaris 10 and 11.
|
||||||
|
X# - amd64 64 bit kernel support
|
||||||
|
X# - cosmetical changes to also support sun4v, not only sun4u
|
||||||
|
X#
|
||||||
|
X# >>NOTE<< Have a look at Makefile.amd64 for amd64 specifics.
|
||||||
X#
|
X#
|
||||||
X# GNU gcc compiler
|
X# GNU gcc compiler
|
||||||
XCC=gcc
|
XCC=gcc
|
||||||
XCFLGS=-fno-builtin -Wall -O3
|
XCFLGS=-fno-builtin -Wall -O3
|
||||||
X
|
X
|
||||||
X#
|
X#
|
||||||
X# Proworks compiler
|
X# SUNWspro compiler
|
||||||
X#CC=/opt/SUNWspro/bin/cc
|
X#CC=/opt/SUNWspro/bin/cc
|
||||||
X#CFLGS=-Xa -xnolib -xO3
|
X#CFLGS=-Xa -xnolib -xO3
|
||||||
X
|
X
|
||||||
|
@ -75,26 +71,26 @@ X# Make rules
|
||||||
Xall: $(DRIVER)
|
Xall: $(DRIVER)
|
||||||
X
|
X
|
||||||
X$(DRIVER): $(OBJS)
|
X$(DRIVER): $(OBJS)
|
||||||
X @if [ -f "Makefile.`uname -m`" ]; then \
|
X @if [ -f "Makefile.`isainfo -k`" ]; then \
|
||||||
X make -f Makefile.`uname -m` $(DRIVER); \
|
X make -f Makefile.`isainfo -k` $(DRIVER); \
|
||||||
X else \
|
X else \
|
||||||
X rm -f $(DRIVER); \
|
X rm -f $(DRIVER); \
|
||||||
X ld -r -o $(DRIVER) $(OBJS); \
|
X ld -r -o $(DRIVER) $(OBJS); \
|
||||||
X fi
|
X fi
|
||||||
X
|
X
|
||||||
Xinstall: $(DRIVER)
|
Xinstall: $(DRIVER)
|
||||||
X @if [ -f "Makefile.`uname -m`" ]; then \
|
X @if [ -f "Makefile.`isainfo -k`" ]; then \
|
||||||
X make -f Makefile.`uname -m` install; \
|
X make -f Makefile.`isainfo -k` install; \
|
||||||
X else \
|
X else \
|
||||||
X cp aperture.conf /kernel/drv; \
|
X cp aperture.conf /kernel/drv; \
|
||||||
X cp $(DRIVER) /kernel/drv; \
|
X cp $(DRIVER) /kernel/drv; \
|
||||||
X fi
|
X fi
|
||||||
X
|
X
|
||||||
Xadd_drv:
|
Xadd_drv:
|
||||||
X @if [ -f "Makefile.`uname -m`" ]; then \
|
X @if [ -f "Makefile.`isainfo -k`" ]; then \
|
||||||
X make -f Makefile.`uname -m` add_drv; \
|
X make -f Makefile.`isainfo -k` add_drv; \
|
||||||
X else \
|
X else \
|
||||||
X add_drv /kernel/drv/aperture; \
|
X add_drv aperture; \
|
||||||
X fi
|
X fi
|
||||||
X
|
X
|
||||||
Xclean:
|
Xclean:
|
||||||
|
@ -106,29 +102,156 @@ X.c.i:
|
||||||
X $(CC) -E $(CFLAGS) $*.c > $@
|
X $(CC) -E $(CFLAGS) $*.c > $@
|
||||||
X
|
X
|
||||||
X.c.o:
|
X.c.o:
|
||||||
X @if [ -f "Makefile.`uname -m`" ]; then \
|
X @if [ -f "Makefile.`isainfo -k`" ]; then \
|
||||||
X make -f Makefile.`uname -m` $@; \
|
X make -f Makefile.`isainfo -k` $@; \
|
||||||
X else \
|
X else \
|
||||||
X rm -f $@; \
|
X rm -f $@; \
|
||||||
X $(CC) -c $(CFLAGS) $*.c -o $@; \
|
X $(CC) -c $(CFLAGS) $*.c -o $@; \
|
||||||
X fi
|
X fi
|
||||||
SHAR_EOF
|
END-of-./aperture/Makefile
|
||||||
: || $echo 'restore of' 'aperture/Makefile' 'failed'
|
echo x - ./aperture/Makefile.amd64
|
||||||
fi
|
sed 's/^X//' >./aperture/Makefile.amd64 << 'END-of-./aperture/Makefile.amd64'
|
||||||
# ============= aperture/README ==============
|
X#
|
||||||
if test -f 'aperture/README' && test "$first_param" != -c; then
|
X# File: Makefile for aperture Framebuffer Driver
|
||||||
$echo 'x -' SKIPPING 'aperture/README' '(file already exists)'
|
X# Author: Doug Anson (danson@lgc.com)
|
||||||
else
|
X# Date: 2/15/94
|
||||||
$echo 'x -' extracting 'aperture/README' '(text)'
|
X# Modified: David Holland (davidh@use.com)
|
||||||
sed 's/^X//' << 'SHAR_EOF' > 'aperture/README' &&
|
X# Date: 2/23/94
|
||||||
XFramebuffer apperture driver.
|
X# - Changed name, and debugging structure
|
||||||
|
X# Modified: Marc Aurele La France (tsi@xfree86.org)
|
||||||
|
X# Date: 2001.06.08
|
||||||
|
X# - SPARC support, cleanup and turf aptest.
|
||||||
|
X# Modified: Martin Bochnig (martin@martux.org)
|
||||||
|
X# - amd64 64 bit kernel support, cosmetics and also
|
||||||
|
X# supporting sun4v (and arbitrary sparcv9) platforms
|
||||||
|
X# as well as SunOS 5.10 or higher now
|
||||||
|
X# - Changed name
|
||||||
|
X#
|
||||||
|
X
|
||||||
|
X#
|
||||||
|
X# GNU gcc compiler, version 3.2 or later
|
||||||
|
X#
|
||||||
|
XCC=gcc
|
||||||
|
XCFLGS=-fno-builtin -Wall -O3 -m64 -mcmodel=kernel
|
||||||
|
X
|
||||||
|
X#
|
||||||
|
X# SUNWspro compiler (untested, might not properly work for amd64 here)
|
||||||
|
X#CC=/opt/SUNWspro/bin/cc
|
||||||
|
X#CFLGS=-Xa -xarch=v9 -xnolib -xO3
|
||||||
|
X
|
||||||
|
X#
|
||||||
|
X# Debug error reporting
|
||||||
|
X#DEBUG_FLG=
|
||||||
|
X#DEBUG_FLG=-DAPERTURE_DEBUG
|
||||||
|
X
|
||||||
|
X#
|
||||||
|
X# Files and object declarations
|
||||||
|
XKERNEL_FLGS=-D_KERNEL -DSUNDDI
|
||||||
|
XCFLAGS= $(CFLGS) $(KERNEL_FLGS) $(DEBUG_FLG)
|
||||||
|
XCFILES= aperture.c
|
||||||
|
XOBJS= aperture.o
|
||||||
|
XDRIVER= aperture
|
||||||
|
X
|
||||||
|
X#
|
||||||
|
X# Make rules
|
||||||
|
Xall: $(DRIVER)
|
||||||
|
X
|
||||||
|
X$(DRIVER): $(OBJS)
|
||||||
|
X rm -f $(DRIVER)
|
||||||
|
X ld -r -o $(DRIVER) $(OBJS)
|
||||||
|
X
|
||||||
|
Xinstall: $(DRIVER)
|
||||||
|
X cp aperture.conf /kernel/drv
|
||||||
|
X cp $(DRIVER) /kernel/drv/amd64
|
||||||
|
X
|
||||||
|
Xadd_drv:
|
||||||
|
X add_drv aperture
|
||||||
|
X
|
||||||
|
Xclean:
|
||||||
|
X rm -f *% *.BAK $(OBJS) $(DRIVER) core
|
||||||
|
X
|
||||||
|
X.SUFFIXES: .i
|
||||||
|
X
|
||||||
|
X.c.i:
|
||||||
|
X $(CC) -E $(CFLAGS) $*.c > $@
|
||||||
|
END-of-./aperture/Makefile.amd64
|
||||||
|
echo x - ./aperture/Makefile.sparcv9
|
||||||
|
sed 's/^X//' >./aperture/Makefile.sparcv9 << 'END-of-./aperture/Makefile.sparcv9'
|
||||||
|
X#
|
||||||
|
X# File: makefile for aperture Framebuffer Driver
|
||||||
|
X# Author: Doug Anson (danson@lgc.com)
|
||||||
|
X# Date: 2/15/94
|
||||||
|
X# Modified: David Holland (davidh@use.com)
|
||||||
|
X# Date: 2/23/94
|
||||||
|
X# - Changed name, and debugging structure
|
||||||
|
X# Modified: Marc Aurele La France (tsi@xfree86.org)
|
||||||
|
X# Date: 2001.06.08
|
||||||
|
X# - SPARC support, cleanup and turf aptest.
|
||||||
|
X# Modified: Martin Bochnig (martin@martux.org)
|
||||||
|
X# Date: 2006.06.24
|
||||||
|
X# - Changed name for generic sparcv9 support
|
||||||
|
X# - updated to better work with Solaris 10 and 11
|
||||||
|
X#
|
||||||
|
X
|
||||||
|
X#
|
||||||
|
X# GNU gcc compiler, version 3.2 or later
|
||||||
|
X#
|
||||||
|
XCC=gcc
|
||||||
|
XCFLGS=-fno-builtin -Wall -O3 -m64
|
||||||
|
X
|
||||||
|
X#
|
||||||
|
X# SUNWspro compiler
|
||||||
|
X#CC=/opt/SUNWspro/bin/cc
|
||||||
|
X#CFLGS=-Xa -xarch=v9 -xnolib -xO3
|
||||||
|
X
|
||||||
|
X#
|
||||||
|
X# Debug error reporting
|
||||||
|
X#DEBUG_FLG=
|
||||||
|
X#DEBUG_FLG=-DAPERTURE_DEBUG
|
||||||
|
X
|
||||||
|
X#
|
||||||
|
X# Files and object declarations
|
||||||
|
XKERNEL_FLGS=-D_KERNEL -DSUNDDI
|
||||||
|
XCFLAGS= $(CFLGS) $(KERNEL_FLGS) $(DEBUG_FLG)
|
||||||
|
XCFILES= aperture.c
|
||||||
|
XOBJS= aperture.o
|
||||||
|
XDRIVER= aperture
|
||||||
|
X
|
||||||
|
X#
|
||||||
|
X# Make rules
|
||||||
|
Xall: $(DRIVER)
|
||||||
|
X
|
||||||
|
X$(DRIVER): $(OBJS)
|
||||||
|
X rm -f $(DRIVER)
|
||||||
|
X ld -r -o $(DRIVER) $(OBJS)
|
||||||
|
X
|
||||||
|
Xinstall: $(DRIVER)
|
||||||
|
X cp aperture.conf /kernel/drv
|
||||||
|
X cp $(DRIVER) /kernel/drv/sparcv9
|
||||||
|
X
|
||||||
|
Xadd_drv:
|
||||||
|
X add_drv aperture
|
||||||
|
X
|
||||||
|
Xclean:
|
||||||
|
X rm -f *% *.BAK $(OBJS) $(DRIVER) core
|
||||||
|
X
|
||||||
|
X.SUFFIXES: .i
|
||||||
|
X
|
||||||
|
X.c.i:
|
||||||
|
X $(CC) -E $(CFLAGS) $*.c > $@
|
||||||
|
END-of-./aperture/Makefile.sparcv9
|
||||||
|
echo x - ./aperture/README
|
||||||
|
sed 's/^X//' >./aperture/README << 'END-of-./aperture/README'
|
||||||
|
XFramebuffer aperture driver.
|
||||||
X
|
X
|
||||||
XThis driver was written to provide a device that, unlike /dev/mem, allows
|
XThis driver was written to provide a device that, unlike /dev/mem, allows
|
||||||
Xmmap()'ing of ranges beyond installed memory.
|
Xmmap()'ing of ranges beyond installed memory.
|
||||||
X
|
X
|
||||||
XThe original x86-based version of this driver was the corroborative work of
|
XThe original x86-based version of this driver was the collaborative work of
|
||||||
XDoug Anson (danson@lgc.com), and David Holland (davidh@use.com). It has since
|
XDoug Anson (danson@lgc.com), and David Holland (davidh@use.com). It has since
|
||||||
Xbeen rewritten to also work on sun4u machines.
|
Xbeen rewritten to also work on sparc machines and - later on - also on sparcv9
|
||||||
|
Xand recently amd64 64 bit kernels.
|
||||||
|
XIt flawlessly compiles and installs on Solaris 10 and 11 now.
|
||||||
X
|
X
|
||||||
X
|
X
|
||||||
XInstallation instructions:
|
XInstallation instructions:
|
||||||
|
@ -137,23 +260,23 @@ X1) Check the Makefile, for appropriate CC, and CFLAGS definitions. Compiling
|
||||||
X with APERTURE_DEBUG defined means the driver will generate reams of
|
X with APERTURE_DEBUG defined means the driver will generate reams of
|
||||||
X debugging output. You'll probably want to leave this off...
|
X debugging output. You'll probably want to leave this off...
|
||||||
X
|
X
|
||||||
X2) type 'make'. The driver and test program should compile with out any
|
X2) Type 'make' (or 'gmake'). Both the driver and test program should compile
|
||||||
X problems. There also should not be any warning messages.
|
X without any problems. No warning messages should be generated.
|
||||||
X
|
X
|
||||||
X3) Become 'root'.
|
X3) Become 'root'.
|
||||||
X
|
X
|
||||||
X4) type 'make install' and 'make add_drv'. The screen should look something
|
X4) Type 'make install' and 'make add_drv'. The screen should look something
|
||||||
X like this:
|
X like this:
|
||||||
X
|
X
|
||||||
X # make install
|
X # make install
|
||||||
X cp aperture aperture.conf /kernel/drv
|
X cp aperture aperture.conf /kernel/drv
|
||||||
X # make add_drv
|
X # make add_drv
|
||||||
X add_drv /kernel/drv/aperture
|
X add_drv aperture
|
||||||
X
|
X
|
||||||
X On a sun4u machine this will mention the /kernel/drv/sparcv9 directory
|
X On a sparcv9 machine this will mention the /kernel/drv/sparcv9 directory
|
||||||
X instead of /kernel/drv.
|
X instead of /kernel/drv. Similarily /kernel/drv/amd64 should be used on amd64.
|
||||||
X
|
X
|
||||||
X This installs the driver in the system.
|
X This installs the driver to the system.
|
||||||
X
|
X
|
||||||
X5) While as root modify the file /etc/devlink.tab, adding these lines:
|
X5) While as root modify the file /etc/devlink.tab, adding these lines:
|
||||||
X
|
X
|
||||||
|
@ -163,7 +286,7 @@ X
|
||||||
X Add that line exactly as shown. You may also simply add the
|
X Add that line exactly as shown. You may also simply add the
|
||||||
X contents of the devlink.tab file supplied to /etc/devlink.tab.
|
X contents of the devlink.tab file supplied to /etc/devlink.tab.
|
||||||
X It contains the lines as well. (Yes, that is a tab between
|
X It contains the lines as well. (Yes, that is a tab between
|
||||||
X aperture, and fbs, not spaces - very important)
|
X aperture and fbs, not spaces - very important)
|
||||||
X
|
X
|
||||||
X6) Perform a reconfiguration boot of the system.
|
X6) Perform a reconfiguration boot of the system.
|
||||||
X
|
X
|
||||||
|
@ -171,15 +294,9 @@ X # touch /reconfigure
|
||||||
X # init 6
|
X # init 6
|
||||||
X
|
X
|
||||||
XBug reports, questions, suggestions, etc can be sent to xfree86@xfree86.org.
|
XBug reports, questions, suggestions, etc can be sent to xfree86@xfree86.org.
|
||||||
SHAR_EOF
|
END-of-./aperture/README
|
||||||
: || $echo 'restore of' 'aperture/README' 'failed'
|
echo x - ./aperture/aperture.c
|
||||||
fi
|
sed 's/^X//' >./aperture/aperture.c << 'END-of-./aperture/aperture.c'
|
||||||
# ============= aperture/aperture.c ==============
|
|
||||||
if test -f 'aperture/aperture.c' && test "$first_param" != -c; then
|
|
||||||
$echo 'x -' SKIPPING 'aperture/aperture.c' '(file already exists)'
|
|
||||||
else
|
|
||||||
$echo 'x -' extracting 'aperture/aperture.c' '(text)'
|
|
||||||
sed 's/^X//' << 'SHAR_EOF' > 'aperture/aperture.c' &&
|
|
||||||
X/*
|
X/*
|
||||||
X * Copyright (C) 2001 The XFree86 Project, Inc. All Rights Reserved.
|
X * Copyright (C) 2001 The XFree86 Project, Inc. All Rights Reserved.
|
||||||
X *
|
X *
|
||||||
|
@ -210,6 +327,13 @@ X/*
|
||||||
X * Aperture driver for Solaris.
|
X * Aperture driver for Solaris.
|
||||||
X */
|
X */
|
||||||
X
|
X
|
||||||
|
X/*
|
||||||
|
X * Modified: Martin Bochnig (martin@martux.org)
|
||||||
|
X * Log: Commented out obsolete kernel interfaces DDI_IDENTIFIED and DDI_NOT_IDENTIFIED
|
||||||
|
X * not supported by SunOS 5.10 or higher anymore,
|
||||||
|
X * see http://docs.sun.com/app/docs/doc/819-2255/6n4ibnffr?a=view
|
||||||
|
X */
|
||||||
|
X
|
||||||
X#include <sys/conf.h>
|
X#include <sys/conf.h>
|
||||||
X#include <sys/ddi.h>
|
X#include <sys/ddi.h>
|
||||||
X#include <sys/modctl.h>
|
X#include <sys/modctl.h>
|
||||||
|
@ -412,9 +536,9 @@ X
|
||||||
X#endif
|
X#endif
|
||||||
X
|
X
|
||||||
X if (strcmp(ddi_get_name(dip), DEV_IDENT))
|
X if (strcmp(ddi_get_name(dip), DEV_IDENT))
|
||||||
X error = DDI_NOT_IDENTIFIED;
|
X error = 1 /* DDI_NOT_IDENTIFIED obsolete since SunOS 5.10 */ ;
|
||||||
X else
|
X else
|
||||||
X error = DDI_IDENTIFIED;
|
X error = 2 /* DDI_IDENTIFIED obsolete since SunOS 5.10 */ ;
|
||||||
X
|
X
|
||||||
X#ifdef APERTURE_DEBUG
|
X#ifdef APERTURE_DEBUG
|
||||||
X
|
X
|
||||||
|
@ -465,7 +589,7 @@ X else
|
||||||
X {
|
X {
|
||||||
X error = ddi_create_minor_node(dip, ddi_get_name(dip), S_IFCHR,
|
X error = ddi_create_minor_node(dip, ddi_get_name(dip), S_IFCHR,
|
||||||
X (minor_t)ddi_get_instance(dip),
|
X (minor_t)ddi_get_instance(dip),
|
||||||
X NULL, NODESPECIFIC_DEV);
|
X NULL, 0 /* NODESPECIFIC_DEV obsolete since SunOS 5.10 */ );
|
||||||
X
|
X
|
||||||
X if (error == DDI_SUCCESS)
|
X if (error == DDI_SUCCESS)
|
||||||
X {
|
X {
|
||||||
|
@ -653,15 +777,9 @@ X#endif
|
||||||
X
|
X
|
||||||
X return error;
|
X return error;
|
||||||
X}
|
X}
|
||||||
SHAR_EOF
|
END-of-./aperture/aperture.c
|
||||||
: || $echo 'restore of' 'aperture/aperture.c' 'failed'
|
echo x - ./aperture/aperture.conf
|
||||||
fi
|
sed 's/^X//' >./aperture/aperture.conf << 'END-of-./aperture/aperture.conf'
|
||||||
# ============= aperture/aperture.conf ==============
|
|
||||||
if test -f 'aperture/aperture.conf' && test "$first_param" != -c; then
|
|
||||||
$echo 'x -' SKIPPING 'aperture/aperture.conf' '(file already exists)'
|
|
||||||
else
|
|
||||||
$echo 'x -' extracting 'aperture/aperture.conf' '(text)'
|
|
||||||
sed 's/^X//' << 'SHAR_EOF' > 'aperture/aperture.conf' &&
|
|
||||||
X#
|
X#
|
||||||
X# Copyright 1994 Doug Anson, danson@lgc.com & David Holland, davidh@use.com
|
X# Copyright 1994 Doug Anson, danson@lgc.com & David Holland, davidh@use.com
|
||||||
X#
|
X#
|
||||||
|
@ -678,91 +796,11 @@ X#
|
||||||
X# Purpose: This conf file is used by the aperture driver.
|
X# Purpose: This conf file is used by the aperture driver.
|
||||||
X#
|
X#
|
||||||
Xname="aperture" parent="pseudo";
|
Xname="aperture" parent="pseudo";
|
||||||
SHAR_EOF
|
END-of-./aperture/aperture.conf
|
||||||
: || $echo 'restore of' 'aperture/aperture.conf' 'failed'
|
echo x - ./aperture/devlink.tab
|
||||||
fi
|
sed 's/^X//' >./aperture/devlink.tab << 'END-of-./aperture/devlink.tab'
|
||||||
# ============= aperture/devlink.tab ==============
|
|
||||||
if test -f 'aperture/devlink.tab' && test "$first_param" != -c; then
|
|
||||||
$echo 'x -' SKIPPING 'aperture/devlink.tab' '(file already exists)'
|
|
||||||
else
|
|
||||||
$echo 'x -' extracting 'aperture/devlink.tab' '(text)'
|
|
||||||
sed 's/^X//' << 'SHAR_EOF' > 'aperture/devlink.tab' &&
|
|
||||||
X# The following entry is for the aperture driver
|
X# The following entry is for the aperture driver
|
||||||
Xtype=ddi_pseudo;name=aperture fbs/\M0
|
Xtype=ddi_pseudo;name=aperture fbs/\M0
|
||||||
SHAR_EOF
|
END-of-./aperture/devlink.tab
|
||||||
: || $echo 'restore of' 'aperture/devlink.tab' 'failed'
|
exit
|
||||||
fi
|
|
||||||
# ============= aperture/Makefile.sun4u ==============
|
|
||||||
if test -f 'aperture/Makefile.sun4u' && test "$first_param" != -c; then
|
|
||||||
$echo 'x -' SKIPPING 'aperture/Makefile.sun4u' '(file already exists)'
|
|
||||||
else
|
|
||||||
$echo 'x -' extracting 'aperture/Makefile.sun4u' '(text)'
|
|
||||||
sed 's/^X//' << 'SHAR_EOF' > 'aperture/Makefile.sun4u' &&
|
|
||||||
X#
|
|
||||||
X# File: makefile for aperture Framebuffer Driver
|
|
||||||
X# Author: Doug Anson (danson@lgc.com)
|
|
||||||
X# Date: 2/15/94
|
|
||||||
X# Modified: David Holland (davidh@use.com)
|
|
||||||
X# Date: 2/23/94
|
|
||||||
X# - Changed name, and debugging structure
|
|
||||||
X# Modified: Marc Aurele La France (tsi@xfree86.org)
|
|
||||||
X# Date: 2001.06.08
|
|
||||||
X# - SPARC support, cleanup and turf aptest.
|
|
||||||
X#
|
|
||||||
X
|
|
||||||
X#
|
|
||||||
X# GNU gcc compiler, version 3.2 or later
|
|
||||||
X#
|
|
||||||
XCC=gcc
|
|
||||||
XCFLGS=-fno-builtin -Wall -O3 -m64
|
|
||||||
X
|
|
||||||
X#
|
|
||||||
X# Proworks compiler
|
|
||||||
X#CC=/opt/SUNWspro/bin/cc
|
|
||||||
X#CFLGS=-Xa -xarch=v9 -xnolib -xO3
|
|
||||||
X
|
|
||||||
X#
|
|
||||||
X# Debug error reporting
|
|
||||||
X#DEBUG_FLG=
|
|
||||||
X#DEBUG_FLG=-DAPERTURE_DEBUG
|
|
||||||
X
|
|
||||||
X#
|
|
||||||
X# Files and object declarations
|
|
||||||
XKERNEL_FLGS=-D_KERNEL -DSUNDDI
|
|
||||||
XCFLAGS= $(CFLGS) $(KERNEL_FLGS) $(DEBUG_FLG)
|
|
||||||
XCFILES= aperture.c
|
|
||||||
XOBJS= aperture.o
|
|
||||||
XDRIVER= aperture
|
|
||||||
X
|
|
||||||
X#
|
|
||||||
X# Make rules
|
|
||||||
Xall: $(DRIVER)
|
|
||||||
X
|
|
||||||
X$(DRIVER): $(OBJS)
|
|
||||||
X rm -f $(DRIVER)
|
|
||||||
X ld -r -o $(DRIVER) $(OBJS)
|
|
||||||
X
|
|
||||||
Xinstall: $(DRIVER)
|
|
||||||
X cp aperture.conf /kernel/drv
|
|
||||||
X cp $(DRIVER) /kernel/drv/sparcv9
|
|
||||||
X
|
|
||||||
Xadd_drv:
|
|
||||||
X add_drv /kernel/drv/sparcv9/aperture
|
|
||||||
X
|
|
||||||
Xclean:
|
|
||||||
X rm -f *% *.BAK $(OBJS) $(DRIVER) core
|
|
||||||
X
|
|
||||||
X.SUFFIXES: .i
|
|
||||||
X
|
|
||||||
X.c.i:
|
|
||||||
X $(CC) -E $(CFLAGS) $*.c > $@
|
|
||||||
SHAR_EOF
|
|
||||||
: || $echo 'restore of' 'aperture/Makefile.sun4u' 'failed'
|
|
||||||
fi
|
|
||||||
$echo $shar_n 'x -' 'lock directory' "\`_sh09806': " $shar_c
|
|
||||||
if rm -fr _sh09806; then
|
|
||||||
$echo 'removed'
|
|
||||||
else
|
|
||||||
$echo 'failed to remove'
|
|
||||||
fi
|
|
||||||
exit 0
|
|
||||||
|
|
|
@ -170,7 +170,10 @@ xf86writeConfigFile (const char *filename, XF86ConfigPtr cptr)
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
return 0;
|
return 0;
|
||||||
case 0: /* child */
|
case 0: /* child */
|
||||||
setuid(getuid());
|
if (setuid(getuid() == -1)
|
||||||
|
FatalError("xf86writeConfigFile(): "
|
||||||
|
"setuid failed(%s)\n",
|
||||||
|
strerror(errno));
|
||||||
ret = doWriteConfigFile(filename, cptr);
|
ret = doWriteConfigFile(filename, cptr);
|
||||||
exit(ret);
|
exit(ret);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
module_LTLIBRARIES = librac.la
|
module_LIBRARIES = librac.a
|
||||||
librac_la_LDFLAGS = -avoid-version
|
librac_a_SOURCES = xf86RAC.c
|
||||||
librac_la_SOURCES = xf86RACmodule.c xf86RAC.c
|
|
||||||
|
|
||||||
sdk_HEADERS = xf86RAC.h
|
sdk_HEADERS = xf86RAC.h
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/rac/xf86RAC.c,v 1.5 1999/06/12 17:30:21 dawes Exp $ */
|
|
||||||
|
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
#ifdef HAVE_XORG_CONFIG_H
|
||||||
#include <xorg-config.h>
|
#include <xorg-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -243,12 +241,12 @@ static void RACCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor *color,
|
||||||
int nRect, xRectangle *rects);
|
int nRect, xRectangle *rects);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
GCFuncs RACGCFuncs = {
|
static GCFuncs RACGCFuncs = {
|
||||||
RACValidateGC, RACChangeGC, RACCopyGC, RACDestroyGC,
|
RACValidateGC, RACChangeGC, RACCopyGC, RACDestroyGC,
|
||||||
RACChangeClip, RACDestroyClip, RACCopyClip
|
RACChangeClip, RACDestroyClip, RACCopyClip
|
||||||
};
|
};
|
||||||
|
|
||||||
GCOps RACGCOps = {
|
static GCOps RACGCOps = {
|
||||||
RACFillSpans, RACSetSpans, RACPutImage, RACCopyArea,
|
RACFillSpans, RACSetSpans, RACPutImage, RACCopyArea,
|
||||||
RACCopyPlane, RACPolyPoint, RACPolylines, RACPolySegment,
|
RACCopyPlane, RACPolyPoint, RACPolylines, RACPolySegment,
|
||||||
RACPolyRectangle, RACPolyArc, RACFillPolygon, RACPolyFillRect,
|
RACPolyRectangle, RACPolyArc, RACFillPolygon, RACPolyFillRect,
|
||||||
|
@ -257,13 +255,13 @@ GCOps RACGCOps = {
|
||||||
{NULL} /* devPrivate */
|
{NULL} /* devPrivate */
|
||||||
};
|
};
|
||||||
|
|
||||||
miPointerSpriteFuncRec RACSpriteFuncs = {
|
static miPointerSpriteFuncRec RACSpriteFuncs = {
|
||||||
RACSpriteRealizeCursor, RACSpriteUnrealizeCursor, RACSpriteSetCursor,
|
RACSpriteRealizeCursor, RACSpriteUnrealizeCursor, RACSpriteSetCursor,
|
||||||
RACSpriteMoveCursor
|
RACSpriteMoveCursor
|
||||||
};
|
};
|
||||||
|
|
||||||
int RACScreenIndex = -1;
|
static int RACScreenIndex = -1;
|
||||||
int RACGCIndex = -1;
|
static int RACGCIndex = -1;
|
||||||
static unsigned long RACGeneration = 0;
|
static unsigned long RACGeneration = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
|
||||||
#include <xorg-config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "xf86Module.h"
|
|
||||||
|
|
||||||
static XF86ModuleVersionInfo racVersRec =
|
|
||||||
{
|
|
||||||
"rac",
|
|
||||||
MODULEVENDORSTRING,
|
|
||||||
MODINFOSTRING1,
|
|
||||||
MODINFOSTRING2,
|
|
||||||
XORG_VERSION_CURRENT,
|
|
||||||
1, 0, 0,
|
|
||||||
ABI_CLASS_VIDEODRV, /* requires the video driver ABI */
|
|
||||||
ABI_VIDEODRV_VERSION,
|
|
||||||
MOD_CLASS_NONE,
|
|
||||||
{0,0,0,0}
|
|
||||||
};
|
|
||||||
|
|
||||||
_X_EXPORT XF86ModuleData racModuleData = { &racVersRec, NULL, NULL };
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
gtf.1
|
||||||
|
gtf.1x
|
|
@ -0,0 +1,3 @@
|
||||||
|
pcitweak.1
|
||||||
|
pcitweak.1x
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
scanpci.1
|
||||||
|
scanpci.1x
|
|
@ -0,0 +1,2 @@
|
||||||
|
xorgcfg.1
|
||||||
|
xorgcfg.1x
|
|
@ -0,0 +1 @@
|
||||||
|
xorgconfig.1
|
|
@ -516,7 +516,10 @@ XAAComposite (CARD8 op,
|
||||||
(!pSrc->repeat || (xSrc >= 0 && ySrc >= 0 &&
|
(!pSrc->repeat || (xSrc >= 0 && ySrc >= 0 &&
|
||||||
xSrc+width<=pSrc->pDrawable->width &&
|
xSrc+width<=pSrc->pDrawable->width &&
|
||||||
ySrc+height<=pSrc->pDrawable->height)) &&
|
ySrc+height<=pSrc->pDrawable->height)) &&
|
||||||
((op == PictOpSrc && pSrc->format == pDst->format) ||
|
((op == PictOpSrc &&
|
||||||
|
((pSrc->format==pDst->format) ||
|
||||||
|
(pSrc->format==PICT_a8r8g8b8 && pDst->format==PICT_x8r8g8b8) ||
|
||||||
|
(pSrc->format==PICT_a8b8g8r8 && pDst->format==PICT_x8b8g8r8))) ||
|
||||||
(op == PictOpOver && !pSrc->alphaMap && !pDst->alphaMap &&
|
(op == PictOpOver && !pSrc->alphaMap && !pDst->alphaMap &&
|
||||||
pSrc->format==pDst->format &&
|
pSrc->format==pDst->format &&
|
||||||
(pSrc->format==PICT_x8r8g8b8 || pSrc->format==PICT_x8b8g8r8))))
|
(pSrc->format==PICT_x8r8g8b8 || pSrc->format==PICT_x8b8g8r8))))
|
||||||
|
|
|
@ -97,8 +97,8 @@ SOFTWARE.
|
||||||
*/
|
*/
|
||||||
static GCFuncs vgaGCFuncs = {
|
static GCFuncs vgaGCFuncs = {
|
||||||
xf4bppValidateGC,
|
xf4bppValidateGC,
|
||||||
(void (*)())NoopDDA,
|
(void (*)(GCPtr, unsigned long))NoopDDA,
|
||||||
(void (*)())NoopDDA,
|
(void (*)(GCPtr, unsigned long, GCPtr))NoopDDA,
|
||||||
xf4bppDestroyGC,
|
xf4bppDestroyGC,
|
||||||
xf4bppChangeClip,
|
xf4bppChangeClip,
|
||||||
xf4bppDestroyClip,
|
xf4bppDestroyClip,
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
Xnest.1
|
||||||
|
Xnest.1x
|
|
@ -41,6 +41,7 @@ copyright holders.
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
#ifdef HAVE_DIX_CONFIG_H
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include <X11/fonts/fontstruct.h>
|
||||||
|
|
||||||
#ifndef _XpDiPrint_H_
|
#ifndef _XpDiPrint_H_
|
||||||
#define _XpDiPrint_H_ 1
|
#define _XpDiPrint_H_ 1
|
||||||
|
@ -74,6 +75,10 @@ extern void PrinterInitGlobals(void);
|
||||||
|
|
||||||
extern void PrinterInitOutput(ScreenInfo *pScreenInfo, int argc, char **argv);
|
extern void PrinterInitOutput(ScreenInfo *pScreenInfo, int argc, char **argv);
|
||||||
|
|
||||||
|
extern Bool XpClientIsPrintClient(ClientPtr client, FontPathElementPtr fpe);
|
||||||
|
|
||||||
|
extern Bool XpClientIsBitmapClient(ClientPtr client);
|
||||||
|
|
||||||
extern void _XpVoidNoop(void);
|
extern void _XpVoidNoop(void);
|
||||||
|
|
||||||
extern Bool _XpBoolNoop(void);
|
extern Bool _XpBoolNoop(void);
|
|
@ -1,4 +1,4 @@
|
||||||
SUBDIRS = doc pcl pcl-mono raster ps etc
|
SUBDIRS = doc pcl pcl-mono raster ps etc config
|
||||||
|
|
||||||
bin_PROGRAMS = Xprt
|
bin_PROGRAMS = Xprt
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@ Xprt_CFLAGS = @SERVER_DEFINES@ @DIX_CFLAGS@ @XPRINT_CFLAGS@ \
|
||||||
|
|
||||||
Xprt_LDFLAGS = -L$(top_srcdir)
|
Xprt_LDFLAGS = -L$(top_srcdir)
|
||||||
Xprt_LDADD = @XPRINT_LIBS@ ps/libps.la raster/libraster.la \
|
Xprt_LDADD = @XPRINT_LIBS@ ps/libps.la raster/libraster.la \
|
||||||
pcl/libpcl.la pcl-mono/libpcl.la ../fb/libfb.la \
|
pcl/libpcl.la pcl-mono/libpcl.la ../../fb/libfb.la \
|
||||||
../render/librender.la ../mi/libmi.la ../Xext/libXext.la \
|
../../render/librender.la ../../mi/libmi.la ../../Xext/libXext.la \
|
||||||
@FREETYPE_LIBS@
|
@FREETYPE_LIBS@
|
||||||
|
|
||||||
miinitext-wrapper.c:
|
miinitext-wrapper.c:
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue