1 #ifndef _IPXE_BLOCKDEV_H 2 #define _IPXE_BLOCKDEV_H 30 #define block_read_TYPE( object_type ) \ 31 typeof ( int ( object_type, struct interface *data, \ 32 uint64_t lba, unsigned int count, \ 33 userptr_t buffer, size_t len ) ) 38 #define block_write_TYPE( object_type ) \ 39 typeof ( int ( object_type, struct interface *data, \ 40 uint64_t lba, unsigned int count, \ 41 userptr_t buffer, size_t len ) ) 45 #define block_read_capacity_TYPE( object_type ) \ 46 typeof ( int ( object_type, struct interface *data ) ) 50 #define block_capacity_TYPE( object_type ) \ 51 typeof ( void ( object_type, \ 52 struct block_device_capacity *capacity ) ) unsigned int max_count
Maximum number of blocks per single transfer.
void block_capacity(struct interface *intf, struct block_device_capacity *capacity)
Report block device capacity.
unsigned long long uint64_t
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
uint32_t buffer
Buffer index (or NETVSC_RNDIS_NO_BUFFER)
int block_write(struct interface *control, struct interface *data, uint64_t lba, unsigned int count, userptr_t buffer, size_t len)
Write to block device.
Access to external ("user") memory.
int block_read(struct interface *control, struct interface *data, uint64_t lba, unsigned int count, userptr_t buffer, size_t len)
Read from block device.
uint32_t userptr_t
A pointer to a user buffer.
uint16_t count
Number of entries.
uint64_t blocks
Total number of blocks.
uint64_t lba
Starting block number.
int block_read_capacity(struct interface *control, struct interface *data)
Read block device capacity.
uint8_t data[48]
Additional event data.
size_t blksize
Block size.