AGP busmanager now compiles.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8373 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -13,39 +13,52 @@
|
|||||||
#if !defined(_AGP_H_)
|
#if !defined(_AGP_H_)
|
||||||
#define _AGP_H_
|
#define _AGP_H_
|
||||||
|
|
||||||
#include <Drivers.h>
|
#include <bus_manager.h>
|
||||||
|
|
||||||
/* The API for driver access is C, not C++ */
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
//driver IOCTRL argument:
|
/* -----
|
||||||
typedef struct {
|
agp device info
|
||||||
|
----- */
|
||||||
|
|
||||||
|
typedef struct agp_info {
|
||||||
|
ushort vendor_id; /* vendor id */
|
||||||
|
ushort device_id; /* device id */
|
||||||
|
uchar bus; /* bus number */
|
||||||
|
uchar device; /* device number on bus */
|
||||||
|
uchar function; /* function number in device */
|
||||||
|
uchar class_sub; /* specific device function */
|
||||||
|
uchar class_base; /* device type (display vs host bridge) */
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
ushort vendor_id, /* host bridge vendor id */
|
uint32 agp_cap_id; /* AGP capability register as defined in the AGP standard */
|
||||||
device_id; /* host bridge device id */
|
uint32 agp_stat; /* AGP STATUS register as defined in the AGP standard */
|
||||||
} dev;
|
uint32 agp_cmd; /* AGP COMMAND register as defined in the AGP standard */
|
||||||
struct
|
} interface;
|
||||||
{
|
status_t status; /* B_OK if usable, B_ERROR if device did not respond
|
||||||
uint32 agp_cap_id, /* AGP capability register as defined in the AGP standard */
|
* according to the AGP standard */
|
||||||
agp_stat, /* AGP STATUS register as defined in the AGP standard */
|
|
||||||
agp_cmd; /* AGP COMMAND register as defined in the AGP standard */
|
|
||||||
}config;
|
|
||||||
status_t status; /* hostbridge usability status (B_OK if usable, B_ERROR if it
|
|
||||||
* did not respond according to the AGP standard */
|
|
||||||
} agp_info;
|
} agp_info;
|
||||||
|
|
||||||
|
typedef struct agp_module_info agp_module_info;
|
||||||
|
|
||||||
//driver IOCTRL operation codes:
|
struct agp_module_info {
|
||||||
enum
|
bus_manager_info binfo;
|
||||||
{
|
|
||||||
GET_CONFIG = B_DEVICE_OP_CODES_END+20001,
|
long (*get_nth_agp_info) (
|
||||||
SET_CONFIG,
|
long index, /* index into agp device table */
|
||||||
|
agp_info *info /* caller-supplied buffer for info */
|
||||||
|
);
|
||||||
|
void (*enable_agp) (
|
||||||
|
uint32 *command /* max. mode to set */
|
||||||
|
);
|
||||||
|
//fixme: GART and APERTURE stuff is lacking for now, add here...
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define B_AGP_MODULE_NAME "bus_managers/agp/v0"
|
||||||
|
|
||||||
|
|
||||||
/* ---
|
/* ---
|
||||||
value for the AGP_id field in the agp_cap_id register
|
value for the AGP_id field in the agp_cap_id register
|
||||||
|
|||||||
Reference in New Issue
Block a user