DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5

devmem_mapout(D3)


devmem_mapout -- free virtual address mapping for physical offsets within device memory

Synopsis

   #include <sys/types.h>
   #include <sys/ddi.h>

void devmem_mapout(void *addr, size_t nbytes);

Description

devmem_mapout( ) releases a mapping allocated by a previous call to devmem_mapin(D3).

Arguments


addr
Virtual address for which the mapping will be released.

nbytes
Number of bytes in the mapping. This must match the value of the nbytes argument supplied to the corresponding devmem_mapin(D3) call.

Return values

None.

Usage

devmem_mapout( ) is typically called from the _unload(D2) entry point routine or the CFG_REMOVE subfunction of the config(D2) entry point routine to free device memory mappings obtained in the CFG_ADD subfunction of the config( ) routine. dynamically allocate and free address mappings. In most cases, drivers keep the mappings forever, so devmem_mapout( ) is not called.

Context and synchronization

User or blockable context.

Hardware applicability

All

Version applicability

ddi: 8, 8mp

Differences between versions

In DDI versions prior to version 8, use the physmap_free(D3) function to release a virtual address mapping that was obtained with the physmap(D3) function.

References

devmem_mapin(D3), devmem_ppid(D3), drv_mmap(D3), devmem_size(D3)

``Memory-mapped I/O'' in HDK Technical Reference


19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005