xref: /titanic_52/usr/src/man/man9f/ldi_devmap.9f (revision 2bc987325e3ded1865bff043128661815c4690b9)
te
Copyright (c) 2003, Sun Microsystems, Inc., All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
LDI_DEVMAP 9F "Jun 3, 2003"
NAME
ldi_devmap - Issue a devmap request to a device
SYNOPSIS

#include <sys/sunldi.h>

int ldi_devmap(ldi_handle_t lh, devmap_cookie_t dhp, offset_t off,
 size_t len, size_t *maplen, uint_t model);
PARAMETERS
lh

Layered handle.

dhp

Opaque mapping handle used by the system to describe mapping.

off

User offset within the logical device memory at which mapping begins.

len

Mapping length (in bytes).

maplen

Pointer to length (in bytes) of validated mapping. (Less than or equal to len).

model

Data model type of current thread.

DESCRIPTION

The ldi_devmap() function passes an devmap request to the device entry point for the device specified by the layered handle. This operation is supported for character devices.

RETURN VALUES

The ldi_devmap() function returns 0 upon success. If a failure occurs before the request is passed to the device, possible return values are shown below. Otherwise any other error number may be returned by the device. EINVAL

Invalid input parameters.

ENOTSUP

Operation is not supported for this device.

CONTEXT

This function may be called from user or kernel context.