summaryrefslogtreecommitdiffstats
path: root/rtemsbsd/include/rtems/bsd/local
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-10-07 15:10:20 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-01-10 09:53:31 +0100
commitc40e45b75eb76d79a05c7fa85c1fa9b5c728a12f (patch)
treead4f2519067709f00ab98b3c591186c26dc3a21f /rtemsbsd/include/rtems/bsd/local
parentuserspace-header-gen.py: Simplify program ports (diff)
downloadrtems-libbsd-c40e45b75eb76d79a05c7fa85c1fa9b5c728a12f.tar.bz2
Update to FreeBSD head 2016-08-23
Git mirror commit 9fe7c416e6abb28b1398fd3e5687099846800cfd.
Diffstat (limited to 'rtemsbsd/include/rtems/bsd/local')
-rw-r--r--rtemsbsd/include/rtems/bsd/local/bus_if.h256
-rw-r--r--rtemsbsd/include/rtems/bsd/local/device_if.h49
-rw-r--r--rtemsbsd/include/rtems/bsd/local/gpio_if.h151
-rw-r--r--rtemsbsd/include/rtems/bsd/local/if_dwc_if.h55
-rw-r--r--rtemsbsd/include/rtems/bsd/local/miidevs.h18
-rw-r--r--rtemsbsd/include/rtems/bsd/local/opt_callout_profiling.h0
-rw-r--r--rtemsbsd/include/rtems/bsd/local/opt_em.h0
-rw-r--r--rtemsbsd/include/rtems/bsd/local/opt_ifmedia.h0
-rw-r--r--rtemsbsd/include/rtems/bsd/local/opt_kld.h0
-rw-r--r--rtemsbsd/include/rtems/bsd/local/opt_kqueue.h0
-rw-r--r--rtemsbsd/include/rtems/bsd/local/opt_kstack_usage_prof.h0
-rw-r--r--rtemsbsd/include/rtems/bsd/local/opt_pci.h0
-rw-r--r--rtemsbsd/include/rtems/bsd/local/opt_rss.h0
-rw-r--r--rtemsbsd/include/rtems/bsd/local/opt_stack.h0
-rw-r--r--rtemsbsd/include/rtems/bsd/local/opt_timer.h1
-rw-r--r--rtemsbsd/include/rtems/bsd/local/opt_verbose_sysinit.h0
-rw-r--r--rtemsbsd/include/rtems/bsd/local/opt_vm.h0
-rw-r--r--rtemsbsd/include/rtems/bsd/local/pci_if.h181
-rw-r--r--rtemsbsd/include/rtems/bsd/local/pcib_if.h67
19 files changed, 741 insertions, 37 deletions
diff --git a/rtemsbsd/include/rtems/bsd/local/bus_if.h b/rtemsbsd/include/rtems/bsd/local/bus_if.h
index c95c7015..2376b896 100644
--- a/rtemsbsd/include/rtems/bsd/local/bus_if.h
+++ b/rtemsbsd/include/rtems/bsd/local/bus_if.h
@@ -92,7 +92,7 @@ typedef int bus_read_ivar_t(device_t _dev, device_t _child, int _index,
* @param _child the child device whose instance variable is
* being read
* @param _index the instance variable to read
- * @param _result a loction to recieve the instance variable
+ * @param _result a location to receive the instance variable
* value
*
* @retval 0 success
@@ -215,7 +215,9 @@ typedef device_t bus_add_child_t(device_t _dev, u_int _order, const char *_name,
* For busses which use use drivers supporting DEVICE_IDENTIFY() to
* enumerate their devices, this method is used to create new
* device instances. The new device will be added after the last
- * existing child with the same order.
+ * existing child with the same order. Implementations of bus_add_child
+ * call device_add_child_ordered to add the child and often add
+ * a suitable ivar to the device specific to that bus.
*
* @param _dev the bus device which will be the parent of the
* new child device
@@ -237,13 +239,35 @@ static __inline device_t BUS_ADD_CHILD(device_t _dev, u_int _order,
return ((bus_add_child_t *) _m)(_dev, _order, _name, _unit);
}
+/** @brief Unique descriptor for the BUS_RESCAN() method */
+extern struct kobjop_desc bus_rescan_desc;
+/** @brief A function implementing the BUS_RESCAN() method */
+typedef int bus_rescan_t(device_t _dev);
+/**
+ * @brief Rescan the bus
+ *
+ * This method is called by a parent bridge or devctl to trigger a bus
+ * rescan. The rescan should delete devices no longer present and
+ * enumerate devices that have newly arrived.
+ *
+ * @param _dev the bus device
+ */
+
+static __inline int BUS_RESCAN(device_t _dev)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)_dev)->ops,bus_rescan);
+ return ((bus_rescan_t *) _m)(_dev);
+}
+
/** @brief Unique descriptor for the BUS_ALLOC_RESOURCE() method */
extern struct kobjop_desc bus_alloc_resource_desc;
/** @brief A function implementing the BUS_ALLOC_RESOURCE() method */
typedef struct resource * bus_alloc_resource_t(device_t _dev, device_t _child,
int _type, int *_rid,
- u_long _start, u_long _end,
- u_long _count, u_int _flags);
+ rman_res_t _start,
+ rman_res_t _end,
+ rman_res_t _count, u_int _flags);
/**
* @brief Allocate a system resource
*
@@ -260,9 +284,9 @@ typedef struct resource * bus_alloc_resource_t(device_t _dev, device_t _child,
* @param _type the type of resource to allocate
* @param _rid a pointer to the resource identifier
* @param _start hint at the start of the resource range - pass
- * @c 0UL for any start address
+ * @c 0 for any start address
* @param _end hint at the end of the resource range - pass
- * @c ~0UL for any end address
+ * @c ~0 for any end address
* @param _count hint at the size of range required - pass @c 1
* for any size
* @param _flags any extra flags to control the resource
@@ -275,8 +299,10 @@ typedef struct resource * bus_alloc_resource_t(device_t _dev, device_t _child,
static __inline struct resource * BUS_ALLOC_RESOURCE(device_t _dev,
device_t _child, int _type,
- int *_rid, u_long _start,
- u_long _end, u_long _count,
+ int *_rid,
+ rman_res_t _start,
+ rman_res_t _end,
+ rman_res_t _count,
u_int _flags)
{
kobjop_t _m;
@@ -293,8 +319,9 @@ typedef int bus_activate_resource_t(device_t _dev, device_t _child, int _type,
* @brief Activate a resource
*
* Activate a resource previously allocated with
- * BUS_ALLOC_RESOURCE(). This may for instance map a memory region
- * into the kernel's virtual address space.
+ * BUS_ALLOC_RESOURCE(). This may enable decoding of this resource in a
+ * device for instance. It will also establish a mapping for the resource
+ * unless RF_UNMAPPED was set when allocating the resource.
*
* @param _dev the parent device of @p _child
* @param _child the device which allocated the resource
@@ -312,6 +339,67 @@ static __inline int BUS_ACTIVATE_RESOURCE(device_t _dev, device_t _child,
return ((bus_activate_resource_t *) _m)(_dev, _child, _type, _rid, _r);
}
+/** @brief Unique descriptor for the BUS_MAP_RESOURCE() method */
+extern struct kobjop_desc bus_map_resource_desc;
+/** @brief A function implementing the BUS_MAP_RESOURCE() method */
+typedef int bus_map_resource_t(device_t _dev, device_t _child, int _type,
+ struct resource *_r,
+ struct resource_map_request *_args,
+ struct resource_map *_map);
+/**
+ * @brief Map a resource
+ *
+ * Allocate a mapping for a range of an active resource. The mapping
+ * is described by a struct resource_map object. This may for instance
+ * map a memory region into the kernel's virtual address space.
+ *
+ * @param _dev the parent device of @p _child
+ * @param _child the device which allocated the resource
+ * @param _type the type of resource
+ * @param _r the resource to map
+ * @param _args optional attributes of the mapping
+ * @param _map the mapping
+ */
+
+static __inline int BUS_MAP_RESOURCE(device_t _dev, device_t _child, int _type,
+ struct resource *_r,
+ struct resource_map_request *_args,
+ struct resource_map *_map)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)_dev)->ops,bus_map_resource);
+ return ((bus_map_resource_t *) _m)(_dev, _child, _type, _r, _args, _map);
+}
+
+/** @brief Unique descriptor for the BUS_UNMAP_RESOURCE() method */
+extern struct kobjop_desc bus_unmap_resource_desc;
+/** @brief A function implementing the BUS_UNMAP_RESOURCE() method */
+typedef int bus_unmap_resource_t(device_t _dev, device_t _child, int _type,
+ struct resource *_r,
+ struct resource_map *_map);
+/**
+ * @brief Unmap a resource
+ *
+ * Release a mapping previously allocated with
+ * BUS_MAP_RESOURCE(). This may for instance unmap a memory region
+ * from the kernel's virtual address space.
+ *
+ * @param _dev the parent device of @p _child
+ * @param _child the device which allocated the resource
+ * @param _type the type of resource
+ * @param _r the resource
+ * @param _map the mapping to release
+ */
+
+static __inline int BUS_UNMAP_RESOURCE(device_t _dev, device_t _child,
+ int _type, struct resource *_r,
+ struct resource_map *_map)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)_dev)->ops,bus_unmap_resource);
+ return ((bus_unmap_resource_t *) _m)(_dev, _child, _type, _r, _map);
+}
+
/** @brief Unique descriptor for the BUS_DEACTIVATE_RESOURCE() method */
extern struct kobjop_desc bus_deactivate_resource_desc;
/** @brief A function implementing the BUS_DEACTIVATE_RESOURCE() method */
@@ -321,8 +409,7 @@ typedef int bus_deactivate_resource_t(device_t _dev, device_t _child, int _type,
* @brief Deactivate a resource
*
* Deactivate a resource previously allocated with
- * BUS_ALLOC_RESOURCE(). This may for instance unmap a memory region
- * from the kernel's virtual address space.
+ * BUS_ALLOC_RESOURCE().
*
* @param _dev the parent device of @p _child
* @param _child the device which allocated the resource
@@ -344,8 +431,8 @@ static __inline int BUS_DEACTIVATE_RESOURCE(device_t _dev, device_t _child,
extern struct kobjop_desc bus_adjust_resource_desc;
/** @brief A function implementing the BUS_ADJUST_RESOURCE() method */
typedef int bus_adjust_resource_t(device_t _dev, device_t _child, int _type,
- struct resource *_res, u_long _start,
- u_long _end);
+ struct resource *_res, rman_res_t _start,
+ rman_res_t _end);
/**
* @brief Adjust a resource
*
@@ -364,7 +451,7 @@ typedef int bus_adjust_resource_t(device_t _dev, device_t _child, int _type,
static __inline int BUS_ADJUST_RESOURCE(device_t _dev, device_t _child,
int _type, struct resource *_res,
- u_long _start, u_long _end)
+ rman_res_t _start, rman_res_t _end)
{
kobjop_t _m;
KOBJOPLOOKUP(((kobj_t)_dev)->ops,bus_adjust_resource);
@@ -425,7 +512,7 @@ typedef int bus_setup_intr_t(device_t _dev, device_t _child,
* triggers
* @param _arg a value to use as the single argument in calls
* to @p _intr
- * @param _cookiep a pointer to a location to recieve a cookie
+ * @param _cookiep a pointer to a location to receive a cookie
* value that may be used to remove the interrupt
* handler
*/
@@ -472,7 +559,7 @@ static __inline int BUS_TEARDOWN_INTR(device_t _dev, device_t _child,
extern struct kobjop_desc bus_set_resource_desc;
/** @brief A function implementing the BUS_SET_RESOURCE() method */
typedef int bus_set_resource_t(device_t _dev, device_t _child, int _type,
- int _rid, u_long _start, u_long _count);
+ int _rid, rman_res_t _start, rman_res_t _count);
/**
* @brief Define a resource which can be allocated with
* BUS_ALLOC_RESOURCE().
@@ -492,7 +579,8 @@ typedef int bus_set_resource_t(device_t _dev, device_t _child, int _type,
*/
static __inline int BUS_SET_RESOURCE(device_t _dev, device_t _child, int _type,
- int _rid, u_long _start, u_long _count)
+ int _rid, rman_res_t _start,
+ rman_res_t _count)
{
kobjop_t _m;
KOBJOPLOOKUP(((kobj_t)_dev)->ops,bus_set_resource);
@@ -503,7 +591,8 @@ static __inline int BUS_SET_RESOURCE(device_t _dev, device_t _child, int _type,
extern struct kobjop_desc bus_get_resource_desc;
/** @brief A function implementing the BUS_GET_RESOURCE() method */
typedef int bus_get_resource_t(device_t _dev, device_t _child, int _type,
- int _rid, u_long *_startp, u_long *_countp);
+ int _rid, rman_res_t *_startp,
+ rman_res_t *_countp);
/**
* @brief Describe a resource
*
@@ -514,14 +603,15 @@ typedef int bus_get_resource_t(device_t _dev, device_t _child, int _type,
* @param _child the device which owns the resource
* @param _type the type of resource
* @param _rid the resource identifier
- * @param _start the address of a location to recieve the start
+ * @param _start the address of a location to receive the start
* index of the resource range
- * @param _count the address of a location to recieve the size
+ * @param _count the address of a location to receive the size
* of the resource range
*/
static __inline int BUS_GET_RESOURCE(device_t _dev, device_t _child, int _type,
- int _rid, u_long *_startp, u_long *_countp)
+ int _rid, rman_res_t *_startp,
+ rman_res_t *_countp)
{
kobjop_t _m;
KOBJOPLOOKUP(((kobj_t)_dev)->ops,bus_get_resource);
@@ -612,8 +702,15 @@ typedef int bus_child_pnpinfo_str_t(device_t _dev, device_t _child, char *_buf,
/**
* @brief Returns the pnp info for this device.
*
- * Return it as a string. If the string is insufficient for the
- * storage, then return EOVERFLOW.
+ * Return it as a string. If the storage is insufficient for the
+ * string, then return EOVERFLOW.
+ *
+ * The string must be formatted as a space-separated list of
+ * name=value pairs. Names may only contain alphanumeric characters,
+ * underscores ('_') and hyphens ('-'). Values can contain any
+ * non-whitespace characters. Values containing whitespace can be
+ * quoted with double quotes ('"'). Double quotes and backslashes in
+ * quoted values can be escaped with backslashes ('\').
*
* @param _dev the parent device of @p _child
* @param _child the device which is being examined
@@ -638,9 +735,16 @@ typedef int bus_child_location_str_t(device_t _dev, device_t _child, char *_buf,
/**
* @brief Returns the location for this device.
*
- * Return it as a string. If the string is insufficient for the
- * storage, then return EOVERFLOW.
- *
+ * Return it as a string. If the storage is insufficient for the
+ * string, then return EOVERFLOW.
+ *
+ * The string must be formatted as a space-separated list of
+ * name=value pairs. Names may only contain alphanumeric characters,
+ * underscores ('_') and hyphens ('-'). Values can contain any
+ * non-whitespace characters. Values containing whitespace can be
+ * quoted with double quotes ('"'). Double quotes and backslashes in
+ * quoted values can be escaped with backslashes ('\').
+ *
* @param _dev the parent device of @p _child
* @param _child the device which is being examined
* @param _buf the address of a buffer to receive the location
@@ -777,6 +881,24 @@ static __inline bus_dma_tag_t BUS_GET_DMA_TAG(device_t _dev, device_t _child)
return ((bus_get_dma_tag_t *) _m)(_dev, _child);
}
+/** @brief Unique descriptor for the BUS_GET_BUS_TAG() method */
+extern struct kobjop_desc bus_get_bus_tag_desc;
+/** @brief A function implementing the BUS_GET_BUS_TAG() method */
+typedef bus_space_tag_t bus_get_bus_tag_t(device_t _dev, device_t _child);
+/**
+ * @brief Returns bus_space_tag_t for use w/ devices on the bus.
+ *
+ * @param _dev the parent device of @p _child
+ * @param _child the device to which the tag will belong
+ */
+
+static __inline bus_space_tag_t BUS_GET_BUS_TAG(device_t _dev, device_t _child)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)_dev)->ops,bus_get_bus_tag);
+ return ((bus_get_bus_tag_t *) _m)(_dev, _child);
+}
+
/** @brief Unique descriptor for the BUS_HINT_DEVICE_UNIT() method */
extern struct kobjop_desc bus_hint_device_unit_desc;
/** @brief A function implementing the BUS_HINT_DEVICE_UNIT() method */
@@ -835,4 +957,84 @@ static __inline int BUS_REMAP_INTR(device_t _dev, device_t _child, u_int _irq)
return ((bus_remap_intr_t *) _m)(_dev, _child, _irq);
}
+/** @brief Unique descriptor for the BUS_SUSPEND_CHILD() method */
+extern struct kobjop_desc bus_suspend_child_desc;
+/** @brief A function implementing the BUS_SUSPEND_CHILD() method */
+typedef int bus_suspend_child_t(device_t _dev, device_t _child);
+/**
+ * @brief Suspend a given child
+ *
+ * @param _dev the parent device of @p _child
+ * @param _child the device to suspend
+ */
+
+static __inline int BUS_SUSPEND_CHILD(device_t _dev, device_t _child)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)_dev)->ops,bus_suspend_child);
+ return ((bus_suspend_child_t *) _m)(_dev, _child);
+}
+
+/** @brief Unique descriptor for the BUS_RESUME_CHILD() method */
+extern struct kobjop_desc bus_resume_child_desc;
+/** @brief A function implementing the BUS_RESUME_CHILD() method */
+typedef int bus_resume_child_t(device_t _dev, device_t _child);
+/**
+ * @brief Resume a given child
+ *
+ * @param _dev the parent device of @p _child
+ * @param _child the device to resume
+ */
+
+static __inline int BUS_RESUME_CHILD(device_t _dev, device_t _child)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)_dev)->ops,bus_resume_child);
+ return ((bus_resume_child_t *) _m)(_dev, _child);
+}
+
+/** @brief Unique descriptor for the BUS_GET_DOMAIN() method */
+extern struct kobjop_desc bus_get_domain_desc;
+/** @brief A function implementing the BUS_GET_DOMAIN() method */
+typedef int bus_get_domain_t(device_t _dev, device_t _child, int *_domain);
+/**
+ * @brief Get the VM domain handle for the given bus and child.
+ *
+ * @param _dev the bus device
+ * @param _child the child device
+ * @param _domain a pointer to the bus's domain handle identifier
+ */
+
+static __inline int BUS_GET_DOMAIN(device_t _dev, device_t _child, int *_domain)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)_dev)->ops,bus_get_domain);
+ return ((bus_get_domain_t *) _m)(_dev, _child, _domain);
+}
+
+/** @brief Unique descriptor for the BUS_GET_CPUS() method */
+extern struct kobjop_desc bus_get_cpus_desc;
+/** @brief A function implementing the BUS_GET_CPUS() method */
+typedef int bus_get_cpus_t(device_t _dev, device_t _child, enum cpu_sets _op,
+ size_t _setsize, cpuset_t *_cpuset);
+/**
+ * @brief Request a set of CPUs
+ *
+ * @param _dev the bus device
+ * @param _child the child device
+ * @param _op type of CPUs to request
+ * @param _setsize the size of the set passed in _cpuset
+ * @param _cpuset a pointer to a cpuset to receive the requested
+ * set of CPUs
+ */
+
+static __inline int BUS_GET_CPUS(device_t _dev, device_t _child,
+ enum cpu_sets _op, size_t _setsize,
+ cpuset_t *_cpuset)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)_dev)->ops,bus_get_cpus);
+ return ((bus_get_cpus_t *) _m)(_dev, _child, _op, _setsize, _cpuset);
+}
+
#endif /* _bus_if_h_ */
diff --git a/rtemsbsd/include/rtems/bsd/local/device_if.h b/rtemsbsd/include/rtems/bsd/local/device_if.h
index 7a2cbc72..e27c2b52 100644
--- a/rtemsbsd/include/rtems/bsd/local/device_if.h
+++ b/rtemsbsd/include/rtems/bsd/local/device_if.h
@@ -52,28 +52,29 @@ typedef int device_probe_t(device_t dev);
* the probe before returning. The return value of DEVICE_PROBE()
* is used to elect which driver is used - the driver which returns
* the largest non-error value wins the election and attaches to
- * the device.
+ * the device. Common non-error values are described in the
+ * DEVICE_PROBE(9) manual page.
*
* If a driver matches the hardware, it should set the device
* description string using device_set_desc() or
- * device_set_desc_copy(). This string is
- * used to generate an informative message when DEVICE_ATTACH()
- * is called.
+ * device_set_desc_copy(). This string is used to generate an
+ * informative message when DEVICE_ATTACH() is called.
*
* As a special case, if a driver returns zero, the driver election
* is cut short and that driver will attach to the device
- * immediately.
+ * immediately. This should rarely be used.
*
- * For example, a probe method for a pci device driver might look
+ * For example, a probe method for a PCI device driver might look
* like this:
*
* @code
- * int foo_probe(device_t dev)
+ * int
+ * foo_probe(device_t dev)
* {
* if (pci_get_vendor(dev) == FOOVENDOR &&
* pci_get_device(dev) == FOODEVICE) {
* device_set_desc(dev, "Foo device");
- * return (0);
+ * return (BUS_PROBE_DEFAULT);
* }
* return (ENXIO);
* }
@@ -88,7 +89,8 @@ typedef int device_probe_t(device_t dev);
*
* @param dev the device to probe
*
- * @retval 0 if the driver strongly matches this device
+ * @retval 0 if this is the only possible driver for this
+ * device
* @retval negative if the driver can match this device - the
* least negative value is used to select the
* driver
@@ -337,4 +339,33 @@ static __inline int DEVICE_QUIESCE(device_t dev)
return ((device_quiesce_t *) _m)(dev);
}
+/** @brief Unique descriptor for the DEVICE_REGISTER() method */
+extern struct kobjop_desc device_register_desc;
+/** @brief A function implementing the DEVICE_REGISTER() method */
+typedef void * device_register_t(device_t dev);
+/**
+ * @brief This is called when the driver is asked to register handlers.
+ *
+ *
+ * To include this method in a device driver, use a line like this
+ * in the driver's method list:
+ *
+ * @code
+ * KOBJMETHOD(device_register, foo_register)
+ * @endcode
+ *
+ * @param dev the device for which handlers are being registered
+ *
+ * @retval NULL method not implemented
+ * @retval non-NULL a pointer to implementation specific static driver state
+ *
+ */
+
+static __inline void * DEVICE_REGISTER(device_t dev)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)dev)->ops,device_register);
+ return ((device_register_t *) _m)(dev);
+}
+
#endif /* _device_if_h_ */
diff --git a/rtemsbsd/include/rtems/bsd/local/gpio_if.h b/rtemsbsd/include/rtems/bsd/local/gpio_if.h
new file mode 100644
index 00000000..1d42f82b
--- /dev/null
+++ b/rtemsbsd/include/rtems/bsd/local/gpio_if.h
@@ -0,0 +1,151 @@
+/*
+ * This file is produced automatically.
+ * Do not modify anything in here by hand.
+ *
+ * Created from source file
+ * freebsd-org/sys/dev/gpio/gpio_if.m
+ * with
+ * makeobjops.awk
+ *
+ * See the source file for legal information
+ */
+
+
+#ifndef _gpio_if_h_
+#define _gpio_if_h_
+
+
+#include <dev/ofw/openfirm.h>
+
+/** @brief Unique descriptor for the GPIO_GET_BUS() method */
+extern struct kobjop_desc gpio_get_bus_desc;
+/** @brief A function implementing the GPIO_GET_BUS() method */
+typedef device_t gpio_get_bus_t(device_t dev);
+
+static __inline device_t GPIO_GET_BUS(device_t dev)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)dev)->ops,gpio_get_bus);
+ return ((gpio_get_bus_t *) _m)(dev);
+}
+
+/** @brief Unique descriptor for the GPIO_PIN_MAX() method */
+extern struct kobjop_desc gpio_pin_max_desc;
+/** @brief A function implementing the GPIO_PIN_MAX() method */
+typedef int gpio_pin_max_t(device_t dev, int *maxpin);
+
+static __inline int GPIO_PIN_MAX(device_t dev, int *maxpin)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)dev)->ops,gpio_pin_max);
+ return ((gpio_pin_max_t *) _m)(dev, maxpin);
+}
+
+/** @brief Unique descriptor for the GPIO_PIN_SET() method */
+extern struct kobjop_desc gpio_pin_set_desc;
+/** @brief A function implementing the GPIO_PIN_SET() method */
+typedef int gpio_pin_set_t(device_t dev, uint32_t pin_num, uint32_t pin_value);
+
+static __inline int GPIO_PIN_SET(device_t dev, uint32_t pin_num,
+ uint32_t pin_value)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)dev)->ops,gpio_pin_set);
+ return ((gpio_pin_set_t *) _m)(dev, pin_num, pin_value);
+}
+
+/** @brief Unique descriptor for the GPIO_PIN_GET() method */
+extern struct kobjop_desc gpio_pin_get_desc;
+/** @brief A function implementing the GPIO_PIN_GET() method */
+typedef int gpio_pin_get_t(device_t dev, uint32_t pin_num, uint32_t *pin_value);
+
+static __inline int GPIO_PIN_GET(device_t dev, uint32_t pin_num,
+ uint32_t *pin_value)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)dev)->ops,gpio_pin_get);
+ return ((gpio_pin_get_t *) _m)(dev, pin_num, pin_value);
+}
+
+/** @brief Unique descriptor for the GPIO_PIN_TOGGLE() method */
+extern struct kobjop_desc gpio_pin_toggle_desc;
+/** @brief A function implementing the GPIO_PIN_TOGGLE() method */
+typedef int gpio_pin_toggle_t(device_t dev, uint32_t pin_num);
+
+static __inline int GPIO_PIN_TOGGLE(device_t dev, uint32_t pin_num)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)dev)->ops,gpio_pin_toggle);
+ return ((gpio_pin_toggle_t *) _m)(dev, pin_num);
+}
+
+/** @brief Unique descriptor for the GPIO_PIN_GETCAPS() method */
+extern struct kobjop_desc gpio_pin_getcaps_desc;
+/** @brief A function implementing the GPIO_PIN_GETCAPS() method */
+typedef int gpio_pin_getcaps_t(device_t dev, uint32_t pin_num, uint32_t *caps);
+
+static __inline int GPIO_PIN_GETCAPS(device_t dev, uint32_t pin_num,
+ uint32_t *caps)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)dev)->ops,gpio_pin_getcaps);
+ return ((gpio_pin_getcaps_t *) _m)(dev, pin_num, caps);
+}
+
+/** @brief Unique descriptor for the GPIO_PIN_GETFLAGS() method */
+extern struct kobjop_desc gpio_pin_getflags_desc;
+/** @brief A function implementing the GPIO_PIN_GETFLAGS() method */
+typedef int gpio_pin_getflags_t(device_t dev, uint32_t pin_num,
+ uint32_t *flags);
+
+static __inline int GPIO_PIN_GETFLAGS(device_t dev, uint32_t pin_num,
+ uint32_t *flags)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)dev)->ops,gpio_pin_getflags);
+ return ((gpio_pin_getflags_t *) _m)(dev, pin_num, flags);
+}
+
+/** @brief Unique descriptor for the GPIO_PIN_GETNAME() method */
+extern struct kobjop_desc gpio_pin_getname_desc;
+/** @brief A function implementing the GPIO_PIN_GETNAME() method */
+typedef int gpio_pin_getname_t(device_t dev, uint32_t pin_num, char *name);
+
+static __inline int GPIO_PIN_GETNAME(device_t dev, uint32_t pin_num, char *name)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)dev)->ops,gpio_pin_getname);
+ return ((gpio_pin_getname_t *) _m)(dev, pin_num, name);
+}
+
+/** @brief Unique descriptor for the GPIO_PIN_SETFLAGS() method */
+extern struct kobjop_desc gpio_pin_setflags_desc;
+/** @brief A function implementing the GPIO_PIN_SETFLAGS() method */
+typedef int gpio_pin_setflags_t(device_t dev, uint32_t pin_num, uint32_t flags);
+
+static __inline int GPIO_PIN_SETFLAGS(device_t dev, uint32_t pin_num,
+ uint32_t flags)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)dev)->ops,gpio_pin_setflags);
+ return ((gpio_pin_setflags_t *) _m)(dev, pin_num, flags);
+}
+
+/** @brief Unique descriptor for the GPIO_MAP_GPIOS() method */
+extern struct kobjop_desc gpio_map_gpios_desc;
+/** @brief A function implementing the GPIO_MAP_GPIOS() method */
+typedef int gpio_map_gpios_t(device_t bus, phandle_t dev, phandle_t gparent,
+ int gcells, pcell_t *gpios, uint32_t *pin,
+ uint32_t *flags);
+
+static __inline int GPIO_MAP_GPIOS(device_t bus, phandle_t dev,
+ phandle_t gparent, int gcells,
+ pcell_t *gpios, uint32_t *pin,
+ uint32_t *flags)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)bus)->ops,gpio_map_gpios);
+ return ((gpio_map_gpios_t *) _m)(bus, dev, gparent, gcells, gpios, pin, flags);
+}
+
+#endif /* _gpio_if_h_ */
diff --git a/rtemsbsd/include/rtems/bsd/local/if_dwc_if.h b/rtemsbsd/include/rtems/bsd/local/if_dwc_if.h
new file mode 100644
index 00000000..17aa3b8e
--- /dev/null
+++ b/rtemsbsd/include/rtems/bsd/local/if_dwc_if.h
@@ -0,0 +1,55 @@
+/*
+ * This file is produced automatically.
+ * Do not modify anything in here by hand.
+ *
+ * Created from source file
+ * freebsd-org/sys/dev/dwc/if_dwc_if.m
+ * with
+ * makeobjops.awk
+ *
+ * See the source file for legal information
+ */
+
+
+#ifndef _if_dwc_if_h_
+#define _if_dwc_if_h_
+
+
+
+/** @brief Unique descriptor for the IF_DWC_INIT() method */
+extern struct kobjop_desc if_dwc_init_desc;
+/** @brief A function implementing the IF_DWC_INIT() method */
+typedef int if_dwc_init_t(device_t dev);
+
+static __inline int IF_DWC_INIT(device_t dev)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)dev)->ops,if_dwc_init);
+ return ((if_dwc_init_t *) _m)(dev);
+}
+
+/** @brief Unique descriptor for the IF_DWC_MAC_TYPE() method */
+extern struct kobjop_desc if_dwc_mac_type_desc;
+/** @brief A function implementing the IF_DWC_MAC_TYPE() method */
+typedef int if_dwc_mac_type_t(device_t dev);
+
+static __inline int IF_DWC_MAC_TYPE(device_t dev)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)dev)->ops,if_dwc_mac_type);
+ return ((if_dwc_mac_type_t *) _m)(dev);
+}
+
+/** @brief Unique descriptor for the IF_DWC_MII_CLK() method */
+extern struct kobjop_desc if_dwc_mii_clk_desc;
+/** @brief A function implementing the IF_DWC_MII_CLK() method */
+typedef int if_dwc_mii_clk_t(device_t dev);
+
+static __inline int IF_DWC_MII_CLK(device_t dev)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)dev)->ops,if_dwc_mii_clk);
+ return ((if_dwc_mii_clk_t *) _m)(dev);
+}
+
+#endif /* _if_dwc_if_h_ */
diff --git a/rtemsbsd/include/rtems/bsd/local/miidevs.h b/rtemsbsd/include/rtems/bsd/local/miidevs.h
index 82f0102b..2199229d 100644
--- a/rtemsbsd/include/rtems/bsd/local/miidevs.h
+++ b/rtemsbsd/include/rtems/bsd/local/miidevs.h
@@ -187,8 +187,14 @@
#define MII_STR_BROADCOM_BCM5400 "BCM5400 1000BASE-T media interface"
#define MII_MODEL_BROADCOM_BCM5401 0x0005
#define MII_STR_BROADCOM_BCM5401 "BCM5401 1000BASE-T media interface"
+#define MII_MODEL_BROADCOM_BCM5402 0x0006
+#define MII_STR_BROADCOM_BCM5402 "BCM5402 1000BASE-T media interface"
#define MII_MODEL_BROADCOM_BCM5411 0x0007
#define MII_STR_BROADCOM_BCM5411 "BCM5411 1000BASE-T media interface"
+#define MII_MODEL_BROADCOM_BCM5404 0x0008
+#define MII_STR_BROADCOM_BCM5404 "BCM5404 1000BASE-T media interface"
+#define MII_MODEL_BROADCOM_BCM5424 0x000a
+#define MII_STR_BROADCOM_BCM5424 "BCM5424/BCM5234 1000BASE-T media interface"
#define MII_MODEL_BROADCOM_BCM5464 0x000b
#define MII_STR_BROADCOM_BCM5464 "BCM5464 1000BASE-T media interface"
#define MII_MODEL_BROADCOM_BCM5461 0x000c
@@ -219,10 +225,16 @@
#define MII_STR_BROADCOM_BCM5780 "BCM5780 1000BASE-T media interface"
#define MII_MODEL_BROADCOM_BCM5708C 0x0036
#define MII_STR_BROADCOM_BCM5708C "BCM5708C 1000BASE-T media interface"
+#define MII_MODEL_BROADCOM_BCM5466 0x003b
+#define MII_STR_BROADCOM_BCM5466 "BCM5466 1000BASE-T media interface"
#define MII_MODEL_BROADCOM2_BCM5325 0x0003
#define MII_STR_BROADCOM2_BCM5325 "BCM5325 10/100 5-port PHY switch"
#define MII_MODEL_BROADCOM2_BCM5906 0x0004
#define MII_STR_BROADCOM2_BCM5906 "BCM5906 10/100baseTX media interface"
+#define MII_MODEL_BROADCOM2_BCM5478 0x0008
+#define MII_STR_BROADCOM2_BCM5478 "BCM5478 1000BASE-T media interface"
+#define MII_MODEL_BROADCOM2_BCM5488 0x0009
+#define MII_STR_BROADCOM2_BCM5488 "BCM5488 1000BASE-T media interface"
#define MII_MODEL_BROADCOM2_BCM5481 0x000a
#define MII_STR_BROADCOM2_BCM5481 "BCM5481 1000BASE-T media interface"
#define MII_MODEL_BROADCOM2_BCM5482 0x000b
@@ -230,7 +242,7 @@
#define MII_MODEL_BROADCOM2_BCM5755 0x000c
#define MII_STR_BROADCOM2_BCM5755 "BCM5755 1000BASE-T media interface"
#define MII_MODEL_BROADCOM2_BCM5754 0x000e
-#define MII_STR_BROADCOM2_BCM5754 "BCM5754/5787 1000BASE-T media interface"
+#define MII_STR_BROADCOM2_BCM5754 "BCM5754/BCM5787 1000BASE-T media interface"
#define MII_MODEL_BROADCOM2_BCM5708S 0x0015
#define MII_STR_BROADCOM2_BCM5708S "BCM5708S 1000/2500baseSX PHY"
#define MII_MODEL_BROADCOM2_BCM5785 0x0016
@@ -411,6 +423,8 @@
/* Micrel PHYs */
#define MII_MODEL_MICREL_KSZ9021 0x0021
#define MII_STR_MICREL_KSZ9021 "Micrel KSZ9021 10/100/1000 PHY"
+#define MII_MODEL_MICREL_KSZ9031 0x0022
+#define MII_STR_MICREL_KSZ9031 "Micrel KSZ9031 10/100/1000 PHY"
/* Myson Technology PHYs */
#define MII_MODEL_xxMYSON_MTD972 0x0000
@@ -505,3 +519,5 @@
/* SMC */
#define MII_MODEL_SMC_LAN8710A 0x000F
#define MII_STR_SMC_LAN8710A "SMC LAN8710A 10/100 interface"
+#define MII_MODEL_SMC_LAN8700 0x000C
+#define MII_STR_SMC_LAN8700 "SMC LAN8700 10/100 interface"
diff --git a/rtemsbsd/include/rtems/bsd/local/opt_callout_profiling.h b/rtemsbsd/include/rtems/bsd/local/opt_callout_profiling.h
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/rtemsbsd/include/rtems/bsd/local/opt_callout_profiling.h
diff --git a/rtemsbsd/include/rtems/bsd/local/opt_em.h b/rtemsbsd/include/rtems/bsd/local/opt_em.h
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/rtemsbsd/include/rtems/bsd/local/opt_em.h
diff --git a/rtemsbsd/include/rtems/bsd/local/opt_ifmedia.h b/rtemsbsd/include/rtems/bsd/local/opt_ifmedia.h
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/rtemsbsd/include/rtems/bsd/local/opt_ifmedia.h
diff --git a/rtemsbsd/include/rtems/bsd/local/opt_kld.h b/rtemsbsd/include/rtems/bsd/local/opt_kld.h
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/rtemsbsd/include/rtems/bsd/local/opt_kld.h
diff --git a/rtemsbsd/include/rtems/bsd/local/opt_kqueue.h b/rtemsbsd/include/rtems/bsd/local/opt_kqueue.h
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/rtemsbsd/include/rtems/bsd/local/opt_kqueue.h
diff --git a/rtemsbsd/include/rtems/bsd/local/opt_kstack_usage_prof.h b/rtemsbsd/include/rtems/bsd/local/opt_kstack_usage_prof.h
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/rtemsbsd/include/rtems/bsd/local/opt_kstack_usage_prof.h
diff --git a/rtemsbsd/include/rtems/bsd/local/opt_pci.h b/rtemsbsd/include/rtems/bsd/local/opt_pci.h
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/rtemsbsd/include/rtems/bsd/local/opt_pci.h
diff --git a/rtemsbsd/include/rtems/bsd/local/opt_rss.h b/rtemsbsd/include/rtems/bsd/local/opt_rss.h
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/rtemsbsd/include/rtems/bsd/local/opt_rss.h
diff --git a/rtemsbsd/include/rtems/bsd/local/opt_stack.h b/rtemsbsd/include/rtems/bsd/local/opt_stack.h
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/rtemsbsd/include/rtems/bsd/local/opt_stack.h
diff --git a/rtemsbsd/include/rtems/bsd/local/opt_timer.h b/rtemsbsd/include/rtems/bsd/local/opt_timer.h
new file mode 100644
index 00000000..188d2f49
--- /dev/null
+++ b/rtemsbsd/include/rtems/bsd/local/opt_timer.h
@@ -0,0 +1 @@
+#define NO_EVENTTIMERS 1
diff --git a/rtemsbsd/include/rtems/bsd/local/opt_verbose_sysinit.h b/rtemsbsd/include/rtems/bsd/local/opt_verbose_sysinit.h
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/rtemsbsd/include/rtems/bsd/local/opt_verbose_sysinit.h
diff --git a/rtemsbsd/include/rtems/bsd/local/opt_vm.h b/rtemsbsd/include/rtems/bsd/local/opt_vm.h
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/rtemsbsd/include/rtems/bsd/local/opt_vm.h
diff --git a/rtemsbsd/include/rtems/bsd/local/pci_if.h b/rtemsbsd/include/rtems/bsd/local/pci_if.h
index d4152556..2f11c95a 100644
--- a/rtemsbsd/include/rtems/bsd/local/pci_if.h
+++ b/rtemsbsd/include/rtems/bsd/local/pci_if.h
@@ -14,6 +14,14 @@
#ifndef _pci_if_h_
#define _pci_if_h_
+
+struct nvlist;
+
+enum pci_id_type {
+ PCI_ID_RID,
+ PCI_ID_MSI,
+};
+
/** @brief Unique descriptor for the PCI_READ_CONFIG() method */
extern struct kobjop_desc pci_read_config_desc;
/** @brief A function implementing the PCI_READ_CONFIG() method */
@@ -154,6 +162,20 @@ static __inline int PCI_ASSIGN_INTERRUPT(device_t dev, device_t child)
return ((pci_assign_interrupt_t *) _m)(dev, child);
}
+/** @brief Unique descriptor for the PCI_FIND_CAP() method */
+extern struct kobjop_desc pci_find_cap_desc;
+/** @brief A function implementing the PCI_FIND_CAP() method */
+typedef int pci_find_cap_t(device_t dev, device_t child, int capability,
+ int *capreg);
+
+static __inline int PCI_FIND_CAP(device_t dev, device_t child, int capability,
+ int *capreg)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)dev)->ops,pci_find_cap);
+ return ((pci_find_cap_t *) _m)(dev, child, capability, capreg);
+}
+
/** @brief Unique descriptor for the PCI_FIND_EXTCAP() method */
extern struct kobjop_desc pci_find_extcap_desc;
/** @brief A function implementing the PCI_FIND_EXTCAP() method */
@@ -168,6 +190,20 @@ static __inline int PCI_FIND_EXTCAP(device_t dev, device_t child,
return ((pci_find_extcap_t *) _m)(dev, child, capability, capreg);
}
+/** @brief Unique descriptor for the PCI_FIND_HTCAP() method */
+extern struct kobjop_desc pci_find_htcap_desc;
+/** @brief A function implementing the PCI_FIND_HTCAP() method */
+typedef int pci_find_htcap_t(device_t dev, device_t child, int capability,
+ int *capreg);
+
+static __inline int PCI_FIND_HTCAP(device_t dev, device_t child, int capability,
+ int *capreg)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)dev)->ops,pci_find_htcap);
+ return ((pci_find_htcap_t *) _m)(dev, child, capability, capreg);
+}
+
/** @brief Unique descriptor for the PCI_ALLOC_MSI() method */
extern struct kobjop_desc pci_alloc_msi_desc;
/** @brief A function implementing the PCI_ALLOC_MSI() method */
@@ -192,6 +228,46 @@ static __inline int PCI_ALLOC_MSIX(device_t dev, device_t child, int *count)
return ((pci_alloc_msix_t *) _m)(dev, child, count);
}
+/** @brief Unique descriptor for the PCI_ENABLE_MSI() method */
+extern struct kobjop_desc pci_enable_msi_desc;
+/** @brief A function implementing the PCI_ENABLE_MSI() method */
+typedef void pci_enable_msi_t(device_t dev, device_t child, uint64_t address,
+ uint16_t data);
+
+static __inline void PCI_ENABLE_MSI(device_t dev, device_t child,
+ uint64_t address, uint16_t data)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)dev)->ops,pci_enable_msi);
+ ((pci_enable_msi_t *) _m)(dev, child, address, data);
+}
+
+/** @brief Unique descriptor for the PCI_ENABLE_MSIX() method */
+extern struct kobjop_desc pci_enable_msix_desc;
+/** @brief A function implementing the PCI_ENABLE_MSIX() method */
+typedef void pci_enable_msix_t(device_t dev, device_t child, u_int index,
+ uint64_t address, uint32_t data);
+
+static __inline void PCI_ENABLE_MSIX(device_t dev, device_t child, u_int index,
+ uint64_t address, uint32_t data)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)dev)->ops,pci_enable_msix);
+ ((pci_enable_msix_t *) _m)(dev, child, index, address, data);
+}
+
+/** @brief Unique descriptor for the PCI_DISABLE_MSI() method */
+extern struct kobjop_desc pci_disable_msi_desc;
+/** @brief A function implementing the PCI_DISABLE_MSI() method */
+typedef void pci_disable_msi_t(device_t dev, device_t child);
+
+static __inline void PCI_DISABLE_MSI(device_t dev, device_t child)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)dev)->ops,pci_disable_msi);
+ ((pci_disable_msi_t *) _m)(dev, child);
+}
+
/** @brief Unique descriptor for the PCI_REMAP_MSIX() method */
extern struct kobjop_desc pci_remap_msix_desc;
/** @brief A function implementing the PCI_REMAP_MSIX() method */
@@ -242,4 +318,109 @@ static __inline int PCI_MSIX_COUNT(device_t dev, device_t child)
return ((pci_msix_count_t *) _m)(dev, child);
}
+/** @brief Unique descriptor for the PCI_MSIX_PBA_BAR() method */
+extern struct kobjop_desc pci_msix_pba_bar_desc;
+/** @brief A function implementing the PCI_MSIX_PBA_BAR() method */
+typedef int pci_msix_pba_bar_t(device_t dev, device_t child);
+
+static __inline int PCI_MSIX_PBA_BAR(device_t dev, device_t child)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)dev)->ops,pci_msix_pba_bar);
+ return ((pci_msix_pba_bar_t *) _m)(dev, child);
+}
+
+/** @brief Unique descriptor for the PCI_MSIX_TABLE_BAR() method */
+extern struct kobjop_desc pci_msix_table_bar_desc;
+/** @brief A function implementing the PCI_MSIX_TABLE_BAR() method */
+typedef int pci_msix_table_bar_t(device_t dev, device_t child);
+
+static __inline int PCI_MSIX_TABLE_BAR(device_t dev, device_t child)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)dev)->ops,pci_msix_table_bar);
+ return ((pci_msix_table_bar_t *) _m)(dev, child);
+}
+
+/** @brief Unique descriptor for the PCI_GET_ID() method */
+extern struct kobjop_desc pci_get_id_desc;
+/** @brief A function implementing the PCI_GET_ID() method */
+typedef int pci_get_id_t(device_t dev, device_t child, enum pci_id_type type,
+ uintptr_t *id);
+
+static __inline int PCI_GET_ID(device_t dev, device_t child,
+ enum pci_id_type type, uintptr_t *id)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)dev)->ops,pci_get_id);
+ return ((pci_get_id_t *) _m)(dev, child, type, id);
+}
+
+/** @brief Unique descriptor for the PCI_ALLOC_DEVINFO() method */
+extern struct kobjop_desc pci_alloc_devinfo_desc;
+/** @brief A function implementing the PCI_ALLOC_DEVINFO() method */
+typedef struct pci_devinfo * pci_alloc_devinfo_t(device_t dev);
+
+static __inline struct pci_devinfo * PCI_ALLOC_DEVINFO(device_t dev)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)dev)->ops,pci_alloc_devinfo);
+ return ((pci_alloc_devinfo_t *) _m)(dev);
+}
+
+/** @brief Unique descriptor for the PCI_CHILD_ADDED() method */
+extern struct kobjop_desc pci_child_added_desc;
+/** @brief A function implementing the PCI_CHILD_ADDED() method */
+typedef void pci_child_added_t(device_t dev, device_t child);
+
+static __inline void PCI_CHILD_ADDED(device_t dev, device_t child)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)dev)->ops,pci_child_added);
+ ((pci_child_added_t *) _m)(dev, child);
+}
+
+/** @brief Unique descriptor for the PCI_IOV_ATTACH() method */
+extern struct kobjop_desc pci_iov_attach_desc;
+/** @brief A function implementing the PCI_IOV_ATTACH() method */
+typedef int pci_iov_attach_t(device_t dev, device_t child,
+ struct nvlist *pf_schema, struct nvlist *vf_schema,
+ const char *name);
+
+static __inline int PCI_IOV_ATTACH(device_t dev, device_t child,
+ struct nvlist *pf_schema,
+ struct nvlist *vf_schema, const char *name)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)dev)->ops,pci_iov_attach);
+ return ((pci_iov_attach_t *) _m)(dev, child, pf_schema, vf_schema, name);
+}
+
+/** @brief Unique descriptor for the PCI_IOV_DETACH() method */
+extern struct kobjop_desc pci_iov_detach_desc;
+/** @brief A function implementing the PCI_IOV_DETACH() method */
+typedef int pci_iov_detach_t(device_t dev, device_t child);
+
+static __inline int PCI_IOV_DETACH(device_t dev, device_t child)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)dev)->ops,pci_iov_detach);
+ return ((pci_iov_detach_t *) _m)(dev, child);
+}
+
+/** @brief Unique descriptor for the PCI_CREATE_IOV_CHILD() method */
+extern struct kobjop_desc pci_create_iov_child_desc;
+/** @brief A function implementing the PCI_CREATE_IOV_CHILD() method */
+typedef device_t pci_create_iov_child_t(device_t bus, device_t pf, uint16_t rid,
+ uint16_t vid, uint16_t did);
+
+static __inline device_t PCI_CREATE_IOV_CHILD(device_t bus, device_t pf,
+ uint16_t rid, uint16_t vid,
+ uint16_t did)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)bus)->ops,pci_create_iov_child);
+ return ((pci_create_iov_child_t *) _m)(bus, pf, rid, vid, did);
+}
+
#endif /* _pci_if_h_ */
diff --git a/rtemsbsd/include/rtems/bsd/local/pcib_if.h b/rtemsbsd/include/rtems/bsd/local/pcib_if.h
index d8f20c78..a7c06c31 100644
--- a/rtemsbsd/include/rtems/bsd/local/pcib_if.h
+++ b/rtemsbsd/include/rtems/bsd/local/pcib_if.h
@@ -14,6 +14,9 @@
#ifndef _pcib_if_h_
#define _pcib_if_h_
+
+#include "pci_if.h"
+
/** @brief Unique descriptor for the PCIB_MAXSLOTS() method */
extern struct kobjop_desc pcib_maxslots_desc;
/** @brief A function implementing the PCIB_MAXSLOTS() method */
@@ -26,6 +29,18 @@ static __inline int PCIB_MAXSLOTS(device_t dev)
return ((pcib_maxslots_t *) _m)(dev);
}
+/** @brief Unique descriptor for the PCIB_MAXFUNCS() method */
+extern struct kobjop_desc pcib_maxfuncs_desc;
+/** @brief A function implementing the PCIB_MAXFUNCS() method */
+typedef int pcib_maxfuncs_t(device_t dev);
+
+static __inline int PCIB_MAXFUNCS(device_t dev)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)dev)->ops,pcib_maxfuncs);
+ return ((pcib_maxfuncs_t *) _m)(dev);
+}
+
/** @brief Unique descriptor for the PCIB_READ_CONFIG() method */
extern struct kobjop_desc pcib_read_config_desc;
/** @brief A function implementing the PCIB_READ_CONFIG() method */
@@ -147,4 +162,56 @@ static __inline int PCIB_POWER_FOR_SLEEP(device_t pcib, device_t dev,
return ((pcib_power_for_sleep_t *) _m)(pcib, dev, pstate);
}
+/** @brief Unique descriptor for the PCIB_GET_ID() method */
+extern struct kobjop_desc pcib_get_id_desc;
+/** @brief A function implementing the PCIB_GET_ID() method */
+typedef int pcib_get_id_t(device_t pcib, device_t dev, enum pci_id_type type,
+ uintptr_t *id);
+
+static __inline int PCIB_GET_ID(device_t pcib, device_t dev,
+ enum pci_id_type type, uintptr_t *id)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)pcib)->ops,pcib_get_id);
+ return ((pcib_get_id_t *) _m)(pcib, dev, type, id);
+}
+
+/** @brief Unique descriptor for the PCIB_TRY_ENABLE_ARI() method */
+extern struct kobjop_desc pcib_try_enable_ari_desc;
+/** @brief A function implementing the PCIB_TRY_ENABLE_ARI() method */
+typedef int pcib_try_enable_ari_t(device_t pcib, device_t dev);
+
+static __inline int PCIB_TRY_ENABLE_ARI(device_t pcib, device_t dev)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)pcib)->ops,pcib_try_enable_ari);
+ return ((pcib_try_enable_ari_t *) _m)(pcib, dev);
+}
+
+/** @brief Unique descriptor for the PCIB_ARI_ENABLED() method */
+extern struct kobjop_desc pcib_ari_enabled_desc;
+/** @brief A function implementing the PCIB_ARI_ENABLED() method */
+typedef int pcib_ari_enabled_t(device_t pcib);
+
+static __inline int PCIB_ARI_ENABLED(device_t pcib)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)pcib)->ops,pcib_ari_enabled);
+ return ((pcib_ari_enabled_t *) _m)(pcib);
+}
+
+/** @brief Unique descriptor for the PCIB_DECODE_RID() method */
+extern struct kobjop_desc pcib_decode_rid_desc;
+/** @brief A function implementing the PCIB_DECODE_RID() method */
+typedef void pcib_decode_rid_t(device_t pcib, uint16_t rid, int *bus, int *slot,
+ int *func);
+
+static __inline void PCIB_DECODE_RID(device_t pcib, uint16_t rid, int *bus,
+ int *slot, int *func)
+{
+ kobjop_t _m;
+ KOBJOPLOOKUP(((kobj_t)pcib)->ops,pcib_decode_rid);
+ ((pcib_decode_rid_t *) _m)(pcib, rid, bus, slot, func);
+}
+
#endif /* _pcib_if_h_ */