Getnexthighmonotoniccount() – Intel Extensible Firmware Interface User Manual

Page 215

Advertising
background image

Services

— Runtime Services

Version 1.10

12/01/02

6-23

GetNextHighMonotonicCount()

Summary

Returns the next high 32 bits of the platform’s monotonic counter.

Prototype

EFI_STATUS

GetNextHighMonotonicCount (

OUT

UINT32

*HighCount

);

Parameters

HighCount

Pointer to returned value.

Description

The

GetNextHighMonotonicCount()

function returns the next high 32 bits of the platform’s

monotonic counter.

The platform’s monotonic counter is comprised of two 32-bit quantities: the high 32 bits and the
low 32 bits. During boot service time the low 32-bit value is volatile: it is reset to zero on every
system reset and is increased by 1 on every call to

GetNextMonotonicCount()

.

The high

32-bit value is nonvolatile and is increased by 1 whenever the system resets or whenever the low
32-bit count (returned by

GetNextMonoticCount()

) overflows.

The

GetNextMonotonicCount()

function is only available at boot services time. If the

operating system wishes to extend the platform monotonic counter to runtime, it may do so by
utilizing

GetNextHighMonotonicCount()

. To do this, before calling

ExitBootServices()

the operating system would call

GetNextMonotonicCount()

to

obtain the current platform monotonic count. The operating system would then provide an
interface that returns the next count by:
• Adding 1 to the last count.
• Before the lower 32 bits of the count overflows, call

GetNextHighMonotonicCount()

.

This will increase the high 32 bits of the platform’s nonvolatile portion of the monotonic count
by 1.

This function may only be called at Runtime.

Status Codes Returned

EFI_SUCCESS

The next high monotonic count was returned.

EFI_DEVICE_ERROR

The device is not functioning properly.

EFI_INVALID_PARAMETER

HighCount

is

NULL

.

Advertising