XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
audrv.h File Reference
#include <stdint.h>
#include <Fs\vfs.h>
Include dependency graph for audrv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _aurora_driver_
 
struct  _aurora_device_
 

Macros

#define DRIVER_CLASS_AUDIO   1
 
#define DRIVER_CLASS_VIDEO   2
 
#define DRIVER_CLASS_NETWORK   3
 
#define DRIVER_CLASS_CONNECTIVITY_BLUETOOTH   4
 
#define DRIVER_CLASS_CONNECTIVITY_WIFI   5
 
#define DRIVER_CLASS_STORAGE   6
 
#define DRIVER_CLASS_USB   7
 
#define DRIVER_CLASS_HID   8
 
#define DRIVER_CLASS_UNKNOWN   9
 
#define DEVICE_CLASS_ETHERNET   1
 
#define DEVICE_CLASS_HD_AUDIO   2
 
#define DEVICE_CLASS_USB3   3
 
#define AURORA_MAX_DRIVERS   256
 

Typedefs

typedef int(* au_drv_entry) ()
 
typedef int(* au_drv_unload) ()
 
typedef struct _aurora_driver_ AuDriver
 
typedef struct _aurora_device_ AuDevice
 

Functions

void AuDrvMngrInitialize (KERNEL_BOOT_INFO *info)
 AuDrvMngrInitialize – Initialize the driver manager.
 
AU_EXTERN AU_EXPORT void AuRegisterDevice (AuDevice *dev)
 AuRegisterDevice – register a new device to aurora system.
 
AU_EXTERN AU_EXPORT bool AuCheckDevice (uint16_t classC, uint16_t subclassC, uint8_t progIF)
 AuCheckDevice – checks an aurora device if it's already present.
 
AU_EXTERN AU_EXPORT void AuBootDriverInitialise (KERNEL_BOOT_INFO *info)
 AuBootDriverInitialise – Initialise and load all boot time drivers.
 
uint64_t AuDrvMgrGetBaseAddress ()
 AuDrvMgrGetBaseAddress – returns the current driver load base address.
 
void AuDrvMgrSetBaseAddress (uint64_t base_address)
 AuDrvMgrSetBaseAddress – sets a new base address for driver to load it's highly risky because, if we set it to kernel stack location, kernel will crash.
 
char * AuGetConfEntry (uint32_t vendor_id, uint32_t device_id, uint8_t *buffer, int entryoff)
 AuGetConfEntry – Get an entry offset in the file for required device.
 
void AuGetDriverName (uint32_t vendor_id, uint32_t device_id, uint8_t *buffer, int entryoff)
 AuGetDriverName – Extract the driver path from its entry offset.
 

Macro Definition Documentation

◆ AURORA_MAX_DRIVERS

#define AURORA_MAX_DRIVERS   256

◆ DEVICE_CLASS_ETHERNET

#define DEVICE_CLASS_ETHERNET   1

◆ DEVICE_CLASS_HD_AUDIO

#define DEVICE_CLASS_HD_AUDIO   2

◆ DEVICE_CLASS_USB3

#define DEVICE_CLASS_USB3   3

◆ DRIVER_CLASS_AUDIO

#define DRIVER_CLASS_AUDIO   1

BSD 2-Clause License

Copyright (c) 2022-2023, Manas Kamal Choudhury All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

◆ DRIVER_CLASS_CONNECTIVITY_BLUETOOTH

#define DRIVER_CLASS_CONNECTIVITY_BLUETOOTH   4

◆ DRIVER_CLASS_CONNECTIVITY_WIFI

#define DRIVER_CLASS_CONNECTIVITY_WIFI   5

◆ DRIVER_CLASS_HID

#define DRIVER_CLASS_HID   8

◆ DRIVER_CLASS_NETWORK

#define DRIVER_CLASS_NETWORK   3

◆ DRIVER_CLASS_STORAGE

#define DRIVER_CLASS_STORAGE   6

◆ DRIVER_CLASS_UNKNOWN

#define DRIVER_CLASS_UNKNOWN   9

◆ DRIVER_CLASS_USB

#define DRIVER_CLASS_USB   7

◆ DRIVER_CLASS_VIDEO

#define DRIVER_CLASS_VIDEO   2

Typedef Documentation

◆ au_drv_entry

typedef int(* au_drv_entry) ()

◆ au_drv_unload

typedef int(* au_drv_unload) ()

◆ AuDevice

typedef struct _aurora_device_ AuDevice

◆ AuDriver

typedef struct _aurora_driver_ AuDriver

Function Documentation

◆ AuBootDriverInitialise()

AU_EXTERN AU_EXPORT void AuBootDriverInitialise ( KERNEL_BOOT_INFO info)

AuBootDriverInitialise – Initialise and load all boot time drivers.

Parameters
info– Kernel boot information passed by XNLDR [TODO] : Everything is hard coded for now

◆ AuCheckDevice()

AU_EXTERN AU_EXPORT bool AuCheckDevice ( uint16_t  classC,
uint16_t  subclassC,
uint8_t  progIF 
)

AuCheckDevice – checks an aurora device if it's already present.

Parameters
classC– class code of the device to check
subclassC– sub class code of the device to check
progIF– programming interface of the device

◆ AuDrvMgrGetBaseAddress()

uint64_t AuDrvMgrGetBaseAddress ( )
extern

AuDrvMgrGetBaseAddress – returns the current driver load base address.

◆ AuDrvMgrSetBaseAddress()

void AuDrvMgrSetBaseAddress ( uint64_t  base_address)
extern

AuDrvMgrSetBaseAddress – sets a new base address for driver to load it's highly risky because, if we set it to kernel stack location, kernel will crash.

◆ AuDrvMngrInitialize()

void AuDrvMngrInitialize ( KERNEL_BOOT_INFO info)
extern

AuDrvMngrInitialize – Initialize the driver manager.

Parameters
info– kernel boot info

◆ AuGetConfEntry()

char * AuGetConfEntry ( uint32_t  vendor_id,
uint32_t  device_id,
uint8_t buffer,
int  entryoff 
)
extern

AuGetConfEntry – Get an entry offset in the file for required device.

Parameters
vendor_id– vendor id of the product
device_id– device id of the product
buffer– configuration file buffer
entryoff– entry offset from where search begins

◆ AuGetDriverName()

void AuGetDriverName ( uint32_t  vendor_id,
uint32_t  device_id,
uint8_t buffer,
int  entryoff 
)
extern

AuGetDriverName – Extract the driver path from its entry offset.

Parameters
vendor_id– vendor id of the product
device_id– device id of the product
buffer– configuration file buffer
entryoff– entry offset from where search begins

◆ AuRegisterDevice()

AU_EXTERN AU_EXPORT void AuRegisterDevice ( AuDevice dev)

AuRegisterDevice – register a new device to aurora system.

Parameters
dev– Pointer to device to add