Documentation ¶
Overview ¶
Package gasket describes the userspace interface for Gasket devices.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GASKET_IOCTL_BASE = uint32(0xDC) GASKET_IOCTL_RESET = Ioctl(linux.IOW(GASKET_IOCTL_BASE, 0, SizeOfUnsignedLong)) GASKET_IOCTL_SET_EVENTFD = Ioctl(linux.IOW(GASKET_IOCTL_BASE, 1, SizeofGasketInterruptEventFd)) GASKET_IOCTL_CLEAR_EVENTFD = Ioctl(linux.IOW(GASKET_IOCTL_BASE, 2, SizeOfUnsignedLong)) GASKET_IOCTL_NUMBER_PAGE_TABLES = Ioctl(linux.IOR(GASKET_IOCTL_BASE, 4, SizeOfUnsignedLong)) GASKET_IOCTL_PAGE_TABLE_SIZE = Ioctl(linux.IOWR(GASKET_IOCTL_BASE, 5, SizeofGasketPageTableIoctl)) GASKET_IOCTL_SIMPLE_PAGE_TABLE_SIZE = Ioctl(linux.IOWR(GASKET_IOCTL_BASE, 6, SizeofGasketPageTableIoctl)) GASKET_IOCTL_PARTITION_PAGE_TABLE = Ioctl(linux.IOW(GASKET_IOCTL_BASE, 7, SizeofGasketPageTableIoctl)) GASKET_IOCTL_MAP_BUFFER = Ioctl(linux.IOW(GASKET_IOCTL_BASE, 8, SizeofGasketPageTableIoctl)) GASKET_IOCTL_UNMAP_BUFFER = Ioctl(linux.IOW(GASKET_IOCTL_BASE, 9, SizeofGasketPageTableIoctl)) GASKET_IOCTL_CLEAR_INTERRUPT_COUNTS = Ioctl(linux.IO(GASKET_IOCTL_BASE, 10)) GASKET_IOCTL_REGISTER_INTERRUPT = Ioctl(linux.IOW(GASKET_IOCTL_BASE, 11, SizeofGasketInterruptMapping)) GASKET_IOCTL_UNREGISTER_INTERRUPT = Ioctl(linux.IOW(GASKET_IOCTL_BASE, 12, SizeOfUnsignedLong)) GASKET_IOCTL_MAP_DMA_BUF = Ioctl(linux.IOW(GASKET_IOCTL_BASE, 13, SizeofGasketPageTableDmaBufIoctl)) )
From https://github.com/tensorflow/tpu/blob/master/tools/driver/include/linux/google/gasket.h
View Source
var ( SizeofGasketInterruptEventFd = uint32((*GasketInterruptEventFd)(nil).SizeBytes()) SizeofGasketPageTableIoctl = uint32((*GasketPageTableIoctl)(nil).SizeBytes()) SizeofGasketInterruptMapping = uint32((*GasketInterruptMapping)(nil).SizeBytes()) SizeofGasketPageTableDmaBufIoctl = uint32((*GasketPageTableDmaBufIoctl)(nil).SizeBytes()) SizeOfUnsignedLong = uint32(8) )
Ioctl parameter struct sizes.
Functions ¶
This section is empty.
Types ¶
type GasketInterruptEventFd ¶
GasketInterruptEventFd is the common structure for ioctls associating an eventfd with a device interrupt, when using the Gasket interrupt module.
+marshal
type GasketInterruptMapping ¶
type GasketInterruptMapping struct { Interrupt uint64 EventFD uint64 BarIndex uint64 RegOffset uint64 }
GasketInterruptMapping is a structure for ioctls associating an eventfd and interrupt controlling bar register with a device interrupt, when using the Gasket interrupt module.
+marshal
type GasketPageTableDmaBufIoctl ¶
type GasketPageTableDmaBufIoctl struct { PageTableIndex uint64 DeviceAddress uint64 DMABufID int32 `marshal:"unaligned"` // Struct ends mid 64bit word. }
GasketPageTableDmaBufIoctl is a structure for dma_buf mapping ioctl parameters.
+marshal
Click to show internal directories.
Click to hide internal directories.