add first accelerant atombios wrapper sources, atombios is now accessible from accelerant; atombios calls PCI register read/write routines from the main accelerant that need implimented, thus bios.cpp is disabled atm... going to be tricky

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41112 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Alexander von Gluck IV 2011-03-26 16:19:25 +00:00
parent ab5904510b
commit 0ceb83958d
4 changed files with 77 additions and 0 deletions

View File

@ -12,6 +12,7 @@ Addon radeon_hd.accelerant :
engine.cpp
hooks.cpp
mode.cpp
# bios.cpp
: be libaccelerantscommon.a atombios.a
;

View File

@ -6,6 +6,8 @@ UsePrivateHeaders [ FDirName graphics radeon_hd ] ;
UsePrivateHeaders [ FDirName graphics common ] ;
DEFINES += DISABLE_EASF ;
DEFINES += DRIVER_PARSER ;
DEFINES += ENABLE_ALL_SERVICE_FUNCTIONS ;
# To avoid changing AMD vendor sources
TARGET_WARNING_CCFLAGS = [ FFilter $(TARGET_WARNING_CCFLAGS)
@ -15,4 +17,5 @@ TARGET_WARNING_CCFLAGS += -Wno-pointer-to-int-cast ;
StaticLibrary atombios.a :
Decoder.c
CD_Operations.c
hwserv_drv.c
;

View File

@ -0,0 +1,56 @@
/*
* Copyright 2011, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Alexander von Gluck IV, kallisti5@unixzen.com
*/
#include <Debug.h>
#include "bios.h"
#include "accelerant.h"
#include "accelerant_protos.h"
#undef TRACE
#define TRACE_ATOM
#ifdef TRACE_ATOM
# define TRACE(x) _sPrintf x
#else
# define TRACE(x) ;
#endif
status_t
AtomBiosParser(void *pspace, uint8_t index, void *handle, void *BIOSBase)
{
DEVICE_DATA deviceData;
deviceData.pParameterSpace = (UINT32*)pspace;
deviceData.CAIL = handle;
deviceData.pBIOS_Image = (UINT8*)BIOSBase;
deviceData.format = TABLE_FORMAT_BIOS;
switch (ParseTable(&deviceData, index)) {
case CD_SUCCESS:
TRACE(("%s: CD_SUCCESS : success\n", __FUNCTION__));
return B_OK;
break;
case CD_CALL_TABLE:
TRACE(("%s: CD_CALL_TABLE : success\n", __FUNCTION__));
return B_OK;
break;
case CD_COMPLETED:
TRACE(("%s: CD_COMPLETED : success\n", __FUNCTION__));
return B_OK;
break;
default:
TRACE(("%s: UNKNOWN ERROR\n", __FUNCTION__));
}
return B_ERROR;
}

View File

@ -0,0 +1,17 @@
/*
* Copyright 2011, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Alexander von Gluck IV, kallisti5@unixzen.com
*/
#include <stdint.h>
// AtomBios includes
extern "C" {
#include "CD_Common_Types.h"
#include "CD_Definitions.h"
#include "atombios.h"
}