Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/next/external/cache/sources/linuxpg/pgdrv.h
Views: 3959
#ifndef _PG_DRV_H1#define _PG_DRV_H23#define BYTE __u84#define WORD __u165#define DWORD __u326#define DWORD64 __u647#define BOOLEAN int8typedef void * PVOID;9typedef BYTE * PBYTE;10typedef WORD * PWORD;11typedef DWORD * PDWORD;1213#ifndef TRUE14#define TRUE 115#define FALSE 016#endif1718#define PRINT_LEVEL KERN_NOTICE1920#ifdef DEBUG21#define DebugPrint(fmt,args...) printk(PRINT_LEVEL "[RTNICPG]" fmt "\n",## args)22#define DbgFunPrint(fmt,args...) printk(PRINT_LEVEL "[RTNICPG]" "%s %i: " fmt "\n",__FUNCTION__,__LINE__,## args)23#else24#define DebugPrint(fmt,args...) //printk(PRINT_LEVEL fmt "\n",## args)25#define DbgFunPrint(fmt,args...) //printk(PRINT_LEVEL "%s %i: " fmt "\n",__FUNCTION__,__LINE__,## args)26#endif2728/*******************************************************************************29*******************************************************************************/30#define Writel(Address,Data) writel(Data,(void *)(Address))31#define Readl(Address) readl((void *)(Address))32#define Writew(Address,Data) writew(Data,(void *)(Address))33#define Readw(Address) readw((void *)(Address))34#define Writeb(Address,Data) writeb(Data,(void *)(Address))35#define Readb(Address) readb((void *)(Address))3637#define MODULENAME "pgtool"38#define MAX_DEV_NUM 1039#define MAX_IO_SIZE 0x1004041typedef struct _DEV_INFO_42{43dev_t devno;44bool bUsed;45}DEV_INFO,*PDEV_INFO;4647typedef struct _PG_DEV_48{49struct cdev cdev;50struct pci_dev *pdev;51unsigned long base_phyaddr;52unsigned int offset;53unsigned int deviceID;54atomic_t count;55#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)56struct semaphore dev_sem;57#else58struct mutex dev_mutex;59#endif60unsigned int index;61}PGDEV,*PPGDEV;6263typedef struct _PCI_CONFIG_RW_64{65union66{67unsigned char byte;68unsigned short word;69unsigned int dword;70};71unsigned int bRead:1;72unsigned int size:7;73unsigned int addr:8;74unsigned int reserve:16;75}PCI_CONFIG_RW,*PPCI_CONFIG_RW;7677#define RTL_IOC_MAGIC 0x957879#define IOC_PCI_CONFIG _IOWR(RTL_IOC_MAGIC, 0, PCI_CONFIG_RW)80#define IOC_IOMEM_OFFSET _IOR(RTL_IOC_MAGIC, 1, unsigned int)81#define IOC_DEV_FUN _IOR(RTL_IOC_MAGIC, 2, unsigned int)8283#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)84#define __devinit85#define __devexit86#define __devexit_p(func) func87#endif8889#endif // end of #ifndef _PG_DRV_H909192