XenevaOS
Loading...
Searching...
No Matches
Functions
devhw.h File Reference
#include <aurora.h>
#include <process.h>
Include dependency graph for devhw.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void AuHwdevInitialize (void)
 AuHwdevInitialize – register /dev/hwdev (hardware access for user-space drivers, see BaseHdr/hwdev.h)
 
void AuInputSrvInitialize (void)
 AuInputSrvInitialize – register /dev/inputsrv (see BaseHdr/inputsrv.h)
 
bool AuHwdevCallerAllowed (AuProcess *proc)
 AuHwdevCallerAllowed – true when proc is in the MISC_DAEMONS group. Checked on every privileged operation: a write-mode open skips the VFS permission check, so node permissions alone are not enough.
 
bool AuHwdevClaimsPci (int bus, int dev, int func)
 True when a live user-space hwdev capability owns this PCI function.
 
bool AuHwdevOwnsDma (AuProcess *proc, uint64_t phys, uint64_t len)
 AuHwdevOwnsDma – true when [phys, phys+len) lies inside a DMA buffer that proc allocated through one of its own hw handles. Lets other kernel code accept a user-supplied physical address without trusting it.
 
bool AuHwdevHandleIsDevice (AuProcess *proc, int fd, uint16_t vendor, uint16_t device)
 Validate that fd is the caller's PCI function with the requested ID.
 
void * AuHwdevHandleObject (AuProcess *proc, int fd)
 Return the opaque kernel object for one exact caller handle.
 
bool AuHwdevHandleOwnsDma (AuProcess *proc, int fd, uint64_t phys, uint64_t len)
 Validate a DMA range against one exact hwdev capability.
 
AuProcess * AuHwdevCurrentProcess (void)
 AuHwdevCurrentProcess – the process running the current thread.
 

Function Documentation

◆ AuHwdevCallerAllowed()

bool AuHwdevCallerAllowed ( AuProcess *  proc)
extern

AuHwdevCallerAllowed – true when proc is in the MISC_DAEMONS group. Checked on every privileged operation: a write-mode open skips the VFS permission check, so node permissions alone are not enough.

◆ AuHwdevClaimsPci()

bool AuHwdevClaimsPci ( int  bus,
int  dev,
int  func 
)
extern

True when a live user-space hwdev capability owns this PCI function.

◆ AuHwdevCurrentProcess()

AuProcess * AuHwdevCurrentProcess ( void  )
extern

AuHwdevCurrentProcess – the process running the current thread.

◆ AuHwdevHandleIsDevice()

bool AuHwdevHandleIsDevice ( AuProcess *  proc,
int  fd,
uint16_t  vendor,
uint16_t  device 
)
extern

Validate that fd is the caller's PCI function with the requested ID.

◆ AuHwdevHandleObject()

void * AuHwdevHandleObject ( AuProcess *  proc,
int  fd 
)
extern

Return the opaque kernel object for one exact caller handle.

◆ AuHwdevHandleOwnsDma()

bool AuHwdevHandleOwnsDma ( AuProcess *  proc,
int  fd,
uint64_t  phys,
uint64_t  len 
)
extern

Validate a DMA range against one exact hwdev capability.

◆ AuHwdevInitialize()

void AuHwdevInitialize ( void  )
extern

AuHwdevInitialize – register /dev/hwdev (hardware access for user-space drivers, see BaseHdr/hwdev.h)

◆ AuHwdevOwnsDma()

bool AuHwdevOwnsDma ( AuProcess *  proc,
uint64_t  phys,
uint64_t  len 
)
extern

AuHwdevOwnsDma – true when [phys, phys+len) lies inside a DMA buffer that proc allocated through one of its own hw handles. Lets other kernel code accept a user-supplied physical address without trusting it.

◆ AuInputSrvInitialize()

void AuInputSrvInitialize ( void  )
extern

AuInputSrvInitialize – register /dev/inputsrv (see BaseHdr/inputsrv.h)