[PATCH mga] Nothing uses clientlx.c, so delete it.

Jeremy Huddleston jeremyhu at apple.com
Tue Sep 13 19:44:43 PDT 2011


Huzah for 920 lines deleted.  It compiles, ship it (seriously though, hopefully comeone can test this)!

Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>

On Sep 13, 2011, at 4:12 PM, Jamey Sharp wrote:

> As far as I can tell, none of this code has been used since the
> beginning of git history.
> 
> Signed-off-by: Jamey Sharp <jamey at minilop.net>
> Cc: Adam Jackson <ajax at redhat.com>
> Cc: Corbin Simpson <mostawesomedude at gmail.com>
> ---
> I don't have any mga hardware to test with, but I have compile-tested
> this patch. I'd appreciate review and testing before merge. Thanks!
> 
> src/Makefile.am |    1 -
> src/binding.h   |   31 --
> src/client.h    |   40 ---
> src/clientlx.c  |  848 -------------------------------------------------------
> 4 files changed, 0 insertions(+), 920 deletions(-)
> delete mode 100644 src/clientlx.c
> 
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 17211bb..44417de 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -32,7 +32,6 @@ mga_drv_la_LIBADD = $(noinst_LTLIBRARIES)
> mga_drv_la_SOURCES = \
>         binding.h \
>         client.h \
> -         clientlx.c \
>         mga_arc.c \
>         mga_bios.c \
>         mga_common.h \
> diff --git a/src/binding.h b/src/binding.h
> index 57e9b92..616aed7 100644
> --- a/src/binding.h
> +++ b/src/binding.h
> @@ -37,37 +37,6 @@ typedef char            CHAR;
> typedef unsigned char   UCHAR;
> typedef unsigned char   FAR*LPUCHAR;
> 
> -typedef struct TAGCLIENTTABLE{
> -    ULONG (DECL *ClientReadConfigSpaceByte       )(LPVOID , ULONG, LPVOID );        
> -    ULONG (DECL *ClientReadConfigSpaceDword      )(LPVOID , ULONG, LPVOID );        
> -    ULONG (DECL *ClientWriteConfigSpaceByte      )(LPVOID , ULONG, UCHAR);          
> -    ULONG (DECL *ClientWriteConfigSpaceDword     )(LPVOID , ULONG, ULONG);          
> -    ULONG (DECL *ClientOpenRegisterBase          )(LPVOID , ULONG, ULONG);          
> -    ULONG (DECL *ClientCloseRegisterBase         )(LPVOID );                        
> -    ULONG (DECL *ClientReadRegisterByte          )(LPVOID , ULONG, LPVOID );        
> -    ULONG (DECL *ClientReadRegisterDword         )(LPVOID , ULONG, LPVOID );        
> -    ULONG (DECL *ClientWriteRegisterByte         )(LPVOID , ULONG, UCHAR);          
> -    ULONG (DECL *ClientWriteRegisterDword        )(LPVOID , ULONG, ULONG);          
> -    ULONG (DECL *ClientOpenMemoryBase            )(LPVOID , ULONG, ULONG);          
> -    ULONG (DECL *ClientCloseMemoryBase           )(LPVOID );                        
> -    ULONG (DECL *ClientReadMemoryByte            )(LPVOID , ULONG, LPVOID );        
> -    ULONG (DECL *ClientReadMemoryDword           )(LPVOID , ULONG, LPVOID );        
> -    ULONG (DECL *ClientWriteMemoryByte           )(LPVOID , ULONG, UCHAR);          
> -    ULONG (DECL *ClientWriteMemoryDword          )(LPVOID , ULONG, ULONG);          
> -    ULONG (DECL *ClientOpenSystemDevice          )(LPVOID , ULONG, ULONG);          
> -    ULONG (DECL *ClientCloseSystemDevice         )(LPVOID );                        
> -    ULONG (DECL *ClientReadSystemDeviceByte      )(LPVOID , ULONG, LPVOID );        
> -    ULONG (DECL *ClientReadSystemDeviceDword     )(LPVOID , ULONG, LPVOID );        
> -    ULONG (DECL *ClientWriteSystemDeviceByte     )(LPVOID , ULONG, UCHAR);          
> -    ULONG (DECL *ClientWriteSystemDeviceDword    )(LPVOID , ULONG, ULONG);          
> -    ULONG (DECL *ClientWait                      )(LPVOID , ULONG);                 
> -    ULONG (DECL *ClientGetBiosInfo               ) (LPVOID, LPVOID, LPVOID);        
> -    ULONG (DECL *ClientReadDDCEdid               ) (LPVOID, LPVOID, ULONG);         
> -#ifdef DEBUG
> -    ULONG (DECL *ClientDebug                     ) (LPVOID, ULONG, LPVOID, ULONG, LPVOID);
> -#endif
> -} CLIENTTABLE, FAR *LPCLIENTTABLE;
> -
> #endif /* _INTERNALBINDING */
> 
> /***************************************************************************************************
> diff --git a/src/client.h b/src/client.h
> index 8348b64..59aca5d 100644
> --- a/src/client.h
> +++ b/src/client.h
> @@ -17,46 +17,6 @@ typedef struct TAGCLIENTDATA
>    pointer        pMga;
> } CLIENTDATA, *LPCLIENTDATA;
> 
> -extern ULONG DECL ClientReadConfigSpaceByte(LPBOARDHANDLE, ULONG, LPUCHAR);
> -extern ULONG DECL ClientReadConfigSpaceDword(LPBOARDHANDLE , ULONG, LPULONG );
> -extern ULONG DECL ClientWriteConfigSpaceByte (LPBOARDHANDLE , ULONG, UCHAR);
> -extern ULONG DECL ClientWriteConfigSpaceDword(LPBOARDHANDLE , ULONG, ULONG);
> -extern ULONG DECL ClientOpenRegisterBase(LPBOARDHANDLE , ULONG, ULONG);
> -extern ULONG DECL ClientCloseRegisterBase (LPBOARDHANDLE );
> -extern ULONG DECL ClientReadRegisterByte(LPBOARDHANDLE , ULONG, LPUCHAR );
> -extern ULONG DECL ClientReadRegisterDword(LPBOARDHANDLE , ULONG, LPULONG );
> -extern ULONG DECL ClientWriteRegisterByte (LPBOARDHANDLE , ULONG, UCHAR);
> -extern ULONG DECL ClientWriteRegisterDword(LPBOARDHANDLE , ULONG, ULONG);
> -extern ULONG DECL ClientOpenMemoryBase(LPBOARDHANDLE , ULONG, ULONG);
> -extern ULONG DECL ClientCloseMemoryBase(LPBOARDHANDLE );
> -extern ULONG DECL ClientReadMemoryByte(LPBOARDHANDLE , ULONG, LPUCHAR );
> -extern ULONG DECL ClientReadMemoryDword (LPBOARDHANDLE , ULONG, LPULONG );
> -extern ULONG DECL ClientWriteMemoryByte(LPBOARDHANDLE , ULONG, UCHAR);
> -extern ULONG DECL ClientWriteMemoryDword (LPBOARDHANDLE , ULONG, ULONG);
> -extern ULONG DECL ClientOpenSystemDevice (LPBOARDHANDLE , ULONG, ULONG);
> -extern ULONG DECL ClientCloseSystemDevice (LPBOARDHANDLE );
> -extern ULONG DECL ClientReadSystemDeviceByte(LPBOARDHANDLE , ULONG, LPUCHAR );
> -extern ULONG DECL ClientReadSystemDeviceDword(LPBOARDHANDLE , ULONG, LPULONG );
> -extern ULONG DECL ClientWriteSystemDeviceByte(LPBOARDHANDLE , ULONG, UCHAR);
> -extern ULONG DECL ClientWriteSystemDeviceDword (LPBOARDHANDLE , ULONG, ULONG);
> -extern ULONG DECL ClientWait (LPBOARDHANDLE , ULONG);
> -extern ULONG DECL ClientLocateFirstTwisterOfQuad(ULONG);
> -extern ULONG DECL ClientSearchDevNode(ULONG, UCHAR, UCHAR);
> -extern ULONG DECL ClientGetBiosInfo(LPBOARDHANDLE, LPUCHAR, LPULONG );
> -extern ULONG DECL ClientDebug (LPBOARDHANDLE , ULONG, LPUCHAR, ULONG, LPVOID);
> -extern ULONG DECL ClientCallBiosInt10(LPBOARDHANDLE, LPBIOSREGS);
> -extern ULONG DECL ClientReadDDCEdid(LPBOARDHANDLE, LPUCHAR, ULONG);
> -extern ULONG DECL ClientCustomCall(LPBOARDHANDLE, ULONG, LPVOID, LPVOID);
> -extern ULONG DECL ClientApplyEpromPatch(LPBOARDHANDLE);
> -extern ULONG DECL ClientDetectHostInterface(LPBOARDHANDLE, LPULONG);
> -extern ULONG DECL ClientHSLPatchFunction(LPBOARDHANDLE, ULONG, ULONG, LPUCHAR);
> -extern ULONG DECL InitClientFunctions(LPBOARDHANDLE, ULONG);
> -extern ULONG DECL ClientInitTimeBase(LPBOARDHANDLE);
> -extern ULONG DECL ClientOpenDMABase(LPBOARDHANDLE, ULONG, ULONG);
> -extern ULONG DECL ClientReadDMAByte(LPBOARDHANDLE, ULONG, LPUCHAR);
> -extern ULONG DECL ClientReadBIOS(LPBOARDHANDLE, ULONG, ULONG, ULONG, ULONG, LPUCHAR);
> -extern ULONG DECL ClientWriteBIOS(LPBOARDHANDLE, ULONG, ULONG, ULONG, ULONG);
> -
> #if defined(__cplusplus)
>    }
> #endif
> diff --git a/src/clientlx.c b/src/clientlx.c
> deleted file mode 100644
> index 9c6ab50..0000000
> --- a/src/clientlx.c
> +++ /dev/null
> @@ -1,848 +0,0 @@
> -/******************************************************************************\
> -
> -    clientlx.c
> -
> -    Copyright © 1997, Matrox Graphics Inc.
> -
> -    All Rights Reserved.
> -
> -\******************************************************************************/
> -#ifdef HAVE_CONFIG_H
> -#include "config.h"
> -#endif
> -
> -#include "xf86_OSproc.h"
> -#include "xf86Pci.h"
> -#include "client.h"
> -#include "mga.h"
> -
> -CLIENTTABLE ClientFunctions = {
> -    (ULONG (DECL *)(LPVOID,ULONG,LPVOID))    ClientReadConfigSpaceByte,
> -    (ULONG (DECL *)(LPVOID,ULONG,LPVOID))    ClientReadConfigSpaceDword,
> -    (ULONG (DECL *)(LPVOID,ULONG,UCHAR))     ClientWriteConfigSpaceByte,
> -    (ULONG (DECL *)(LPVOID,ULONG,ULONG))     ClientWriteConfigSpaceDword,
> -    (ULONG (DECL *)(LPVOID,ULONG,ULONG))     ClientOpenRegisterBase,
> -    (ULONG (DECL *)(LPVOID))                 ClientCloseRegisterBase,
> -    (ULONG (DECL *)(LPVOID,ULONG,LPVOID))    ClientReadRegisterByte,
> -    (ULONG (DECL *)(LPVOID,ULONG,LPVOID))    ClientReadRegisterDword,
> -    (ULONG (DECL *)(LPVOID,ULONG,UCHAR))     ClientWriteRegisterByte,
> -    (ULONG (DECL *)(LPVOID,ULONG,ULONG))     ClientWriteRegisterDword,
> -    (ULONG (DECL *)(LPVOID,ULONG,ULONG))     ClientOpenMemoryBase,
> -    (ULONG (DECL *)(LPVOID))                 ClientCloseMemoryBase,
> -    (ULONG (DECL *)(LPVOID,ULONG,LPVOID))    ClientReadMemoryByte,
> -    (ULONG (DECL *)(LPVOID,ULONG,LPVOID))    ClientReadMemoryDword,
> -    (ULONG (DECL *)(LPVOID,ULONG,UCHAR))     ClientWriteMemoryByte,
> -    (ULONG (DECL *)(LPVOID,ULONG,ULONG))     ClientWriteMemoryDword,
> -    (ULONG (DECL *)(LPVOID,ULONG,ULONG))     ClientOpenSystemDevice,
> -    (ULONG (DECL *)(LPVOID))                 ClientCloseSystemDevice,
> -    (ULONG (DECL *)(LPVOID,ULONG,LPVOID))    ClientReadSystemDeviceByte,
> -    (ULONG (DECL *)(LPVOID,ULONG,LPVOID))    ClientReadSystemDeviceDword,
> -    (ULONG (DECL *)(LPVOID,ULONG,UCHAR))     ClientWriteSystemDeviceByte,
> -    (ULONG (DECL *)(LPVOID,ULONG,ULONG))     ClientWriteSystemDeviceDword,
> -    (ULONG (DECL *)(LPVOID,ULONG))           ClientWait,
> -    (ULONG (DECL *)(LPVOID,LPVOID,LPVOID))   ClientGetBiosInfo,
> -    (ULONG (DECL *)(LPVOID,LPVOID,ULONG))    ClientReadDDCEdid
> -};
> -
> -/******************************************************************************\
> -
> -    Function      : ClientReadConfigSpaceByte
> -
> -    Description   : Read a Byte from the configuration space.
> -
> -    I/O Desc.     : LPBOARDHANDLE pBoard | Handle to the board structure
> -                    containing all the information about a specifib board.
> -                    ULONG ulOffset | Offset of the Byte to be read.
> -                    UCHAR *pucByte | pointer to a byte that will receive
> -                    the data
> -
> -    Return Val : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientReadConfigSpaceByte(LPBOARDHANDLE pBoard, ULONG ulOffset,
> -                                UCHAR *pucByte)
> -{
> -    LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
> -    MGAPtr pMga = (MGAPtr)pClientStruct->pMga;
> -
> -    ASSERT_HANDLER(pBoard);
> -
> -#ifdef XSERVER_LIBPCIACCESS
> -    pci_device_cfg_read_u8(pMga->PciInfo, pucByte, ulOffset);
> -#else
> -    *pucByte = pciReadByte(pMga->PciTag,ulOffset);
> -#endif
> -
> -    return 0;
> -}
> -
> -
> -/******************************************************************************\
> -
> -    Function      : ClientReadConfigSpaceDword
> -
> -    Description   : Read a Dword from the configuration space.
> -
> -    I/O Desc.     : LPBOARDHANDLE pBoard | Handle to the board structure
> -                    containing all the information about a specific board.
> -                    ULONG ulOffset  | Offset of the Byte to be read.
> -                    ULONG *pulDword | Dword to receive the data
> -
> -    Return Val    : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientReadConfigSpaceDword(LPBOARDHANDLE pBoard, ULONG ulOffset,
> -                                 ULONG *pulDword)
> -{
> -    LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
> -    MGAPtr pMga = (MGAPtr)pClientStruct->pMga;
> -
> -    ASSERT_HANDLER(pBoard);
> -
> -#ifdef XSERVER_LIBPCIACCESS
> -    pci_device_cfg_read_u32(pMga->PciInfo, (uint32_t *) pulDword, ulOffset);
> -#else
> -    *pulDword = pciReadLong(pMga->PciTag,ulOffset);
> -#endif
> -
> -    return 0;
> -}
> -
> -
> -/******************************************************************************\
> -
> -    Function      : ClientWriteConfigSpaceByte
> -
> -    Description   : Write a Byte from the configuration space.
> -
> -    I/O Desc.     : LPBOARDHANDLE pBoard | Handle to the board structure
> -                    containing all the information about a specific board.
> -                    ULONG ulOffset | Offset of the Byte to be read.
> -                    UCHAR ucByte   | Byte to receive the data
> -
> -    Return Val    : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientWriteConfigSpaceByte(LPBOARDHANDLE pBoard, ULONG ulOffset,
> -                                 UCHAR ucByte)
> -{
> -    LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
> -    MGAPtr pMga = (MGAPtr)pClientStruct->pMga;
> -
> -    ASSERT_HANDLER(pBoard);
> -
> -#ifdef XSERVER_LIBPCIACCESS
> -    pci_device_cfg_write_u8(pMga->PciInfo, ucByte, ulOffset);
> -#else
> -    pciWriteByte(pMga->PciTag,ulOffset, ucByte);
> -#endif
> -
> -    return 0;
> -}
> -
> -
> -/******************************************************************************\
> -
> -    Function      : ClientWriteConfigSpaceDword
> -
> -    Description   : Write a Dword from the configuration space.
> -
> -    I/O Desc.     : LPBOARDHANDLE pBoard     | Handle to the board structure
> -                    containing all the information about a specific board.
> -                    ULONG ulOffset | Offset of the Byte to be read.
> -                    ULONG ulDword  | Dword containing the data to  be written
> -
> -    Return Val    : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientWriteConfigSpaceDword(LPBOARDHANDLE pBoard, ULONG ulOffset,
> -                                  ULONG ulDword)
> -{
> -    LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
> -    MGAPtr pMga = (MGAPtr)pClientStruct->pMga;
> -
> -    ASSERT_HANDLER(pBoard);
> -
> -#ifdef XSERVER_LIBPCIACCESS
> -    pci_device_cfg_write_u32(pMga->PciInfo, (uint32_t) ulDword, ulOffset);
> -#else
> -    pciWriteLong(pMga->PciTag,ulOffset, ulDword);
> -#endif
> -
> -    return 0;
> -}
> -
> -
> -/******************************************************************************\
> -
> -    Function      : ClientOpenRegisterBase
> -
> -    Description   : Map the register base for future call to ClientReadRegisterX
> -                    and ClientWriteRegisterX.
> -
> -    I/O Desc.     : LPBOARDHANDLE pBoard | Handle to the board structure
> -                    containing all the information about a specific board.
> -                    ULONG ulAddress | Physical address of the Register aperture
> -                    ULONG ulSize    | Size in Byte of the Register Aperture
> -
> -    Return Val : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientOpenRegisterBase(LPBOARDHANDLE pBoard, ULONG ulAddress, ULONG ulSize)
> -{
> -    LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
> -    MGAPtr pMga = (MGAPtr)pClientStruct->pMga;
> -
> -    ASSERT_HANDLER(pBoard);
> -
> -    pClientStruct->ulRegisterBase = (ULONG) pMga->IOBase;
> -
> -    return 0;
> -}
> -
> -
> -/******************************************************************************\
> -
> -    Function      : ClientCloseRegisterBase
> -
> -    Description   : Unmap the register base address and free resources needed
> -                    to address it.
> -
> -    I/O Desc.     : LPBOARDHANDLE pBoard | Handle to the board structure
> -                    containing all the information about a specific board.
> -
> -    Return Val : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientCloseRegisterBase(LPBOARDHANDLE pBoard)
> -{
> -    ASSERT_HANDLER(pBoard);
> -    return 0;
> -}
> -
> -
> -/******************************************************************************\
> -
> -    Function      : ClientReadRegisterByte
> -
> -    Description   : Read a byte from the Register space.
> -
> -    I/O Desc.     : LPBOARDHANDLE pBoard | Handle to the board structure.
> -                    containing all the information about a specific board.
> -                    ULONG ulOffset | Offset of the Byte to be read.
> -                    UCHAR *pucByte | pointer to the byte that will receive
> -                    the data.
> -
> -    Return Val    : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientReadRegisterByte(LPBOARDHANDLE pBoard, ULONG ulOffset,
> -                             UCHAR *pucByte)
> -{
> -    LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
> -
> -    ASSERT_HANDLER(pBoard);
> -
> -    *pucByte = *((UCHAR *)(pClientStruct->ulRegisterBase + ulOffset));
> -
> -    return 0;
> -}
> -
> -
> -/******************************************************************************\
> -
> -    Function      : ClientReadRegisterDword
> -
> -    Description   : Read a Dword from the Register space.
> -
> -    I/O Desc.     : LPBOARDHANDLE pBoard | Handle to the board structure
> -                    containing all the information about a specific board.
> -                    ULONG ulOffset  | Offset of the Byte to be read.
> -                    ULONG *pulDword | pointer to the dword that will receive
> -                    the data.
> -
> -    Return Val : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientReadRegisterDword(LPBOARDHANDLE pBoard, ULONG ulOffset,
> -                              ULONG *pulDword)
> -{
> -    LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
> -
> -    ASSERT_HANDLER(pBoard);
> -
> -    *pulDword = *((ULONG *)(pClientStruct->ulRegisterBase + ulOffset));
> -
> -    return 0;
> -}
> -
> -
> -/******************************************************************************\
> -
> -    Function      : ClientWriteRegisterByte
> -
> -    Description   : Write a Byte from the Register space.
> -
> -    I/O Desc.     : LPBOARDHANDLE pBoard | Handle to the board structure
> -                    containing all the information about a specific board.
> -                    ULONG ulOffset | Offset of the Byte to be read.
> -                    UCHAR ucByte   | CHAR to receive the data.
> -
> -    Return Val : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientWriteRegisterByte(LPBOARDHANDLE pBoard, ULONG ulOffset,
> -                              UCHAR ucByte)
> -{
> -    LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
> -
> -    ASSERT_HANDLER(pBoard);
> -
> -    *((UCHAR *)(pClientStruct->ulRegisterBase + ulOffset)) = ucByte;
> -
> -    return 0;
> -}
> -
> -
> -/******************************************************************************\
> -
> -    Function      : ClientWriteRegisterSpaceDword
> -
> -    Description   : Write a Dword from the Register space.
> -
> -    I/O Desc.     : LPBOARDHANDLE *| pBoard  | Handle to the board structure
> -                    containing all the information about a specific board.
> -                    ULONG ulOffset | Offset of the Byte to be read.
> -                    ULONG ulDword  | Dword to receive the data
> -
> -    Return Val : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientWriteRegisterDword(LPBOARDHANDLE pBoard, ULONG ulOffset,
> -                               ULONG ulDword)
> -{
> -    LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
> -
> -    ASSERT_HANDLER(pBoard);
> -
> -    *((ULONG *)(pClientStruct->ulRegisterBase + ulOffset)) = ulDword;
> -
> -    return 0;
> -}
> -
> -
> -/******************************************************************************\
> -
> -    Function      : ClientOpenMemoryBase
> -
> -    Description   : Map the Memory base for future call to ClientReadMemoryX
> -                    and ClientWriteMemoryX.
> -
> -    I/O Desc.     : LPBOARDHANDLE pBoard | Handle to the board structure
> -                    containing all the information about a specific board.
> -                    ULONG ulAddress | Physical address of the Register aperture
> -                    ULONG ulSize    | Size in Byte of the Register Aperture
> -    Return Val : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientOpenMemoryBase(LPBOARDHANDLE pBoard, ULONG ulAddress, ULONG ulSize)
> -{
> -    LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
> -    MGAPtr pMga = (MGAPtr) pClientStruct->pMga;
> -
> -    ASSERT_HANDLER(pBoard);
> -
> -    pClientStruct->ulFrameBufferBase = (ULONG) pMga->FbBase;
> -
> -    return 0;
> -}
> -
> -
> -/******************************************************************************\
> -
> -    Function      : ClientCloseMemoryBase
> -
> -    Description   : Unmap the Frame Buffer aperture and free resources
> -                    needed to address it.
> -
> -    I/O Desc.     : LPBOARDHANDLE pBoard | Handle to the board structure
> -                    containing all the information about a specific board.
> -
> -    Return Val    : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientCloseMemoryBase(LPBOARDHANDLE pBoard)
> -{
> -    ASSERT_HANDLER(pBoard);
> -    return 0;
> -}
> -
> -
> -/******************************************************************************\
> -
> -    Function      : ClientReadMemoryByte
> -
> -    Description   : Read a Byte from the Frame Buffer space.
> -
> -    I/O Desc.     : LPBOARDHANDLE pBoard | Handle to the board structure
> -                    containing all the information about a specific board.
> -                    ULONG ulOffset | Offset of the Byte to be read.
> -                    UCHAR *ucByte  | CHAR to receive the data
> -
> -    Return Val : ULONG
> -\******************************************************************************/
> -ULONG ClientReadMemoryByte(LPBOARDHANDLE pBoard, ULONG ulOffset, UCHAR *pucByte)
> -{
> -    LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
> -
> -    ASSERT_HANDLER(pBoard);
> -
> -    *pucByte = *((UCHAR *)(pClientStruct->ulFrameBufferBase + ulOffset));
> -
> -    return 0;
> -}
> -
> -
> -/******************************************************************************\
> -
> -    Function      : ClientReadMemoryDword
> -
> -    Description   : Read a Dword from the Frame Buffer Space.
> -
> -    I/O Desc.     : LPBOARDHANDLE pBoard | Handle to the board structure
> -                    containing all the information about a specific board.
> -                    ULONG ulOffset | Offset of the Byte to be read.
> -                    ULONG *uDword  | Dword to receive the data
> -
> -    Return Val    : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientReadMemoryDword(LPBOARDHANDLE pBoard, ULONG ulOffset,
> -                            ULONG *pulDword)
> -{
> -    LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
> -
> -    ASSERT_HANDLER(pBoard);
> -
> -    *pulDword = *((ULONG *)(pClientStruct->ulFrameBufferBase + ulOffset));
> -
> -    return 0;
> -}
> -
> -
> -/******************************************************************************\
> -
> -   Function      : ClientWriteMemoryByte
> -
> -   Description   : Write a Byte from the Frame Buffer space.
> -
> -   I/O Desc.     : LPBOARDHANDLE pBoard     | Handle to the board structure
> -                   containing all the information about a specific board.
> -                   ULONG ulOffset | Offset of the Byte to be read.
> -                   UCHAR ucByte   | CHAR to receive the data
> -
> -   Return Val    : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientWriteMemoryByte(LPBOARDHANDLE pBoard, ULONG ulOffset, UCHAR ucByte)
> -{
> -    LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
> -
> -    ASSERT_HANDLER(pBoard);
> -
> -    *((UCHAR *)(pClientStruct->ulFrameBufferBase + ulOffset)) = ucByte;
> -
> -    return 0;
> -}
> -
> -
> -/******************************************************************************\
> -
> -    Function      : ClientWriteMemoryDword
> -
> -    Description   : Write a Dword from the Frame Buffer space.
> -
> -    I/O desc.     : LPBOARDHANDLE pBoard | Handle to the board structure
> -                    containing all the information about a specific board.
> -                    ULONG ulOffset | Offset of the Byte to be read.
> -                    ULONG ulDword  | Dword to receive the data
> -
> -    Return Val    : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientWriteMemoryDword(LPBOARDHANDLE pBoard, ULONG ulOffset,
> -                            ULONG ulDword)
> -{
> -    LPCLIENTDATA pClientStruct = MGAGetClientPointer(pBoard);
> -
> -    ASSERT_HANDLER(pBoard);
> -
> -    *((ULONG *)(pClientStruct->ulFrameBufferBase + ulOffset)) = ulDword;
> -
> -    return 0;
> -}
> -
> -
> -/******************************************************************************\
> -
> -    Function      : ClientOpenSystemDevice
> -
> -    Description   : Map a System device aperture for future call to
> -                    ClientReadSystemDeviceX and ClientWriteSystemDeviceX.
> -
> -    I/O Desc.     : LPBOARDHANDLE pBoard | Handle to the board structure
> -                    containing all the information about a specific board.
> -                    ULONG ulAddress | Physical address of the Register aperture
> -                    ULONG ulSize    | Size in Byte of the Register Aperture
> -
> -    Return Val    : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientOpenSystemDevice(LPBOARDHANDLE pBoard, ULONG ulAddress,
> -                                    ULONG ulSize)
> -{
> -    return 1;
> -}
> -
> -
> -/******************************************************************************\
> -
> -    Function      : ClientCloseSystemDevice
> -
> -    Description   : Unmap the System Device aperture address and free
> -                    resources needed to address it.
> -
> -    I/O Desc.     : LPBOARDHANDLE pBoard | Handle to the board structure
> -                    containing all the information about a specific board.
> -
> -    Return Val    : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientCloseSystemDevice (LPBOARDHANDLE pBoard)
> -{
> -    return 1;
> -}
> -
> -
> -/******************************************************************************\
> -
> -    Function      : ClientReadSystemDeviceByte
> -
> -    Description   : Read a Byte from the device Space.
> -
> -    I/O Desc.     : LPBOARDHANDLE pBoard | Handle to the board structure
> -                    containing all the information about a specific board.
> -                    ULONG ulOffset | Offset of the Byte to be read.
> -                    ULONG pucByte  | Byte to read the data
> -
> -    Return Val    : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientReadSystemDeviceByte(LPBOARDHANDLE pBoard, ULONG ulOffset,
> -                                 UCHAR *pucByte)
> -{
> -    return 1;
> -}
> -
> -
> -/******************************************************************************\
> -
> -    Function      : ClientReadSystemDeviceDword
> -
> -    Description   : Read a Dword from the Frame Buffer Space
> -
> -    I/O Desc.     : LPBOARDHANDLE pBoard     | Handle to the board structure
> -                    containing all the information about a specific board.
> -                    ULONG ulOffset | Offset of the Byte to be read.
> -                    ULONG ulDword  | Dword to Read the data
> -
> -    Return Val    : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientReadSystemDeviceDword(LPBOARDHANDLE pBoard, ULONG ulOffset,
> -                                  ULONG *pulDword)
> -{
> -    return 1;
> -}
> -
> -
> -/******************************************************************************\
> -
> -    Function      : ClientWriteSystemByte
> -
> -    Description   : Write a Byte from the System Device Aperture
> -
> -    I/O Desc.     : LPBOARDHANDLE pBoard | Handle to the board structure
> -                    containing all the information about a specific board.
> -                    ULONG ulOffset | Offset of the Byte to be read.
> -                    UCHAR ucByte   | Byte to receive the data
> -    Return Val : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientWriteSystemDeviceByte(LPBOARDHANDLE pBoard, ULONG ulOffset,
> -                                  UCHAR ucByte)
> -{
> -    return 1;
> -}
> -
> -
> -/******************************************************************************\
> -
> -    Function      : ClientWriteSystemDword
> -
> -    Description   : Write a Dword from the System Device Aperture.
> -
> -    I/O Desc.     : LPBOARDHANDLE pBoard     | Handle to the board structure
> -                    containing all the information about a specific board.
> -                    ULONG ulOffset | Offset of the Byte to be read.
> -                    ULONG uDword   | Dword to receive the data
> -
> -    Return Val    : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientWriteSystemDeviceDword(LPBOARDHANDLE pBoard, ULONG ulOffset,
> -                                   ULONG ulDword)
> -{
> -    return 1;
> -}
> -
> -
> -/******************************************************************************\
> -
> -    Function      : ClientWait
> -
> -    Description   : Wait for ulDelayus micro-seconds.
> -
> -    I/O Desc.     : LPBOARDHANDLE pBoard | Handle to the board structure
> -                    containing all the information about a specific board.
> -                    ULONG ulDelayus | Delay in uSec
> -
> -    Return Val    : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientWait (LPBOARDHANDLE pBoard, ULONG ulDelayus)
> -{
> -    int i;
> -    ULONG ulTmp;
> -
> -    ASSERT_HANDLER(pBoard);
> -
> -    for(i = 0; i < ulDelayus * 3; i++)
> -    {
> -        ClientReadRegisterDword(pBoard,0x1e14,&ulTmp);
> -    }
> -
> -    return 0;
> -}
> -
> -
> -/******************************************************************************\
> -
> -    Function      : ClientGetBiosInfo
> -
> -    Description   : This function will be call if no PINS can be found
> -                    in physical EEPROM.
> -
> -    I/O Desc.     :  LPBOARDHANDLE pBoard | Handle to the board structure
> -                     containing all the information about a specific board.
> -                     LPUCHAR    | Buffer where we copy bios pins.
> -                     ULONG      | Bios version
> -
> -    Return Val    : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientGetBiosInfo(LPBOARDHANDLE pBoard, LPUCHAR pucPins,LPULONG pulBIOSVersion)
> -{
> -    Bool bNotFound = TRUE;
> -    UCHAR ucBIOS[32768];
> -    UCHAR ucTmpByte;
> -    UCHAR ucCheckSum;
> -    UCHAR ucPinsIndex;
> -    UCHAR ucPinsSize;
> -    ULONG ulTmpDword;
> -    ULONG ulPinsOffset = 0;
> -    ULONG ulPCIINFOffset;
> -
> -    ASSERT_HANDLER(pBoard);
> -
> -    xf86ReadBIOS(0xc0000,0,ucBIOS,32768);
> -
> -    if(ucBIOS[0] == 0x55)
> -    {
> -        if(ucBIOS[1] == 0xaa)
> -        {
> -            while((ulPinsOffset < 0x10000) && bNotFound)
> -            {
> -                ulTmpDword = *(ULONG *)(ucBIOS + ulPinsOffset);
> -                ucPinsSize = (UCHAR) (ulTmpDword >> 16);
> -                if(((ulTmpDword & 0x0000ffff) == 0x0000412e)
> -                    && ucPinsSize <= 128)
> -                {
> -                    ucCheckSum = 0;
> -                    for(ucPinsIndex = 0;ucPinsIndex < ucPinsSize; ucPinsIndex++)
> -                    {
> -                        pucPins[ucPinsIndex] = ucBIOS[ulPinsOffset +
> -                                               ucPinsIndex];
> -                        ucCheckSum += pucPins[ucPinsIndex];
> -                    }
> -                    if(ucCheckSum == 0)
> -                    {
> -                        bNotFound = FALSE;
> -                    }
> -                }
> -                ulPinsOffset++;
> -            }
> -
> -            if(bNotFound)
> -            {
> -                return 1;
> -            }
> -
> -            ulPCIINFOffset = *(ULONG *)(ucBIOS + 0x18);
> -            ulPCIINFOffset &= 0x0000ffff;
> -            ulTmpDword = *(ULONG *)(ucBIOS + ulPCIINFOffset);
> -
> -            if(ulTmpDword == 0x52494350)  /* "PCIR" */
> -            {
> -                ulPCIINFOffset += 0x12;
> -                ulTmpDword = *(ULONG *)(ucBIOS + ulPCIINFOffset);
> -                *pulBIOSVersion = ((ULONG) ((ulTmpDword & 0xf0) >> 4) << 16) |
> -                                  ((ulTmpDword &0xf) << 12) | ((ulTmpDword >> 8)
> -                                  & 0xff);
> -            }
> -            else
> -            {
> -                return 1;
> -            }
> -        }
> -        else
> -        {
> -           return 1;
> -        }
> -    }
> -    else
> -    {
> -        return 1;
> -    }
> -
> -    if(!*pulBIOSVersion)
> -    {
> -        ucTmpByte = ucBIOS[5];
> -        *pulBIOSVersion = ((ULONG) (ucTmpByte >> 4) << 16) | ((ULONG)
> -                          (ucTmpByte & 0x0f) << 12);
> -    }
> -
> -    return 0;
> -}
> -
> -/******************************************************************************\
> -
> -    Function      : ClientCallBiosInt10
> -
> -    Description   : Call the BIOS Int10h with specified parameters.
> -
> -    I/O Desc.     : LPBOARDHANDLE pBoard | Handle to the board structure
> -                    containing all the information about a specific board.
> -                    LPBIOSREGS pBiosRegs | Pointor to the Bios register
> -                    structure.
> -
> -    Return Val    : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientCallBiosInt10(LPBOARDHANDLE pBoard, LPBIOSREGS pBiosRegs)
> -{
> -   ASSERT_HANDLER(pBoard);
> -
> -   return 1;
> -}
> -
> -
> -/******************************************************************************\
> -
> -    Function      : ClientReadDDCEdid
> -
> -    Description   : Not implemented.
> -
> -    I/O Desc.     : LPBOARDHANDLE pBoard | Handle to the board structure
> -                    containing all the information about a specific board.
> -                    LPBIOSREGS pBiosRegs | Pointor to the Bios register
> -                    structure.
> -
> -    Return Val    : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientReadDDCEdid(LPBOARDHANDLE pBoard, LPUCHAR pEdid,
> -                               ULONG ulMonitorIndex)
> -{
> -   ASSERT_HANDLER(pBoard);
> -
> -   return 1;
> -}
> -
> -
> -/******************************************************************************\
> -
> -    Function      : ClientCustomCall
> -
> -    Description   : Not implemented.
> -
> -    I/O Desc.     : LPBOARDHANDLE pBoard | Handle to the board structure
> -                    containing all the information about a specific board.
> -                    LPBIOSREGS pBiosRegs | Pointor to the Bios register
> -                    structure.
> -
> -    Return Val    : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientCustomCall(LPBOARDHANDLE pBoard, ULONG ulServiceNumber,
> -                       LPVOID pInData, LPVOID pOutData)
> -{
> -   ASSERT_HANDLER(pBoard);
> -
> -   return 1;
> -}
> -
> -
> -/******************************************************************************\
> -
> -    Function      : ClientApplyEpromPatch
> -
> -    Description   : Not implemented.
> -
> -    I/O Desc.     : LPBOARDHANDLE pBoard | Handle to the board structure
> -                    containing all the information about a specific board.
> -                    LPBIOSREGS pBiosRegs | Pointor to the Bios register
> -                    structure.
> -
> -    Return Val    : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientApplyEpromPatch(LPBOARDHANDLE pBoard)
> -{
> -   ASSERT_HANDLER(pBoard);
> -
> -   return 1;
> -}
> -
> -
> -/******************************************************************************\
> -
> -    Function      : ClientDetectHostInterface
> -
> -    Description   : Not implemented.
> -
> -    I/O Desc.     : LPBOARDHANDLE pBoard | Handle to the board structure
> -                    containing all the information about a specific board.
> -                    LPBIOSREGS pBiosRegs | Pointor to the Bios register
> -                    structure.
> -
> -    Return Val    : ULONG
> -
> -\******************************************************************************/
> -ULONG ClientDetectHostInterface(LPBOARDHANDLE pBoard, LPULONG pulData)
> -{
> -   ASSERT_HANDLER(pBoard);
> -
> -   return 1;
> -}
> -
> -- 
> 1.7.5.4
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel

---
Jeremy Huddleston

Rebuild Sudan
- Board of Directors
- http://www.rebuildsudan.org

Berkeley Foundation for Opportunities in Information Technology
- Advisory Board
- http://www.bfoit.org



More information about the xorg-devel mailing list