2 * (c) 2008-2010 Adam Lackorzynski <adam@os.inf.tu-dresden.de>
3 * economic rights: Technische Universität Dresden (Germany)
4 * This file is part of TUD:OS and distributed under the terms of the
5 * GNU Lesser General Public License 2.1.
6 * Please see the COPYING-LGPL-2.1 file for details.
10 #include <l4/vbus/vbus_types.h>
13 * \brief Flags for IO memory.
16 enum l4io_iomem_flags_t
18 L4IO_MEM_NONCACHED = 0, /**< Non-cache memory */
19 L4IO_MEM_CACHED = 1, /**< Cache memory */
20 L4IO_MEM_USE_MTRR = 2, /**< Use MTRR */
21 L4IO_MEM_ATTR_MASK = 0xf,
23 /** Use reserved area for mapping I/O memory. Flag only valid
24 * for l4io_request_iomem_region() */
25 L4IO_MEM_USE_RESERVED_AREA = 0x10,
28 L4IO_MEM_WRITE_COMBINED = L4IO_MEM_USE_MTRR | L4IO_MEM_CACHED,
32 * \brief Device types.
35 enum l4io_device_types_t {
36 L4IO_DEVICE_INVALID = 0, /**< Invalid type */
37 L4IO_DEVICE_PCI, /**< PCI device */
38 L4IO_DEVICE_USB, /**< USB device */
39 L4IO_DEVICE_OTHER, /**< Any other device without unique IDs */
40 L4IO_DEVICE_ANY = ~0 /**< any type */
44 * \brief Resource types
47 enum l4io_resource_types_t {
48 L4IO_RESOURCE_INVALID = L4VBUS_RESOURCE_INVALID, /**< Invalid type */
49 L4IO_RESOURCE_IRQ = L4VBUS_RESOURCE_IRQ, /**< Interrupt resource */
50 L4IO_RESOURCE_MEM = L4VBUS_RESOURCE_MEM, /**< I/O memory resource */
51 L4IO_RESOURCE_PORT = L4VBUS_RESOURCE_PORT, /**< I/O port resource (x86 only) */
52 L4IO_RESOURCE_ANY = ~0 /**< any type */
56 typedef l4vbus_device_handle_t l4io_device_handle_t;
57 typedef int l4io_resource_handle_t;
60 * \brief Resource descriptor.
63 * For IRQ types, the end field is not used, i.e. only a single
64 * interrupt can be described with a l4io_resource_t
66 typedef l4vbus_resource_t l4io_resource_t;
68 /** Device descriptor.
71 typedef l4vbus_device_t l4io_device_t;