gtpc2m88C/C++ Language Support User's Guide

tpf_gsvac-Convert an EVM Address to an SVM Address

This function converts a specified ECB virtual memory address (EVA) in the specified ECB virtual memory (EVM) to the corresponding system virtual memory (SVM) address.

Format

#include   <sysapi.h>
void * tpf_gsvac(const void *ecbaddr, void *evaaddr);

ecbaddr
A pointer to the target EVM that determines the segment and page tables that will be used for conversion. This is the SVM address of the target ECB.

evaaddr
A pointer to the EVM address to be converted.

Normal Return

The converted address is returned to the calling function.

Error Return

A NULL pointer is returned when the entry control block (ECB) or EVM address is incorrect.

Programming Considerations

Examples

The following example converts an EVM address to an SVM address.

#include <sysapi.h>
sva_address = (void *) tpf_gsvac((void *) g->appl_ecb, (void *)
                                 ((uint applEVA + length - 1));
if (!sva_address) return RC_ENDADDR;
sva_address = (void *) tpf_gsvac((void *) g->appl_ecb, applEVA);
if (!sva_address) return RC_STARTADDR;
tpf_movec(sva_address, TPF_MOVEC_SVA, buffer, TPF_MOVEC_EVA, length);
return RC_OK;

Related Information

tpf_movec-Move Data between EVM and SVM.