Go to the source code of this file.
|
static u32 | ReadVirtIODeviceRegister (ULONG_PTR ulRegister) |
|
static void | WriteVirtIODeviceRegister (ULONG_PTR ulRegister, u32 ulValue) |
|
static u8 | ReadVirtIODeviceByte (ULONG_PTR ulRegister) |
|
static void | WriteVirtIODeviceByte (ULONG_PTR ulRegister, u8 bValue) |
|
static u16 | ReadVirtIODeviceWord (ULONG_PTR ulRegister) |
|
static void | WriteVirtIODeviceWord (ULONG_PTR ulRegister, u16 wValue) |
|
static void * | mem_alloc_contiguous_pages (void *context, size_t size) |
|
static void | mem_free_contiguous_pages (void *context, void *virt) |
|
static ULONGLONG | mem_get_physical_address (void *context, void *virt) |
|
static void * | mem_alloc_nonpaged_block (void *context, size_t size) |
|
static void | mem_free_nonpaged_block (void *context, void *addr) |
|
static int | PCIReadConfig (PPARANDIS_ADAPTER pContext, int where, void *buffer, size_t length) |
|
static int | pci_read_config_byte (void *context, int where, u8 *bVal) |
|
static int | pci_read_config_word (void *context, int where, u16 *wVal) |
|
static int | pci_read_config_dword (void *context, int where, u32 *dwVal) |
|
static size_t | pci_get_resource_len (void *context, int bar) |
|
static void * | pci_map_address_range (void *context, int bar, size_t offset, size_t maxlen) |
|
static u16 | vdev_get_msix_vector (void *context, int queue) |
|
static void | vdev_sleep (void *context, unsigned int msecs) |
|
◆ PORT_MASK
◆ mem_alloc_contiguous_pages()
static void* mem_alloc_contiguous_pages |
( |
void * |
context, |
|
|
size_t |
size |
|
) |
| |
|
static |
Definition at line 135 of file ParaNdis-VirtIO.c.
VOID EXPORT NdisMAllocateSharedMemory(IN NDIS_HANDLE MiniportAdapterHandle, IN ULONG Length, IN BOOLEAN Cached, OUT PVOID *VirtualAddress, OUT PNDIS_PHYSICAL_ADDRESS PhysicalAddress)
tBusResource SharedMemoryRanges[MAX_NUM_OF_QUEUES]
NDIS_PHYSICAL_ADDRESS BasePA
#define DPrintf(Level, Fmt)
NDIS_HANDLE MiniportHandle
#define MAX_NUM_OF_QUEUES
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define NdisZeroMemory(Destination, Length)
◆ mem_alloc_nonpaged_block()
Definition at line 222 of file ParaNdis-VirtIO.c.
NDIS_STATUS EXPORT NdisAllocateMemoryWithTag(OUT PVOID *VirtualAddress, IN UINT Length, IN ULONG Tag)
#define DPrintf(Level, Fmt)
#define NDIS_STATUS_SUCCESS
#define NdisZeroMemory(Destination, Length)
#define PARANDIS_MEMORY_TAG
◆ mem_free_contiguous_pages()
static void mem_free_contiguous_pages |
( |
void * |
context, |
|
|
void * |
virt |
|
) |
| |
|
static |
Definition at line 183 of file ParaNdis-VirtIO.c.
tBusResource SharedMemoryRanges[MAX_NUM_OF_QUEUES]
#define DPrintf(Level, Fmt)
#define MAX_NUM_OF_QUEUES
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
◆ mem_free_nonpaged_block()
static void mem_free_nonpaged_block |
( |
void * |
context, |
|
|
void * |
addr |
|
) |
| |
|
static |
Definition at line 242 of file ParaNdis-VirtIO.c.
#define UNREFERENCED_PARAMETER(P)
#define DPrintf(Level, Fmt)
GLenum const GLvoid * addr
VOID EXPORT NdisFreeMemory(IN PVOID VirtualAddress, IN UINT Length, IN UINT MemoryFlags)
◆ mem_get_physical_address()
Definition at line 202 of file ParaNdis-VirtIO.c.
tBusResource SharedMemoryRanges[MAX_NUM_OF_QUEUES]
NDIS_PHYSICAL_ADDRESS BasePA
#define DPrintf(Level, Fmt)
#define MAX_NUM_OF_QUEUES
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
◆ pci_get_resource_len()
Definition at line 288 of file ParaNdis-VirtIO.c.
#define PCI_TYPE0_ADDRESSES
tAdapterResources AdapterResources
#define DPrintf(Level, Fmt)
tBusResource PciBars[PCI_TYPE0_ADDRESSES]
◆ pci_map_address_range()
Definition at line 300 of file ParaNdis-VirtIO.c.
#define PCI_TYPE0_ADDRESSES
tAdapterResources AdapterResources
NDIS_STATUS EXPORT NdisMRegisterIoPortRange(OUT PVOID *PortOffset, IN NDIS_HANDLE MiniportAdapterHandle, IN UINT InitialPort, IN UINT NumberOfPorts)
NDIS_PHYSICAL_ADDRESS BasePA
#define DPrintf(Level, Fmt)
NDIS_HANDLE MiniportHandle
#define NDIS_STATUS_SUCCESS
NDIS_STATUS EXPORT NdisMMapIoSpace(OUT PVOID *VirtualAddress, IN NDIS_HANDLE MiniportAdapterHandle, IN NDIS_PHYSICAL_ADDRESS PhysicalAddress, IN UINT Length)
tBusResource PciBars[PCI_TYPE0_ADDRESSES]
◆ pci_read_config_byte()
static int pci_read_config_byte |
( |
void * |
context, |
|
|
int |
where, |
|
|
u8 * |
bVal |
|
) |
| |
|
static |
Definition at line 273 of file ParaNdis-VirtIO.c.
static int PCIReadConfig(PPARANDIS_ADAPTER pContext, int where, void *buffer, size_t length)
◆ pci_read_config_dword()
static int pci_read_config_dword |
( |
void * |
context, |
|
|
int |
where, |
|
|
u32 * |
dwVal |
|
) |
| |
|
static |
Definition at line 283 of file ParaNdis-VirtIO.c.
static int PCIReadConfig(PPARANDIS_ADAPTER pContext, int where, void *buffer, size_t length)
◆ pci_read_config_word()
static int pci_read_config_word |
( |
void * |
context, |
|
|
int |
where, |
|
|
u16 * |
wVal |
|
) |
| |
|
static |
Definition at line 278 of file ParaNdis-VirtIO.c.
static int PCIReadConfig(PPARANDIS_ADAPTER pContext, int where, void *buffer, size_t length)
◆ PCIReadConfig()
Definition at line 250 of file ParaNdis-VirtIO.c.
GLenum GLuint GLenum GLsizei length
#define DPrintf(Level, Fmt)
NDIS_HANDLE MiniportHandle
ULONG EXPORT NdisReadPciSlotInformation(IN NDIS_HANDLE NdisAdapterHandle, IN ULONG SlotNumber, IN ULONG Offset, IN PVOID Buffer, IN ULONG Length)
_CRTIMP int __cdecl read(_In_ int _FileHandle, _Out_writes_bytes_(_MaxCharCount) void *_DstBuf, _In_ unsigned int _MaxCharCount)
Referenced by pci_read_config_byte(), pci_read_config_dword(), and pci_read_config_word().
◆ ReadVirtIODeviceByte()
Definition at line 68 of file ParaNdis-VirtIO.c.
#define NdisReadRegisterUchar(Register, Data)
#define DPrintf(Level, Fmt)
#define NdisRawReadPortUchar(Port, Data)
◆ ReadVirtIODeviceRegister()
Definition at line 43 of file ParaNdis-VirtIO.c.
#define DPrintf(Level, Fmt)
#define NdisRawReadPortUlong(Port, Data)
#define NdisReadRegisterUlong(Register, Data)
◆ ReadVirtIODeviceWord()
Definition at line 93 of file ParaNdis-VirtIO.c.
#define NdisRawReadPortUshort(Port, Data)
#define NdisReadRegisterUshort(Register, Data)
#define DPrintf(Level, Fmt)
◆ vdev_get_msix_vector()
static u16 vdev_get_msix_vector |
( |
void * |
context, |
|
|
int |
queue |
|
) |
| |
|
static |
Definition at line 350 of file ParaNdis-VirtIO.c.
tAdapterResources AdapterResources
#define VIRTIO_MSI_NO_VECTOR
◆ vdev_sleep()
Definition at line 363 of file ParaNdis-VirtIO.c.
#define UNREFERENCED_PARAMETER(P)
VOID EXPORT NdisMSleep(IN ULONG MicrosecondsToSleep)
◆ WriteVirtIODeviceByte()
◆ WriteVirtIODeviceRegister()
Definition at line 57 of file ParaNdis-VirtIO.c.
#define NdisWriteRegisterUlong(Register, Data)
#define DPrintf(Level, Fmt)
#define NdisRawWritePortUlong(Port, Data)
◆ WriteVirtIODeviceWord()
Definition at line 107 of file ParaNdis-VirtIO.c.
118 static int nCounterToFail = 0;
119 static const int StartFail = 200, StopFail = 600;
122 if ((ulRegister & 0x1F) == 0x10)
125 bFail = nCounterToFail >= StartFail && nCounterToFail < StopFail;
#define NdisWriteRegisterUshort(Register, Data)
#define NdisRawWritePortUshort(Port, Data)
#define DPrintf(Level, Fmt)
◆ ParaNdisSystemOps
Initial value:= {
}
static void WriteVirtIODeviceWord(ULONG_PTR ulRegister, u16 wValue)
static u16 ReadVirtIODeviceWord(ULONG_PTR ulRegister)
static int pci_read_config_dword(void *context, int where, u32 *dwVal)
static u32 ReadVirtIODeviceRegister(ULONG_PTR ulRegister)
static void vdev_sleep(void *context, unsigned int msecs)
static int pci_read_config_byte(void *context, int where, u8 *bVal)
static void * mem_alloc_nonpaged_block(void *context, size_t size)
static void * mem_alloc_contiguous_pages(void *context, size_t size)
static void mem_free_nonpaged_block(void *context, void *addr)
static ULONGLONG mem_get_physical_address(void *context, void *virt)
static size_t pci_get_resource_len(void *context, int bar)
static void mem_free_contiguous_pages(void *context, void *virt)
static void * pci_map_address_range(void *context, int bar, size_t offset, size_t maxlen)
static u16 vdev_get_msix_vector(void *context, int queue)
static void WriteVirtIODeviceByte(ULONG_PTR ulRegister, u8 bValue)
static u8 ReadVirtIODeviceByte(ULONG_PTR ulRegister)
static void WriteVirtIODeviceRegister(ULONG_PTR ulRegister, u32 ulValue)
static int pci_read_config_word(void *context, int where, u16 *wVal)
Definition at line 370 of file ParaNdis-VirtIO.c.
Referenced by ParaNdis_InitializeContext().