Find an erratum for a device
Synopsis:
#include <drvr/hwinfo.h>
int hwitag_find_errata( unsigned hwi_off,
unsigned *errata_idx );
Arguments:
- hwi_off
- The offset into the hwinfo section of the system page for the device,
which you can get by calling
hwi_find_device().
- errata_idx
- NULL, or a pointer to a location that holds the index of the erratum that you want to find;
see below.
Library:
libdrvr
Use the -l drvr option to
qcc
to link against this library.
Description:
You can use hwitag_find_errata() to find one or more errata tags associated with
the device at hwi_off in the hwinfo section of the syspage.
You can retrieve all errata by using the errata_idx parameter as follows:
- On the first call, set *errata_idx to 0.
The first address (if one exists) is returned.
- You can then continue to call hwitag_find_errata() with the same arguments until it
returns -1.
- If you know that there's more than one erratum for the specified device, you can set
*errata_idx to the instance number of the desired erratum.
If that instance exists, the address is returned.
For example, to obtain the third erratum for hwi_off, set *errata_idx
to 2 (base-0 indexing applies).
- If you're interested only in the first erratum, you can pass NULL for
errata_idx (which is the same as setting *errata_idx to 0).
By convention, startup sets the erratum value to the vendor's
chosen erratum number as obtained from the errata documents.
Some vendors don't necessarily use a unique erratum number, and so the startup and driver must
agree on an erratum value.
Returns:
The errata value, or -1 on error.
Classification:
QNX Neutrino
Safety: |
|
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |