IOCTL_ACPI_TRANSLATE_BIOS_RESOURCES control code

[This documentation is preliminary and is subject to change.]

A driver can use the IOCTL_ACPI_TRANSLATE_BIOS_RESOURCES control code to parse BIOS resources for its device connected to the bus, to IO_RESOURCE_LIST structures. The driver should call IoBuildDeviceIoControlRequest (or WdfIoTargetSendIoctlSynchronously in KMDF) and pass the following input and output parameters to build this request.

Input Parameters

Set the IoBuildDeviceIoControlRequest input parameters as follows:

  • IoControlCode is set to IOCTL_ACPI_TRANSLATE_BIOS_RESOURCES.

  • DeviceObject is set to a pointer to the physical device object (PDO) of the device.

  • InputBuffer is set to a pointer to an input buffer structure of the type that depends on the type of input arguments to be passed to the control method. For more information about the type of input arguments that this IOCTL supports, see the Remarks section later in this topic.

  • InputBufferLength is set to the size, in bytes, of the input buffer that is supplied by InputBuffer. Must not be 0.

  • OutputBufferLength supplies the size, in bytes, of the output buffer that is supplied by OutputBuffer. The value must be at least the size of the IO_RESOURCE_LIST structure.

  • InternalDeviceIoControl is set to FALSE.

  • Event is set to NULL.

Output Parameters

Set the IoBuildDeviceIoControlRequest output parameters as follows:

  • OutputBuffer supplies a pointer to an array of IO_RESOURCE_LIST structures that is filled after the request completes.

  • IoStatusBlock is set to an IO_STATUS_BLOCK structure.

I/O Status Block

If the request succeeds, IoStatusBlock->Status is set to STATUS_SUCCESS; otherwise, the Status member is set to an error code. If the input bugger size is 0, Status is STATUS_INVALID_PARAMETER. If the output buffer is not large enough to contain the output buffer header, the Status member is set to STATUS_BUFFER_TOO_SMALL. If the output buffer is large enough to contain the output buffer header, but is not large enough to contain all the output arguments from the control method, the Status member is set to STATUS_BUFFER_OVERFLOW.

If the request succeeds, the IoStatusBlock->Information member is set to the number of bytes that is returned in the output buffer; otherwise, the Information member is set to zero.

Remarks

If you are writing a custom framework extension to work with the controller driver, you can send the IOCTL_ACPI_TRANSLATE_BIOS_RESOURCES control code to obtain information about ACPI resource. For example, if you want to retrieve the parameters from the ACPI resource table entry that describes a particular device connection, you should send this request. For such a request, you will need the connection identifier passed by the configuration manager. Send the connection identifier in the input buffer. After the request completes, the received array of IO_RESOURCE_LIST contains connection information such as bus address and the required bus clock frequency.

For information about the format of the data in the output buffer, see the resource hub structures defined in Reshub.h. For data structures for connections that are not defined in that header, refer to the The ACPI Specification - Revision 5.0.

The translated BIOS resources are retrieved in a variable length array of IO_RESOURCE_LIST structures. Therefore, you must send this request twice. In the first request, allocate an output buffer that is large enough to hold IO_RESOURCE_LIST. Because that buffer is not large enough to hold the results, the request fails with STATUS_BUFFER_OVERFLOW. Check the OutputBuffer->Count to get the number of resources in the array. Accordingly, allocate the output buffer and resend the request. The caller must free the array when done.

Requirements

Header

WinIoctl.h

See also

IoBuildDeviceIoControlRequest

WdfIoTargetSendIoctlSynchronously

IO_RESOURCE_LIST

 

 

Send comments about this topic to Microsoft

Build date: 9/20/2012