[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

rmmap_getwimg Kernel Service

Purpose

Returns wimg information about a particular effective address range within an effective address to real address translation region.

Syntax

#include <sys/adspace.h>
int rmmap_getwimg(eaddr, npages, results) 
unsigned long long eaddr;
unsigned int  npages;
char* results;

Parameters

eaddr The process effective address of the start of the desired mapping region. This address should point somewhere inside the first page of the range. This address is interpreted as a 64-bit quantity if the current user address space is 64-bits, and is interpreted as a 32-bit (not remapped) quantity if the current user address space is 32-bits.
npages The number of pages whose wimg information is returned, starting from the page indicated by eaddr.
results This is an array of bytes, where the wimg information is returned. The address of this is passed in by the caller, and rmmap_getwimg stores the wimg information for each page in the range in each successive byte in this array. The size of this array is indicated by npages as specified by the caller. The caller is responsible for ensuring that the storage allocated for this array is large enough to hold npage bytes.

Description

The wimg information corresponding to the input effective address range is returned.

This routine only works for regions previously mapped with an I/O mapping segment as created by rmmap_create64 or rmmap_create.

npages should not be such that the range crosses a segment boundary. If it does, EINVAL is returned.

The wimg information is returned in the results array. Each element of the results array is a character. Each character may be added with the following fields to examine wimg information: RMMAP_PAGE_W, RMMAP_PAGE_I, RMMAP_PAGE_M or RMMAP_PAGE_G. The array is valid if the return value is 0.

Execution Environment

The rmmap_getwimg kernel service is called from the process environment only.

Return Values

0 Successful completion. Indicates that the results array is valid and should be examined.
EINVAL An error occurred. Most likely the region was not mapped via rmmap_create64 or rmmap_create previously.
EINVAL Input range crosses a certain boundary.
EINVAL The hardware platform does not implement this service.

Implementation Specifics

The rmmap_getwimg kernel service is part of the Base Operating System (BOS) Runtime. This service only functions on PowerPC microprocessors.

Related Information

The rmmap_create64 kernel service, the rmmap_remove64 kernel service, the rmmap_create kernel service, the rmmap_remove kernel service.

Memory Kernel Services and Understanding Virtual Memory Manager Interfaces in AIX Version 4 Kernel Extensions and Device Support Programming Concepts.


[ Previous | Next | Contents | Home | Search ]