beautypg.com

Intel Extensible Firmware Interface User Manual

Page 727

background image

Protocols

— Debugger Support

Version 1.10

12/01/02

16-13

EFI_DEBUG_SUPPORT_PROTOCOL.InvalidateInstructionCache()

Summary

Invalidates processor instruction cache for a memory range. Subsequent execution in this range
causes a fresh memory fetch to retrieve code to be executed.

Prototype

typedef
EFI_STATUS
(EFIAPI *EFI_INVALIDATE_INSTRUCTION_CACHE) (
IN EFI_DEBUG_SUPPORT_PROTOCOL

*This,

IN UINTN

ProcessorIndex,

IN VOID

*Start,

IN UINT64

Length

);

Parameters

This

A pointer to the

EFI_DEBUG_SUPPORT_PROTOCOL

instance.

Type

EFI_DEBUG_SUPPORT_PROTOCOL

is defined in Section 16.2.

ProcessorIndex

Specifies which processor’s instruction cache is to be invalidated.

Start

Specifies the physical base of the memory range to be invalidated.

Length

Specifies the minimum number of bytes in the processor’s instruction
cache to invalidate.

Description

Typical operation of a debugger may require modifying the code image that is under debug. This
can occur for many reasons, but is typically done to insert/remove software break instructions.
Some processor architectures do not have coherent instruction and data caches so modifications to
the code image require that the instruction cache be explicitly invalidated in that memory region.

The

InvalidateInstructionCache()

function abstracts this operation from the debug

agent and provides a general purpose capability to invalidate the processor’s instruction cache.

It is the responsibility of the caller to insure all parameters are correct. There is no provision for
parameter checking by

RegisterExceptionCallback()

. The implementation behavior

when an invalid parameter is passed is not defined by this specification.

Status Codes Returned

EFI_SUCCESS

The function completed successfully.