[haiku-commits] r41083 - in haiku/trunk/headers/private/graphics/radeon_hd: . atombios

  • From: kallisti5@xxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 22 Mar 2011 20:39:03 +0100 (CET)

Author: kallisti5
Date: 2011-03-22 20:39:02 +0100 (Tue, 22 Mar 2011)
New Revision: 41083
Changeset: https://dev.haiku-os.org/changeset/41083

Added:
   haiku/trunk/headers/private/graphics/radeon_hd/atombios/
   haiku/trunk/headers/private/graphics/radeon_hd/atombios/CD_Common_Types.h
   haiku/trunk/headers/private/graphics/radeon_hd/atombios/CD_Definitions.h
   haiku/trunk/headers/private/graphics/radeon_hd/atombios/CD_Opcodes.h
   haiku/trunk/headers/private/graphics/radeon_hd/atombios/CD_Structs.h
   haiku/trunk/headers/private/graphics/radeon_hd/atombios/CD_binding.h
   haiku/trunk/headers/private/graphics/radeon_hd/atombios/CD_hw_services.h
   haiku/trunk/headers/private/graphics/radeon_hd/atombios/Decoder.h
   haiku/trunk/headers/private/graphics/radeon_hd/atombios/ObjectID.h
   haiku/trunk/headers/private/graphics/radeon_hd/atombios/atombios.h
   haiku/trunk/headers/private/graphics/radeon_hd/atombios/regsdef.h
Log:
move atombios headers into private include

Copied: 
haiku/trunk/headers/private/graphics/radeon_hd/atombios/CD_Common_Types.h (from 
rev 41080, 
haiku/trunk/src/add-ons/accelerants/radeon_hd/AtomBios/includes/CD_Common_Types.h)
===================================================================
--- haiku/trunk/headers/private/graphics/radeon_hd/atombios/CD_Common_Types.h   
                        (rev 0)
+++ haiku/trunk/headers/private/graphics/radeon_hd/atombios/CD_Common_Types.h   
2011-03-22 19:39:02 UTC (rev 41083)
@@ -0,0 +1,156 @@
+/*
+ * 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

Copied: 
haiku/trunk/headers/private/graphics/radeon_hd/atombios/CD_Definitions.h (from 
rev 41080, 
haiku/trunk/src/add-ons/accelerants/radeon_hd/AtomBios/includes/CD_Definitions.h)
===================================================================
--- haiku/trunk/headers/private/graphics/radeon_hd/atombios/CD_Definitions.h    
                        (rev 0)
+++ haiku/trunk/headers/private/graphics/radeon_hd/atombios/CD_Definitions.h    
2011-03-22 19:39:02 UTC (rev 41083)
@@ -0,0 +1,49 @@
+/*
+ * 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

Copied: haiku/trunk/headers/private/graphics/radeon_hd/atombios/CD_Opcodes.h 
(from rev 41080, 
haiku/trunk/src/add-ons/accelerants/radeon_hd/AtomBios/includes/CD_Opcodes.h)
===================================================================
--- haiku/trunk/headers/private/graphics/radeon_hd/atombios/CD_Opcodes.h        
                        (rev 0)
+++ haiku/trunk/headers/private/graphics/radeon_hd/atombios/CD_Opcodes.h        
2011-03-22 19:39:02 UTC (rev 41083)
@@ -0,0 +1,181 @@
+/*
+ * 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_

Copied: haiku/trunk/headers/private/graphics/radeon_hd/atombios/CD_Structs.h 
(from rev 41080, 
haiku/trunk/src/add-ons/accelerants/radeon_hd/AtomBios/includes/CD_Structs.h)
===================================================================
--- haiku/trunk/headers/private/graphics/radeon_hd/atombios/CD_Structs.h        
                        (rev 0)
+++ haiku/trunk/headers/private/graphics/radeon_hd/atombios/CD_Structs.h        
2011-03-22 19:39:02 UTC (rev 41083)
@@ -0,0 +1,464 @@
+/*
+ * 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

Copied: haiku/trunk/headers/private/graphics/radeon_hd/atombios/CD_binding.h 
(from rev 41080, 
haiku/trunk/src/add-ons/accelerants/radeon_hd/AtomBios/includes/CD_binding.h)
===================================================================
--- haiku/trunk/headers/private/graphics/radeon_hd/atombios/CD_binding.h        
                        (rev 0)
+++ haiku/trunk/headers/private/graphics/radeon_hd/atombios/CD_binding.h        
2011-03-22 19:39:02 UTC (rev 41083)
@@ -0,0 +1,46 @@
+/*
+ * 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))
+

Copied: 
haiku/trunk/headers/private/graphics/radeon_hd/atombios/CD_hw_services.h (from 
rev 41080, 
haiku/trunk/src/add-ons/accelerants/radeon_hd/AtomBios/includes/CD_hw_services.h)
===================================================================
--- haiku/trunk/headers/private/graphics/radeon_hd/atombios/CD_hw_services.h    
                        (rev 0)
+++ haiku/trunk/headers/private/graphics/radeon_hd/atombios/CD_hw_services.h    
2011-03-22 19:39:02 UTC (rev 41083)
@@ -0,0 +1,318 @@
+/*
+ * 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);
+

[... truncated: 7166 lines follow ...]

Other related posts:

  • » [haiku-commits] r41083 - in haiku/trunk/headers/private/graphics/radeon_hd: . atombios - kallisti5