Convertpointer() – Intel Extensible Firmware Interface User Manual

Page 211

Advertising
background image

Services

— Runtime Services

Version 1.10

12/01/02

6-19

ConvertPointer()

Summary

Determines the new virtual address that is to be used on subsequent memory accesses.

Prototype

EFI_STATUS
ConvertPointer (

IN UINTN

DebugDisposition,

IN

VOID

**Address

);

Parameters

DebugDisposition

Supplies type information for the pointer being converted. See
“Related Definitions.”

Address

A pointer to a pointer that is to be fixed to be the value needed
for the new virtual address mappings being applied.

Related Definitions


//*******************************************************
// EFI_OPTIONAL_PTR
//*******************************************************
#define EFI_OPTIONAL_PTR 0x00000001

Description

The

ConvertPointer()

function is used by an EFI component during the

SetVirtualAddressMap()

operation.

The

ConvertPointer()

function updates the current pointer pointed to by

Address

to be the

proper value for the new address map. Only runtime components need to perform this operation.
The

CreateEvent()

function is used to create an event that is to be notified when the address

map is changing. All pointers the component has allocated or assigned must be updated.

If the

EFI_OPTIONAL_PTR

flag is specified, the pointer being converted is allowed to be

NULL

.

Once all components have been notified of the address map change, firmware fixes any compiled in
pointers that are embedded in any runtime image.

Status Codes Returned

EFI_SUCCESS

The pointer pointed to by

Address

was modified.

EFI_NOT_FOUND

The pointer pointed to by

Address

was not found to be part

of the current memory map. This is normally fatal.

EFI_INVALID_PARAMETER

One of the parameters has an invalid value.

Advertising