Loading...
Searching...
No Matches
vbus_types.h
Go to the documentation of this file.
/*
* (c) 2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
* Alexander Warg <warg@os.inf.tu-dresden.de>
* economic rights: Technische Universität Dresden (Germany)
*
* License: see LICENSE.spdx (in this directory or the directories above)
*/
#pragma once
#include <l4/sys/types.h>
typedef l4_mword_t l4vbus_device_handle_t;
typedef l4_addr_t l4vbus_paddr_t;
typedef struct {
l4_uint16_t type;
l4_uint16_t flags;
l4vbus_paddr_t start;
l4vbus_paddr_t end;
l4vbus_device_handle_t provider;
l4_uint32_t id;
} l4vbus_resource_t;
enum l4vbus_resource_type_t {
L4VBUS_RESOURCE_INVALID = 0,
L4VBUS_RESOURCE_IRQ,
L4VBUS_RESOURCE_MEM,
L4VBUS_RESOURCE_PORT,
L4VBUS_RESOURCE_BUS,
L4VBUS_RESOURCE_GPIO,
L4VBUS_RESOURCE_DMA_DOMAIN,
L4VBUS_RESOURCE_MAX,
};
enum l4vbus_resource_flags_t {
L4VBUS_RESOURCE_F_MEM_R = 0x1,
L4VBUS_RESOURCE_F_MEM_W = 0x2,
L4VBUS_RESOURCE_F_MEM_PREFETCHABLE = 0x10,
L4VBUS_RESOURCE_F_MEM_CACHEABLE = 0x20,
L4VBUS_RESOURCE_F_MEM_MMIO_READ = 0x2000,
L4VBUS_RESOURCE_F_MEM_MMIO_WRITE = 0x4000,
};
enum l4vbus_consts_t {
L4VBUS_DEV_NAME_LEN = 64,
L4VBUS_MAX_DEPTH = 100,
};
typedef struct {
l4_uint32_t type;
char name[L4VBUS_DEV_NAME_LEN];
unsigned num_resources;
unsigned flags;
} l4vbus_device_t;
enum l4vbus_device_flags_t {
L4VBUS_DEVICE_F_CHILDREN = 0x10,
};
l4_addr_t
unsigned long l4_addr_t
Address type.
Definition l4int.h:34
l4_mword_t
signed long l4_mword_t
Signed machine word.
Definition l4int.h:37
l4_uint32_t
unsigned int l4_uint32_t
Unsigned 32bit value.
Definition l4int.h:29
l4_uint16_t
unsigned short int l4_uint16_t
Unsigned 16bit value.
Definition l4int.h:27
types.h
Common L4 ABI Data Types.
l4vbus_device_t
Detailed information about a vbus device.
Definition vbus_types.h:80
l4vbus_device_t::flags
unsigned flags
Flags, see l4vbus_device_flags_t.
Definition vbus_types.h:88
l4vbus_device_t::type
l4_uint32_t type
Bitfield of supported sub-interfaces, see l4vbus_iface_type_t.
Definition vbus_types.h:82
l4vbus_device_t::num_resources
unsigned num_resources
Number of resources for this device.
Definition vbus_types.h:86
l4vbus_device_t::name
char name[L4VBUS_DEV_NAME_LEN]
Name.
Definition vbus_types.h:84
l4vbus_resource_t
Description of a single vbus resource.
Definition vbus_types.h:23
l4vbus_resource_t::flags
l4_uint16_t flags
Flags.
Definition vbus_types.h:27
l4vbus_resource_t::provider
l4vbus_device_handle_t provider
Device handle of the provider of the resource.
Definition vbus_types.h:33
l4vbus_resource_t::type
l4_uint16_t type
Resource type, see l4vbus_resource_type_t.
Definition vbus_types.h:25
l4vbus_resource_t::start
l4vbus_paddr_t start
Start of resource range.
Definition vbus_types.h:29
l4vbus_resource_t::end
l4vbus_paddr_t end
End of resource range (inclusive).
Definition vbus_types.h:31
l4vbus_resource_t::id
l4_uint32_t id
Resource ID (4 bytes), usually a 4 letter ASCII name is used.
Definition vbus_types.h:35
l4vbus_resource_flags_t
l4vbus_resource_flags_t
Description of vbus resource flags.
Definition vbus_types.h:51
L4VBUS_RESOURCE_F_MEM_R
@ L4VBUS_RESOURCE_F_MEM_R
Memory resource is readable.
Definition vbus_types.h:53
L4VBUS_RESOURCE_F_MEM_W
@ L4VBUS_RESOURCE_F_MEM_W
Memory resource is writeable.
Definition vbus_types.h:55
L4VBUS_RESOURCE_F_MEM_CACHEABLE
@ L4VBUS_RESOURCE_F_MEM_CACHEABLE
Memory resource is cacheable.
Definition vbus_types.h:67
L4VBUS_RESOURCE_F_MEM_PREFETCHABLE
@ L4VBUS_RESOURCE_F_MEM_PREFETCHABLE
Memory resource is prefetchable.
Definition vbus_types.h:60
L4VBUS_RESOURCE_F_MEM_MMIO_WRITE
@ L4VBUS_RESOURCE_F_MEM_MMIO_WRITE
Writing needs to be performed using the MMIO space protocol.
Definition vbus_types.h:71
L4VBUS_RESOURCE_F_MEM_MMIO_READ
@ L4VBUS_RESOURCE_F_MEM_MMIO_READ
Reading needs to be performed using the MMIO space protocol.
Definition vbus_types.h:69
l4vbus_device_handle_t
l4_mword_t l4vbus_device_handle_t
Device handle for a device on the vbus.
Definition vbus_types.h:18
l4vbus_device_flags_t
l4vbus_device_flags_t
Flags describing device properties, see l4vbus_device_t.
Definition vbus_types.h:92
L4VBUS_DEVICE_F_CHILDREN
@ L4VBUS_DEVICE_F_CHILDREN
Device has child devices.
Definition vbus_types.h:93
l4vbus_paddr_t
l4_addr_t l4vbus_paddr_t
Address of resources on the vbus.
Definition vbus_types.h:20
l4vbus_resource_type_t
l4vbus_resource_type_t
Description of vbus resource types.
Definition vbus_types.h:39
L4VBUS_RESOURCE_IRQ
@ L4VBUS_RESOURCE_IRQ
Interrupt resource.
Definition vbus_types.h:41
L4VBUS_RESOURCE_MAX
@ L4VBUS_RESOURCE_MAX
Maximum resource id.
Definition vbus_types.h:47
L4VBUS_RESOURCE_PORT
@ L4VBUS_RESOURCE_PORT
I/O port resource (x86 only).
Definition vbus_types.h:43
L4VBUS_RESOURCE_DMA_DOMAIN
@ L4VBUS_RESOURCE_DMA_DOMAIN
DMA domain.
Definition vbus_types.h:46
L4VBUS_RESOURCE_BUS
@ L4VBUS_RESOURCE_BUS
Bus resource.
Definition vbus_types.h:44
L4VBUS_RESOURCE_MEM
@ L4VBUS_RESOURCE_MEM
I/O memory resource.
Definition vbus_types.h:42
L4VBUS_RESOURCE_GPIO
@ L4VBUS_RESOURCE_GPIO
Gpio resource.
Definition vbus_types.h:45
L4VBUS_RESOURCE_INVALID
@ L4VBUS_RESOURCE_INVALID
Invalid type.
Definition vbus_types.h:40