device.hThe device.h interface provides a series of datastructures and helpers to manage VMM devices.
Functions:
Structs:
The interface device.h defines the following functions.
device_list_init(list)Initialise an empty device list
Parameters:
list {device_list_t *}: device list to initialiseReturns:
Back to interface description.
add_device(dev_list, d)Add a generic device to a given device list without performing any initialisation of the device
Parameters:
dev_list {device_list_t *}: A handle to the device list that the device should be installed intodevice {const struct device *}: A description of the deviceReturns:
Back to interface description.
find_device_by_pa(dev_list, addr)Find a device by a given addr within a device list
Parameters:
dev_list {device_list_t *}: Device list to search withinaddr {uintptr_t}: Add to search withReturns:
Back to interface description.
The interface device.h defines the following structs.
deviceDevice Management Object
Elements:
name {const char *}: A string representation of the device. Useful for debuggingpstart {seL4_Word}: The physical address of the devicesize {seL4_Word}: Device mapping sizehandle_device_fault {int *(vm_t, vm_vcpu_t, dev, addr, len)}: Fault handlerpriv {void *}: Device emulation private dataBack to interface description.
device_listManagement for a list of devices
Elements:
devices {struct device *}: List of registered devicesnum_devices {int}: Total number of registered devicesBack to interface description.
Back to top.