Contents

IOConnectMapMemory64(_:_:_:_:_:_:)

Map hardware or shared memory into the caller's task.

Declaration

func IOConnectMapMemory64(_ connect: io_connect_t, _ memoryType: UInt32, _ intoTask: task_port_t, _ atAddress: UnsafeMutablePointer<mach_vm_address_t>!, _ ofSize: UnsafeMutablePointer<mach_vm_size_t>!, _ options: IOOptionBits) -> kern_return_t

Parameters

  • connect:

    The connect handle created by IOServiceOpen.

  • memoryType:

    What is being requested to be mapped, not interpreted by IOKit and family defined. The family may support physical hardware or shared memory mappings.

  • intoTask:

    The task port for the task in which to create the mapping. This may be different to the task which the opened the connection.

  • atAddress:

    An in/out parameter - if the kIOMapAnywhere option is not set, the caller should pass the address where it requests the mapping be created, otherwise nothing need to set on input. The address of the mapping created is passed back on sucess.

  • ofSize:

    The size of the mapping created is passed back on success.

Return Value

A kern_return_t error code.

Discussion

This is a generic method to create a mapping in the callers task. The family will interpret the type parameter to determine what sort of mapping is being requested. Cache modes and placed mappings may be requested by the caller.

See Also

Miscellaneous