xref: /haiku/src/add-ons/accelerants/radeon_hd/bios.cpp (revision 0ceb83958d08555379a75c78de5f2740aeb3d1e5)
1*0ceb8395SAlexander von Gluck IV /*
2*0ceb8395SAlexander von Gluck IV  * Copyright 2011, Haiku, Inc. All Rights Reserved.
3*0ceb8395SAlexander von Gluck IV  * Distributed under the terms of the MIT License.
4*0ceb8395SAlexander von Gluck IV  *
5*0ceb8395SAlexander von Gluck IV  * Authors:
6*0ceb8395SAlexander von Gluck IV  *		Alexander von Gluck IV, kallisti5@unixzen.com
7*0ceb8395SAlexander von Gluck IV  */
8*0ceb8395SAlexander von Gluck IV 
9*0ceb8395SAlexander von Gluck IV 
10*0ceb8395SAlexander von Gluck IV #include <Debug.h>
11*0ceb8395SAlexander von Gluck IV 
12*0ceb8395SAlexander von Gluck IV #include "bios.h"
13*0ceb8395SAlexander von Gluck IV 
14*0ceb8395SAlexander von Gluck IV #include "accelerant.h"
15*0ceb8395SAlexander von Gluck IV #include "accelerant_protos.h"
16*0ceb8395SAlexander von Gluck IV 
17*0ceb8395SAlexander von Gluck IV 
18*0ceb8395SAlexander von Gluck IV #undef TRACE
19*0ceb8395SAlexander von Gluck IV 
20*0ceb8395SAlexander von Gluck IV #define TRACE_ATOM
21*0ceb8395SAlexander von Gluck IV #ifdef TRACE_ATOM
22*0ceb8395SAlexander von Gluck IV #   define TRACE(x) _sPrintf x
23*0ceb8395SAlexander von Gluck IV #else
24*0ceb8395SAlexander von Gluck IV #   define TRACE(x) ;
25*0ceb8395SAlexander von Gluck IV #endif
26*0ceb8395SAlexander von Gluck IV 
27*0ceb8395SAlexander von Gluck IV 
28*0ceb8395SAlexander von Gluck IV status_t
29*0ceb8395SAlexander von Gluck IV AtomBiosParser(void *pspace, uint8_t index, void *handle, void *BIOSBase)
30*0ceb8395SAlexander von Gluck IV {
31*0ceb8395SAlexander von Gluck IV 	DEVICE_DATA deviceData;
32*0ceb8395SAlexander von Gluck IV 
33*0ceb8395SAlexander von Gluck IV 	deviceData.pParameterSpace = (UINT32*)pspace;
34*0ceb8395SAlexander von Gluck IV 	deviceData.CAIL = handle;
35*0ceb8395SAlexander von Gluck IV 	deviceData.pBIOS_Image = (UINT8*)BIOSBase;
36*0ceb8395SAlexander von Gluck IV 	deviceData.format = TABLE_FORMAT_BIOS;
37*0ceb8395SAlexander von Gluck IV 
38*0ceb8395SAlexander von Gluck IV 	switch (ParseTable(&deviceData, index)) {
39*0ceb8395SAlexander von Gluck IV 		case CD_SUCCESS:
40*0ceb8395SAlexander von Gluck IV 			TRACE(("%s: CD_SUCCESS : success\n", __FUNCTION__));
41*0ceb8395SAlexander von Gluck IV 			return B_OK;
42*0ceb8395SAlexander von Gluck IV 			break;
43*0ceb8395SAlexander von Gluck IV 		case CD_CALL_TABLE:
44*0ceb8395SAlexander von Gluck IV 			TRACE(("%s: CD_CALL_TABLE : success\n", __FUNCTION__));
45*0ceb8395SAlexander von Gluck IV 			return B_OK;
46*0ceb8395SAlexander von Gluck IV 			break;
47*0ceb8395SAlexander von Gluck IV 		case CD_COMPLETED:
48*0ceb8395SAlexander von Gluck IV 			TRACE(("%s: CD_COMPLETED : success\n", __FUNCTION__));
49*0ceb8395SAlexander von Gluck IV 			return B_OK;
50*0ceb8395SAlexander von Gluck IV 			break;
51*0ceb8395SAlexander von Gluck IV 		default:
52*0ceb8395SAlexander von Gluck IV 			TRACE(("%s: UNKNOWN ERROR\n", __FUNCTION__));
53*0ceb8395SAlexander von Gluck IV 	}
54*0ceb8395SAlexander von Gluck IV 	return B_ERROR;
55*0ceb8395SAlexander von Gluck IV }
56*0ceb8395SAlexander von Gluck IV 
57