bus_get_resource (9)
Leading comments
Copyright (c) 2008 The DragonFly Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the docu...
NAME
bus_get_resource - read a resource range/value with a given resource IDSYNOPSIS
In sys/param.h In sys/bus.h In sys/rman.h Ft int Fo bus_get_resource Fa device_t dev int type int rid rman_res_t *startp rman_res_t *countp FcDESCRIPTION
The Fn bus_get_resource function reads the range or value of the resource Fa type , rid pair and stores it in the Fa startp and Fa countp arguments.The arguments are as follows:
- Fa dev
- The device to read the resource from.
- Fa type
-
The type of resource you want to read.
It is one of:
- SYS_RES_IRQ
- for IRQs
- SYS_RES_DRQ
- for ISA DMA lines
- SYS_RES_MEMORY
- for I/O memory
- SYS_RES_IOPORT
- for I/O ports
- Fa rid
- A bus-specific handle that identifies the resource being read.
- Fa startp
- A pointer to the start address of this resource.
- Fa countp
- A pointer to the length of the resource. For example, the size of the memory in bytes.