open-src/app/gfx-utils/sun-src/vts/ast/ast.h
changeset 1407 72726c775cc9
parent 1117 629ac4b133bc
equal deleted inserted replaced
1406:1c119a0c7495 1407:72726c775cc9
     1 /*
     1 /*
     2  * Copyright (c) 2006, 2009, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
     3  *
     3  *
     4  * Permission is hereby granted, free of charge, to any person obtaining a
     4  * Permission is hereby granted, free of charge, to any person obtaining a
     5  * copy of this software and associated documentation files (the "Software"),
     5  * copy of this software and associated documentation files (the "Software"),
     6  * to deal in the Software without restriction, including without limitation
     6  * to deal in the Software without restriction, including without limitation
     7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
     7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
    20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    21  * DEALINGS IN THE SOFTWARE.
    21  * DEALINGS IN THE SOFTWARE.
    22  */
    22  */
    23 
    23 
    24 #ifndef AST_H
    24 #ifndef AST_H
    25 #define AST_H
    25 #define	AST_H
    26 
    26 
    27 #include <sys/types.h>
    27 #define	AST_REG_SIZE_LOG2	18
    28 #include <stdio.h>
       
    29 #include <sys/mman.h>
       
    30 
    28 
    31 #include "gfx_common.h"		/* GFX Common definitions */
    29 #define	PCI_MAP_MEMORY			0x00000000
    32 #include "graphicstest.h"
    30 #define	PCI_MAP_IO			0x00000001
    33 #include "libvtsSUNWast.h"	/* Common VTS library definitions */
       
    34 
    31 
    35 #include "X11/Xlib.h"
    32 #define	PCI_MAP_MEMORY_TYPE		0x00000007
    36 #include "gfx_vts.h"		/* VTS Graphics Test common routines */
    33 #define	PCI_MAP_IO_TYPE			0x00000003
    37 
    34 
    38 #define AST_REG_SIZE_LOG2	18
    35 #define	PCI_MAP_MEMORY_TYPE_32BIT	0x00000000
       
    36 #define	PCI_MAP_MEMORY_TYPE_32BIT_1M	0x00000002
       
    37 #define	PCI_MAP_MEMORY_TYPE_64BIT	0x00000004
       
    38 #define	PCI_MAP_MEMORY_TYPE_MASK	0x00000006
       
    39 #define	PCI_MAP_MEMORY_CACHABLE		0x00000008
       
    40 #define	PCI_MAP_MEMORY_ATTR_MASK	0x0000000e
       
    41 #define	PCI_MAP_MEMORY_ADDRESS_MASK	0xfffffff0
    39 
    42 
    40 struct pci_info {
    43 #define	PCI_MAP_IO_ATTR_MASK		0x00000003
    41 	unsigned long	memBase[6];
    44 #define	PCI_MAP_IS_IO(b)		((b) & PCI_MAP_IO)
    42 	unsigned long	ioBase[6];
    45 #define	PCI_MAP_IO_ADDRESS_MASK		0xfffffffc
    43 	unsigned int	type [6];
    46 
    44 	unsigned int	size [6];
    47 #define	PCIGETIO(b)			((b) & PCI_MAP_IO_ADDRESS_MASK)
    45 };
    48 
       
    49 #define	PCI_MAP_IS64BITMEM(b)	\
       
    50 	(((b) & PCI_MAP_MEMORY_TYPE) == PCI_MAP_MEMORY_TYPE_64BIT)
       
    51 
       
    52 #define	PCIGETMEMORY(b)			((b) & PCI_MAP_MEMORY_ADDRESS_MASK)
       
    53 
       
    54 #define	PCI_REGION_BASE(_pcidev, _b, _type)	\
       
    55 	(((_type) == REGION_MEM) ? (_pcidev)->memBase[(_b)] : \
       
    56 	(_pcidev)->ioBase[(_b)])
       
    57 
       
    58 #define	AR_PORT_WRITE			0x40
       
    59 #define	MISC_PORT_WRITE			0x42
       
    60 #define	SEQ_PORT			0x44
       
    61 #define	DAC_INDEX_READ			0x47
       
    62 #define	DAC_INDEX_WRITE			0x48
       
    63 #define	DAC_DATA			0x49
       
    64 #define	GR_PORT				0x4E
       
    65 #define	CRTC_PORT			0x54
       
    66 #define	INPUT_STATUS1_READ		0x5A
       
    67 #define	MISC_PORT_READ			0x4C
       
    68 
       
    69 #define	AST_MMIO_SIZE			0x00020000
       
    70 #define	AST_VRAM_SIZE_08M		0x00800000
       
    71 #define	AST_VRAM_SIZE_16M		0x01000000
       
    72 #define	AST_VRAM_SIZE_32M		0x02000000
       
    73 #define	AST_VRAM_SIZE_64M		0x04000000
       
    74 #define	AST_VRAM_SIZE_128M		0x08000000
    46 
    75 
    47 
    76 
    48 #define PKT_NULL_CMD				0x00009561
    77 #define	MASK_SRC_PITCH			0x1FFF
       
    78 #define	MASK_DST_PITCH			0x1FFF
       
    79 #define	MASK_DST_HEIGHT			0x7FF
       
    80 #define	MASK_SRC_X			0xFFF
       
    81 #define	MASK_SRC_Y			0xFFF
       
    82 #define	MASK_DST_X			0xFFF
       
    83 #define	MASK_DST_Y			0xFFF
       
    84 #define	MASK_RECT_WIDTH			0x7FF
       
    85 #define	MASK_RECT_HEIGHT		0x7FF
       
    86 #define	MASK_CLIP			0xFFF
    49 
    87 
    50 #define PKT_SINGLE_LENGTH			8
    88 #define	MASK_LINE_X			0xFFF
    51 #define PKT_SINGLE_CMD_HEADER			0x00009562
    89 #define	MASK_LINE_Y			0xFFF
    52 
    90 #define	MASK_LINE_ERR			0x3FFFFF
    53 typedef struct  _PKT_SC
    91 #define	MASK_LINE_WIDTH			0x7FF
    54 {
    92 #define	MASK_LINE_K1			0x3FFFFF
    55 	unsigned int	header;
    93 #define	MASK_LINE_K2			0x3FFFFF
    56 	unsigned int	data[1];
    94 #define	MASK_AIPLINE_X			0xFFF
    57 } PKT_SC, *PPKT_SC;
    95 #define	MASK_AIPLINE_Y			0xFFF
    58 
       
    59 
       
    60 #define CMD_QUEUE_GUARD_BAND			0x20
       
    61 
       
    62 typedef struct {
       
    63 
       
    64 	unsigned long   ulCMDQSize;
       
    65 	unsigned long	ulCMDQType;
       
    66    
       
    67 	unsigned long	ulCMDQOffset;
       
    68 	unsigned char   *pjCMDQvaddr;
       
    69    
       
    70 	unsigned char   *pjCmdQBasePort;
       
    71 	unsigned char   *pjWritePort;
       
    72 	unsigned char   *pjReadPort;
       
    73 	unsigned char   *pjEngStatePort;
       
    74 
       
    75 	unsigned long   ulCMDQMask;
       
    76 	unsigned long   ulCMDQueueLen;
       
    77 
       
    78 	unsigned long   ulWritePointer;
       
    79 	unsigned long   ulReadPointer;
       
    80 	unsigned long   ulReadPointer_OK;               /* for Eng_DBGChk */
       
    81 
       
    82 } CMDQINFO, *PCMDQINFO;
       
    83 
       
    84 
       
    85 typedef unsigned int (*PFNRead32)  (unsigned char *);
       
    86 typedef void         (*PFNWrite32) (unsigned char *, unsigned int);
       
    87 
       
    88 struct ast_info {
       
    89 	int		fd;
       
    90 
       
    91 	int		screenWidth;
       
    92 	int		screenHeight;
       
    93 	int		screenPitch;
       
    94 	int		bytesPerPixel;
       
    95 
       
    96 	int		MMIO2D;
       
    97 
       
    98 	unsigned long	FBPhysAddr;
       
    99 	unsigned long	MMIOPhysAddr;
       
   100 	unsigned long	RelocateIO;
       
   101 
       
   102 	int		FBMapSize;
       
   103 	int		MMIOMapSize;
       
   104 
       
   105 	unsigned char	*FBvaddr;
       
   106 	unsigned char	*MMIOvaddr;
       
   107 
       
   108 	CMDQINFO	CMDQInfo;
       
   109 	unsigned long	cmdreg;
       
   110 
       
   111 	unsigned int	save_dst_base;
       
   112 	unsigned int	save_line_xy;
       
   113 	unsigned int	save_line_err;
       
   114 	unsigned int	save_line_width;
       
   115 	unsigned int	save_line_k1;
       
   116 	unsigned int	save_line_k2;
       
   117 	unsigned int	save_mono_pat1;
       
   118 	unsigned int	save_mono_pat2;
       
   119 
       
   120         PFNRead32       read32;
       
   121         PFNWrite32      write32;
       
   122 };
       
   123 
       
   124 #define PCI_MAP_MEMORY                  0x00000000
       
   125 #define PCI_MAP_IO			0x00000001
       
   126 
       
   127 #define PCI_MAP_MEMORY_TYPE             0x00000007
       
   128 #define PCI_MAP_IO_TYPE                 0x00000003
       
   129 
       
   130 #define PCI_MAP_MEMORY_TYPE_32BIT       0x00000000
       
   131 #define PCI_MAP_MEMORY_TYPE_32BIT_1M    0x00000002
       
   132 #define PCI_MAP_MEMORY_TYPE_64BIT       0x00000004
       
   133 #define PCI_MAP_MEMORY_TYPE_MASK        0x00000006
       
   134 #define PCI_MAP_MEMORY_CACHABLE         0x00000008
       
   135 #define PCI_MAP_MEMORY_ATTR_MASK        0x0000000e
       
   136 #define PCI_MAP_MEMORY_ADDRESS_MASK     0xfffffff0
       
   137 
       
   138 #define PCI_MAP_IO_ATTR_MASK		0x00000003
       
   139 #define PCI_MAP_IS_IO(b)		((b) & PCI_MAP_IO)
       
   140 #define PCI_MAP_IO_ADDRESS_MASK		0xfffffffc
       
   141 
       
   142 #define PCIGETIO(b)			((b) & PCI_MAP_IO_ADDRESS_MASK)
       
   143 
       
   144 #define PCI_MAP_IS64BITMEM(b)   \
       
   145         (((b) & PCI_MAP_MEMORY_TYPE) == PCI_MAP_MEMORY_TYPE_64BIT)
       
   146 
       
   147 #define PCIGETMEMORY(b)         	((b) & PCI_MAP_MEMORY_ADDRESS_MASK)
       
   148 
       
   149 #define PCI_REGION_BASE(_pcidev, _b, _type)             \
       
   150     (((_type) == REGION_MEM) ? (_pcidev)->memBase[(_b)] \
       
   151                              : (_pcidev)->ioBase[(_b)])
       
   152 
       
   153 #define AR_PORT_WRITE           0x40
       
   154 #define MISC_PORT_WRITE         0x42
       
   155 #define SEQ_PORT                0x44
       
   156 #define DAC_INDEX_READ          0x47
       
   157 #define DAC_INDEX_WRITE         0x48
       
   158 #define DAC_DATA                0x49
       
   159 #define GR_PORT                 0x4E
       
   160 #define CRTC_PORT               0x54
       
   161 #define INPUT_STATUS1_READ      0x5A
       
   162 #define MISC_PORT_READ          0x4C
       
   163 
       
   164 #define AST_MMIO_SIZE		0x00020000
       
   165 #define AST_VRAM_SIZE_08M	0x00800000
       
   166 #define AST_VRAM_SIZE_16M	0x01000000
       
   167 #define AST_VRAM_SIZE_32M	0x02000000
       
   168 #define AST_VRAM_SIZE_64M	0x04000000
       
   169 #define AST_VRAM_SIZE_128M	0x08000000
       
   170 
       
   171 
       
   172 #define MASK_SRC_PITCH          0x1FFF
       
   173 #define MASK_DST_PITCH          0x1FFF
       
   174 #define MASK_DST_HEIGHT         0x7FF
       
   175 #define MASK_SRC_X              0xFFF
       
   176 #define MASK_SRC_Y              0xFFF
       
   177 #define MASK_DST_X              0xFFF
       
   178 #define MASK_DST_Y              0xFFF
       
   179 #define MASK_RECT_WIDTH         0x7FF
       
   180 #define MASK_RECT_HEIGHT        0x7FF
       
   181 #define MASK_CLIP               0xFFF
       
   182 
       
   183 #define MASK_LINE_X             0xFFF
       
   184 #define MASK_LINE_Y             0xFFF
       
   185 #define MASK_LINE_ERR           0x3FFFFF
       
   186 #define MASK_LINE_WIDTH         0x7FF
       
   187 #define MASK_LINE_K1            0x3FFFFF
       
   188 #define MASK_LINE_K2            0x3FFFFF
       
   189 #define MASK_AIPLINE_X          0xFFF
       
   190 #define MASK_AIPLINE_Y          0xFFF
       
   191 
    96 
   192 
    97 
   193 /* CMDQ Reg */
    98 /* CMDQ Reg */
   194 #define CMDQREG_SRC_BASE        (0x00 << 24)
    99 #define	CMDQREG_SRC_BASE		(0x00 << 24)
   195 #define CMDQREG_SRC_PITCH       (0x01 << 24)
   100 #define	CMDQREG_SRC_PITCH		(0x01 << 24)
   196 #define CMDQREG_DST_BASE        (0x02 << 24)
   101 #define	CMDQREG_DST_BASE		(0x02 << 24)
   197 #define CMDQREG_DST_PITCH       (0x03 << 24)
   102 #define	CMDQREG_DST_PITCH		(0x03 << 24)
   198 #define CMDQREG_DST_XY          (0x04 << 24)
   103 #define	CMDQREG_DST_XY			(0x04 << 24)
   199 #define CMDQREG_SRC_XY          (0x05 << 24)
   104 #define	CMDQREG_SRC_XY			(0x05 << 24)
   200 #define CMDQREG_RECT_XY         (0x06 << 24)
   105 #define	CMDQREG_RECT_XY			(0x06 << 24)
   201 #define CMDQREG_FG              (0x07 << 24)
   106 #define	CMDQREG_FG			(0x07 << 24)
   202 #define CMDQREG_BG              (0x08 << 24)
   107 #define	CMDQREG_BG			(0x08 << 24)
   203 #define CMDQREG_FG_SRC          (0x09 << 24)
   108 #define	CMDQREG_FG_SRC			(0x09 << 24)
   204 #define CMDQREG_BG_SRC          (0x0A << 24)
   109 #define	CMDQREG_BG_SRC			(0x0A << 24)
   205 #define CMDQREG_MONO1           (0x0B << 24)
   110 #define	CMDQREG_MONO1			(0x0B << 24)
   206 #define CMDQREG_MONO2           (0x0C << 24)
   111 #define	CMDQREG_MONO2			(0x0C << 24)
   207 #define CMDQREG_CLIP1           (0x0D << 24)
   112 #define	CMDQREG_CLIP1			(0x0D << 24)
   208 #define CMDQREG_CLIP2           (0x0E << 24)
   113 #define	CMDQREG_CLIP2			(0x0E << 24)
   209 #define CMDQREG_CMD             (0x0F << 24)
   114 #define	CMDQREG_CMD			(0x0F << 24)
   210 #define CMDQREG_PAT             (0x40 << 24)
   115 #define	CMDQREG_PAT			(0x40 << 24)
   211 
   116 
   212 #define CMDQREG_LINE_XY         (0x04 << 24)
   117 #define	CMDQREG_LINE_XY			(0x04 << 24)
   213 #define CMDQREG_LINE_Err        (0x05 << 24)
   118 #define	CMDQREG_LINE_ERR		(0x05 << 24)
   214 #define CMDQREG_LINE_WIDTH      (0x06 << 24)
   119 #define	CMDQREG_LINE_WIDTH		(0x06 << 24)
   215 #define CMDQREG_LINE_K1         (0x09 << 24)
   120 #define	CMDQREG_LINE_K1			(0x09 << 24)
   216 #define CMDQREG_LINE_K2         (0x0A << 24)
   121 #define	CMDQREG_LINE_K2			(0x0A << 24)
   217 #define CMDQREG_LINE_STYLE1     (0x0B << 24)
   122 #define	CMDQREG_LINE_STYLE1		(0x0B << 24)
   218 #define CMDQREG_LINE_STYLE2     (0x0C << 24)
   123 #define	CMDQREG_LINE_STYLE2		(0x0C << 24)
   219 #define CMDQREG_LINE_XY2        (0x05 << 24)
   124 #define	CMDQREG_LINE_XY2		(0x05 << 24)
   220 #define CMDQREG_LINE_NUMBER     (0x06 << 24)
   125 #define	CMDQREG_LINE_NUMBER		(0x06 << 24)
   221 
   126 
   222 #define	CMD_BITBLT                            0x00000000
   127 #define	CMD_BITBLT			0x00000000
   223 #define CMD_LINEDRAW                          0x00000001
   128 #define	CMD_LINEDRAW			0x00000001
   224 #define CMD_COLOREXP                          0x00000002
   129 #define	CMD_COLOREXP			0x00000002
   225 #define CMD_ENHCOLOREXP                       0x00000003
   130 #define	CMD_ENHCOLOREXP			0x00000003
   226 #define CMD_TRANSPARENTBLT                    0x00000004
   131 #define	CMD_TRANSPARENTBLT		0x00000004
   227 #define CMD_MASK                              0x00000007
   132 #define	CMD_MASK			0x00000007
   228 
   133 
   229 #define CMD_DISABLE_CLIP                      0x00000000
   134 #define	CMD_DISABLE_CLIP		0x00000000
   230 #define CMD_ENABLE_CLIP                       0x00000008
   135 #define	CMD_ENABLE_CLIP			0x00000008
   231 
   136 
   232 #define CMD_COLOR_08                          0x00000000
   137 #define	CMD_COLOR_08			0x00000000
   233 #define CMD_COLOR_16                          0x00000010
   138 #define	CMD_COLOR_16			0x00000010
   234 #define CMD_COLOR_32                          0x00000020
   139 #define	CMD_COLOR_32			0x00000020
   235 
   140 
   236 #define CMD_SRC_SIQ                           0x00000040
   141 #define	CMD_SRC_SIQ			0x00000040
   237 
   142 
   238 #define CMD_TRANSPARENT                       0x00000080
   143 #define	CMD_TRANSPARENT			0x00000080
   239 
   144 
   240 #define CMD_PAT_FGCOLOR                       0x00000000
   145 #define	CMD_PAT_FGCOLOR			0x00000000
   241 #define CMD_PAT_MONOMASK                      0x00010000
   146 #define	CMD_PAT_MONOMASK		0x00010000
   242 #define CMD_PAT_PATREG                        0x00020000
   147 #define	CMD_PAT_PATREG			0x00020000
   243 
   148 
   244 #define CMD_OPAQUE                            0x00000000
   149 #define	CMD_OPAQUE			0x00000000
   245 #define CMD_FONT_TRANSPARENT                  0x00040000
   150 #define	CMD_FONT_TRANSPARENT		0x00040000
   246 
   151 
   247 #define CMD_X_INC                             0x00000000
   152 #define	CMD_X_INC			0x00000000
   248 #define CMD_X_DEC                             0x00200000
   153 #define	CMD_X_DEC			0x00200000
   249 
   154 
   250 #define CMD_Y_INC                             0x00000000
   155 #define	CMD_Y_INC			0x00000000
   251 #define CMD_Y_DEC                             0x00100000
   156 #define	CMD_Y_DEC			0x00100000
   252 
   157 
   253 #define CMD_NT_LINE                           0x00000000
   158 #define	CMD_NT_LINE			0x00000000
   254 #define CMD_NORMAL_LINE                       0x00400000
   159 #define	CMD_NORMAL_LINE			0x00400000
   255 
   160 
   256 #define CMD_DRAW_LAST_PIXEL                   0x00000000
   161 #define	CMD_DRAW_LAST_PIXEL		0x00000000
   257 #define CMD_NOT_DRAW_LAST_PIXEL               0x00800000
   162 #define	CMD_NOT_DRAW_LAST_PIXEL		0x00800000
   258 
   163 
   259 #define CMD_DISABLE_LINE_STYLE                0x00000000
   164 #define	CMD_DISABLE_LINE_STYLE		0x00000000
   260 #define CMD_ENABLE_LINE_STYLE                 0x40000000
   165 #define	CMD_ENABLE_LINE_STYLE		0x40000000
   261 
   166 
   262 #define CMD_RESET_STYLE_COUNTER               0x80000000
   167 #define	CMD_RESET_STYLE_COUNTER		0x80000000
   263 #define CMD_NOT_RESET_STYLE_COUNTER           0x00000000
   168 #define	CMD_NOT_RESET_STYLE_COUNTER	0x00000000
   264 
   169 
   265 #define BURST_FORCE_CMD                       0x80000000
   170 #define	QUEUE_MEMORY_MAP		0x02000000
       
   171 #define	STAT_BUSY			0x80000000
   266 
   172 
   267 #define MMIOREG_DST_BASE        (pAST->MMIOvaddr + 0x8008)
   173 #define	BURST_FORCE_CMD			0x80000000
   268 #define MMIOREG_DST_PITCH       (pAST->MMIOvaddr + 0x800C)
       
   269 #define MMIOREG_DST_XY          (pAST->MMIOvaddr + 0x8010)
       
   270 #define MMIOREG_SRC_XY          (pAST->MMIOvaddr + 0x8014)
       
   271 #define MMIOREG_RECT_XY         (pAST->MMIOvaddr + 0x8018)
       
   272 #define MMIOREG_FG              (pAST->MMIOvaddr + 0x801C)
       
   273 #define MMIOREG_BG              (pAST->MMIOvaddr + 0x8020)
       
   274 #define MMIOREG_MONO1           (pAST->MMIOvaddr + 0x802C)
       
   275 #define MMIOREG_MONO2           (pAST->MMIOvaddr + 0x8030)
       
   276 #define MMIOREG_CLIP1           (pAST->MMIOvaddr + 0x8034)
       
   277 #define MMIOREG_CLIP2           (pAST->MMIOvaddr + 0x8038)
       
   278 #define MMIOREG_CMD             (pAST->MMIOvaddr + 0x803C)
       
   279 #define MMIOREG_PAT             (pAST->MMIOvaddr + 0x8100)
       
   280 
   174 
   281 #define MMIOREG_LINE_XY         (pAST->MMIOvaddr + 0x8010)
   175 #define	MMIOREG_DST_BASE		0x8008
   282 #define MMIOREG_LINE_Err        (pAST->MMIOvaddr + 0x8014)
   176 #define	MMIOREG_DST_PITCH		0x800C
   283 #define MMIOREG_LINE_WIDTH      (pAST->MMIOvaddr + 0x8018)
   177 #define	MMIOREG_DST_XY			0x8010
   284 #define MMIOREG_LINE_K1         (pAST->MMIOvaddr + 0x8024)
   178 #define	MMIOREG_SRC_XY			0x8014
   285 #define MMIOREG_LINE_K2         (pAST->MMIOvaddr + 0x8028)
   179 #define	MMIOREG_RECT_XY			0x8018
       
   180 #define	MMIOREG_FG			0x801C
       
   181 #define	MMIOREG_BG			0x8020
       
   182 #define	MMIOREG_MONO1			0x802C
       
   183 #define	MMIOREG_MONO2			0x8030
       
   184 #define	MMIOREG_CLIP1			0x8034
       
   185 #define	MMIOREG_CLIP2			0x8038
       
   186 #define	MMIOREG_CMD			0x803C
       
   187 #define	MMIOREG_QUEUE			0x8044
       
   188 #define	MMIOREG_STAT			0x804C
       
   189 #define	MMIOREG_PAT			0x8100
       
   190 
       
   191 #define	MMIOREG_LINE_XY			0x8010
       
   192 #define	MMIOREG_LINE_ERR		0x8014
       
   193 #define	MMIOREG_LINE_WIDTH		0x8018
       
   194 #define	MMIOREG_LINE_K1			0x8024
       
   195 #define	MMIOREG_LINE_K2			0x8028
   286 
   196 
   287 
   197 
   288 int ast_get_pci_info(int fd, struct pci_info *pci_info); 
       
   289 int ast_get_mem_info(struct pci_info *pci_info, struct ast_info *pAST); 
       
   290 int ast_map_mem(struct ast_info *pAST, return_packet *rp, int test);
       
   291 int ast_unmap_mem(struct ast_info *pAST, return_packet *rp, int test);
       
   292 
       
   293 void ASTSetReg(int fd, int offset, int value);
       
   294 void ASTGetReg(int fd, int offset, int *value);
       
   295 void ASTSetIndexReg(int fd, int offset, int index, unsigned char value);
       
   296 void ASTGetIndexReg(int fd, int offset, int index, unsigned char *value);
       
   297 void ASTSetIndexRegMask(int fd, int offset, int index, int and, unsigned char value);
       
   298 void ASTGetIndexRegMask(int fd, int offset, int index, int and, unsigned char *value);
       
   299 void ASTOpenKey(int fd);
       
   300 unsigned int ASTMMIORead32(unsigned char *addr);
       
   301 void ASTMMIOWrite32(unsigned char *addr, unsigned int data);
       
   302 
       
   303 int ast_init_info(struct ast_info *);
       
   304 
       
   305 #endif /* AST_H */
   198 #endif /* AST_H */