Function

IOFlushProcessorCache

Flushes the processor cache for mapped memory.

Declaration

IOReturn IOFlushProcessorCache(task_t task, IOVirtualAddress address, IOByteCount length);

Parameters

task

Task the memory is mapped into.

address

Virtual address of the memory.

length

Length of the range to set.

Return Value

An IOReturn code.

Discussion

This function flushes the processor cache of an already mapped memory range. Note in most cases it is preferable to use IOMemoryDescriptor::prepare and complete to manage cache coherency since they are aware of the architecture's requirements. Flushing the processor cache is not required for coherency in most situations.

See Also

Miscellaneous

IOThreadSelf

Returns the osfmk identifier for the currently running thread.

Debugger

Enter the kernel debugger.

IOCreateThread

Deprecated function - use kernel_thread_start(). Create a kernel thread.

Deprecated
IODelay

Spin delay for a number of microseconds.

IOExitThread

Deprecated function - use thread_terminate(). Terminate execution of current thread.

Deprecated
IOFree

Frees memory allocated with IOMalloc.

IOFreeAligned

Frees memory allocated with IOMallocAligned.

IOFreeContiguous

Deprecated - use IOBufferMemoryDescriptor. Frees memory allocated with IOMallocContiguous.

Deprecated
IOFreePageable

Frees memory allocated with IOMallocPageable.

IOLog

Log a message to console in text mode, and /var/log/system.log.

IOLogv

Log a message to console in text mode, and /var/log/system.log.

IOMalloc

Allocates general purpose, wired memory in the kernel map.

IOMallocAligned

Allocates wired memory in the kernel map, with an alignment restriction.

IOMallocContiguous

Deprecated - use IOBufferMemoryDescriptor. Allocates wired memory in the kernel map, with an alignment restriction and physically contiguous.

Deprecated
IOMallocPageable

Allocates pageable memory in the kernel map.

IOMappedRead16

Read two bytes from the desired "Physical" IOSpace address.

IOMappedRead32

Read four bytes from the desired "Physical" IOSpace address.

IOMappedRead64

Read eight bytes from the desired "Physical" IOSpace address.

IOMappedRead8

Read one byte from the desired "Physical" IOSpace address.

IOMappedWrite16

Write two bytes to the desired "Physical" IOSpace address.

IOMappedWrite32

Write four bytes to the desired "Physical" IOSpace address.

IOMappedWrite64

Write eight bytes to the desired "Physical" IOSpace address.

IOMappedWrite8

Write one byte to the desired "Physical" IOSpace address.

IOPause

Spin delay for a number of nanoseconds.

IOSleep

Sleep the calling thread for a number of milliseconds.