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:
Alexander von Gluck IV 2014-05-24 20:19:17 -05:00
parent bc73719d2f
commit 38ec158d2a
3 changed files with 45 additions and 20 deletions

View File

@ -0,0 +1,28 @@
/*
* Copyright 2013-2014, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Alexander von Gluck, kallisti5@unixzen.com
*/
#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 */

View File

@ -29,33 +29,35 @@
#ifndef _ATOMBIOS_H
#define _ATOMBIOS_H
// Types for Haiku
#include "atombios-types.h"
#define ATOM_VERSION_MAJOR 0x00020000
#define ATOM_VERSION_MINOR 0x00000002
#define ATOM_HEADER_VERSION (ATOM_VERSION_MAJOR | ATOM_VERSION_MINOR)
#if defined(__POWERPC__)
#define ATOM_BIG_ENDIAN 1
#else
#define ATOM_BIG_ENDIAN 0
#endif
/* Endianness should be specified before inclusion,
* default to little endian
*/
#ifndef ATOM_BIG_ENDIAN
#error Endian not specified
#endif
#ifndef ULONG
typedef unsigned long ULONG;
#endif
#ifdef _H2INC
#ifndef ULONG
typedef unsigned long ULONG;
#endif
#ifndef UCHAR
typedef unsigned char UCHAR;
#endif
#ifndef UCHAR
typedef unsigned char UCHAR;
#endif
#ifndef USHORT
typedef unsigned short USHORT;
#ifndef USHORT
typedef unsigned short USHORT;
#endif
#endif
#define ATOM_DAC_A 0
#define ATOM_DAC_B 1
#define ATOM_EXT_DAC 2

View File

@ -23,8 +23,6 @@
#ifndef _PPTABLE_H
#define _PPTABLE_H
// Haiku GCC2 fix
//#pragma pack(push, 1)
#pragma pack(1)
typedef struct _ATOM_PPLIB_THERMALCONTROLLER
@ -679,9 +677,6 @@ typedef struct _ATOM_PPLIB_PPM_Table
ULONG ulTjmax;
} ATOM_PPLIB_PPM_Table;
// Haiku GCC2 fix
//#pragma pack(pop)
#pragma pack()
#endif