123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- /*++
- Copyright (c) 2015 Minoca Corp. All Rights Reserved
- Module Name:
- resdesc.h
- Abstract:
- This header contains definitions for handling and converting resource
- descriptors in ACPI.
- Author:
- Evan Green 4-Aug-2015
- --*/
- //
- // ------------------------------------------------------------------- Includes
- //
- //
- // ---------------------------------------------------------------- Definitions
- //
- //
- // ------------------------------------------------------ Data Type Definitions
- //
- //
- // -------------------------------------------------------------------- Globals
- //
- //
- // -------------------------------------------------------- Function Prototypes
- //
- KSTATUS
- AcpipParseGenericAddress (
- PACPI_OBJECT ResourceBuffer,
- PGENERIC_ADDRESS GenericAddress
- );
- /*++
- Routine Description:
- This routine reads a single generic address from the given resource buffer.
- Arguments:
- ResourceBuffer - Supplies a pointer to the ACPI resource buffer to parse.
- GenericAddress - Supplies a pointer where the extracted generic address
- will be returned.
- Return Value:
- Status code.
- --*/
- KSTATUS
- AcpipConvertFromAcpiResourceBuffer (
- PACPI_OBJECT Device,
- PACPI_OBJECT ResourceBuffer,
- PRESOURCE_CONFIGURATION_LIST *ConfigurationListResult
- );
- /*++
- Routine Description:
- This routine converts an ACPI resource buffer into an OS configuration list.
- Arguments:
- Device - Supplies a pointer to the namespace object of the device this
- buffer is coming from. This is used for relative namespace traversal
- for certain types of resource descriptors (like GPIO).
- ResourceBuffer - Supplies a pointer to the ACPI resource list buffer to
- parse.
- ConfigurationListResult - Supplies a pointer where a newly allocated
- resource configuration list will be returned. It is the callers
- responsibility to manage this memory once it is returned.
- Return Value:
- Status code.
- --*/
- KSTATUS
- AcpipConvertFromRequirementListToAllocationList (
- PRESOURCE_CONFIGURATION_LIST ConfigurationList,
- PRESOURCE_ALLOCATION_LIST *AllocationList
- );
- /*++
- Routine Description:
- This routine converts a resource requirement list into a resource allocation
- list. For every requirement, it will create an allocation from the
- requirement's minimum and length.
- Arguments:
- ConfigurationList - Supplies a pointer to the resource configuration list to
- convert. This routine assumes there is only one configuration on the
- list.
- AllocationList - Supplies a pointer where a pointer to a new resource
- allocation list will be returned on success. The caller is responsible
- for freeing this memory once it is returned.
- Return Value:
- Status code.
- --*/
- KSTATUS
- AcpipConvertToAcpiResourceBuffer (
- PRESOURCE_ALLOCATION_LIST AllocationList,
- PACPI_OBJECT ResourceBuffer
- );
- /*++
- Routine Description:
- This routine converts an ACPI resource buffer into an OS configuration list.
- Arguments:
- AllocationList - Supplies a pointer to a resource allocation list to convert
- to a resource buffer.
- ResourceBuffer - Supplies a pointer to a resource buffer to tweak to fit
- the allocation list. The resource buffer comes from executing the _CRS
- method.
- Return Value:
- Status code.
- --*/
|