radeon_hd: Cleanup atombios parser types
* pptable.h now 100% stock * atombios.h now 99% stock * Resolves issues with radeon_hd on x86_64 by making atombios structs match OS typedefs * Resolves #10614
This commit is contained in:
@@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2013-2014, Haiku, Inc. All Rights Reserved.
|
||||||
|
* Distributed under the terms of the MIT License.
|
||||||
|
*
|
||||||
|
* Authors:
|
||||||
|
* Alexander von Gluck, [email protected]
|
||||||
|
*/
|
||||||
|
#ifndef _ATOMBIOS_TYPES_H
|
||||||
|
#define _ATOMBIOS_TYPES_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <SupportDefs.h>
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(__POWERPC__)
|
||||||
|
#define ATOM_BIG_ENDIAN 1
|
||||||
|
#else
|
||||||
|
#define ATOM_BIG_ENDIAN 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
// Align types to Haiku's types
|
||||||
|
typedef uint16 USHORT;
|
||||||
|
typedef uint32 ULONG;
|
||||||
|
typedef uint8 UCHAR;
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* _ATOMBIOS_TYPES_H */
|
||||||
@@ -29,33 +29,35 @@
|
|||||||
#ifndef _ATOMBIOS_H
|
#ifndef _ATOMBIOS_H
|
||||||
#define _ATOMBIOS_H
|
#define _ATOMBIOS_H
|
||||||
|
|
||||||
|
// Types for Haiku
|
||||||
|
#include "atombios-types.h"
|
||||||
|
|
||||||
#define ATOM_VERSION_MAJOR 0x00020000
|
#define ATOM_VERSION_MAJOR 0x00020000
|
||||||
#define ATOM_VERSION_MINOR 0x00000002
|
#define ATOM_VERSION_MINOR 0x00000002
|
||||||
|
|
||||||
#define ATOM_HEADER_VERSION (ATOM_VERSION_MAJOR | ATOM_VERSION_MINOR)
|
#define ATOM_HEADER_VERSION (ATOM_VERSION_MAJOR | ATOM_VERSION_MINOR)
|
||||||
|
|
||||||
#if defined(__POWERPC__)
|
/* Endianness should be specified before inclusion,
|
||||||
#define ATOM_BIG_ENDIAN 1
|
* default to little endian
|
||||||
#else
|
*/
|
||||||
#define ATOM_BIG_ENDIAN 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef ATOM_BIG_ENDIAN
|
#ifndef ATOM_BIG_ENDIAN
|
||||||
#error Endian not specified
|
#error Endian not specified
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef ULONG
|
#ifdef _H2INC
|
||||||
typedef unsigned long ULONG;
|
#ifndef ULONG
|
||||||
#endif
|
typedef unsigned long ULONG;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef UCHAR
|
#ifndef UCHAR
|
||||||
typedef unsigned char UCHAR;
|
typedef unsigned char UCHAR;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef USHORT
|
#ifndef USHORT
|
||||||
typedef unsigned short USHORT;
|
typedef unsigned short USHORT;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ATOM_DAC_A 0
|
#define ATOM_DAC_A 0
|
||||||
#define ATOM_DAC_B 1
|
#define ATOM_DAC_B 1
|
||||||
#define ATOM_EXT_DAC 2
|
#define ATOM_EXT_DAC 2
|
||||||
|
|||||||
@@ -23,8 +23,6 @@
|
|||||||
#ifndef _PPTABLE_H
|
#ifndef _PPTABLE_H
|
||||||
#define _PPTABLE_H
|
#define _PPTABLE_H
|
||||||
|
|
||||||
// Haiku GCC2 fix
|
|
||||||
//#pragma pack(push, 1)
|
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
|
|
||||||
typedef struct _ATOM_PPLIB_THERMALCONTROLLER
|
typedef struct _ATOM_PPLIB_THERMALCONTROLLER
|
||||||
@@ -679,9 +677,6 @@ typedef struct _ATOM_PPLIB_PPM_Table
|
|||||||
ULONG ulTjmax;
|
ULONG ulTjmax;
|
||||||
} ATOM_PPLIB_PPM_Table;
|
} ATOM_PPLIB_PPM_Table;
|
||||||
|
|
||||||
// Haiku GCC2 fix
|
|
||||||
//#pragma pack(pop)
|
|
||||||
#pragma pack()
|
#pragma pack()
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user