Device_io.freebuffer(), Freebuffer() – Intel Extensible Firmware Interface User Manual

Page 774

Advertising
background image

Extensible Firmware Interface Specification

18-14

12/01/02

Version 1.10

DEVICE_IO.FreeBuffer()

Summary

Frees pages that were allocated with

AllocateBuffer()

.

Prototype

typedef

EFI_STATUS

(EFIAPI *EFI_IO_FREE_BUFFER) (

IN EFI_DEVICE_IO_INTERFACE

*This,

IN UINTN

Pages,

IN EFI_PHYSICAL_ADDRESS

HostAddress

);

Parameters

This

A pointer to the

EFI_DEVICE_IO_INTERFACE

instance. Type

EFI_DEVICE_IO_INTERFACE

is defined in Section 18.2.

Pages

The number of pages to free.

HostAddress

The base address of the range to free. Type

EFI_PHYSICAL_ADDRESS

is defined in Chapter 5.

Description

The

FreeBuffer()

function frees pages that were allocated with

AllocateBuffer()

.

The

FreeBuffer()

function internally calls

FreePages()

to free a memory range.

Status Codes Returned

EFI_SUCCESS

The requested memory pages were freed.

EFI_NOT_FOUND

The requested memory pages were not allocated with

AllocateBuffer()

.

EFI_INVALID_PARAMETER

HostAddress

is not page aligned or

Pages

is invalid.

Advertising