XenevaOS
Loading...
Searching...
No Matches
devhw.h
Go to the documentation of this file.
1#ifndef __DEVHW_H__
2#define __DEVHW_H__
3
4#include <aurora.h>
5#include <process.h>
6
11extern void AuHwdevInitialize(void);
12
14extern void AuInputSrvInitialize(void);
15
21extern bool AuHwdevCallerAllowed(AuProcess* proc);
22
24extern bool AuHwdevClaimsPci(int bus, int dev, int func);
25
32
34extern bool AuHwdevHandleIsDevice(AuProcess* proc, int fd, uint16_t vendor,
36
38extern void* AuHwdevHandleObject(AuProcess* proc, int fd);
39
41extern bool AuHwdevHandleOwnsDma(AuProcess* proc, int fd, uint64_t phys,
43
46
47#endif
COMPILER_DEPENDENT_UINT64 uint64_t
Definition acefiex.h:165
unsigned short int uint16_t
Definition acefiex.h:162
uint16_t vendor
Definition devhw.c:88
void AuInputSrvInitialize(void)
AuInputSrvInitialize – register /dev/inputsrv (see BaseHdr/inputsrv.h)
Definition devinputsrv.c:89
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.
Definition devhw.c:253
void AuHwdevInitialize(void)
AuHwdevInitialize – register /dev/hwdev (hardware access for user-space drivers, see BaseHdr/hwdev....
Definition devhw.c:657
bool AuHwdevCallerAllowed(AuProcess *proc)
AuHwdevCallerAllowed – true when proc is in the MISC_DAEMONS group. Checked on every privileged opera...
Definition devhw.c:121
bool AuHwdevClaimsPci(int bus, int dev, int func)
True when a live user-space hwdev capability owns this PCI function.
Definition devhw.c:102
void * AuHwdevHandleObject(AuProcess *proc, int fd)
Return the opaque kernel object for one exact caller handle.
Definition devhw.c:259
bool AuHwdevHandleOwnsDma(AuProcess *proc, int fd, uint64_t phys, uint64_t len)
Validate a DMA range against one exact hwdev capability.
Definition devhw.c:263
AuProcess * AuHwdevCurrentProcess(void)
AuHwdevCurrentProcess – the process running the current thread.
Definition devhw.c:111
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 ...
Definition devhw.c:219
const struct device * dev
Definition drm_print.h:519
size_t len
Definition initial.c:23
char phys[]
Definition process.h:126
Definition fs.h:255
Definition file.h:140