wbadaddr(D3X)
wbadaddr - test for valid output bus address wbadaddr_val - test for valid output bus address and write value
As shipped in IRIX 6.5.30. Unchanged since IRIX 6.5.
NAME wbadaddr - test for valid output bus address wbadaddr_val - test for valid output bus address and write value SYNOPSIS #include <sys/systm.h> int wbadaddr(volatile void *addr, int size); int wbadaddr_val(volatile void *addr, int size, void *ptr); Arguments addr The physical memory address of the location to be tested. size The size in bytes of the location to be written: 1, 2, 4, or 8. ptr A pointer to a value of the appropriate size (char, short, int, or long long) whose value is written to the given location. DESCRIPTION Typically these functions are called from a VME device driver's init(D2) or edtinit(D2) function to determine whether a device is present in the system. Call wbadaddr to determine whether you can write to location addr. It writes a binary zero of the specified size. Call wbadaddr_val when you also want to specify the data to be written. Use badaddr(D3X) to test a location for input only. NOTES If an invalid size is passed a system panic results. For some systems, pio_wbadaddr(D3X) must be used in order to perform address mapping. It is possible that the wbadaddr_val(D3X) function may change or be removed in the future. These routines may not be called from an interrupt handler, or routines that may be called from an interrupt handler. Return Values Both functions return 0 when addr is writeable. Otherwise, they return 1. See Also badaddr(D3X), edtinit(D2), pio_wbadaddr(D3X).