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

Item Description
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_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

Item Description
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_create previously.

.
EINVAL Input range crosses a certain boundary.
EINVAL The hardware platform does not implement this service.

Implementation Specifics

This service only functions on PowerPC® microprocessors.