removing atombios and starting clean, after some review I going with Axels suggestion to put it all in the accelerant.. I don't see the radeon_hd driver using AtomBios in the future. sorry for the commit spam
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41086 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
7758e371f4
commit
5e89302676
@ -1,156 +0,0 @@
|
||||
/*
|
||||
* Copyright 2006-2007 Advanced Micro Devices, Inc.
|
||||
*
|
||||
* 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 HOLDER(S) OR AUTHOR(S) 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.
|
||||
*/
|
||||
|
||||
/*++
|
||||
|
||||
Module Name:
|
||||
|
||||
CD_Common_Types.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Defines common data types to use across platforms/SW components
|
||||
|
||||
Revision History:
|
||||
|
||||
NEG:17.09.2002 Initiated.
|
||||
--*/
|
||||
#ifndef _COMMON_TYPES_H_
|
||||
#define _COMMON_TYPES_H_
|
||||
|
||||
#ifndef LINUX
|
||||
#if _MSC_EXTENSIONS
|
||||
|
||||
//
|
||||
// use Microsoft* C complier dependent interger width types
|
||||
//
|
||||
// typedef unsigned __int64 uint64_t;
|
||||
// typedef __int64 int64_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef __int32 int32_t;
|
||||
#elif defined (__linux__) || defined (__NetBSD__) \
|
||||
|| defined(__sun) || defined(__OpenBSD__) \
|
||||
|| defined (__FreeBSD__) || defined(__DragonFly__) || defined(__GLIBC__)
|
||||
typedef unsigned int uint32_t;
|
||||
typedef int int32_t;
|
||||
#else
|
||||
typedef unsigned long uint32_t;
|
||||
typedef signed long int32_t;
|
||||
#endif
|
||||
typedef unsigned char uint8_t;
|
||||
#if (defined(__sun) && defined(_CHAR_IS_SIGNED))
|
||||
typedef char int8_t;
|
||||
#else
|
||||
typedef signed char int8_t;
|
||||
#endif
|
||||
typedef unsigned short uint16_t;
|
||||
typedef signed short int16_t;
|
||||
#endif
|
||||
#ifndef UEFI_BUILD
|
||||
typedef signed int intn_t;
|
||||
typedef unsigned int uintn_t;
|
||||
#else
|
||||
#ifndef EFIX64
|
||||
typedef signed int intn_t;
|
||||
typedef unsigned int uintn_t;
|
||||
#endif
|
||||
#endif
|
||||
#ifndef FGL_LINUX
|
||||
#pragma warning ( disable : 4142 )
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef VOID
|
||||
typedef void VOID;
|
||||
#endif
|
||||
#ifndef UEFI_BUILD
|
||||
typedef intn_t INTN;
|
||||
typedef uintn_t UINTN;
|
||||
#else
|
||||
#ifndef EFIX64
|
||||
typedef intn_t INTN;
|
||||
typedef uintn_t UINTN;
|
||||
#endif
|
||||
#endif
|
||||
#ifndef BOOLEAN
|
||||
typedef uint8_t BOOLEAN;
|
||||
#endif
|
||||
#ifndef INT8
|
||||
typedef int8_t INT8;
|
||||
#endif
|
||||
#ifndef UINT8
|
||||
typedef uint8_t UINT8;
|
||||
#endif
|
||||
#ifndef INT16
|
||||
typedef int16_t INT16;
|
||||
#endif
|
||||
#ifndef UINT16
|
||||
typedef uint16_t UINT16;
|
||||
#endif
|
||||
#ifndef INT32
|
||||
typedef int32_t INT32;
|
||||
#endif
|
||||
#ifndef UINT32
|
||||
typedef uint32_t UINT32;
|
||||
#endif
|
||||
//typedef int64_t INT64;
|
||||
//typedef uint64_t UINT64;
|
||||
typedef uint8_t CHAR8;
|
||||
typedef uint16_t CHAR16;
|
||||
#ifndef USHORT
|
||||
typedef UINT16 USHORT;
|
||||
#endif
|
||||
#ifndef UCHAR
|
||||
typedef UINT8 UCHAR;
|
||||
#endif
|
||||
#ifndef ULONG
|
||||
typedef UINT32 ULONG;
|
||||
#endif
|
||||
|
||||
#ifndef _WIN64
|
||||
#ifndef ULONG_PTR
|
||||
typedef unsigned long ULONG_PTR;
|
||||
#endif // ULONG_PTR
|
||||
#endif // _WIN64
|
||||
|
||||
//#define FAR __far
|
||||
#ifndef TRUE
|
||||
#define TRUE ((BOOLEAN) 1 == 1)
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE ((BOOLEAN) 0 == 1)
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL ((VOID *) 0)
|
||||
#endif
|
||||
|
||||
//typedef UINTN CD_STATUS;
|
||||
|
||||
|
||||
#ifndef FGL_LINUX
|
||||
#pragma warning ( default : 4142 )
|
||||
#endif
|
||||
#endif // _COMMON_TYPES_H_
|
||||
|
||||
// EOF
|
@ -1,49 +0,0 @@
|
||||
/*
|
||||
* Copyright 2006-2007 Advanced Micro Devices, Inc.
|
||||
*
|
||||
* 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 HOLDER(S) OR AUTHOR(S) 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.
|
||||
*/
|
||||
|
||||
/*++
|
||||
|
||||
Module Name:
|
||||
|
||||
CD_Definitions.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Defines Script Language commands
|
||||
|
||||
Revision History:
|
||||
|
||||
NEG:27.08.2002 Initiated.
|
||||
--*/
|
||||
|
||||
#include "CD_Structs.h"
|
||||
#ifndef _CD_DEFINITIONS_H
|
||||
#define _CD_DEFINITIONS_H_
|
||||
#ifdef DRIVER_PARSER
|
||||
VOID *AllocateMemory(VOID *, UINT16);
|
||||
VOID ReleaseMemory(DEVICE_DATA * , WORKING_TABLE_DATA* );
|
||||
#endif
|
||||
CD_STATUS ParseTable(DEVICE_DATA* pDeviceData, UINT8 IndexInMasterTable);
|
||||
//CD_STATUS CD_MainLoop(PARSER_TEMP_DATA_POINTER pParserTempData);
|
||||
CD_STATUS Main_Loop(DEVICE_DATA* pDeviceData,UINT16 *MasterTableOffset,UINT8 IndexInMasterTable);
|
||||
UINT16* GetCommandMasterTablePointer(DEVICE_DATA* pDeviceData);
|
||||
#endif //CD_DEFINITIONS
|
@ -1,181 +0,0 @@
|
||||
/*
|
||||
* Copyright 2006-2007 Advanced Micro Devices, Inc.
|
||||
*
|
||||
* 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 HOLDER(S) OR AUTHOR(S) 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.
|
||||
*/
|
||||
|
||||
/*++
|
||||
|
||||
Module Name:
|
||||
|
||||
CD_OPCODEs.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Defines Command Decoder OPCODEs
|
||||
|
||||
Revision History:
|
||||
|
||||
NEG:24.09.2002 Initiated.
|
||||
--*/
|
||||
#ifndef _CD_OPCODES_H_
|
||||
#define _CD_OPCODES_H_
|
||||
|
||||
typedef enum _OPCODE {
|
||||
Reserved_00= 0, // 0 = 0x00
|
||||
// MOVE_ group
|
||||
MOVE_REG_OPCODE, // 1 = 0x01
|
||||
FirstValidCommand=MOVE_REG_OPCODE,
|
||||
MOVE_PS_OPCODE, // 2 = 0x02
|
||||
MOVE_WS_OPCODE, // 3 = 0x03
|
||||
MOVE_FB_OPCODE, // 4 = 0x04
|
||||
MOVE_PLL_OPCODE, // 5 = 0x05
|
||||
MOVE_MC_OPCODE, // 6 = 0x06
|
||||
// Logic group
|
||||
AND_REG_OPCODE, // 7 = 0x07
|
||||
AND_PS_OPCODE, // 8 = 0x08
|
||||
AND_WS_OPCODE, // 9 = 0x09
|
||||
AND_FB_OPCODE, // 10 = 0x0A
|
||||
AND_PLL_OPCODE, // 11 = 0x0B
|
||||
AND_MC_OPCODE, // 12 = 0x0C
|
||||
OR_REG_OPCODE, // 13 = 0x0D
|
||||
OR_PS_OPCODE, // 14 = 0x0E
|
||||
OR_WS_OPCODE, // 15 = 0x0F
|
||||
OR_FB_OPCODE, // 16 = 0x10
|
||||
OR_PLL_OPCODE, // 17 = 0x11
|
||||
OR_MC_OPCODE, // 18 = 0x12
|
||||
SHIFT_LEFT_REG_OPCODE, // 19 = 0x13
|
||||
SHIFT_LEFT_PS_OPCODE, // 20 = 0x14
|
||||
SHIFT_LEFT_WS_OPCODE, // 21 = 0x15
|
||||
SHIFT_LEFT_FB_OPCODE, // 22 = 0x16
|
||||
SHIFT_LEFT_PLL_OPCODE, // 23 = 0x17
|
||||
SHIFT_LEFT_MC_OPCODE, // 24 = 0x18
|
||||
SHIFT_RIGHT_REG_OPCODE, // 25 = 0x19
|
||||
SHIFT_RIGHT_PS_OPCODE, // 26 = 0x1A
|
||||
SHIFT_RIGHT_WS_OPCODE, // 27 = 0x1B
|
||||
SHIFT_RIGHT_FB_OPCODE, // 28 = 0x1C
|
||||
SHIFT_RIGHT_PLL_OPCODE, // 29 = 0x1D
|
||||
SHIFT_RIGHT_MC_OPCODE, // 30 = 0x1E
|
||||
// Arithmetic group
|
||||
MUL_REG_OPCODE, // 31 = 0x1F
|
||||
MUL_PS_OPCODE, // 32 = 0x20
|
||||
MUL_WS_OPCODE, // 33 = 0x21
|
||||
MUL_FB_OPCODE, // 34 = 0x22
|
||||
MUL_PLL_OPCODE, // 35 = 0x23
|
||||
MUL_MC_OPCODE, // 36 = 0x24
|
||||
DIV_REG_OPCODE, // 37 = 0x25
|
||||
DIV_PS_OPCODE, // 38 = 0x26
|
||||
DIV_WS_OPCODE, // 39 = 0x27
|
||||
DIV_FB_OPCODE, // 40 = 0x28
|
||||
DIV_PLL_OPCODE, // 41 = 0x29
|
||||
DIV_MC_OPCODE, // 42 = 0x2A
|
||||
ADD_REG_OPCODE, // 43 = 0x2B
|
||||
ADD_PS_OPCODE, // 44 = 0x2C
|
||||
ADD_WS_OPCODE, // 45 = 0x2D
|
||||
ADD_FB_OPCODE, // 46 = 0x2E
|
||||
ADD_PLL_OPCODE, // 47 = 0x2F
|
||||
ADD_MC_OPCODE, // 48 = 0x30
|
||||
SUB_REG_OPCODE, // 49 = 0x31
|
||||
SUB_PS_OPCODE, // 50 = 0x32
|
||||
SUB_WS_OPCODE, // 51 = 0x33
|
||||
SUB_FB_OPCODE, // 52 = 0x34
|
||||
SUB_PLL_OPCODE, // 53 = 0x35
|
||||
SUB_MC_OPCODE, // 54 = 0x36
|
||||
// Control grouop
|
||||
SET_ATI_PORT_OPCODE, // 55 = 0x37
|
||||
SET_PCI_PORT_OPCODE, // 56 = 0x38
|
||||
SET_SYS_IO_PORT_OPCODE, // 57 = 0x39
|
||||
SET_REG_BLOCK_OPCODE, // 58 = 0x3A
|
||||
SET_FB_BASE_OPCODE, // 59 = 0x3B
|
||||
COMPARE_REG_OPCODE, // 60 = 0x3C
|
||||
COMPARE_PS_OPCODE, // 61 = 0x3D
|
||||
COMPARE_WS_OPCODE, // 62 = 0x3E
|
||||
COMPARE_FB_OPCODE, // 63 = 0x3F
|
||||
COMPARE_PLL_OPCODE, // 64 = 0x40
|
||||
COMPARE_MC_OPCODE, // 65 = 0x41
|
||||
SWITCH_OPCODE, // 66 = 0x42
|
||||
JUMP__OPCODE, // 67 = 0x43
|
||||
JUMP_EQUAL_OPCODE, // 68 = 0x44
|
||||
JUMP_BELOW_OPCODE, // 69 = 0x45
|
||||
JUMP_ABOVE_OPCODE, // 70 = 0x46
|
||||
JUMP_BELOW_OR_EQUAL_OPCODE, // 71 = 0x47
|
||||
JUMP_ABOVE_OR_EQUAL_OPCODE, // 72 = 0x48
|
||||
JUMP_NOT_EQUAL_OPCODE, // 73 = 0x49
|
||||
TEST_REG_OPCODE, // 74 = 0x4A
|
||||
TEST_PS_OPCODE, // 75 = 0x4B
|
||||
TEST_WS_OPCODE, // 76 = 0x4C
|
||||
TEST_FB_OPCODE, // 77 = 0x4D
|
||||
TEST_PLL_OPCODE, // 78 = 0x4E
|
||||
TEST_MC_OPCODE, // 79 = 0x4F
|
||||
DELAY_MILLISEC_OPCODE, // 80 = 0x50
|
||||
DELAY_MICROSEC_OPCODE, // 81 = 0x51
|
||||
CALL_TABLE_OPCODE, // 82 = 0x52
|
||||
REPEAT_OPCODE, // 83 = 0x53
|
||||
// Miscellaneous group
|
||||
CLEAR_REG_OPCODE, // 84 = 0x54
|
||||
CLEAR_PS_OPCODE, // 85 = 0x55
|
||||
CLEAR_WS_OPCODE, // 86 = 0x56
|
||||
CLEAR_FB_OPCODE, // 87 = 0x57
|
||||
CLEAR_PLL_OPCODE, // 88 = 0x58
|
||||
CLEAR_MC_OPCODE, // 89 = 0x59
|
||||
NOP_OPCODE, // 90 = 0x5A
|
||||
EOT_OPCODE, // 91 = 0x5B
|
||||
MASK_REG_OPCODE, // 92 = 0x5C
|
||||
MASK_PS_OPCODE, // 93 = 0x5D
|
||||
MASK_WS_OPCODE, // 94 = 0x5E
|
||||
MASK_FB_OPCODE, // 95 = 0x5F
|
||||
MASK_PLL_OPCODE, // 96 = 0x60
|
||||
MASK_MC_OPCODE, // 97 = 0x61
|
||||
// BIOS dedicated group
|
||||
POST_CARD_OPCODE, // 98 = 0x62
|
||||
BEEP_OPCODE, // 99 = 0x63
|
||||
SAVE_REG_OPCODE, // 100 = 0x64
|
||||
RESTORE_REG_OPCODE, // 101 = 0x65
|
||||
SET_DATA_BLOCK_OPCODE, // 102 = 0x66
|
||||
|
||||
XOR_REG_OPCODE, // 103 = 0x67
|
||||
XOR_PS_OPCODE, // 104 = 0x68
|
||||
XOR_WS_OPCODE, // 105 = 0x69
|
||||
XOR_FB_OPCODE, // 106 = 0x6a
|
||||
XOR_PLL_OPCODE, // 107 = 0x6b
|
||||
XOR_MC_OPCODE, // 108 = 0x6c
|
||||
|
||||
SHL_REG_OPCODE, // 109 = 0x6d
|
||||
SHL_PS_OPCODE, // 110 = 0x6e
|
||||
SHL_WS_OPCODE, // 111 = 0x6f
|
||||
SHL_FB_OPCODE, // 112 = 0x70
|
||||
SHL_PLL_OPCODE, // 113 = 0x71
|
||||
SHL_MC_OPCODE, // 114 = 0x72
|
||||
|
||||
SHR_REG_OPCODE, // 115 = 0x73
|
||||
SHR_PS_OPCODE, // 116 = 0x74
|
||||
SHR_WS_OPCODE, // 117 = 0x75
|
||||
SHR_FB_OPCODE, // 118 = 0x76
|
||||
SHR_PLL_OPCODE, // 119 = 0x77
|
||||
SHR_MC_OPCODE, // 120 = 0x78
|
||||
|
||||
DEBUG_OPCODE, // 121 = 0x79
|
||||
CTB_DS_OPCODE, // 122 = 0x7A
|
||||
|
||||
LastValidCommand = CTB_DS_OPCODE,
|
||||
// Extension specificaTOR
|
||||
Extension = 0x80, // 128 = 0x80 // Next byte is an OPCODE as well
|
||||
Reserved_FF = 255 // 255 = 0xFF
|
||||
}OPCODE;
|
||||
#endif // _CD_OPCODES_H_
|
@ -1,464 +0,0 @@
|
||||
/*
|
||||
* Copyright 2006-2007 Advanced Micro Devices, Inc.
|
||||
*
|
||||
* 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 HOLDER(S) OR AUTHOR(S) 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.
|
||||
*/
|
||||
|
||||
/*++
|
||||
|
||||
Module Name:
|
||||
|
||||
CD_Struct.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Defines Script Language commands
|
||||
|
||||
Revision History:
|
||||
|
||||
NEG:26.08.2002 Initiated.
|
||||
--*/
|
||||
|
||||
#include "CD_binding.h"
|
||||
#ifndef _CD_STRUCTS_H_
|
||||
#define _CD_STRUCTS_H_
|
||||
|
||||
#ifdef UEFI_BUILD
|
||||
typedef UINT16** PTABLE_UNIT_TYPE;
|
||||
typedef UINTN TABLE_UNIT_TYPE;
|
||||
#else
|
||||
typedef UINT16* PTABLE_UNIT_TYPE;
|
||||
typedef UINT16 TABLE_UNIT_TYPE;
|
||||
#endif
|
||||
|
||||
#include <regsdef.h> //This important file is dynamically generated based on the ASIC!!!!
|
||||
|
||||
#define PARSER_MAJOR_REVISION 5
|
||||
#define PARSER_MINOR_REVISION 0
|
||||
|
||||
//#include "atombios.h"
|
||||
#if (PARSER_TYPE==DRIVER_TYPE_PARSER)
|
||||
#ifdef FGL_LINUX
|
||||
#pragma pack(push,1)
|
||||
#else
|
||||
#pragma pack(push)
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "CD_Common_Types.h"
|
||||
#include "CD_Opcodes.h"
|
||||
typedef UINT16 WORK_SPACE_SIZE;
|
||||
typedef enum _CD_STATUS{
|
||||
CD_SUCCESS,
|
||||
CD_CALL_TABLE,
|
||||
CD_COMPLETED=0x10,
|
||||
CD_GENERAL_ERROR=0x80,
|
||||
CD_INVALID_OPCODE,
|
||||
CD_NOT_IMPLEMENTED,
|
||||
CD_EXEC_TABLE_NOT_FOUND,
|
||||
CD_EXEC_PARAMETER_ERROR,
|
||||
CD_EXEC_PARSER_ERROR,
|
||||
CD_INVALID_DESTINATION_TYPE,
|
||||
CD_UNEXPECTED_BEHAVIOR,
|
||||
CD_INVALID_SWITCH_OPERAND_SIZE
|
||||
}CD_STATUS;
|
||||
|
||||
#define PARSER_STRINGS 0
|
||||
#define PARSER_DEC 1
|
||||
#define PARSER_HEX 2
|
||||
|
||||
#define DB_CURRENT_COMMAND_TABLE 0xFF
|
||||
|
||||
#define TABLE_FORMAT_BIOS 0
|
||||
#define TABLE_FORMAT_EASF 1
|
||||
|
||||
#define EASF_TABLE_INDEX_MASK 0xfc
|
||||
#define EASF_TABLE_ATTR_MASK 0x03
|
||||
|
||||
#define CD_ERROR(a) (((INTN) (a)) > CD_COMPLETED)
|
||||
#define CD_ERROR_OR_COMPLETED(a) (((INTN) (a)) > CD_SUCCESS)
|
||||
|
||||
|
||||
#if (BIOS_PARSER==1)
|
||||
#ifdef _H2INC
|
||||
#define STACK_BASED
|
||||
#else
|
||||
extern __segment farstack;
|
||||
#define STACK_BASED __based(farstack)
|
||||
#endif
|
||||
#else
|
||||
#define STACK_BASED
|
||||
#endif
|
||||
|
||||
typedef enum _COMPARE_FLAGS{
|
||||
Below,
|
||||
Equal,
|
||||
Above,
|
||||
NotEqual,
|
||||
Overflow,
|
||||
NoCondition
|
||||
}COMPARE_FLAGS;
|
||||
|
||||
typedef UINT16 IO_BASE_ADDR;
|
||||
|
||||
typedef struct _BUS_DEV_FUNC_PCI_ADDR{
|
||||
UINT8 Register;
|
||||
UINT8 Function;
|
||||
UINT8 Device;
|
||||
UINT8 Bus;
|
||||
} BUS_DEV_FUNC_PCI_ADDR;
|
||||
|
||||
typedef struct _BUS_DEV_FUNC{
|
||||
UINT8 Function : 3;
|
||||
UINT8 Device : 5;
|
||||
UINT8 Bus;
|
||||
} BUS_DEV_FUNC;
|
||||
|
||||
#ifndef UEFI_BUILD
|
||||
typedef struct _PCI_CONFIG_ACCESS_CF8{
|
||||
UINT32 Reg : 8;
|
||||
UINT32 Func : 3;
|
||||
UINT32 Dev : 5;
|
||||
UINT32 Bus : 8;
|
||||
UINT32 Reserved: 7;
|
||||
UINT32 Enable : 1;
|
||||
} PCI_CONFIG_ACCESS_CF8;
|
||||
#endif
|
||||
|
||||
typedef enum _MEM_RESOURCE {
|
||||
Stack_Resource,
|
||||
FrameBuffer_Resource,
|
||||
BIOS_Image_Resource
|
||||
}MEM_RESOURCE;
|
||||
|
||||
typedef enum _PORTS{
|
||||
ATI_RegsPort,
|
||||
PCI_Port,
|
||||
SystemIO_Port
|
||||
}PORTS;
|
||||
|
||||
typedef enum _OPERAND_TYPE {
|
||||
typeRegister,
|
||||
typeParamSpace,
|
||||
typeWorkSpace,
|
||||
typeFrameBuffer,
|
||||
typeIndirect,
|
||||
typeDirect,
|
||||
typePLL,
|
||||
typeMC
|
||||
}OPERAND_TYPE;
|
||||
|
||||
typedef enum _DESTINATION_OPERAND_TYPE {
|
||||
destRegister,
|
||||
destParamSpace,
|
||||
destWorkSpace,
|
||||
destFrameBuffer,
|
||||
destPLL,
|
||||
destMC
|
||||
}DESTINATION_OPERAND_TYPE;
|
||||
|
||||
typedef enum _SOURCE_OPERAND_TYPE {
|
||||
sourceRegister,
|
||||
sourceParamSpace,
|
||||
sourceWorkSpace,
|
||||
sourceFrameBuffer,
|
||||
sourceIndirect,
|
||||
sourceDirect,
|
||||
sourcePLL,
|
||||
sourceMC
|
||||
}SOURCE_OPERAND_TYPE;
|
||||
|
||||
typedef enum _ALIGNMENT_TYPE {
|
||||
alignmentDword,
|
||||
alignmentLowerWord,
|
||||
alignmentMiddleWord,
|
||||
alignmentUpperWord,
|
||||
alignmentByte0,
|
||||
alignmentByte1,
|
||||
alignmentByte2,
|
||||
alignmentByte3
|
||||
}ALIGNMENT_TYPE;
|
||||
|
||||
|
||||
#define INDIRECT_IO_READ 0
|
||||
#define INDIRECT_IO_WRITE 0x80
|
||||
#define INDIRECT_IO_MM 0
|
||||
#define INDIRECT_IO_PLL 1
|
||||
#define INDIRECT_IO_MC 2
|
||||
|
||||
typedef struct _PARAMETERS_TYPE{
|
||||
UINT8 Destination;
|
||||
UINT8 Source;
|
||||
}PARAMETERS_TYPE;
|
||||
/* The following structures don't used to allocate any type of objects(variables).
|
||||
they are serve the only purpose: Get proper access to data(commands), found in the tables*/
|
||||
typedef struct _PA_BYTE_BYTE{
|
||||
UINT8 PA_Destination;
|
||||
UINT8 PA_Source;
|
||||
UINT8 PA_Padding[8];
|
||||
}PA_BYTE_BYTE;
|
||||
typedef struct _PA_BYTE_WORD{
|
||||
UINT8 PA_Destination;
|
||||
UINT16 PA_Source;
|
||||
UINT8 PA_Padding[7];
|
||||
}PA_BYTE_WORD;
|
||||
typedef struct _PA_BYTE_DWORD{
|
||||
UINT8 PA_Destination;
|
||||
UINT32 PA_Source;
|
||||
UINT8 PA_Padding[5];
|
||||
}PA_BYTE_DWORD;
|
||||
typedef struct _PA_WORD_BYTE{
|
||||
UINT16 PA_Destination;
|
||||
UINT8 PA_Source;
|
||||
UINT8 PA_Padding[7];
|
||||
}PA_WORD_BYTE;
|
||||
typedef struct _PA_WORD_WORD{
|
||||
UINT16 PA_Destination;
|
||||
UINT16 PA_Source;
|
||||
UINT8 PA_Padding[6];
|
||||
}PA_WORD_WORD;
|
||||
typedef struct _PA_WORD_DWORD{
|
||||
UINT16 PA_Destination;
|
||||
UINT32 PA_Source;
|
||||
UINT8 PA_Padding[4];
|
||||
}PA_WORD_DWORD;
|
||||
typedef struct _PA_WORD_XX{
|
||||
UINT16 PA_Destination;
|
||||
UINT8 PA_Padding[8];
|
||||
}PA_WORD_XX;
|
||||
typedef struct _PA_BYTE_XX{
|
||||
UINT8 PA_Destination;
|
||||
UINT8 PA_Padding[9];
|
||||
}PA_BYTE_XX;
|
||||
/*The following 6 definitions used for Mask operation*/
|
||||
typedef struct _PA_BYTE_BYTE_BYTE{
|
||||
UINT8 PA_Destination;
|
||||
UINT8 PA_AndMaskByte;
|
||||
UINT8 PA_OrMaskByte;
|
||||
UINT8 PA_Padding[7];
|
||||
}PA_BYTE_BYTE_BYTE;
|
||||
typedef struct _PA_BYTE_WORD_WORD{
|
||||
UINT8 PA_Destination;
|
||||
UINT16 PA_AndMaskWord;
|
||||
UINT16 PA_OrMaskWord;
|
||||
UINT8 PA_Padding[5];
|
||||
}PA_BYTE_WORD_WORD;
|
||||
typedef struct _PA_BYTE_DWORD_DWORD{
|
||||
UINT8 PA_Destination;
|
||||
UINT32 PA_AndMaskDword;
|
||||
UINT32 PA_OrMaskDword;
|
||||
UINT8 PA_Padding;
|
||||
}PA_BYTE_DWORD_DWORD;
|
||||
typedef struct _PA_WORD_BYTE_BYTE{
|
||||
UINT16 PA_Destination;
|
||||
UINT8 PA_AndMaskByte;
|
||||
UINT8 PA_OrMaskByte;
|
||||
UINT8 PA_Padding[6];
|
||||
}PA_WORD_BYTE_BYTE;
|
||||
typedef struct _PA_WORD_WORD_WORD{
|
||||
UINT16 PA_Destination;
|
||||
UINT16 PA_AndMaskWord;
|
||||
UINT16 PA_OrMaskWord;
|
||||
UINT8 PA_Padding[4];
|
||||
}PA_WORD_WORD_WORD;
|
||||
typedef struct _PA_WORD_DWORD_DWORD{
|
||||
UINT16 PA_Destination;
|
||||
UINT32 PA_AndMaskDword;
|
||||
UINT32 PA_OrMaskDword;
|
||||
}PA_WORD_DWORD_DWORD;
|
||||
|
||||
|
||||
typedef union _PARAMETER_ACCESS {
|
||||
PA_BYTE_XX ByteXX;
|
||||
PA_BYTE_BYTE ByteByte;
|
||||
PA_BYTE_WORD ByteWord;
|
||||
PA_BYTE_DWORD ByteDword;
|
||||
PA_WORD_BYTE WordByte;
|
||||
PA_WORD_WORD WordWord;
|
||||
PA_WORD_DWORD WordDword;
|
||||
PA_WORD_XX WordXX;
|
||||
/*The following 6 definitions used for Mask operation*/
|
||||
PA_BYTE_BYTE_BYTE ByteByteAndByteOr;
|
||||
PA_BYTE_WORD_WORD ByteWordAndWordOr;
|
||||
PA_BYTE_DWORD_DWORD ByteDwordAndDwordOr;
|
||||
PA_WORD_BYTE_BYTE WordByteAndByteOr;
|
||||
PA_WORD_WORD_WORD WordWordAndWordOr;
|
||||
PA_WORD_DWORD_DWORD WordDwordAndDwordOr;
|
||||
}PARAMETER_ACCESS;
|
||||
|
||||
typedef struct _COMMAND_ATTRIBUTE {
|
||||
UINT8 Source:3;
|
||||
UINT8 SourceAlignment:3;
|
||||
UINT8 DestinationAlignment:2;
|
||||
}COMMAND_ATTRIBUTE;
|
||||
|
||||
typedef struct _SOURCE_DESTINATION_ALIGNMENT{
|
||||
UINT8 DestAlignment;
|
||||
UINT8 SrcAlignment;
|
||||
}SOURCE_DESTINATION_ALIGNMENT;
|
||||
typedef struct _MULTIPLICATION_RESULT{
|
||||
UINT32 Low32Bit;
|
||||
UINT32 High32Bit;
|
||||
}MULTIPLICATION_RESULT;
|
||||
typedef struct _DIVISION_RESULT{
|
||||
UINT32 Quotient32;
|
||||
UINT32 Reminder32;
|
||||
}DIVISION_RESULT;
|
||||
typedef union _DIVISION_MULTIPLICATION_RESULT{
|
||||
MULTIPLICATION_RESULT Multiplication;
|
||||
DIVISION_RESULT Division;
|
||||
}DIVISION_MULTIPLICATION_RESULT;
|
||||
typedef struct _COMMAND_HEADER {
|
||||
UINT8 Opcode;
|
||||
COMMAND_ATTRIBUTE Attribute;
|
||||
}COMMAND_HEADER;
|
||||
|
||||
typedef struct _GENERIC_ATTRIBUTE_COMMAND{
|
||||
COMMAND_HEADER Header;
|
||||
PARAMETER_ACCESS Parameters;
|
||||
} GENERIC_ATTRIBUTE_COMMAND;
|
||||
|
||||
typedef struct _COMMAND_TYPE_1{
|
||||
UINT8 Opcode;
|
||||
PARAMETER_ACCESS Parameters;
|
||||
} COMMAND_TYPE_1;
|
||||
|
||||
typedef struct _COMMAND_TYPE_OPCODE_OFFSET16{
|
||||
UINT8 Opcode;
|
||||
UINT16 CD_Offset16;
|
||||
} COMMAND_TYPE_OPCODE_OFFSET16;
|
||||
|
||||
typedef struct _COMMAND_TYPE_OPCODE_OFFSET32{
|
||||
UINT8 Opcode;
|
||||
UINT32 CD_Offset32;
|
||||
} COMMAND_TYPE_OPCODE_OFFSET32;
|
||||
|
||||
typedef struct _COMMAND_TYPE_OPCODE_VALUE_BYTE{
|
||||
UINT8 Opcode;
|
||||
UINT8 Value;
|
||||
} COMMAND_TYPE_OPCODE_VALUE_BYTE;
|
||||
|
||||
typedef union _COMMAND_SPECIFIC_UNION{
|
||||
UINT8 ContinueSwitch;
|
||||
UINT8 ControlOperandSourcePosition;
|
||||
UINT8 IndexInMasterTable;
|
||||
} COMMAND_SPECIFIC_UNION;
|
||||
|
||||
|
||||
typedef struct _CD_GENERIC_BYTE{
|
||||
UINT16 CommandType:3;
|
||||
UINT16 CurrentParameterSize:3;
|
||||
UINT16 CommandAccessType:3;
|
||||
UINT16 CurrentPort:2;
|
||||
UINT16 PS_SizeInDwordsUsedByCallingTable:5;
|
||||
}CD_GENERIC_BYTE;
|
||||
|
||||
typedef UINT8 COMMAND_TYPE_OPCODE_ONLY;
|
||||
|
||||
typedef UINT8 COMMAND_HEADER_POINTER;
|
||||
|
||||
|
||||
#if (PARSER_TYPE==BIOS_TYPE_PARSER)
|
||||
|
||||
typedef struct _DEVICE_DATA {
|
||||
UINT32 STACK_BASED *pParameterSpace;
|
||||
UINT8 *pBIOS_Image;
|
||||
UINT8 format;
|
||||
#if (IO_INTERFACE==PARSER_INTERFACE)
|
||||
IO_BASE_ADDR IOBase;
|
||||
#endif
|
||||
} DEVICE_DATA;
|
||||
|
||||
#else
|
||||
|
||||
typedef struct _DEVICE_DATA {
|
||||
UINT32 *pParameterSpace;
|
||||
VOID *CAIL;
|
||||
UINT8 *pBIOS_Image;
|
||||
UINT32 format;
|
||||
} DEVICE_DATA;
|
||||
|
||||
#endif
|
||||
|
||||
struct _PARSER_TEMP_DATA;
|
||||
typedef UINT32 WORKSPACE_POINTER;
|
||||
|
||||
struct _WORKING_TABLE_DATA{
|
||||
UINT8 * pTableHead;
|
||||
COMMAND_HEADER_POINTER * IP; // Commands pointer
|
||||
WORKSPACE_POINTER STACK_BASED * pWorkSpace;
|
||||
struct _WORKING_TABLE_DATA STACK_BASED * prevWorkingTableData;
|
||||
};
|
||||
|
||||
|
||||
|
||||
typedef struct _PARSER_TEMP_DATA{
|
||||
DEVICE_DATA STACK_BASED *pDeviceData;
|
||||
struct _WORKING_TABLE_DATA STACK_BASED *pWorkingTableData;
|
||||
UINT32 SourceData32;
|
||||
UINT32 DestData32;
|
||||
DIVISION_MULTIPLICATION_RESULT MultiplicationOrDivision;
|
||||
UINT32 Index;
|
||||
UINT32 CurrentFB_Window;
|
||||
UINT32 IndirectData;
|
||||
UINT16 CurrentRegBlock;
|
||||
TABLE_UNIT_TYPE CurrentDataBlock;
|
||||
UINT16 AttributesData;
|
||||
// UINT8 *IndirectIOTable;
|
||||
UINT8 *IndirectIOTablePointer;
|
||||
GENERIC_ATTRIBUTE_COMMAND *pCmd; //CurrentCommand;
|
||||
SOURCE_DESTINATION_ALIGNMENT CD_Mask;
|
||||
PARAMETERS_TYPE ParametersType;
|
||||
CD_GENERIC_BYTE Multipurpose;
|
||||
UINT8 CompareFlags;
|
||||
COMMAND_SPECIFIC_UNION CommandSpecific;
|
||||
CD_STATUS Status;
|
||||
UINT8 Shift2MaskConverter;
|
||||
UINT8 CurrentPortID;
|
||||
} PARSER_TEMP_DATA;
|
||||
|
||||
|
||||
typedef struct _WORKING_TABLE_DATA WORKING_TABLE_DATA;
|
||||
|
||||
|
||||
|
||||
typedef VOID (*COMMANDS_DECODER)(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
typedef VOID (*WRITE_IO_FUNCTION)(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
typedef UINT32 (*READ_IO_FUNCTION)(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
typedef UINT32 (*CD_GET_PARAMETERS)(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
typedef struct _COMMANDS_PROPERTIES
|
||||
{
|
||||
COMMANDS_DECODER function;
|
||||
UINT8 destination;
|
||||
UINT8 headersize;
|
||||
} COMMANDS_PROPERTIES;
|
||||
|
||||
typedef struct _INDIRECT_IO_PARSER_COMMANDS
|
||||
{
|
||||
COMMANDS_DECODER func;
|
||||
UINT8 csize;
|
||||
} INDIRECT_IO_PARSER_COMMANDS;
|
||||
|
||||
#if (PARSER_TYPE==DRIVER_TYPE_PARSER)
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Copyright 2006-2007 Advanced Micro Devices, Inc.
|
||||
*
|
||||
* 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 HOLDER(S) OR AUTHOR(S) 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.
|
||||
*/
|
||||
|
||||
#ifdef NT_BUILD
|
||||
#ifdef LH_BUILD
|
||||
#include <ntddk.h>
|
||||
#else
|
||||
#include <miniport.h>
|
||||
#endif // LH_BUILD
|
||||
#endif // NT_BUILD
|
||||
|
||||
|
||||
#if ((defined DBG) || (defined DEBUG))
|
||||
#define DEBUG_PARSER 1 // enable parser debug output
|
||||
#endif
|
||||
|
||||
#define USE_SWITCH_COMMAND 1
|
||||
#define DRIVER_TYPE_PARSER 0x48
|
||||
|
||||
#define PARSER_TYPE DRIVER_TYPE_PARSER
|
||||
|
||||
#define AllocateWorkSpace(x,y) AllocateMemory(pDeviceData,y)
|
||||
#define FreeWorkSpace(x,y) ReleaseMemory(x,y)
|
||||
|
||||
#define RELATIVE_TO_BIOS_IMAGE( x ) ((ULONG_PTR)x + (ULONG_PTR)((DEVICE_DATA*)pParserTempData->pDeviceData->pBIOS_Image))
|
||||
#define RELATIVE_TO_TABLE( x ) (x + (UCHAR *)(pParserTempData->pWorkingTableData->pTableHead))
|
||||
|
@ -1,318 +0,0 @@
|
||||
/*
|
||||
* Copyright 2006-2007 Advanced Micro Devices, Inc.
|
||||
*
|
||||
* 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 HOLDER(S) OR AUTHOR(S) 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.
|
||||
*/
|
||||
|
||||
#ifndef _HW_SERVICES_INTERFACE_
|
||||
#define _HW_SERVICES_INTERFACE_
|
||||
|
||||
#include "CD_Common_Types.h"
|
||||
#include "CD_Structs.h"
|
||||
|
||||
|
||||
// CD - from Command Decoder
|
||||
typedef UINT16 CD_REG_INDEX;
|
||||
typedef UINT8 CD_PCI_OFFSET;
|
||||
typedef UINT16 CD_FB_OFFSET;
|
||||
typedef UINT16 CD_SYS_IO_PORT;
|
||||
typedef UINT8 CD_MEM_TYPE;
|
||||
typedef UINT8 CD_MEM_SIZE;
|
||||
|
||||
typedef VOID * CD_VIRT_ADDR;
|
||||
typedef UINT32 CD_PHYS_ADDR;
|
||||
typedef UINT32 CD_IO_ADDR;
|
||||
|
||||
/***********************ATI Registers access routines**************************/
|
||||
|
||||
VOID ReadIndReg32(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
VOID WriteIndReg32(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
UINT32 ReadReg32(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
VOID WriteReg32(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
UINT32 ReadPLL32(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
VOID WritePLL32(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
UINT32 ReadMC32(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
VOID WriteMC32(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
/************************PCI Registers access routines*************************/
|
||||
|
||||
UINT8 ReadPCIReg8(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
UINT16 ReadPCIReg16(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
UINT32 ReadPCIReg32(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
VOID WritePCIReg8(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
VOID WritePCIReg16(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
VOID WritePCIReg32(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
/***************************Frame buffer access routines************************/
|
||||
|
||||
UINT32 ReadFrameBuffer32(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
VOID WriteFrameBuffer32(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
/******************System IO Registers access routines********************/
|
||||
|
||||
UINT8 ReadSysIOReg8(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
UINT16 ReadSysIOReg16(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
UINT32 ReadSysIOReg32(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
VOID WriteSysIOReg8(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
VOID WriteSysIOReg16(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
VOID WriteSysIOReg32(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
/****************************Delay routines****************************************/
|
||||
|
||||
VOID DelayMicroseconds(PARSER_TEMP_DATA STACK_BASED * pParserTempData); // take WORKING_TABLE_DATA->SourceData32 as a delay value
|
||||
|
||||
VOID DelayMilliseconds(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
VOID PostCharOutput(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
VOID CallerDebugFunc(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
|
||||
//************************Tracing/Debugging routines and macroses******************/
|
||||
#define KEYPRESSED -1
|
||||
|
||||
#if (DEBUG_PARSER != 0)
|
||||
|
||||
#ifdef DRIVER_PARSER
|
||||
|
||||
VOID CD_print_string (DEVICE_DATA STACK_BASED *pDeviceData, UINT8 *str);
|
||||
VOID CD_print_value (DEVICE_DATA STACK_BASED *pDeviceData, ULONG_PTR value, UINT16 value_type );
|
||||
|
||||
// Level 1 : can use WorkingTableData or pDeviceData
|
||||
#define CD_TRACE_DL1(string) CD_print_string(pDeviceData, string);
|
||||
#define CD_TRACETAB_DL1(string) CD_TRACE_DL1("\n");CD_TRACE_DL1(string)
|
||||
#define CD_TRACEDEC_DL1(value) CD_print_value( pDeviceData, (ULONG_PTR)value, PARSER_DEC);
|
||||
#define CD_TRACEHEX_DL1(value) CD_print_value( pDeviceData, (ULONG_PTR)value, PARSER_HEX);
|
||||
|
||||
// Level 2:can use pWorkingTableData
|
||||
#define CD_TRACE_DL2(string) CD_print_string( pWorkingTableData->pParserTempData->pDeviceData, string);
|
||||
#define CD_TRACETAB_DL2(string) CD_TRACE_DL2("\n");CD_TRACE_DL2(string)
|
||||
#define CD_TRACEDEC_DL2(value) CD_print_value( pWorkingTableData->pParserTempData->pDeviceData, (ULONG_PTR)value, PARSER_DEC);
|
||||
#define CD_TRACEHEX_DL2(value) CD_print_value( pWorkingTableData->pParserTempData->pDeviceData, (ULONG_PTR)value, PARSER_HEX);
|
||||
|
||||
// Level 3:can use pWorkingTableData
|
||||
#define CD_TRACE_DL3(string) CD_print_string( pWorkingTableData->pParserTempData->pDeviceData, string);
|
||||
#define CD_TRACETAB_DL3(string) CD_TRACE_DL3("\n");CD_TRACE_DL3(string)
|
||||
#define CD_TRACEDEC_DL3(value) CD_print_value( pWorkingTableData->pParserTempData->pDeviceData, value, PARSER_DEC);
|
||||
#define CD_TRACEHEX_DL3(value) CD_print_value( pWorkingTableData->pParserTempData->pDeviceData, value, PARSER_HEX);
|
||||
|
||||
#define CD_TRACE(string)
|
||||
#define CD_WAIT(what)
|
||||
#define CD_BREAKPOINT()
|
||||
|
||||
#else
|
||||
|
||||
|
||||
VOID CD_assert (UINT8 *file, INTN lineno); //output file/line to debug console
|
||||
VOID CD_postcode(UINT8 value); //output post code to debug console
|
||||
VOID CD_print (UINT8 *str); //output text to debug console
|
||||
VOID CD_print_dec(UINTN value); //output value in decimal format to debug console
|
||||
VOID CD_print_hex(UINT32 value, UINT8 len); //output value in hexadecimal format to debug console
|
||||
VOID CD_print_buf(UINT8 *p, UINTN len); //output dump of memory to debug console
|
||||
VOID CD_wait(INT32 what); //wait for KEYPRESSED=-1 or Delay value expires
|
||||
VOID CD_breakpoint(); //insert int3 opcode or 0xF1 (for American Arium)
|
||||
|
||||
#define CD_ASSERT(condition) if(!(condition)) CD_assert(__FILE__, __LINE__)
|
||||
#define CD_POSTCODE(value) CD_postcode(value)
|
||||
#define CD_TRACE(string) CD_print(string)
|
||||
#define CD_TRACETAB(string) CD_print(string)
|
||||
#define CD_TRACEDEC(value) CD_print_dec( (UINTN)(value))
|
||||
#define CD_TRACEHEX(value) CD_print_hex( (UINT32)(value), sizeof(value) )
|
||||
#define CD_TRACEBUF(pointer, len) CD_print_buf( (UINT8 *)(pointer), (UINTN) len)
|
||||
#define CD_WAIT(what) CD_wait((INT32)what)
|
||||
#define CD_BREAKPOINT() CD_breakpoint()
|
||||
|
||||
#if (DEBUG_PARSER == 4)
|
||||
#define CD_ASSERT_DL4(condition) if(!(condition)) CD_assert(__FILE__, __LINE__)
|
||||
#define CD_POSTCODE_DL4(value) CD_postcode(value)
|
||||
#define CD_TRACE_DL4(string) CD_print(string)
|
||||
#define CD_TRACETAB_DL4(string) CD_print("\n\t\t");CD_print(string)
|
||||
#define CD_TRACEDEC_DL4(value) CD_print_dec( (UINTN)(value))
|
||||
#define CD_TRACEHEX_DL4(value) CD_print_hex( (UINT32)(value), sizeof(value) )
|
||||
#define CD_TRACEBUF_DL4(pointer, len) CD_print_buf( (UINT8 *)(pointer), (UINTN) len)
|
||||
#define CD_WAIT_DL4(what) CD_wait((INT32)what)
|
||||
#define CD_BREAKPOINT_DL4() CD_breakpoint()
|
||||
#else
|
||||
#define CD_ASSERT_DL4(condition)
|
||||
#define CD_POSTCODE_DL4(value)
|
||||
#define CD_TRACE_DL4(string)
|
||||
#define CD_TRACETAB_DL4(string)
|
||||
#define CD_TRACEDEC_DL4(value)
|
||||
#define CD_TRACEHEX_DL4(value)
|
||||
#define CD_TRACEBUF_DL4(pointer, len)
|
||||
#define CD_WAIT_DL4(what)
|
||||
#define CD_BREAKPOINT_DL4()
|
||||
#endif
|
||||
|
||||
#if (DEBUG_PARSER >= 3)
|
||||
#define CD_ASSERT_DL3(condition) if(!(condition)) CD_assert(__FILE__, __LINE__)
|
||||
#define CD_POSTCODE_DL3(value) CD_postcode(value)
|
||||
#define CD_TRACE_DL3(string) CD_print(string)
|
||||
#define CD_TRACETAB_DL3(string) CD_print("\n\t\t");CD_print(string)
|
||||
#define CD_TRACEDEC_DL3(value) CD_print_dec( (UINTN)(value))
|
||||
#define CD_TRACEHEX_DL3(value) CD_print_hex( (UINT32)(value), sizeof(value) )
|
||||
#define CD_TRACEBUF_DL3(pointer, len) CD_print_buf( (UINT8 *)(pointer), (UINTN) len)
|
||||
#define CD_WAIT_DL3(what) CD_wait((INT32)what)
|
||||
#define CD_BREAKPOINT_DL3() CD_breakpoint()
|
||||
#else
|
||||
#define CD_ASSERT_DL3(condition)
|
||||
#define CD_POSTCODE_DL3(value)
|
||||
#define CD_TRACE_DL3(string)
|
||||
#define CD_TRACETAB_DL3(string)
|
||||
#define CD_TRACEDEC_DL3(value)
|
||||
#define CD_TRACEHEX_DL3(value)
|
||||
#define CD_TRACEBUF_DL3(pointer, len)
|
||||
#define CD_WAIT_DL3(what)
|
||||
#define CD_BREAKPOINT_DL3()
|
||||
#endif
|
||||
|
||||
|
||||
#if (DEBUG_PARSER >= 2)
|
||||
#define CD_ASSERT_DL2(condition) if(!(condition)) CD_assert(__FILE__, __LINE__)
|
||||
#define CD_POSTCODE_DL2(value) CD_postcode(value)
|
||||
#define CD_TRACE_DL2(string) CD_print(string)
|
||||
#define CD_TRACETAB_DL2(string) CD_print("\n\t");CD_print(string)
|
||||
#define CD_TRACEDEC_DL2(value) CD_print_dec( (UINTN)(value))
|
||||
#define CD_TRACEHEX_DL2(value) CD_print_hex( (UINT32)(value), sizeof(value) )
|
||||
#define CD_TRACEBUF_DL2(pointer, len) CD_print_buf( (UINT8 *)(pointer), (UINTN) len)
|
||||
#define CD_WAIT_DL2(what) CD_wait((INT32)what)
|
||||
#define CD_BREAKPOINT_DL2() CD_breakpoint()
|
||||
#else
|
||||
#define CD_ASSERT_DL2(condition)
|
||||
#define CD_POSTCODE_DL2(value)
|
||||
#define CD_TRACE_DL2(string)
|
||||
#define CD_TRACETAB_DL2(string)
|
||||
#define CD_TRACEDEC_DL2(value)
|
||||
#define CD_TRACEHEX_DL2(value)
|
||||
#define CD_TRACEBUF_DL2(pointer, len)
|
||||
#define CD_WAIT_DL2(what)
|
||||
#define CD_BREAKPOINT_DL2()
|
||||
#endif
|
||||
|
||||
|
||||
#if (DEBUG_PARSER >= 1)
|
||||
#define CD_ASSERT_DL1(condition) if(!(condition)) CD_assert(__FILE__, __LINE__)
|
||||
#define CD_POSTCODE_DL1(value) CD_postcode(value)
|
||||
#define CD_TRACE_DL1(string) CD_print(string)
|
||||
#define CD_TRACETAB_DL1(string) CD_print("\n");CD_print(string)
|
||||
#define CD_TRACEDEC_DL1(value) CD_print_dec( (UINTN)(value))
|
||||
#define CD_TRACEHEX_DL1(value) CD_print_hex( (UINT32)(value), sizeof(value) )
|
||||
#define CD_TRACEBUF_DL1(pointer, len) CD_print_buf( (UINT8 *)(pointer), (UINTN) len)
|
||||
#define CD_WAIT_DL1(what) CD_wait((INT32)what)
|
||||
#define CD_BREAKPOINT_DL1() CD_breakpoint()
|
||||
#else
|
||||
#define CD_ASSERT_DL1(condition)
|
||||
#define CD_POSTCODE_DL1(value)
|
||||
#define CD_TRACE_DL1(string)
|
||||
#define CD_TRACETAB_DL1(string)
|
||||
#define CD_TRACEDEC_DL1(value)
|
||||
#define CD_TRACEHEX_DL1(value)
|
||||
#define CD_TRACEBUF_DL1(pointer, len)
|
||||
#define CD_WAIT_DL1(what)
|
||||
#define CD_BREAKPOINT_DL1()
|
||||
#endif
|
||||
|
||||
#endif //#ifdef DRIVER_PARSER
|
||||
|
||||
|
||||
#else
|
||||
|
||||
#define CD_ASSERT(condition)
|
||||
#define CD_POSTCODE(value)
|
||||
#define CD_TRACE(string)
|
||||
#define CD_TRACEDEC(value)
|
||||
#define CD_TRACEHEX(value)
|
||||
#define CD_TRACEBUF(pointer, len)
|
||||
#define CD_WAIT(what)
|
||||
#define CD_BREAKPOINT()
|
||||
|
||||
#define CD_ASSERT_DL4(condition)
|
||||
#define CD_POSTCODE_DL4(value)
|
||||
#define CD_TRACE_DL4(string)
|
||||
#define CD_TRACETAB_DL4(string)
|
||||
#define CD_TRACEDEC_DL4(value)
|
||||
#define CD_TRACEHEX_DL4(value)
|
||||
#define CD_TRACEBUF_DL4(pointer, len)
|
||||
#define CD_WAIT_DL4(what)
|
||||
#define CD_BREAKPOINT_DL4()
|
||||
|
||||
#define CD_ASSERT_DL3(condition)
|
||||
#define CD_POSTCODE_DL3(value)
|
||||
#define CD_TRACE_DL3(string)
|
||||
#define CD_TRACETAB_DL3(string)
|
||||
#define CD_TRACEDEC_DL3(value)
|
||||
#define CD_TRACEHEX_DL3(value)
|
||||
#define CD_TRACEBUF_DL3(pointer, len)
|
||||
#define CD_WAIT_DL3(what)
|
||||
#define CD_BREAKPOINT_DL3()
|
||||
|
||||
#define CD_ASSERT_DL2(condition)
|
||||
#define CD_POSTCODE_DL2(value)
|
||||
#define CD_TRACE_DL2(string)
|
||||
#define CD_TRACETAB_DL2(string)
|
||||
#define CD_TRACEDEC_DL2(value)
|
||||
#define CD_TRACEHEX_DL2(value)
|
||||
#define CD_TRACEBUF_DL2(pointer, len)
|
||||
#define CD_WAIT_DL2(what)
|
||||
#define CD_BREAKPOINT_DL2()
|
||||
|
||||
#define CD_ASSERT_DL1(condition)
|
||||
#define CD_POSTCODE_DL1(value)
|
||||
#define CD_TRACE_DL1(string)
|
||||
#define CD_TRACETAB_DL1(string)
|
||||
#define CD_TRACEDEC_DL1(value)
|
||||
#define CD_TRACEHEX_DL1(value)
|
||||
#define CD_TRACEBUF_DL1(pointer, len)
|
||||
#define CD_WAIT_DL1(what)
|
||||
#define CD_BREAKPOINT_DL1()
|
||||
|
||||
|
||||
#endif //#if (DEBUG_PARSER > 0)
|
||||
|
||||
|
||||
#ifdef CHECKSTACK
|
||||
VOID CD_fillstack(UINT16 size);
|
||||
UINT16 CD_checkstack(UINT16 size);
|
||||
#define CD_CHECKSTACK(stacksize) CD_checkstack(stacksize)
|
||||
#define CD_FILLSTACK(stacksize) CD_fillstack(stacksize)
|
||||
#else
|
||||
#define CD_CHECKSTACK(stacksize) 0
|
||||
#define CD_FILLSTACK(stacksize)
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
@ -1,87 +0,0 @@
|
||||
/*
|
||||
* Copyright 2006-2007 Advanced Micro Devices, Inc.
|
||||
*
|
||||
* 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 HOLDER(S) OR AUTHOR(S) 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.
|
||||
*/
|
||||
|
||||
/*++
|
||||
|
||||
Module Name:
|
||||
|
||||
Decoder.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Includes all helper headers
|
||||
|
||||
Revision History:
|
||||
|
||||
NEG:27.08.2002 Initiated.
|
||||
--*/
|
||||
#ifndef _DECODER_H_
|
||||
#define _DECODER_H_
|
||||
#define WS_QUOTIENT_C 64
|
||||
#define WS_REMINDER_C (WS_QUOTIENT_C+1)
|
||||
#define WS_DATAPTR_C (WS_REMINDER_C+1)
|
||||
#define WS_SHIFT_C (WS_DATAPTR_C+1)
|
||||
#define WS_OR_MASK_C (WS_SHIFT_C+1)
|
||||
#define WS_AND_MASK_C (WS_OR_MASK_C+1)
|
||||
#define WS_FB_WINDOW_C (WS_AND_MASK_C+1)
|
||||
#define WS_ATTRIBUTES_C (WS_FB_WINDOW_C+1)
|
||||
#define WS_REGPTR_C (WS_ATTRIBUTES_C+1)
|
||||
#define PARSER_VERSION_MAJOR 0x00000000
|
||||
#define PARSER_VERSION_MINOR 0x0000000E
|
||||
#define PARSER_VERSION (PARSER_VERSION_MAJOR | PARSER_VERSION_MINOR)
|
||||
#include "CD_binding.h"
|
||||
#include "CD_Common_Types.h"
|
||||
#include "CD_hw_services.h"
|
||||
#include "CD_Structs.h"
|
||||
#include "CD_Definitions.h"
|
||||
#include "CD_Opcodes.h"
|
||||
|
||||
#define SOURCE_ONLY_CMD_TYPE 0//0xFE
|
||||
#define SOURCE_DESTINATION_CMD_TYPE 1//0xFD
|
||||
#define DESTINATION_ONLY_CMD_TYPE 2//0xFC
|
||||
|
||||
#define ACCESS_TYPE_BYTE 0//0xF9
|
||||
#define ACCESS_TYPE_WORD 1//0xF8
|
||||
#define ACCESS_TYPE_DWORD 2//0xF7
|
||||
#define SWITCH_TYPE_ACCESS 3//0xF6
|
||||
|
||||
#define CD_CONTINUE 0//0xFB
|
||||
#define CD_STOP 1//0xFA
|
||||
|
||||
|
||||
#define IS_END_OF_TABLE(cmd) ((cmd) == EOT_OPCODE)
|
||||
#define IS_COMMAND_VALID(cmd) (((cmd)<=LastValidCommand)&&((cmd)>=FirstValidCommand))
|
||||
#define IS_IT_SHIFT_COMMAND(Opcode) ((Opcode<=SHIFT_RIGHT_MC_OPCODE)&&(Opcode>=SHIFT_LEFT_REG_OPCODE))
|
||||
#define IS_IT_XXXX_COMMAND(Group, Opcode) ((Opcode<=Group##_MC_OPCODE)&&(Opcode>=Group##_REG_OPCODE))
|
||||
#define CheckCaseAndAdjustIP_Macro(size) \
|
||||
if (pParserTempData->SourceData32==(UINT32)((CASE_OFFSET*)pParserTempData->pWorkingTableData->IP)->XX_Access.size##.Access.Value){\
|
||||
pParserTempData->CommandSpecific.ContinueSwitch = CD_STOP;\
|
||||
pParserTempData->pWorkingTableData->IP =(COMMAND_HEADER_POINTER *) RELATIVE_TO_TABLE(((CASE_OFFSET*)pParserTempData->pWorkingTableData->IP)->XX_Access.size##.Access.JumpOffset);\
|
||||
}else{\
|
||||
pParserTempData->pWorkingTableData->IP+=(sizeof (CASE_##size##ACCESS)\
|
||||
+sizeof(((CASE_OFFSET*)pParserTempData->pWorkingTableData->IP)->CaseSignature));\
|
||||
}
|
||||
|
||||
#endif
|
||||
/* pWorkingTableData->pCmd->Header.Attribute.SourceAlignment=alignmentLowerWord;\*/
|
||||
|
||||
// EOF
|
@ -1,643 +0,0 @@
|
||||
/*
|
||||
* Copyright 2006-2007 Advanced Micro Devices, Inc.
|
||||
*
|
||||
* 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 HOLDER(S) OR AUTHOR(S) 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.
|
||||
*/
|
||||
/* based on stg/asic_reg/drivers/inc/asic_reg/ObjectID.h ver 23 */
|
||||
|
||||
#ifndef _OBJECTID_H
|
||||
#define _OBJECTID_H
|
||||
|
||||
#if defined(_X86_)
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
|
||||
/****************************************************/
|
||||
/* Graphics Object Type Definition */
|
||||
/****************************************************/
|
||||
#define GRAPH_OBJECT_TYPE_NONE 0x0
|
||||
#define GRAPH_OBJECT_TYPE_GPU 0x1
|
||||
#define GRAPH_OBJECT_TYPE_ENCODER 0x2
|
||||
#define GRAPH_OBJECT_TYPE_CONNECTOR 0x3
|
||||
#define GRAPH_OBJECT_TYPE_ROUTER 0x4
|
||||
/* deleted */
|
||||
|
||||
/****************************************************/
|
||||
/* Encoder Object ID Definition */
|
||||
/****************************************************/
|
||||
#define ENCODER_OBJECT_ID_NONE 0x00
|
||||
|
||||
/* Radeon Class Display Hardware */
|
||||
#define ENCODER_OBJECT_ID_INTERNAL_LVDS 0x01
|
||||
#define ENCODER_OBJECT_ID_INTERNAL_TMDS1 0x02
|
||||
#define ENCODER_OBJECT_ID_INTERNAL_TMDS2 0x03
|
||||
#define ENCODER_OBJECT_ID_INTERNAL_DAC1 0x04
|
||||
#define ENCODER_OBJECT_ID_INTERNAL_DAC2 0x05 /* TV/CV DAC */
|
||||
#define ENCODER_OBJECT_ID_INTERNAL_SDVOA 0x06
|
||||
#define ENCODER_OBJECT_ID_INTERNAL_SDVOB 0x07
|
||||
|
||||
/* External Third Party Encoders */
|
||||
#define ENCODER_OBJECT_ID_SI170B 0x08
|
||||
#define ENCODER_OBJECT_ID_CH7303 0x09
|
||||
#define ENCODER_OBJECT_ID_CH7301 0x0A
|
||||
#define ENCODER_OBJECT_ID_INTERNAL_DVO1 0x0B /* This belongs to Radeon Class Display Hardware */
|
||||
#define ENCODER_OBJECT_ID_EXTERNAL_SDVOA 0x0C
|
||||
#define ENCODER_OBJECT_ID_EXTERNAL_SDVOB 0x0D
|
||||
#define ENCODER_OBJECT_ID_TITFP513 0x0E
|
||||
#define ENCODER_OBJECT_ID_INTERNAL_LVTM1 0x0F /* not used for Radeon */
|
||||
#define ENCODER_OBJECT_ID_VT1623 0x10
|
||||
#define ENCODER_OBJECT_ID_HDMI_SI1930 0x11
|
||||
#define ENCODER_OBJECT_ID_HDMI_INTERNAL 0x12
|
||||
/* Kaleidoscope (KLDSCP) Class Display Hardware (internal) */
|
||||
#define ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1 0x13
|
||||
#define ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1 0x14
|
||||
#define ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1 0x15
|
||||
#define ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2 0x16 /* Shared with CV/TV and CRT */
|
||||
#define ENCODER_OBJECT_ID_SI178 0X17 /* External TMDS (dual link, no HDCP.) */
|
||||
#define ENCODER_OBJECT_ID_MVPU_FPGA 0x18 /* MVPU FPGA chip */
|
||||
#define ENCODER_OBJECT_ID_INTERNAL_DDI 0x19
|
||||
#define ENCODER_OBJECT_ID_VT1625 0x1A
|
||||
#define ENCODER_OBJECT_ID_HDMI_SI1932 0x1B
|
||||
#define ENCODER_OBJECT_ID_DP_AN9801 0x1C
|
||||
#define ENCODER_OBJECT_ID_DP_DP501 0x1D
|
||||
#define ENCODER_OBJECT_ID_INTERNAL_UNIPHY 0x1E
|
||||
#define ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA 0x1F
|
||||
#define ENCODER_OBJECT_ID_INTERNAL_UNIPHY1 0x20
|
||||
#define ENCODER_OBJECT_ID_INTERNAL_UNIPHY2 0x21
|
||||
|
||||
#define ENCODER_OBJECT_ID_GENERAL_EXTERNAL_DVO 0xFF
|
||||
|
||||
/****************************************************/
|
||||
/* Connector Object ID Definition */
|
||||
/****************************************************/
|
||||
#define CONNECTOR_OBJECT_ID_NONE 0x00
|
||||
#define CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I 0x01
|
||||
#define CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I 0x02
|
||||
#define CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D 0x03
|
||||
#define CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D 0x04
|
||||
#define CONNECTOR_OBJECT_ID_VGA 0x05
|
||||
#define CONNECTOR_OBJECT_ID_COMPOSITE 0x06
|
||||
#define CONNECTOR_OBJECT_ID_SVIDEO 0x07
|
||||
#define CONNECTOR_OBJECT_ID_YPbPr 0x08
|
||||
#define CONNECTOR_OBJECT_ID_D_CONNECTOR 0x09
|
||||
#define CONNECTOR_OBJECT_ID_9PIN_DIN 0x0A /* Supports both CV & TV */
|
||||
#define CONNECTOR_OBJECT_ID_SCART 0x0B
|
||||
#define CONNECTOR_OBJECT_ID_HDMI_TYPE_A 0x0C
|
||||
#define CONNECTOR_OBJECT_ID_HDMI_TYPE_B 0x0D
|
||||
#define CONNECTOR_OBJECT_ID_LVDS 0x0E
|
||||
#define CONNECTOR_OBJECT_ID_7PIN_DIN 0x0F
|
||||
#define CONNECTOR_OBJECT_ID_PCIE_CONNECTOR 0x10
|
||||
#define CONNECTOR_OBJECT_ID_CROSSFIRE 0x11
|
||||
#define CONNECTOR_OBJECT_ID_HARDCODE_DVI 0x12
|
||||
#define CONNECTOR_OBJECT_ID_DISPLAYPORT 0x13
|
||||
#define CONNECTOR_OBJECT_ID_eDP 0x14
|
||||
#define CONNECTOR_OBJECT_ID_MXM 0x15
|
||||
|
||||
/* deleted */
|
||||
|
||||
/****************************************************/
|
||||
/* Router Object ID Definition */
|
||||
/****************************************************/
|
||||
#define ROUTER_OBJECT_ID_NONE 0x00
|
||||
#define ROUTER_OBJECT_ID_I2C_EXTENDER_CNTL 0x01
|
||||
|
||||
/****************************************************/
|
||||
/* Generic Object ID Definition */
|
||||
/****************************************************/
|
||||
#define GENERIC_OBJECT_ID_NONE 0x00
|
||||
#define GENERIC_OBJECT_ID_GLSYNC 0x01
|
||||
#define GENERIC_OBJECT_ID_PX2_NON_DRIVABLE 0x02
|
||||
#define GENERIC_OBJECT_ID_MXM_OPM 0x03
|
||||
|
||||
/****************************************************/
|
||||
/* Graphics Object ENUM ID Definition */
|
||||
/****************************************************/
|
||||
#define GRAPH_OBJECT_ENUM_ID1 0x01
|
||||
#define GRAPH_OBJECT_ENUM_ID2 0x02
|
||||
#define GRAPH_OBJECT_ENUM_ID3 0x03
|
||||
#define GRAPH_OBJECT_ENUM_ID4 0x04
|
||||
#define GRAPH_OBJECT_ENUM_ID5 0x05
|
||||
#define GRAPH_OBJECT_ENUM_ID6 0x06
|
||||
#define GRAPH_OBJECT_ENUM_ID7 0x07
|
||||
|
||||
/****************************************************/
|
||||
/* Graphics Object ID Bit definition */
|
||||
/****************************************************/
|
||||
#define OBJECT_ID_MASK 0x00FF
|
||||
#define ENUM_ID_MASK 0x0700
|
||||
#define RESERVED1_ID_MASK 0x0800
|
||||
#define OBJECT_TYPE_MASK 0x7000
|
||||
#define RESERVED2_ID_MASK 0x8000
|
||||
|
||||
#define OBJECT_ID_SHIFT 0x00
|
||||
#define ENUM_ID_SHIFT 0x08
|
||||
#define OBJECT_TYPE_SHIFT 0x0C
|
||||
|
||||
|
||||
/****************************************************/
|
||||
/* Graphics Object family definition */
|
||||
/****************************************************/
|
||||
#define CONSTRUCTOBJECTFAMILYID(GRAPHICS_OBJECT_TYPE, GRAPHICS_OBJECT_ID) (GRAPHICS_OBJECT_TYPE << OBJECT_TYPE_SHIFT | \
|
||||
GRAPHICS_OBJECT_ID << OBJECT_ID_SHIFT)
|
||||
/****************************************************/
|
||||
/* GPU Object ID definition - Shared with BIOS */
|
||||
/****************************************************/
|
||||
#define GPU_ENUM_ID1 ( GRAPH_OBJECT_TYPE_GPU << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT)
|
||||
|
||||
/****************************************************/
|
||||
/* Encoder Object ID definition - Shared with BIOS */
|
||||
/****************************************************/
|
||||
/*
|
||||
#define ENCODER_INTERNAL_LVDS_ENUM_ID1 0x2101
|
||||
#define ENCODER_INTERNAL_TMDS1_ENUM_ID1 0x2102
|
||||
#define ENCODER_INTERNAL_TMDS2_ENUM_ID1 0x2103
|
||||
#define ENCODER_INTERNAL_DAC1_ENUM_ID1 0x2104
|
||||
#define ENCODER_INTERNAL_DAC2_ENUM_ID1 0x2105
|
||||
#define ENCODER_INTERNAL_SDVOA_ENUM_ID1 0x2106
|
||||
#define ENCODER_INTERNAL_SDVOB_ENUM_ID1 0x2107
|
||||
#define ENCODER_SIL170B_ENUM_ID1 0x2108
|
||||
#define ENCODER_CH7303_ENUM_ID1 0x2109
|
||||
#define ENCODER_CH7301_ENUM_ID1 0x210A
|
||||
#define ENCODER_INTERNAL_DVO1_ENUM_ID1 0x210B
|
||||
#define ENCODER_EXTERNAL_SDVOA_ENUM_ID1 0x210C
|
||||
#define ENCODER_EXTERNAL_SDVOB_ENUM_ID1 0x210D
|
||||
#define ENCODER_TITFP513_ENUM_ID1 0x210E
|
||||
#define ENCODER_INTERNAL_LVTM1_ENUM_ID1 0x210F
|
||||
#define ENCODER_VT1623_ENUM_ID1 0x2110
|
||||
#define ENCODER_HDMI_SI1930_ENUM_ID1 0x2111
|
||||
#define ENCODER_HDMI_INTERNAL_ENUM_ID1 0x2112
|
||||
#define ENCODER_INTERNAL_KLDSCP_TMDS1_ENUM_ID1 0x2113
|
||||
#define ENCODER_INTERNAL_KLDSCP_DVO1_ENUM_ID1 0x2114
|
||||
#define ENCODER_INTERNAL_KLDSCP_DAC1_ENUM_ID1 0x2115
|
||||
#define ENCODER_INTERNAL_KLDSCP_DAC2_ENUM_ID1 0x2116
|
||||
#define ENCODER_SI178_ENUM_ID1 0x2117
|
||||
#define ENCODER_MVPU_FPGA_ENUM_ID1 0x2118
|
||||
#define ENCODER_INTERNAL_DDI_ENUM_ID1 0x2119
|
||||
#define ENCODER_VT1625_ENUM_ID1 0x211A
|
||||
#define ENCODER_HDMI_SI1932_ENUM_ID1 0x211B
|
||||
#define ENCODER_ENCODER_DP_AN9801_ENUM_ID1 0x211C
|
||||
#define ENCODER_DP_DP501_ENUM_ID1 0x211D
|
||||
#define ENCODER_INTERNAL_UNIPHY_ENUM_ID1 0x211E
|
||||
*/
|
||||
#define ENCODER_INTERNAL_LVDS_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_INTERNAL_LVDS << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_INTERNAL_TMDS1_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_INTERNAL_TMDS1 << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_INTERNAL_TMDS2_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_INTERNAL_TMDS2 << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_INTERNAL_DAC1_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_INTERNAL_DAC1 << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_INTERNAL_DAC2_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_INTERNAL_DAC2 << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_INTERNAL_SDVOA_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_INTERNAL_SDVOA << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_INTERNAL_SDVOA_ENUM_ID2 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_INTERNAL_SDVOA << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_INTERNAL_SDVOB_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_INTERNAL_SDVOB << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_SIL170B_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_SI170B << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_CH7303_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_CH7303 << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_CH7301_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_CH7301 << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_INTERNAL_DVO1_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_INTERNAL_DVO1 << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_EXTERNAL_SDVOA_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_EXTERNAL_SDVOA << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_EXTERNAL_SDVOA_ENUM_ID2 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_EXTERNAL_SDVOA << OBJECT_ID_SHIFT)
|
||||
|
||||
|
||||
#define ENCODER_EXTERNAL_SDVOB_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_EXTERNAL_SDVOB << OBJECT_ID_SHIFT)
|
||||
|
||||
|
||||
#define ENCODER_TITFP513_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_TITFP513 << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_INTERNAL_LVTM1_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_INTERNAL_LVTM1 << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_VT1623_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_VT1623 << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_HDMI_SI1930_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_HDMI_SI1930 << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_HDMI_INTERNAL_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_HDMI_INTERNAL << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_INTERNAL_KLDSCP_TMDS1_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1 << OBJECT_ID_SHIFT)
|
||||
|
||||
|
||||
#define ENCODER_INTERNAL_KLDSCP_TMDS1_ENUM_ID2 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1 << OBJECT_ID_SHIFT)
|
||||
|
||||
|
||||
#define ENCODER_INTERNAL_KLDSCP_DVO1_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1 << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_INTERNAL_KLDSCP_DAC1_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1 << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_INTERNAL_KLDSCP_DAC2_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2 << OBJECT_ID_SHIFT) // Shared with CV/TV and CRT
|
||||
|
||||
#define ENCODER_SI178_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_SI178 << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_MVPU_FPGA_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_MVPU_FPGA << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_INTERNAL_DDI_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_INTERNAL_DDI << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_VT1625_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_VT1625 << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_HDMI_SI1932_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_HDMI_SI1932 << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_DP_DP501_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_DP_DP501 << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_DP_AN9801_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_DP_AN9801 << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_INTERNAL_UNIPHY_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_INTERNAL_UNIPHY << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_INTERNAL_UNIPHY_ENUM_ID2 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_INTERNAL_UNIPHY << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_INTERNAL_KLDSCP_LVTMA_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_INTERNAL_UNIPHY1_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_INTERNAL_UNIPHY1 << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_INTERNAL_UNIPHY1_ENUM_ID2 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_INTERNAL_UNIPHY1 << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_INTERNAL_UNIPHY2_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_INTERNAL_UNIPHY2 << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_INTERNAL_UNIPHY2_ENUM_ID2 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_INTERNAL_UNIPHY2 << OBJECT_ID_SHIFT)
|
||||
|
||||
#define ENCODER_GENERAL_EXTERNAL_DVO_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ENCODER_OBJECT_ID_GENERAL_EXTERNAL_DVO << OBJECT_ID_SHIFT)
|
||||
|
||||
/****************************************************/
|
||||
/* Connector Object ID definition - Shared with BIOS */
|
||||
/****************************************************/
|
||||
/*
|
||||
#define CONNECTOR_SINGLE_LINK_DVI_I_ENUM_ID1 0x3101
|
||||
#define CONNECTOR_DUAL_LINK_DVI_I_ENUM_ID1 0x3102
|
||||
#define CONNECTOR_SINGLE_LINK_DVI_D_ENUM_ID1 0x3103
|
||||
#define CONNECTOR_DUAL_LINK_DVI_D_ENUM_ID1 0x3104
|
||||
#define CONNECTOR_VGA_ENUM_ID1 0x3105
|
||||
#define CONNECTOR_COMPOSITE_ENUM_ID1 0x3106
|
||||
#define CONNECTOR_SVIDEO_ENUM_ID1 0x3107
|
||||
#define CONNECTOR_YPbPr_ENUM_ID1 0x3108
|
||||
#define CONNECTOR_D_CONNECTORE_ENUM_ID1 0x3109
|
||||
#define CONNECTOR_9PIN_DIN_ENUM_ID1 0x310A
|
||||
#define CONNECTOR_SCART_ENUM_ID1 0x310B
|
||||
#define CONNECTOR_HDMI_TYPE_A_ENUM_ID1 0x310C
|
||||
#define CONNECTOR_HDMI_TYPE_B_ENUM_ID1 0x310D
|
||||
#define CONNECTOR_LVDS_ENUM_ID1 0x310E
|
||||
#define CONNECTOR_7PIN_DIN_ENUM_ID1 0x310F
|
||||
#define CONNECTOR_PCIE_CONNECTOR_ENUM_ID1 0x3110
|
||||
*/
|
||||
#define CONNECTOR_LVDS_ENUM_ID1 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_LVDS << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_LVDS_ENUM_ID2 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_LVDS << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_eDP_ENUM_ID1 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_eDP << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_eDP_ENUM_ID2 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_eDP << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_SINGLE_LINK_DVI_I_ENUM_ID1 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_SINGLE_LINK_DVI_I_ENUM_ID2 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_DUAL_LINK_DVI_I_ENUM_ID1 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_DUAL_LINK_DVI_I_ENUM_ID2 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_SINGLE_LINK_DVI_D_ENUM_ID1 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_SINGLE_LINK_DVI_D_ENUM_ID2 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_DUAL_LINK_DVI_D_ENUM_ID1 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_DUAL_LINK_DVI_D_ENUM_ID2 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_DUAL_LINK_DVI_D_ENUM_ID3 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID3 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_VGA_ENUM_ID1 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_VGA << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_VGA_ENUM_ID2 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_VGA << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_COMPOSITE_ENUM_ID1 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_COMPOSITE << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_COMPOSITE_ENUM_ID2 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_COMPOSITE << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_SVIDEO_ENUM_ID1 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_SVIDEO << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_SVIDEO_ENUM_ID2 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_SVIDEO << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_YPbPr_ENUM_ID1 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_YPbPr << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_YPbPr_ENUM_ID2 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_YPbPr << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_D_CONNECTOR_ENUM_ID1 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_D_CONNECTOR << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_D_CONNECTOR_ENUM_ID2 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_D_CONNECTOR << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_9PIN_DIN_ENUM_ID1 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_9PIN_DIN << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_9PIN_DIN_ENUM_ID2 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_9PIN_DIN << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_SCART_ENUM_ID1 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_SCART << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_SCART_ENUM_ID2 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_SCART << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_HDMI_TYPE_A_ENUM_ID1 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_HDMI_TYPE_A << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_HDMI_TYPE_A_ENUM_ID2 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_HDMI_TYPE_A << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_HDMI_TYPE_A_ENUM_ID3 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID3 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_HDMI_TYPE_A << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_HDMI_TYPE_B_ENUM_ID1 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_HDMI_TYPE_B << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_HDMI_TYPE_B_ENUM_ID2 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_HDMI_TYPE_B << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_7PIN_DIN_ENUM_ID1 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_7PIN_DIN << OBJECT_ID_SHIFT)
|
||||
#define CONNECTOR_7PIN_DIN_ENUM_ID2 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_7PIN_DIN << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_PCIE_CONNECTOR_ENUM_ID1 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_PCIE_CONNECTOR << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_PCIE_CONNECTOR_ENUM_ID2 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_PCIE_CONNECTOR << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_CROSSFIRE_ENUM_ID1 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_CROSSFIRE << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_CROSSFIRE_ENUM_ID2 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_CROSSFIRE << OBJECT_ID_SHIFT)
|
||||
|
||||
|
||||
#define CONNECTOR_HARDCODE_DVI_ENUM_ID1 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_HARDCODE_DVI << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_HARDCODE_DVI_ENUM_ID2 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_HARDCODE_DVI << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_DISPLAYPORT_ENUM_ID1 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_DISPLAYPORT << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_DISPLAYPORT_ENUM_ID2 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_DISPLAYPORT << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_DISPLAYPORT_ENUM_ID3 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID3 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_DISPLAYPORT << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_DISPLAYPORT_ENUM_ID4 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID4 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_DISPLAYPORT << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_DISPLAYPORT_ENUM_ID5 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID5 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_DISPLAYPORT << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_DISPLAYPORT_ENUM_ID6 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID6 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_DISPLAYPORT << OBJECT_ID_SHIFT)
|
||||
|
||||
#define CONNECTOR_MXM_ENUM_ID1 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_MXM << OBJECT_ID_SHIFT) //Mapping to MXM_DP_A
|
||||
|
||||
#define CONNECTOR_MXM_ENUM_ID2 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_MXM << OBJECT_ID_SHIFT) //Mapping to MXM_DP_B
|
||||
|
||||
#define CONNECTOR_MXM_ENUM_ID3 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID3 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_MXM << OBJECT_ID_SHIFT) //Mapping to MXM_DP_C
|
||||
|
||||
#define CONNECTOR_MXM_ENUM_ID4 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID4 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_MXM << OBJECT_ID_SHIFT) //Mapping to MXM_DP_D
|
||||
|
||||
#define CONNECTOR_MXM_ENUM_ID5 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID5 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_MXM << OBJECT_ID_SHIFT) //Mapping to MXM_LVDS_TXxx
|
||||
|
||||
#define CONNECTOR_MXM_ENUM_ID6 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID6 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_MXM << OBJECT_ID_SHIFT) //Mapping to MXM_LVDS_UXxx
|
||||
|
||||
#define CONNECTOR_MXM_ENUM_ID7 ( GRAPH_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID7 << ENUM_ID_SHIFT |\
|
||||
CONNECTOR_OBJECT_ID_MXM << OBJECT_ID_SHIFT) //Mapping to MXM_DAC
|
||||
|
||||
/****************************************************/
|
||||
/* Router Object ID definition - Shared with BIOS */
|
||||
/****************************************************/
|
||||
#define ROUTER_I2C_EXTENDER_CNTL_ENUM_ID1 ( GRAPH_OBJECT_TYPE_ROUTER << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
ROUTER_OBJECT_ID_I2C_EXTENDER_CNTL << OBJECT_ID_SHIFT)
|
||||
|
||||
/* deleted */
|
||||
|
||||
/****************************************************/
|
||||
/* Generic Object ID definition - Shared with BIOS */
|
||||
/****************************************************/
|
||||
#define GENERICOBJECT_GLSYNC_ENUM_ID1 (GRAPH_OBJECT_TYPE_GENERIC << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
GENERIC_OBJECT_ID_GLSYNC << OBJECT_ID_SHIFT)
|
||||
|
||||
#define GENERICOBJECT_PX2_NON_DRIVABLE_ID1 (GRAPH_OBJECT_TYPE_GENERIC << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
GENERIC_OBJECT_ID_PX2_NON_DRIVABLE<< OBJECT_ID_SHIFT)
|
||||
|
||||
#define GENERICOBJECT_PX2_NON_DRIVABLE_ID2 (GRAPH_OBJECT_TYPE_GENERIC << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
|
||||
GENERIC_OBJECT_ID_PX2_NON_DRIVABLE<< OBJECT_ID_SHIFT)
|
||||
|
||||
#define GENERICOBJECT_MXM_OPM_ENUM_ID1 (GRAPH_OBJECT_TYPE_GENERIC << OBJECT_TYPE_SHIFT |\
|
||||
GRAPH_OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
|
||||
GENERIC_OBJECT_ID_MXM_OPM << OBJECT_ID_SHIFT)
|
||||
|
||||
/****************************************************/
|
||||
/* Object Cap definition - Shared with BIOS */
|
||||
/****************************************************/
|
||||
#define GRAPHICS_OBJECT_CAP_I2C 0x00000001L
|
||||
#define GRAPHICS_OBJECT_CAP_TABLE_ID 0x00000002L
|
||||
|
||||
|
||||
#define GRAPHICS_OBJECT_I2CCOMMAND_TABLE_ID 0x01
|
||||
#define GRAPHICS_OBJECT_HOTPLUGDETECTIONINTERUPT_TABLE_ID 0x02
|
||||
#define GRAPHICS_OBJECT_ENCODER_OUTPUT_PROTECTION_TABLE_ID 0x03
|
||||
|
||||
#if defined(_X86_)
|
||||
#pragma pack()
|
||||
#endif
|
||||
|
||||
#endif /*GRAPHICTYPE */
|
||||
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,25 +0,0 @@
|
||||
/*
|
||||
* Copyright 2006-2007 Advanced Micro Devices, Inc.
|
||||
*
|
||||
* 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 HOLDER(S) OR AUTHOR(S) 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.
|
||||
*/
|
||||
|
||||
//This is a dummy file used by driver-parser during compilation.
|
||||
//Without this file, compatibility will be broken among ASICs and BIOs vs. driver
|
||||
//James H. Apr. 22/03
|
@ -1,959 +0,0 @@
|
||||
/*
|
||||
* Copyright 2006-2007 Advanced Micro Devices, Inc.
|
||||
*
|
||||
* 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 HOLDER(S) OR AUTHOR(S) 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
Module Name:
|
||||
|
||||
CD_Operations.c
|
||||
|
||||
Abstract:
|
||||
|
||||
Functions Implementing Command Operations and other common functions
|
||||
|
||||
Revision History:
|
||||
|
||||
NEG:27.09.2002 Initiated.
|
||||
--*/
|
||||
#define __SW_4
|
||||
|
||||
#include "Decoder.h"
|
||||
#include "atombios.h"
|
||||
|
||||
|
||||
|
||||
VOID PutDataRegister(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
VOID PutDataPS(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
VOID PutDataWS(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
VOID PutDataFB(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
VOID PutDataPLL(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
VOID PutDataMC(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
UINT32 GetParametersDirect32(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
UINT32 GetParametersDirect16(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
UINT32 GetParametersDirect8(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
UINT32 GetParametersRegister(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
UINT32 GetParametersPS(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
UINT32 GetParametersWS(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
UINT32 GetParametersFB(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
UINT32 GetParametersPLL(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
UINT32 GetParametersMC(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
VOID SkipParameters16(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
VOID SkipParameters8(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
UINT32 GetParametersIndirect(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
UINT32 GetParametersDirect(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
UINT16* GetDataMasterTablePointer(DEVICE_DATA STACK_BASED* pDeviceData);
|
||||
UINT8 GetTrueIndexInMasterTable(PARSER_TEMP_DATA STACK_BASED * pParserTempData, UINT8 IndexInMasterTable);
|
||||
|
||||
|
||||
WRITE_IO_FUNCTION WritePCIFunctions[8] = {
|
||||
WritePCIReg32,
|
||||
WritePCIReg16, WritePCIReg16, WritePCIReg16,
|
||||
WritePCIReg8,WritePCIReg8,WritePCIReg8,WritePCIReg8
|
||||
};
|
||||
WRITE_IO_FUNCTION WriteIOFunctions[8] = {
|
||||
WriteSysIOReg32,
|
||||
WriteSysIOReg16,WriteSysIOReg16,WriteSysIOReg16,
|
||||
WriteSysIOReg8,WriteSysIOReg8,WriteSysIOReg8,WriteSysIOReg8
|
||||
};
|
||||
READ_IO_FUNCTION ReadPCIFunctions[8] = {
|
||||
(READ_IO_FUNCTION)ReadPCIReg32,
|
||||
(READ_IO_FUNCTION)ReadPCIReg16,
|
||||
(READ_IO_FUNCTION)ReadPCIReg16,
|
||||
(READ_IO_FUNCTION)ReadPCIReg16,
|
||||
(READ_IO_FUNCTION)ReadPCIReg8,
|
||||
(READ_IO_FUNCTION)ReadPCIReg8,
|
||||
(READ_IO_FUNCTION)ReadPCIReg8,
|
||||
(READ_IO_FUNCTION)ReadPCIReg8
|
||||
};
|
||||
READ_IO_FUNCTION ReadIOFunctions[8] = {
|
||||
(READ_IO_FUNCTION)ReadSysIOReg32,
|
||||
(READ_IO_FUNCTION)ReadSysIOReg16,
|
||||
(READ_IO_FUNCTION)ReadSysIOReg16,
|
||||
(READ_IO_FUNCTION)ReadSysIOReg16,
|
||||
(READ_IO_FUNCTION)ReadSysIOReg8,
|
||||
(READ_IO_FUNCTION)ReadSysIOReg8,
|
||||
(READ_IO_FUNCTION)ReadSysIOReg8,
|
||||
(READ_IO_FUNCTION)ReadSysIOReg8
|
||||
};
|
||||
READ_IO_FUNCTION GetParametersDirectArray[8]={
|
||||
GetParametersDirect32,
|
||||
GetParametersDirect16,GetParametersDirect16,GetParametersDirect16,
|
||||
GetParametersDirect8,GetParametersDirect8,GetParametersDirect8,
|
||||
GetParametersDirect8
|
||||
};
|
||||
|
||||
COMMANDS_DECODER PutDataFunctions[6] = {
|
||||
PutDataRegister,
|
||||
PutDataPS,
|
||||
PutDataWS,
|
||||
PutDataFB,
|
||||
PutDataPLL,
|
||||
PutDataMC
|
||||
};
|
||||
CD_GET_PARAMETERS GetDestination[6] = {
|
||||
GetParametersRegister,
|
||||
GetParametersPS,
|
||||
GetParametersWS,
|
||||
GetParametersFB,
|
||||
GetParametersPLL,
|
||||
GetParametersMC
|
||||
};
|
||||
|
||||
COMMANDS_DECODER SkipDestination[6] = {
|
||||
SkipParameters16,
|
||||
SkipParameters8,
|
||||
SkipParameters8,
|
||||
SkipParameters8,
|
||||
SkipParameters8,
|
||||
SkipParameters8
|
||||
};
|
||||
|
||||
CD_GET_PARAMETERS GetSource[8] = {
|
||||
GetParametersRegister,
|
||||
GetParametersPS,
|
||||
GetParametersWS,
|
||||
GetParametersFB,
|
||||
GetParametersIndirect,
|
||||
GetParametersDirect,
|
||||
GetParametersPLL,
|
||||
GetParametersMC
|
||||
};
|
||||
|
||||
UINT32 AlignmentMask[8] = {0xFFFFFFFF,0xFFFF,0xFFFF,0xFFFF,0xFF,0xFF,0xFF,0xFF};
|
||||
UINT8 SourceAlignmentShift[8] = {0,0,8,16,0,8,16,24};
|
||||
UINT8 DestinationAlignmentShift[4] = {0,8,16,24};
|
||||
|
||||
#define INDIRECTIO_ID 1
|
||||
#define INDIRECTIO_END_OF_ID 9
|
||||
|
||||
VOID IndirectIOCommand(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
VOID IndirectIOCommand_MOVE(PARSER_TEMP_DATA STACK_BASED * pParserTempData, UINT32 temp);
|
||||
VOID IndirectIOCommand_MOVE_INDEX(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
VOID IndirectIOCommand_MOVE_ATTR(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
VOID IndirectIOCommand_MOVE_DATA(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
VOID IndirectIOCommand_SET(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
VOID IndirectIOCommand_CLEAR(PARSER_TEMP_DATA STACK_BASED * pParserTempData);
|
||||
|
||||
|
||||
INDIRECT_IO_PARSER_COMMANDS IndirectIOParserCommands[10]={
|
||||
{IndirectIOCommand,1},
|
||||
{IndirectIOCommand,2},
|
||||
{ReadIndReg32,3},
|
||||
{WriteIndReg32,3},
|
||||
{IndirectIOCommand_CLEAR,3},
|
||||
{IndirectIOCommand_SET,3},
|
||||
{IndirectIOCommand_MOVE_INDEX,4},
|
||||
{IndirectIOCommand_MOVE_ATTR,4},
|
||||
{IndirectIOCommand_MOVE_DATA,4},
|
||||
{IndirectIOCommand,3}
|
||||
};
|
||||
|
||||
|
||||
VOID IndirectIOCommand(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
VOID IndirectIOCommand_MOVE_INDEX(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->IndirectData &= ~((0xFFFFFFFF >> (32-pParserTempData->IndirectIOTablePointer[1])) << pParserTempData->IndirectIOTablePointer[3]);
|
||||
pParserTempData->IndirectData |=(((pParserTempData->Index >> pParserTempData->IndirectIOTablePointer[2]) &
|
||||
(0xFFFFFFFF >> (32-pParserTempData->IndirectIOTablePointer[1]))) << pParserTempData->IndirectIOTablePointer[3]);
|
||||
}
|
||||
|
||||
VOID IndirectIOCommand_MOVE_ATTR(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->IndirectData &= ~((0xFFFFFFFF >> (32-pParserTempData->IndirectIOTablePointer[1])) << pParserTempData->IndirectIOTablePointer[3]);
|
||||
pParserTempData->IndirectData |=(((pParserTempData->AttributesData >> pParserTempData->IndirectIOTablePointer[2])
|
||||
& (0xFFFFFFFF >> (32-pParserTempData->IndirectIOTablePointer[1]))) << pParserTempData->IndirectIOTablePointer[3]);
|
||||
}
|
||||
|
||||
VOID IndirectIOCommand_MOVE_DATA(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->IndirectData &= ~((0xFFFFFFFF >> (32-pParserTempData->IndirectIOTablePointer[1])) << pParserTempData->IndirectIOTablePointer[3]);
|
||||
pParserTempData->IndirectData |=(((pParserTempData->DestData32 >> pParserTempData->IndirectIOTablePointer[2])
|
||||
& (0xFFFFFFFF >> (32-pParserTempData->IndirectIOTablePointer[1]))) << pParserTempData->IndirectIOTablePointer[3]);
|
||||
}
|
||||
|
||||
|
||||
VOID IndirectIOCommand_SET(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->IndirectData |= ((0xFFFFFFFF >> (32-pParserTempData->IndirectIOTablePointer[1])) << pParserTempData->IndirectIOTablePointer[2]);
|
||||
}
|
||||
|
||||
VOID IndirectIOCommand_CLEAR(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->IndirectData &= ~((0xFFFFFFFF >> (32-pParserTempData->IndirectIOTablePointer[1])) << pParserTempData->IndirectIOTablePointer[2]);
|
||||
}
|
||||
|
||||
|
||||
UINT32 IndirectInputOutput(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
// if ((pParserTempData->IndirectData & 0x7f)==INDIRECT_IO_MM) pParserTempData->IndirectData|=pParserTempData->CurrentPortID;
|
||||
// pParserTempData->IndirectIOTablePointer=pParserTempData->IndirectIOTable;
|
||||
while (*pParserTempData->IndirectIOTablePointer)
|
||||
{
|
||||
if ((pParserTempData->IndirectIOTablePointer[0] == INDIRECTIO_ID) &&
|
||||
(pParserTempData->IndirectIOTablePointer[1] == pParserTempData->IndirectData))
|
||||
{
|
||||
pParserTempData->IndirectIOTablePointer+=IndirectIOParserCommands[*pParserTempData->IndirectIOTablePointer].csize;
|
||||
while (*pParserTempData->IndirectIOTablePointer != INDIRECTIO_END_OF_ID)
|
||||
{
|
||||
IndirectIOParserCommands[*pParserTempData->IndirectIOTablePointer].func(pParserTempData);
|
||||
pParserTempData->IndirectIOTablePointer+=IndirectIOParserCommands[*pParserTempData->IndirectIOTablePointer].csize;
|
||||
}
|
||||
pParserTempData->IndirectIOTablePointer-=*(UINT16*)(pParserTempData->IndirectIOTablePointer+1);
|
||||
pParserTempData->IndirectIOTablePointer++;
|
||||
return pParserTempData->IndirectData;
|
||||
} else pParserTempData->IndirectIOTablePointer+=IndirectIOParserCommands[*pParserTempData->IndirectIOTablePointer].csize;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
VOID PutDataRegister(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->Index=(UINT32)pParserTempData->pCmd->Parameters.WordXX.PA_Destination;
|
||||
pParserTempData->Index+=pParserTempData->CurrentRegBlock;
|
||||
switch(pParserTempData->Multipurpose.CurrentPort){
|
||||
case ATI_RegsPort:
|
||||
if (pParserTempData->CurrentPortID == INDIRECT_IO_MM)
|
||||
{
|
||||
if (pParserTempData->Index==0) pParserTempData->DestData32 <<= 2;
|
||||
WriteReg32( pParserTempData);
|
||||
} else
|
||||
{
|
||||
pParserTempData->IndirectData=pParserTempData->CurrentPortID+INDIRECT_IO_WRITE;
|
||||
IndirectInputOutput(pParserTempData);
|
||||
}
|
||||
break;
|
||||
case PCI_Port:
|
||||
WritePCIFunctions[pParserTempData->pCmd->Header.Attribute.SourceAlignment](pParserTempData);
|
||||
break;
|
||||
case SystemIO_Port:
|
||||
WriteIOFunctions[pParserTempData->pCmd->Header.Attribute.SourceAlignment](pParserTempData);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
VOID PutDataPS(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
*(pParserTempData->pDeviceData->pParameterSpace+pParserTempData->pCmd->Parameters.ByteXX.PA_Destination)=
|
||||
pParserTempData->DestData32;
|
||||
}
|
||||
|
||||
VOID PutDataWS(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
if (pParserTempData->pCmd->Parameters.ByteXX.PA_Destination < WS_QUOTIENT_C)
|
||||
*(pParserTempData->pWorkingTableData->pWorkSpace+pParserTempData->pCmd->Parameters.ByteXX.PA_Destination) = pParserTempData->DestData32;
|
||||
else
|
||||
switch (pParserTempData->pCmd->Parameters.ByteXX.PA_Destination)
|
||||
{
|
||||
case WS_REMINDER_C:
|
||||
pParserTempData->MultiplicationOrDivision.Division.Reminder32=pParserTempData->DestData32;
|
||||
break;
|
||||
case WS_QUOTIENT_C:
|
||||
pParserTempData->MultiplicationOrDivision.Division.Quotient32=pParserTempData->DestData32;
|
||||
break;
|
||||
case WS_DATAPTR_C:
|
||||
#ifndef UEFI_BUILD
|
||||
pParserTempData->CurrentDataBlock=(UINT16)pParserTempData->DestData32;
|
||||
#else
|
||||
pParserTempData->CurrentDataBlock=(UINTN)pParserTempData->DestData32;
|
||||
#endif
|
||||
break;
|
||||
case WS_SHIFT_C:
|
||||
pParserTempData->Shift2MaskConverter=(UINT8)pParserTempData->DestData32;
|
||||
break;
|
||||
case WS_FB_WINDOW_C:
|
||||
pParserTempData->CurrentFB_Window=pParserTempData->DestData32;
|
||||
break;
|
||||
case WS_ATTRIBUTES_C:
|
||||
pParserTempData->AttributesData=(UINT16)pParserTempData->DestData32;
|
||||
break;
|
||||
case WS_REGPTR_C:
|
||||
pParserTempData->CurrentRegBlock=(UINT16)pParserTempData->DestData32;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
VOID PutDataFB(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->Index=(UINT32)pParserTempData->pCmd->Parameters.ByteXX.PA_Destination;
|
||||
//Make an Index from address first, then add to the Index
|
||||
pParserTempData->Index+=(pParserTempData->CurrentFB_Window>>2);
|
||||
WriteFrameBuffer32(pParserTempData);
|
||||
}
|
||||
|
||||
VOID PutDataPLL(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->Index=(UINT32)pParserTempData->pCmd->Parameters.ByteXX.PA_Destination;
|
||||
WritePLL32( pParserTempData );
|
||||
}
|
||||
|
||||
VOID PutDataMC(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->Index=(UINT32)pParserTempData->pCmd->Parameters.ByteXX.PA_Destination;
|
||||
WriteMC32( pParserTempData );
|
||||
}
|
||||
|
||||
|
||||
VOID SkipParameters8(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->pWorkingTableData->IP+=sizeof(UINT8);
|
||||
}
|
||||
|
||||
VOID SkipParameters16(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->pWorkingTableData->IP+=sizeof(UINT16);
|
||||
}
|
||||
|
||||
|
||||
UINT32 GetParametersRegister(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->Index=*(UINT16*)pParserTempData->pWorkingTableData->IP;
|
||||
pParserTempData->pWorkingTableData->IP+=sizeof(UINT16);
|
||||
pParserTempData->Index+=pParserTempData->CurrentRegBlock;
|
||||
switch(pParserTempData->Multipurpose.CurrentPort)
|
||||
{
|
||||
case PCI_Port:
|
||||
return ReadPCIFunctions[pParserTempData->pCmd->Header.Attribute.SourceAlignment](pParserTempData);
|
||||
case SystemIO_Port:
|
||||
return ReadIOFunctions[pParserTempData->pCmd->Header.Attribute.SourceAlignment](pParserTempData);
|
||||
case ATI_RegsPort:
|
||||
default:
|
||||
if (pParserTempData->CurrentPortID == INDIRECT_IO_MM) return ReadReg32( pParserTempData );
|
||||
else
|
||||
{
|
||||
pParserTempData->IndirectData=pParserTempData->CurrentPortID+INDIRECT_IO_READ;
|
||||
return IndirectInputOutput(pParserTempData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UINT32 GetParametersPS(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->Index=*pParserTempData->pWorkingTableData->IP;
|
||||
pParserTempData->pWorkingTableData->IP+=sizeof(UINT8);
|
||||
return *(pParserTempData->pDeviceData->pParameterSpace+pParserTempData->Index);
|
||||
}
|
||||
|
||||
UINT32 GetParametersWS(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->Index=*pParserTempData->pWorkingTableData->IP;
|
||||
pParserTempData->pWorkingTableData->IP+=sizeof(UINT8);
|
||||
if (pParserTempData->Index < WS_QUOTIENT_C)
|
||||
return *(pParserTempData->pWorkingTableData->pWorkSpace+pParserTempData->Index);
|
||||
else
|
||||
switch (pParserTempData->Index)
|
||||
{
|
||||
case WS_REMINDER_C:
|
||||
return pParserTempData->MultiplicationOrDivision.Division.Reminder32;
|
||||
case WS_QUOTIENT_C:
|
||||
return pParserTempData->MultiplicationOrDivision.Division.Quotient32;
|
||||
case WS_DATAPTR_C:
|
||||
return (UINT32)pParserTempData->CurrentDataBlock;
|
||||
case WS_OR_MASK_C:
|
||||
return ((UINT32)1) << pParserTempData->Shift2MaskConverter;
|
||||
case WS_AND_MASK_C:
|
||||
return ~(((UINT32)1) << pParserTempData->Shift2MaskConverter);
|
||||
case WS_FB_WINDOW_C:
|
||||
return pParserTempData->CurrentFB_Window;
|
||||
case WS_ATTRIBUTES_C:
|
||||
return pParserTempData->AttributesData;
|
||||
case WS_REGPTR_C:
|
||||
return (UINT32)pParserTempData->CurrentRegBlock;
|
||||
}
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
UINT32 GetParametersFB(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->Index=*pParserTempData->pWorkingTableData->IP;
|
||||
pParserTempData->pWorkingTableData->IP+=sizeof(UINT8);
|
||||
pParserTempData->Index+=(pParserTempData->CurrentFB_Window>>2);
|
||||
return ReadFrameBuffer32(pParserTempData);
|
||||
}
|
||||
|
||||
UINT32 GetParametersPLL(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->Index=*pParserTempData->pWorkingTableData->IP;
|
||||
pParserTempData->pWorkingTableData->IP+=sizeof(UINT8);
|
||||
return ReadPLL32( pParserTempData );
|
||||
}
|
||||
|
||||
UINT32 GetParametersMC(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->Index=*pParserTempData->pWorkingTableData->IP;
|
||||
pParserTempData->pWorkingTableData->IP+=sizeof(UINT8);
|
||||
return ReadMC32( pParserTempData );
|
||||
}
|
||||
|
||||
|
||||
UINT32 GetParametersIndirect(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->Index=*(UINT16*)pParserTempData->pWorkingTableData->IP;
|
||||
pParserTempData->pWorkingTableData->IP+=sizeof(UINT16);
|
||||
return *(UINT32*)(RELATIVE_TO_BIOS_IMAGE(pParserTempData->Index)+pParserTempData->CurrentDataBlock);
|
||||
}
|
||||
|
||||
UINT32 GetParametersDirect8(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->CD_Mask.SrcAlignment=alignmentByte0;
|
||||
pParserTempData->Index=*(UINT8*)pParserTempData->pWorkingTableData->IP;
|
||||
pParserTempData->pWorkingTableData->IP+=sizeof(UINT8);
|
||||
return pParserTempData->Index;
|
||||
}
|
||||
|
||||
UINT32 GetParametersDirect16(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->CD_Mask.SrcAlignment=alignmentLowerWord;
|
||||
pParserTempData->Index=*(UINT16*)pParserTempData->pWorkingTableData->IP;
|
||||
pParserTempData->pWorkingTableData->IP+=sizeof(UINT16);
|
||||
return pParserTempData->Index;
|
||||
}
|
||||
|
||||
UINT32 GetParametersDirect32(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->CD_Mask.SrcAlignment=alignmentDword;
|
||||
pParserTempData->Index=*(UINT32*)pParserTempData->pWorkingTableData->IP;
|
||||
pParserTempData->pWorkingTableData->IP+=sizeof(UINT32);
|
||||
return pParserTempData->Index;
|
||||
}
|
||||
|
||||
|
||||
UINT32 GetParametersDirect(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
return GetParametersDirectArray[pParserTempData->pCmd->Header.Attribute.SourceAlignment](pParserTempData);
|
||||
}
|
||||
|
||||
|
||||
VOID CommonSourceDataTransformation(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->SourceData32 >>= SourceAlignmentShift[pParserTempData->CD_Mask.SrcAlignment];
|
||||
pParserTempData->SourceData32 &= AlignmentMask[pParserTempData->CD_Mask.SrcAlignment];
|
||||
pParserTempData->SourceData32 <<= DestinationAlignmentShift[pParserTempData->CD_Mask.DestAlignment];
|
||||
}
|
||||
|
||||
VOID CommonOperationDataTransformation(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->SourceData32 >>= SourceAlignmentShift[pParserTempData->CD_Mask.SrcAlignment];
|
||||
pParserTempData->SourceData32 &= AlignmentMask[pParserTempData->CD_Mask.SrcAlignment];
|
||||
pParserTempData->DestData32 >>= DestinationAlignmentShift[pParserTempData->CD_Mask.DestAlignment];
|
||||
pParserTempData->DestData32 &= AlignmentMask[pParserTempData->CD_Mask.SrcAlignment];
|
||||
}
|
||||
|
||||
VOID ProcessMove(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
if (pParserTempData->CD_Mask.SrcAlignment!=alignmentDword)
|
||||
{
|
||||
pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData);
|
||||
} else
|
||||
{
|
||||
SkipDestination[pParserTempData->ParametersType.Destination](pParserTempData);
|
||||
}
|
||||
pParserTempData->SourceData32=GetSource[pParserTempData->ParametersType.Source](pParserTempData);
|
||||
|
||||
if (pParserTempData->CD_Mask.SrcAlignment!=alignmentDword)
|
||||
{
|
||||
pParserTempData->DestData32 &= ~(AlignmentMask[pParserTempData->CD_Mask.SrcAlignment] << DestinationAlignmentShift[pParserTempData->CD_Mask.DestAlignment]);
|
||||
CommonSourceDataTransformation(pParserTempData);
|
||||
pParserTempData->DestData32 |= pParserTempData->SourceData32;
|
||||
} else
|
||||
{
|
||||
pParserTempData->DestData32=pParserTempData->SourceData32;
|
||||
}
|
||||
PutDataFunctions[pParserTempData->ParametersType.Destination](pParserTempData);
|
||||
}
|
||||
|
||||
VOID ProcessMask(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
|
||||
pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData);
|
||||
pParserTempData->SourceData32=GetParametersDirect(pParserTempData);
|
||||
pParserTempData->Index=GetSource[pParserTempData->ParametersType.Source](pParserTempData);
|
||||
pParserTempData->SourceData32 <<= DestinationAlignmentShift[pParserTempData->CD_Mask.DestAlignment];
|
||||
pParserTempData->SourceData32 |= ~(AlignmentMask[pParserTempData->CD_Mask.SrcAlignment] << DestinationAlignmentShift[pParserTempData->CD_Mask.DestAlignment]);
|
||||
pParserTempData->DestData32 &= pParserTempData->SourceData32;
|
||||
pParserTempData->Index &= AlignmentMask[pParserTempData->CD_Mask.SrcAlignment];
|
||||
pParserTempData->Index <<= DestinationAlignmentShift[pParserTempData->CD_Mask.DestAlignment];
|
||||
pParserTempData->DestData32 |= pParserTempData->Index;
|
||||
PutDataFunctions[pParserTempData->ParametersType.Destination](pParserTempData);
|
||||
}
|
||||
|
||||
VOID ProcessAnd(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData);
|
||||
pParserTempData->SourceData32=GetSource[pParserTempData->ParametersType.Source](pParserTempData);
|
||||
pParserTempData->SourceData32 >>= SourceAlignmentShift[pParserTempData->CD_Mask.SrcAlignment];
|
||||
pParserTempData->SourceData32 <<= DestinationAlignmentShift[pParserTempData->CD_Mask.DestAlignment];
|
||||
pParserTempData->SourceData32 |= ~(AlignmentMask[pParserTempData->CD_Mask.SrcAlignment] << DestinationAlignmentShift[pParserTempData->CD_Mask.DestAlignment]);
|
||||
pParserTempData->DestData32 &= pParserTempData->SourceData32;
|
||||
PutDataFunctions[pParserTempData->ParametersType.Destination](pParserTempData);
|
||||
}
|
||||
|
||||
VOID ProcessOr(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData);
|
||||
pParserTempData->SourceData32=GetSource[pParserTempData->ParametersType.Source](pParserTempData);
|
||||
CommonSourceDataTransformation(pParserTempData);
|
||||
pParserTempData->DestData32 |= pParserTempData->SourceData32;
|
||||
PutDataFunctions[pParserTempData->ParametersType.Destination](pParserTempData);
|
||||
}
|
||||
|
||||
VOID ProcessXor(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData);
|
||||
pParserTempData->SourceData32=GetSource[pParserTempData->ParametersType.Source](pParserTempData);
|
||||
CommonSourceDataTransformation(pParserTempData);
|
||||
pParserTempData->DestData32 ^= pParserTempData->SourceData32;
|
||||
PutDataFunctions[pParserTempData->ParametersType.Destination](pParserTempData);
|
||||
}
|
||||
|
||||
VOID ProcessShl(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData);
|
||||
pParserTempData->SourceData32=GetSource[pParserTempData->ParametersType.Source](pParserTempData);
|
||||
CommonSourceDataTransformation(pParserTempData);
|
||||
pParserTempData->DestData32 <<= pParserTempData->SourceData32;
|
||||
PutDataFunctions[pParserTempData->ParametersType.Destination](pParserTempData);
|
||||
}
|
||||
|
||||
VOID ProcessShr(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData);
|
||||
pParserTempData->SourceData32=GetSource[pParserTempData->ParametersType.Source](pParserTempData);
|
||||
CommonSourceDataTransformation(pParserTempData);
|
||||
pParserTempData->DestData32 >>= pParserTempData->SourceData32;
|
||||
PutDataFunctions[pParserTempData->ParametersType.Destination](pParserTempData);
|
||||
}
|
||||
|
||||
|
||||
VOID ProcessADD(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData);
|
||||
pParserTempData->SourceData32=GetSource[pParserTempData->ParametersType.Source](pParserTempData);
|
||||
CommonSourceDataTransformation(pParserTempData);
|
||||
pParserTempData->DestData32 += pParserTempData->SourceData32;
|
||||
PutDataFunctions[pParserTempData->ParametersType.Destination](pParserTempData);
|
||||
}
|
||||
|
||||
VOID ProcessSUB(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData);
|
||||
pParserTempData->SourceData32=GetSource[pParserTempData->ParametersType.Source](pParserTempData);
|
||||
CommonSourceDataTransformation(pParserTempData);
|
||||
pParserTempData->DestData32 -= pParserTempData->SourceData32;
|
||||
PutDataFunctions[pParserTempData->ParametersType.Destination](pParserTempData);
|
||||
}
|
||||
|
||||
VOID ProcessMUL(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData);
|
||||
pParserTempData->SourceData32=GetSource[pParserTempData->ParametersType.Source](pParserTempData);
|
||||
CommonOperationDataTransformation(pParserTempData);
|
||||
pParserTempData->MultiplicationOrDivision.Multiplication.Low32Bit=pParserTempData->DestData32 * pParserTempData->SourceData32;
|
||||
}
|
||||
|
||||
VOID ProcessDIV(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData);
|
||||
pParserTempData->SourceData32=GetSource[pParserTempData->ParametersType.Source](pParserTempData);
|
||||
|
||||
CommonOperationDataTransformation(pParserTempData);
|
||||
pParserTempData->MultiplicationOrDivision.Division.Quotient32=
|
||||
pParserTempData->DestData32 / pParserTempData->SourceData32;
|
||||
pParserTempData->MultiplicationOrDivision.Division.Reminder32=
|
||||
pParserTempData->DestData32 % pParserTempData->SourceData32;
|
||||
}
|
||||
|
||||
|
||||
VOID ProcessCompare(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData);
|
||||
pParserTempData->SourceData32=GetSource[pParserTempData->ParametersType.Source](pParserTempData);
|
||||
|
||||
CommonOperationDataTransformation(pParserTempData);
|
||||
|
||||
// Here we just set flags based on evaluation
|
||||
if (pParserTempData->DestData32==pParserTempData->SourceData32)
|
||||
pParserTempData->CompareFlags = Equal;
|
||||
else
|
||||
pParserTempData->CompareFlags =
|
||||
(UINT8)((pParserTempData->DestData32<pParserTempData->SourceData32) ? Below : Above);
|
||||
|
||||
}
|
||||
|
||||
VOID ProcessClear(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData);
|
||||
pParserTempData->DestData32 &= ~(AlignmentMask[pParserTempData->CD_Mask.SrcAlignment] << SourceAlignmentShift[pParserTempData->CD_Mask.SrcAlignment]);
|
||||
PutDataFunctions[pParserTempData->ParametersType.Destination](pParserTempData);
|
||||
|
||||
}
|
||||
|
||||
VOID ProcessShift(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
UINT32 mask = AlignmentMask[pParserTempData->CD_Mask.SrcAlignment] << SourceAlignmentShift[pParserTempData->CD_Mask.SrcAlignment];
|
||||
pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData);
|
||||
pParserTempData->SourceData32=GetParametersDirect8(pParserTempData);
|
||||
|
||||
// save original value of the destination
|
||||
pParserTempData->Index = pParserTempData->DestData32 & ~mask;
|
||||
pParserTempData->DestData32 &= mask;
|
||||
|
||||
if (pParserTempData->pCmd->Header.Opcode < SHIFT_RIGHT_REG_OPCODE)
|
||||
pParserTempData->DestData32 <<= pParserTempData->SourceData32; else
|
||||
pParserTempData->DestData32 >>= pParserTempData->SourceData32;
|
||||
|
||||
// Clear any bits shifted out of masked area...
|
||||
pParserTempData->DestData32 &= mask;
|
||||
// ... and restore the area outside of masked with original values
|
||||
pParserTempData->DestData32 |= pParserTempData->Index;
|
||||
|
||||
// write data back
|
||||
PutDataFunctions[pParserTempData->ParametersType.Destination](pParserTempData);
|
||||
}
|
||||
|
||||
VOID ProcessTest(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->DestData32=GetDestination[pParserTempData->ParametersType.Destination](pParserTempData);
|
||||
pParserTempData->SourceData32=GetSource[pParserTempData->ParametersType.Source](pParserTempData);
|
||||
CommonOperationDataTransformation(pParserTempData);
|
||||
pParserTempData->CompareFlags =
|
||||
(UINT8)((pParserTempData->DestData32 & pParserTempData->SourceData32) ? NotEqual : Equal);
|
||||
|
||||
}
|
||||
|
||||
VOID ProcessSetFB_Base(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->SourceData32=GetSource[pParserTempData->ParametersType.Source](pParserTempData);
|
||||
pParserTempData->SourceData32 >>= SourceAlignmentShift[pParserTempData->CD_Mask.SrcAlignment];
|
||||
pParserTempData->SourceData32 &= AlignmentMask[pParserTempData->CD_Mask.SrcAlignment];
|
||||
pParserTempData->CurrentFB_Window=pParserTempData->SourceData32;
|
||||
}
|
||||
|
||||
VOID ProcessSwitch(PARSER_TEMP_DATA STACK_BASED * pParserTempData){
|
||||
pParserTempData->SourceData32=GetSource[pParserTempData->ParametersType.Source](pParserTempData);
|
||||
pParserTempData->SourceData32 >>= SourceAlignmentShift[pParserTempData->CD_Mask.SrcAlignment];
|
||||
pParserTempData->SourceData32 &= AlignmentMask[pParserTempData->CD_Mask.SrcAlignment];
|
||||
while ( *(UINT16*)pParserTempData->pWorkingTableData->IP != (((UINT16)NOP_OPCODE << 8)+NOP_OPCODE))
|
||||
{
|
||||
if (*pParserTempData->pWorkingTableData->IP == 'c')
|
||||
{
|
||||
pParserTempData->pWorkingTableData->IP++;
|
||||
pParserTempData->DestData32=GetParametersDirect(pParserTempData);
|
||||
pParserTempData->Index=GetParametersDirect16(pParserTempData);
|
||||
if (pParserTempData->SourceData32 == pParserTempData->DestData32)
|
||||
{
|
||||
pParserTempData->pWorkingTableData->IP= RELATIVE_TO_TABLE(pParserTempData->Index);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
pParserTempData->pWorkingTableData->IP+=sizeof(UINT16);
|
||||
}
|
||||
|
||||
|
||||
VOID cmdSetDataBlock(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
UINT8 value;
|
||||
UINT16* pMasterDataTable;
|
||||
value=((COMMAND_TYPE_1*)pParserTempData->pWorkingTableData->IP)->Parameters.ByteXX.PA_Destination;
|
||||
if (value == 0) pParserTempData->CurrentDataBlock=0; else
|
||||
{
|
||||
if (value == DB_CURRENT_COMMAND_TABLE)
|
||||
{
|
||||
pParserTempData->CurrentDataBlock= (UINT16)(pParserTempData->pWorkingTableData->pTableHead-pParserTempData->pDeviceData->pBIOS_Image);
|
||||
} else
|
||||
{
|
||||
pMasterDataTable = GetDataMasterTablePointer(pParserTempData->pDeviceData);
|
||||
pParserTempData->CurrentDataBlock= (TABLE_UNIT_TYPE)((PTABLE_UNIT_TYPE)pMasterDataTable)[value];
|
||||
}
|
||||
}
|
||||
pParserTempData->pWorkingTableData->IP+=sizeof(COMMAND_TYPE_OPCODE_VALUE_BYTE);
|
||||
}
|
||||
|
||||
VOID cmdSet_ATI_Port(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->Multipurpose.CurrentPort=ATI_RegsPort;
|
||||
pParserTempData->CurrentPortID = (UINT8)((COMMAND_TYPE_1*)pParserTempData->pWorkingTableData->IP)->Parameters.WordXX.PA_Destination;
|
||||
pParserTempData->pWorkingTableData->IP+=sizeof(COMMAND_TYPE_OPCODE_OFFSET16);
|
||||
}
|
||||
|
||||
VOID cmdSet_Reg_Block(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->CurrentRegBlock = ((COMMAND_TYPE_1*)pParserTempData->pWorkingTableData->IP)->Parameters.WordXX.PA_Destination;
|
||||
pParserTempData->pWorkingTableData->IP+=sizeof(COMMAND_TYPE_OPCODE_OFFSET16);
|
||||
}
|
||||
|
||||
|
||||
//Atavism!!! Review!!!
|
||||
VOID cmdSet_X_Port(PARSER_TEMP_DATA STACK_BASED * pParserTempData){
|
||||
pParserTempData->Multipurpose.CurrentPort=pParserTempData->ParametersType.Destination;
|
||||
pParserTempData->pWorkingTableData->IP+=sizeof(COMMAND_TYPE_OPCODE_ONLY);
|
||||
|
||||
}
|
||||
|
||||
VOID cmdDelay_Millisec(PARSER_TEMP_DATA STACK_BASED * pParserTempData){
|
||||
pParserTempData->SourceData32 =
|
||||
((COMMAND_TYPE_1*)pParserTempData->pWorkingTableData->IP)->Parameters.ByteXX.PA_Destination;
|
||||
DelayMilliseconds(pParserTempData);
|
||||
pParserTempData->pWorkingTableData->IP+=sizeof(COMMAND_TYPE_OPCODE_VALUE_BYTE);
|
||||
}
|
||||
VOID cmdDelay_Microsec(PARSER_TEMP_DATA STACK_BASED * pParserTempData){
|
||||
pParserTempData->SourceData32 =
|
||||
((COMMAND_TYPE_1*)pParserTempData->pWorkingTableData->IP)->Parameters.ByteXX.PA_Destination;
|
||||
DelayMicroseconds(pParserTempData);
|
||||
pParserTempData->pWorkingTableData->IP+=sizeof(COMMAND_TYPE_OPCODE_VALUE_BYTE);
|
||||
}
|
||||
|
||||
VOID ProcessPostChar(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->SourceData32 =
|
||||
((COMMAND_TYPE_1*)pParserTempData->pWorkingTableData->IP)->Parameters.ByteXX.PA_Destination;
|
||||
PostCharOutput(pParserTempData);
|
||||
pParserTempData->pWorkingTableData->IP+=sizeof(COMMAND_TYPE_OPCODE_VALUE_BYTE);
|
||||
}
|
||||
|
||||
VOID ProcessDebug(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->SourceData32 =
|
||||
((COMMAND_TYPE_1*)pParserTempData->pWorkingTableData->IP)->Parameters.ByteXX.PA_Destination;
|
||||
CallerDebugFunc(pParserTempData);
|
||||
pParserTempData->pWorkingTableData->IP+=sizeof(COMMAND_TYPE_OPCODE_VALUE_BYTE);
|
||||
}
|
||||
|
||||
|
||||
VOID ProcessDS(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->pWorkingTableData->IP+=((COMMAND_TYPE_1*)pParserTempData->pWorkingTableData->IP)->Parameters.WordXX.PA_Destination+sizeof(COMMAND_TYPE_OPCODE_OFFSET16);
|
||||
}
|
||||
|
||||
|
||||
VOID cmdCall_Table(PARSER_TEMP_DATA STACK_BASED * pParserTempData){
|
||||
UINT16* MasterTableOffset;
|
||||
pParserTempData->pWorkingTableData->IP+=sizeof(COMMAND_TYPE_OPCODE_VALUE_BYTE);
|
||||
MasterTableOffset = GetCommandMasterTablePointer(pParserTempData->pDeviceData);
|
||||
if(((PTABLE_UNIT_TYPE)MasterTableOffset)[((COMMAND_TYPE_OPCODE_VALUE_BYTE*)pParserTempData->pCmd)->Value]!=0 ) // if the offset is not ZERO
|
||||
{
|
||||
pParserTempData->CommandSpecific.IndexInMasterTable=GetTrueIndexInMasterTable(pParserTempData,((COMMAND_TYPE_OPCODE_VALUE_BYTE*)pParserTempData->pCmd)->Value);
|
||||
pParserTempData->Multipurpose.PS_SizeInDwordsUsedByCallingTable =
|
||||
(((ATOM_COMMON_ROM_COMMAND_TABLE_HEADER *)pParserTempData->pWorkingTableData->pTableHead)->TableAttribute.PS_SizeInBytes>>2);
|
||||
pParserTempData->pDeviceData->pParameterSpace+=
|
||||
pParserTempData->Multipurpose.PS_SizeInDwordsUsedByCallingTable;
|
||||
pParserTempData->Status=CD_CALL_TABLE;
|
||||
pParserTempData->pCmd=(GENERIC_ATTRIBUTE_COMMAND*)MasterTableOffset;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
VOID cmdNOP_(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static VOID NotImplemented(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
pParserTempData->Status = CD_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
VOID ProcessJump(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
if ((pParserTempData->ParametersType.Destination == NoCondition) ||
|
||||
(pParserTempData->ParametersType.Destination == pParserTempData->CompareFlags ))
|
||||
{
|
||||
|
||||
pParserTempData->pWorkingTableData->IP= RELATIVE_TO_TABLE(((COMMAND_TYPE_OPCODE_OFFSET16*)pParserTempData->pWorkingTableData->IP)->CD_Offset16);
|
||||
} else
|
||||
{
|
||||
pParserTempData->pWorkingTableData->IP+=sizeof(COMMAND_TYPE_OPCODE_OFFSET16);
|
||||
}
|
||||
}
|
||||
|
||||
VOID ProcessJumpE(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
if ((pParserTempData->CompareFlags == Equal) ||
|
||||
(pParserTempData->CompareFlags == pParserTempData->ParametersType.Destination))
|
||||
{
|
||||
|
||||
pParserTempData->pWorkingTableData->IP= RELATIVE_TO_TABLE(((COMMAND_TYPE_OPCODE_OFFSET16*)pParserTempData->pWorkingTableData->IP)->CD_Offset16);
|
||||
} else
|
||||
{
|
||||
pParserTempData->pWorkingTableData->IP+=sizeof(COMMAND_TYPE_OPCODE_OFFSET16);
|
||||
}
|
||||
}
|
||||
|
||||
VOID ProcessJumpNE(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
if (pParserTempData->CompareFlags != Equal)
|
||||
{
|
||||
|
||||
pParserTempData->pWorkingTableData->IP= RELATIVE_TO_TABLE(((COMMAND_TYPE_OPCODE_OFFSET16*)pParserTempData->pWorkingTableData->IP)->CD_Offset16);
|
||||
} else
|
||||
{
|
||||
pParserTempData->pWorkingTableData->IP+=sizeof(COMMAND_TYPE_OPCODE_OFFSET16);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
COMMANDS_PROPERTIES CallTable[] =
|
||||
{
|
||||
{ NULL, 0,0},
|
||||
{ ProcessMove, destRegister, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessMove, destParamSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessMove, destWorkSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessMove, destFrameBuffer, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessMove, destPLL, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessMove, destMC, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessAnd, destRegister, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessAnd, destParamSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessAnd, destWorkSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessAnd, destFrameBuffer, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessAnd, destPLL, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessAnd, destMC, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessOr, destRegister, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessOr, destParamSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessOr, destWorkSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessOr, destFrameBuffer, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessOr, destPLL, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessOr, destMC, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessShift, destRegister, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessShift, destParamSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessShift, destWorkSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessShift, destFrameBuffer, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessShift, destPLL, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessShift, destMC, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessShift, destRegister, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessShift, destParamSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessShift, destWorkSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessShift, destFrameBuffer, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessShift, destPLL, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessShift, destMC, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessMUL, destRegister, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessMUL, destParamSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessMUL, destWorkSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessMUL, destFrameBuffer, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessMUL, destPLL, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessMUL, destMC, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessDIV, destRegister, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessDIV, destParamSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessDIV, destWorkSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessDIV, destFrameBuffer, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessDIV, destPLL, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessDIV, destMC, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessADD, destRegister, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessADD, destParamSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessADD, destWorkSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessADD, destFrameBuffer, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessADD, destPLL, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessADD, destMC, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessSUB, destRegister, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessSUB, destParamSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessSUB, destWorkSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessSUB, destFrameBuffer, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessSUB, destPLL, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessSUB, destMC, sizeof(COMMAND_HEADER)},
|
||||
{ cmdSet_ATI_Port, ATI_RegsPort, 0},
|
||||
{ cmdSet_X_Port, PCI_Port, 0},
|
||||
{ cmdSet_X_Port, SystemIO_Port, 0},
|
||||
{ cmdSet_Reg_Block, 0, 0},
|
||||
{ ProcessSetFB_Base,0, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessCompare, destRegister, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessCompare, destParamSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessCompare, destWorkSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessCompare, destFrameBuffer, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessCompare, destPLL, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessCompare, destMC, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessSwitch, 0, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessJump, NoCondition, 0},
|
||||
{ ProcessJump, Equal, 0},
|
||||
{ ProcessJump, Below, 0},
|
||||
{ ProcessJump, Above, 0},
|
||||
{ ProcessJumpE, Below, 0},
|
||||
{ ProcessJumpE, Above, 0},
|
||||
{ ProcessJumpNE, 0, 0},
|
||||
{ ProcessTest, destRegister, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessTest, destParamSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessTest, destWorkSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessTest, destFrameBuffer, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessTest, destPLL, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessTest, destMC, sizeof(COMMAND_HEADER)},
|
||||
{ cmdDelay_Millisec,0, 0},
|
||||
{ cmdDelay_Microsec,0, 0},
|
||||
{ cmdCall_Table, 0, 0},
|
||||
/*cmdRepeat*/ { NotImplemented, 0, 0},
|
||||
{ ProcessClear, destRegister, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessClear, destParamSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessClear, destWorkSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessClear, destFrameBuffer, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessClear, destPLL, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessClear, destMC, sizeof(COMMAND_HEADER)},
|
||||
{ cmdNOP_, 0, sizeof(COMMAND_TYPE_OPCODE_ONLY)},
|
||||
/*cmdEOT*/ { cmdNOP_, 0, sizeof(COMMAND_TYPE_OPCODE_ONLY)},
|
||||
{ ProcessMask, destRegister, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessMask, destParamSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessMask, destWorkSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessMask, destFrameBuffer, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessMask, destPLL, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessMask, destMC, sizeof(COMMAND_HEADER)},
|
||||
/*cmdPost_Card*/ { ProcessPostChar, 0, 0},
|
||||
/*cmdBeep*/ { NotImplemented, 0, 0},
|
||||
/*cmdSave_Reg*/ { NotImplemented, 0, 0},
|
||||
/*cmdRestore_Reg*/{ NotImplemented, 0, 0},
|
||||
{ cmdSetDataBlock, 0, 0},
|
||||
{ ProcessXor, destRegister, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessXor, destParamSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessXor, destWorkSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessXor, destFrameBuffer, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessXor, destPLL, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessXor, destMC, sizeof(COMMAND_HEADER)},
|
||||
|
||||
{ ProcessShl, destRegister, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessShl, destParamSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessShl, destWorkSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessShl, destFrameBuffer, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessShl, destPLL, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessShl, destMC, sizeof(COMMAND_HEADER)},
|
||||
|
||||
{ ProcessShr, destRegister, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessShr, destParamSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessShr, destWorkSpace, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessShr, destFrameBuffer, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessShr, destPLL, sizeof(COMMAND_HEADER)},
|
||||
{ ProcessShr, destMC, sizeof(COMMAND_HEADER)},
|
||||
/*cmdDebug*/ { ProcessDebug, 0, 0},
|
||||
{ ProcessDS, 0, 0},
|
||||
|
||||
};
|
||||
|
||||
// EOF
|
@ -1,235 +0,0 @@
|
||||
/*
|
||||
* Copyright 2006-2007 Advanced Micro Devices, Inc.
|
||||
*
|
||||
* 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 HOLDER(S) OR AUTHOR(S) 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
Module Name:
|
||||
|
||||
Decoder.c
|
||||
|
||||
Abstract:
|
||||
|
||||
Commands Decoder
|
||||
|
||||
Revision History:
|
||||
|
||||
NEG:24.09.2002 Initiated.
|
||||
--*/
|
||||
//#include "AtomBios.h"
|
||||
#include "Decoder.h"
|
||||
#include "atombios.h"
|
||||
#include "CD_binding.h"
|
||||
#include "CD_Common_Types.h"
|
||||
|
||||
#ifndef DISABLE_EASF
|
||||
#include "easf.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define INDIRECT_IO_TABLE (((UINT16)&((ATOM_MASTER_LIST_OF_DATA_TABLES*)0)->IndirectIOAccess)/sizeof(TABLE_UNIT_TYPE) )
|
||||
extern COMMANDS_PROPERTIES CallTable[];
|
||||
|
||||
|
||||
UINT8 ProcessCommandProperties(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
UINT8 opcode=((COMMAND_HEADER*)pParserTempData->pWorkingTableData->IP)->Opcode;
|
||||
pParserTempData->pWorkingTableData->IP+=CallTable[opcode].headersize;
|
||||
pParserTempData->ParametersType.Destination=CallTable[opcode].destination;
|
||||
pParserTempData->ParametersType.Source = pParserTempData->pCmd->Header.Attribute.Source;
|
||||
pParserTempData->CD_Mask.SrcAlignment=pParserTempData->pCmd->Header.Attribute.SourceAlignment;
|
||||
pParserTempData->CD_Mask.DestAlignment=pParserTempData->pCmd->Header.Attribute.DestinationAlignment;
|
||||
return opcode;
|
||||
}
|
||||
|
||||
UINT16* GetCommandMasterTablePointer(DEVICE_DATA STACK_BASED* pDeviceData)
|
||||
{
|
||||
UINT16 *MasterTableOffset;
|
||||
#ifndef DISABLE_EASF
|
||||
if (pDeviceData->format == TABLE_FORMAT_EASF)
|
||||
{
|
||||
/*
|
||||
make MasterTableOffset point to EASF_ASIC_SETUP_TABLE structure, including usSize.
|
||||
*/
|
||||
MasterTableOffset = (UINT16 *) (pDeviceData->pBIOS_Image+((EASF_ASIC_DESCRIPTOR*)pDeviceData->pBIOS_Image)->usAsicSetupTable_Offset);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
#ifndef UEFI_BUILD
|
||||
MasterTableOffset = (UINT16 *)(*(UINT16 *)(pDeviceData->pBIOS_Image+OFFSET_TO_POINTER_TO_ATOM_ROM_HEADER) + pDeviceData->pBIOS_Image);
|
||||
MasterTableOffset = (UINT16 *)((ULONG)((ATOM_ROM_HEADER *)MasterTableOffset)->usMasterCommandTableOffset + pDeviceData->pBIOS_Image );
|
||||
MasterTableOffset =(UINT16 *) &(((ATOM_MASTER_COMMAND_TABLE *)MasterTableOffset)->ListOfCommandTables);
|
||||
#else
|
||||
MasterTableOffset = (UINT16 *)(&(GetCommandMasterTable( )->ListOfCommandTables));
|
||||
#endif
|
||||
}
|
||||
return MasterTableOffset;
|
||||
}
|
||||
|
||||
UINT16* GetDataMasterTablePointer(DEVICE_DATA STACK_BASED* pDeviceData)
|
||||
{
|
||||
UINT16 *MasterTableOffset;
|
||||
|
||||
#ifndef UEFI_BUILD
|
||||
MasterTableOffset = (UINT16 *)(*(UINT16 *)(pDeviceData->pBIOS_Image+OFFSET_TO_POINTER_TO_ATOM_ROM_HEADER) + pDeviceData->pBIOS_Image);
|
||||
MasterTableOffset = (UINT16 *)((ULONG)((ATOM_ROM_HEADER *)MasterTableOffset)->usMasterDataTableOffset + pDeviceData->pBIOS_Image );
|
||||
MasterTableOffset =(UINT16 *) &(((ATOM_MASTER_DATA_TABLE *)MasterTableOffset)->ListOfDataTables);
|
||||
#else
|
||||
MasterTableOffset = (UINT16 *)(&(GetDataMasterTable( )->ListOfDataTables));
|
||||
#endif
|
||||
return MasterTableOffset;
|
||||
}
|
||||
|
||||
|
||||
UINT8 GetTrueIndexInMasterTable(PARSER_TEMP_DATA STACK_BASED * pParserTempData, UINT8 IndexInMasterTable)
|
||||
{
|
||||
#ifndef DISABLE_EASF
|
||||
UINT16 i;
|
||||
if ( pParserTempData->pDeviceData->format == TABLE_FORMAT_EASF)
|
||||
{
|
||||
/*
|
||||
Consider EASF_ASIC_SETUP_TABLE structure pointed by pParserTempData->pCmd as UINT16[]
|
||||
((UINT16*)pParserTempData->pCmd)[0] = EASF_ASIC_SETUP_TABLE.usSize;
|
||||
((UINT16*)pParserTempData->pCmd)[1+n*4] = usFunctionID;
|
||||
usFunctionID has to be shifted left by 2 before compare it to the value provided by caller.
|
||||
*/
|
||||
for (i=1; (i < ((UINT16*)pParserTempData->pCmd)[0] >> 1);i+=4)
|
||||
if ((UINT8)(((UINT16*)pParserTempData->pCmd)[i] << 2)==(IndexInMasterTable & EASF_TABLE_INDEX_MASK)) return (i+1+(IndexInMasterTable & EASF_TABLE_ATTR_MASK));
|
||||
return 1;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
return IndexInMasterTable;
|
||||
}
|
||||
}
|
||||
|
||||
CD_STATUS ParseTable(DEVICE_DATA STACK_BASED* pDeviceData, UINT8 IndexInMasterTable)
|
||||
{
|
||||
PARSER_TEMP_DATA ParserTempData;
|
||||
WORKING_TABLE_DATA STACK_BASED* prevWorkingTableData;
|
||||
|
||||
ParserTempData.pDeviceData=(DEVICE_DATA*)pDeviceData;
|
||||
#ifndef DISABLE_EASF
|
||||
if (pDeviceData->format == TABLE_FORMAT_EASF)
|
||||
{
|
||||
ParserTempData.IndirectIOTablePointer = 0;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
ParserTempData.pCmd=(GENERIC_ATTRIBUTE_COMMAND*)GetDataMasterTablePointer(pDeviceData);
|
||||
ParserTempData.IndirectIOTablePointer=(UINT8*)((ULONG)(((PTABLE_UNIT_TYPE)ParserTempData.pCmd)[INDIRECT_IO_TABLE]) + pDeviceData->pBIOS_Image);
|
||||
ParserTempData.IndirectIOTablePointer+=sizeof(ATOM_COMMON_TABLE_HEADER);
|
||||
}
|
||||
|
||||
ParserTempData.pCmd=(GENERIC_ATTRIBUTE_COMMAND*)GetCommandMasterTablePointer(pDeviceData);
|
||||
IndexInMasterTable=GetTrueIndexInMasterTable((PARSER_TEMP_DATA STACK_BASED *)&ParserTempData,IndexInMasterTable);
|
||||
if(((PTABLE_UNIT_TYPE)ParserTempData.pCmd)[IndexInMasterTable]!=0 ) // if the offset is not ZERO
|
||||
{
|
||||
ParserTempData.CommandSpecific.IndexInMasterTable=IndexInMasterTable;
|
||||
ParserTempData.Multipurpose.CurrentPort=ATI_RegsPort;
|
||||
ParserTempData.CurrentPortID=INDIRECT_IO_MM;
|
||||
ParserTempData.CurrentRegBlock=0;
|
||||
ParserTempData.CurrentFB_Window=0;
|
||||
prevWorkingTableData=NULL;
|
||||
ParserTempData.Status=CD_CALL_TABLE;
|
||||
|
||||
do{
|
||||
|
||||
if (ParserTempData.Status==CD_CALL_TABLE)
|
||||
{
|
||||
IndexInMasterTable=ParserTempData.CommandSpecific.IndexInMasterTable;
|
||||
if(((PTABLE_UNIT_TYPE)ParserTempData.pCmd)[IndexInMasterTable]!=0) // if the offset is not ZERO
|
||||
{
|
||||
#ifndef UEFI_BUILD
|
||||
ParserTempData.pWorkingTableData =(WORKING_TABLE_DATA STACK_BASED*) AllocateWorkSpace(pDeviceData,
|
||||
((ATOM_COMMON_ROM_COMMAND_TABLE_HEADER*)(((PTABLE_UNIT_TYPE)ParserTempData.pCmd)[IndexInMasterTable]+pDeviceData->pBIOS_Image))->TableAttribute.WS_SizeInBytes+sizeof(WORKING_TABLE_DATA));
|
||||
#else
|
||||
ParserTempData.pWorkingTableData =(WORKING_TABLE_DATA STACK_BASED*) AllocateWorkSpace(pDeviceData,
|
||||
((ATOM_COMMON_ROM_COMMAND_TABLE_HEADER*)(((PTABLE_UNIT_TYPE)ParserTempData.pCmd)[IndexInMasterTable]))->TableAttribute.WS_SizeInBytes+sizeof(WORKING_TABLE_DATA));
|
||||
#endif
|
||||
if (ParserTempData.pWorkingTableData!=NULL)
|
||||
{
|
||||
ParserTempData.pWorkingTableData->pWorkSpace=(WORKSPACE_POINTER STACK_BASED*)((UINT8*)ParserTempData.pWorkingTableData+sizeof(WORKING_TABLE_DATA));
|
||||
#ifndef UEFI_BUILD
|
||||
ParserTempData.pWorkingTableData->pTableHead = (UINT8 *)(((PTABLE_UNIT_TYPE)ParserTempData.pCmd)[IndexInMasterTable]+pDeviceData->pBIOS_Image);
|
||||
#else
|
||||
ParserTempData.pWorkingTableData->pTableHead = (UINT8 *)(((PTABLE_UNIT_TYPE)ParserTempData.pCmd)[IndexInMasterTable]);
|
||||
#endif
|
||||
ParserTempData.pWorkingTableData->IP=((UINT8*)ParserTempData.pWorkingTableData->pTableHead)+sizeof(ATOM_COMMON_ROM_COMMAND_TABLE_HEADER);
|
||||
ParserTempData.pWorkingTableData->prevWorkingTableData=prevWorkingTableData;
|
||||
prevWorkingTableData=ParserTempData.pWorkingTableData;
|
||||
ParserTempData.Status = CD_SUCCESS;
|
||||
} else ParserTempData.Status = CD_UNEXPECTED_BEHAVIOR;
|
||||
} else ParserTempData.Status = CD_EXEC_TABLE_NOT_FOUND;
|
||||
}
|
||||
if (!CD_ERROR(ParserTempData.Status))
|
||||
{
|
||||
ParserTempData.Status = CD_SUCCESS;
|
||||
while (!CD_ERROR_OR_COMPLETED(ParserTempData.Status))
|
||||
{
|
||||
|
||||
if (IS_COMMAND_VALID(((COMMAND_HEADER*)ParserTempData.pWorkingTableData->IP)->Opcode))
|
||||
{
|
||||
ParserTempData.pCmd = (GENERIC_ATTRIBUTE_COMMAND*)ParserTempData.pWorkingTableData->IP;
|
||||
|
||||
if (IS_END_OF_TABLE(((COMMAND_HEADER*)ParserTempData.pWorkingTableData->IP)->Opcode))
|
||||
{
|
||||
ParserTempData.Status=CD_COMPLETED;
|
||||
prevWorkingTableData=ParserTempData.pWorkingTableData->prevWorkingTableData;
|
||||
|
||||
FreeWorkSpace(pDeviceData, ParserTempData.pWorkingTableData);
|
||||
ParserTempData.pWorkingTableData=prevWorkingTableData;
|
||||
if (prevWorkingTableData!=NULL)
|
||||
{
|
||||
ParserTempData.pDeviceData->pParameterSpace-=
|
||||
(((ATOM_COMMON_ROM_COMMAND_TABLE_HEADER*)ParserTempData.pWorkingTableData->
|
||||
pTableHead)->TableAttribute.PS_SizeInBytes>>2);
|
||||
}
|
||||
// if there is a parent table where to return, then restore PS_pointer to the original state
|
||||
}
|
||||
else
|
||||
{
|
||||
IndexInMasterTable=ProcessCommandProperties((PARSER_TEMP_DATA STACK_BASED *)&ParserTempData);
|
||||
(*CallTable[IndexInMasterTable].function)((PARSER_TEMP_DATA STACK_BASED *)&ParserTempData);
|
||||
#if (PARSER_TYPE!=DRIVER_TYPE_PARSER)
|
||||
BIOS_STACK_MODIFIER();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ParserTempData.Status=CD_INVALID_OPCODE;
|
||||
break;
|
||||
}
|
||||
|
||||
} // while
|
||||
} // if
|
||||
else
|
||||
break;
|
||||
} while (prevWorkingTableData!=NULL);
|
||||
if (ParserTempData.Status == CD_COMPLETED) return CD_SUCCESS;
|
||||
return ParserTempData.Status;
|
||||
} else return CD_SUCCESS;
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
@ -1,348 +0,0 @@
|
||||
/*
|
||||
* Copyright 2006-2007 Advanced Micro Devices, Inc.
|
||||
*
|
||||
* 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 HOLDER(S) OR AUTHOR(S) 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
Module Name:
|
||||
|
||||
hwserv_drv.c
|
||||
|
||||
Abstract:
|
||||
|
||||
Functions defined in the Command Decoder Specification document
|
||||
|
||||
Revision History:
|
||||
|
||||
NEG:27.09.2002 Initiated.
|
||||
--*/
|
||||
#include "CD_binding.h"
|
||||
#include "CD_hw_services.h"
|
||||
|
||||
//trace settings
|
||||
#if DEBUG_OUTPUT_DEVICE & 1
|
||||
#define TRACE_USING_STDERR //define it to use stderr as trace output,
|
||||
#endif
|
||||
#if DEBUG_OUTPUT_DEVICE & 2
|
||||
#define TRACE_USING_RS232
|
||||
#endif
|
||||
#if DEBUG_OUTPUT_DEVICE & 4
|
||||
#define TRACE_USING_LPT
|
||||
#endif
|
||||
|
||||
|
||||
#if DEBUG_PARSER == 4
|
||||
#define IO_TRACE //IO access trace switch, undefine it to turn off
|
||||
#define PCI_TRACE //PCI access trace switch, undefine it to turn off
|
||||
#define MEM_TRACE //MEM access trace switch, undefine it to turn off
|
||||
#endif
|
||||
|
||||
UINT32 CailReadATIRegister(VOID*,UINT32);
|
||||
VOID CailWriteATIRegister(VOID*,UINT32,UINT32);
|
||||
VOID* CailAllocateMemory(VOID*,UINT16);
|
||||
VOID CailReleaseMemory(VOID *,VOID *);
|
||||
VOID CailDelayMicroSeconds(VOID *,UINT32 );
|
||||
VOID CailReadPCIConfigData(VOID*,VOID*,UINT32,UINT16);
|
||||
VOID CailWritePCIConfigData(VOID*,VOID*,UINT32,UINT16);
|
||||
UINT32 CailReadFBData(VOID*,UINT32);
|
||||
VOID CailWriteFBData(VOID*,UINT32,UINT32);
|
||||
ULONG CailReadPLL(VOID *Context ,ULONG Address);
|
||||
VOID CailWritePLL(VOID *Context,ULONG Address,ULONG Data);
|
||||
ULONG CailReadMC(VOID *Context ,ULONG Address);
|
||||
VOID CailWriteMC(VOID *Context ,ULONG Address,ULONG Data);
|
||||
|
||||
|
||||
#if DEBUG_PARSER>0
|
||||
VOID CailVideoDebugPrint(VOID*,ULONG_PTR, UINT16);
|
||||
#endif
|
||||
// Delay function
|
||||
#if ( defined ENABLE_PARSER_DELAY || defined ENABLE_ALL_SERVICE_FUNCTIONS )
|
||||
|
||||
VOID DelayMilliseconds(PARSER_TEMP_DATA STACK_BASED * pWorkingTableData)
|
||||
{
|
||||
CailDelayMicroSeconds(pWorkingTableData->pDeviceData->CAIL,pWorkingTableData->SourceData32*1000);
|
||||
}
|
||||
|
||||
VOID DelayMicroseconds(PARSER_TEMP_DATA STACK_BASED * pWorkingTableData)
|
||||
{
|
||||
CailDelayMicroSeconds(pWorkingTableData->pDeviceData->CAIL,pWorkingTableData->SourceData32);
|
||||
}
|
||||
#endif
|
||||
|
||||
VOID PostCharOutput(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
}
|
||||
|
||||
VOID CallerDebugFunc(PARSER_TEMP_DATA STACK_BASED * pParserTempData)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// PCI READ Access
|
||||
|
||||
#if ( defined ENABLE_PARSER_PCIREAD8 || defined ENABLE_ALL_SERVICE_FUNCTIONS )
|
||||
UINT8 ReadPCIReg8(PARSER_TEMP_DATA STACK_BASED * pWorkingTableData)
|
||||
{
|
||||
UINT8 rvl;
|
||||
CailReadPCIConfigData(pWorkingTableData->pDeviceData->CAIL,&rvl,pWorkingTableData->Index,sizeof(UINT8));
|
||||
return rvl;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if ( defined ENABLE_PARSER_PCIREAD16 || defined ENABLE_ALL_SERVICE_FUNCTIONS )
|
||||
UINT16 ReadPCIReg16(PARSER_TEMP_DATA STACK_BASED * pWorkingTableData)
|
||||
{
|
||||
|
||||
UINT16 rvl;
|
||||
CailReadPCIConfigData(pWorkingTableData->pDeviceData->CAIL,&rvl,pWorkingTableData->Index,sizeof(UINT16));
|
||||
return rvl;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if ( defined ENABLE_PARSER_PCIREAD32 || defined ENABLE_ALL_SERVICE_FUNCTIONS )
|
||||
UINT32 ReadPCIReg32 (PARSER_TEMP_DATA STACK_BASED * pWorkingTableData)
|
||||
{
|
||||
|
||||
UINT32 rvl;
|
||||
CailReadPCIConfigData(pWorkingTableData->pDeviceData->CAIL,&rvl,pWorkingTableData->Index,sizeof(UINT32));
|
||||
return rvl;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// PCI WRITE Access
|
||||
|
||||
#if ( defined ENABLE_PARSER_PCIWRITE8 || defined ENABLE_ALL_SERVICE_FUNCTIONS )
|
||||
VOID WritePCIReg8 (PARSER_TEMP_DATA STACK_BASED * pWorkingTableData)
|
||||
{
|
||||
|
||||
CailWritePCIConfigData(pWorkingTableData->pDeviceData->CAIL,&(pWorkingTableData->DestData32),pWorkingTableData->Index,sizeof(UINT8));
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if ( defined ENABLE_PARSER_PCIWRITE16 || defined ENABLE_ALL_SERVICE_FUNCTIONS )
|
||||
VOID WritePCIReg16 (PARSER_TEMP_DATA STACK_BASED * pWorkingTableData)
|
||||
{
|
||||
|
||||
CailWritePCIConfigData(pWorkingTableData->pDeviceData->CAIL,&(pWorkingTableData->DestData32),pWorkingTableData->Index,sizeof(UINT16));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if ( defined ENABLE_PARSER_PCIWRITE32 || defined ENABLE_ALL_SERVICE_FUNCTIONS )
|
||||
VOID WritePCIReg32 (PARSER_TEMP_DATA STACK_BASED * pWorkingTableData)
|
||||
{
|
||||
CailWritePCIConfigData(pWorkingTableData->pDeviceData->CAIL,&(pWorkingTableData->DestData32),pWorkingTableData->Index,sizeof(UINT32));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
// System IO Access
|
||||
#if ( defined ENABLE_PARSER_SYS_IOREAD8 || defined ENABLE_ALL_SERVICE_FUNCTIONS )
|
||||
UINT8 ReadSysIOReg8 (PARSER_TEMP_DATA STACK_BASED * pWorkingTableData)
|
||||
{
|
||||
UINT8 rvl;
|
||||
rvl=0;
|
||||
//rvl= (UINT8) ReadGenericPciCfg(dev,reg,sizeof(UINT8));
|
||||
return rvl;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if ( defined ENABLE_PARSER_SYS_IOREAD16 || defined ENABLE_ALL_SERVICE_FUNCTIONS )
|
||||
UINT16 ReadSysIOReg16(PARSER_TEMP_DATA STACK_BASED * pWorkingTableData)
|
||||
{
|
||||
|
||||
UINT16 rvl;
|
||||
rvl=0;
|
||||
//rvl= (UINT16) ReadGenericPciCfg(dev,reg,sizeof(UINT16));
|
||||
return rvl;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if ( defined ENABLE_PARSER_SYS_IOREAD32 || defined ENABLE_ALL_SERVICE_FUNCTIONS )
|
||||
UINT32 ReadSysIOReg32 (PARSER_TEMP_DATA STACK_BASED * pWorkingTableData)
|
||||
{
|
||||
|
||||
UINT32 rvl;
|
||||
rvl=0;
|
||||
//rvl= (UINT32) ReadGenericPciCfg(dev,reg,sizeof(UINT32));
|
||||
return rvl;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// PCI WRITE Access
|
||||
|
||||
#if ( defined ENABLE_PARSER_SYS_IOWRITE8 || defined ENABLE_ALL_SERVICE_FUNCTIONS )
|
||||
VOID WriteSysIOReg8 (PARSER_TEMP_DATA STACK_BASED * pWorkingTableData)
|
||||
{
|
||||
|
||||
//WriteGenericPciCfg(dev,reg,sizeof(UINT8),(UINT32)value);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if ( defined ENABLE_PARSER_SYS_IOWRITE16 || defined ENABLE_ALL_SERVICE_FUNCTIONS )
|
||||
VOID WriteSysIOReg16 (PARSER_TEMP_DATA STACK_BASED * pWorkingTableData)
|
||||
{
|
||||
|
||||
//WriteGenericPciCfg(dev,reg,sizeof(UINT16),(UINT32)value);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if ( defined ENABLE_PARSER_SYS_IOWRITE32 || defined ENABLE_ALL_SERVICE_FUNCTIONS )
|
||||
VOID WriteSysIOReg32 (PARSER_TEMP_DATA STACK_BASED * pWorkingTableData)
|
||||
{
|
||||
//WriteGenericPciCfg(dev,reg,sizeof(UINT32),(UINT32)value);
|
||||
}
|
||||
#endif
|
||||
|
||||
// ATI Registers Memory Mapped Access
|
||||
|
||||
#if ( defined ENABLE_PARSER_REGISTERS_MEMORY_ACCESS || defined ENABLE_ALL_SERVICE_FUNCTIONS)
|
||||
|
||||
UINT32 ReadReg32 (PARSER_TEMP_DATA STACK_BASED * pWorkingTableData)
|
||||
{
|
||||
return CailReadATIRegister(pWorkingTableData->pDeviceData->CAIL,pWorkingTableData->Index);
|
||||
}
|
||||
|
||||
VOID WriteReg32(PARSER_TEMP_DATA STACK_BASED * pWorkingTableData)
|
||||
{
|
||||
CailWriteATIRegister(pWorkingTableData->pDeviceData->CAIL,(UINT16)pWorkingTableData->Index,pWorkingTableData->DestData32 );
|
||||
}
|
||||
|
||||
|
||||
VOID ReadIndReg32 (PARSER_TEMP_DATA STACK_BASED * pWorkingTableData)
|
||||
{
|
||||
pWorkingTableData->IndirectData = CailReadATIRegister(pWorkingTableData->pDeviceData->CAIL,*(UINT16*)(pWorkingTableData->IndirectIOTablePointer+1));
|
||||
}
|
||||
|
||||
VOID WriteIndReg32(PARSER_TEMP_DATA STACK_BASED * pWorkingTableData)
|
||||
{
|
||||
CailWriteATIRegister(pWorkingTableData->pDeviceData->CAIL,*(UINT16*)(pWorkingTableData->IndirectIOTablePointer+1),pWorkingTableData->IndirectData );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// ATI Registers IO Mapped Access
|
||||
|
||||
#if ( defined ENABLE_PARSER_REGISTERS_IO_ACCESS || defined ENABLE_ALL_SERVICE_FUNCTIONS )
|
||||
UINT32 ReadRegIO (PARSER_TEMP_DATA STACK_BASED * pWorkingTableData)
|
||||
{
|
||||
//return CailReadATIRegister(pWorkingTableData->pDeviceData->CAIL,pWorkingTableData->Index);
|
||||
return 0;
|
||||
}
|
||||
VOID WriteRegIO(PARSER_TEMP_DATA STACK_BASED * pWorkingTableData)
|
||||
{
|
||||
// return CailWriteATIRegister(pWorkingTableData->pDeviceData->CAIL,pWorkingTableData->Index,pWorkingTableData->DestData32 );
|
||||
}
|
||||
#endif
|
||||
|
||||
// access to Frame buffer, dummy function, need more information to implement it
|
||||
UINT32 ReadFrameBuffer32 (PARSER_TEMP_DATA STACK_BASED * pWorkingTableData)
|
||||
{
|
||||
|
||||
return CailReadFBData(pWorkingTableData->pDeviceData->CAIL, (pWorkingTableData->Index <<2 ));
|
||||
|
||||
}
|
||||
|
||||
VOID WriteFrameBuffer32(PARSER_TEMP_DATA STACK_BASED * pWorkingTableData)
|
||||
{
|
||||
CailWriteFBData(pWorkingTableData->pDeviceData->CAIL,(pWorkingTableData->Index <<2), pWorkingTableData->DestData32);
|
||||
|
||||
}
|
||||
|
||||
|
||||
VOID *AllocateMemory(DEVICE_DATA *pDeviceData , UINT16 MemSize)
|
||||
{
|
||||
if(MemSize)
|
||||
return(CailAllocateMemory(pDeviceData->CAIL,MemSize));
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
VOID ReleaseMemory(DEVICE_DATA *pDeviceData , WORKING_TABLE_DATA* pWorkingTableData)
|
||||
{
|
||||
if( pWorkingTableData)
|
||||
CailReleaseMemory(pDeviceData->CAIL, pWorkingTableData);
|
||||
}
|
||||
|
||||
|
||||
UINT32 ReadMC32(PARSER_TEMP_DATA STACK_BASED * pWorkingTableData)
|
||||
{
|
||||
UINT32 ReadData;
|
||||
ReadData=(UINT32)CailReadMC(pWorkingTableData->pDeviceData->CAIL,pWorkingTableData->Index);
|
||||
return ReadData;
|
||||
}
|
||||
|
||||
VOID WriteMC32(PARSER_TEMP_DATA STACK_BASED * pWorkingTableData)
|
||||
{
|
||||
CailWriteMC(pWorkingTableData->pDeviceData->CAIL,pWorkingTableData->Index,pWorkingTableData->DestData32);
|
||||
}
|
||||
|
||||
UINT32 ReadPLL32(PARSER_TEMP_DATA STACK_BASED * pWorkingTableData)
|
||||
{
|
||||
UINT32 ReadData;
|
||||
ReadData=(UINT32)CailReadPLL(pWorkingTableData->pDeviceData->CAIL,pWorkingTableData->Index);
|
||||
return ReadData;
|
||||
|
||||
}
|
||||
|
||||
VOID WritePLL32(PARSER_TEMP_DATA STACK_BASED * pWorkingTableData)
|
||||
{
|
||||
CailWritePLL(pWorkingTableData->pDeviceData->CAIL,pWorkingTableData->Index,pWorkingTableData->DestData32);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if DEBUG_PARSER>0
|
||||
VOID CD_print_string (DEVICE_DATA *pDeviceData, UINT8 *str)
|
||||
{
|
||||
CailVideoDebugPrint( pDeviceData->CAIL, (ULONG_PTR) str, PARSER_STRINGS);
|
||||
}
|
||||
|
||||
VOID CD_print_value (DEVICE_DATA *pDeviceData, ULONG_PTR value, UINT16 value_type )
|
||||
{
|
||||
CailVideoDebugPrint( pDeviceData->CAIL, (ULONG_PTR)value, value_type);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// EOF
|
Loading…
Reference in New Issue
Block a user