|
ReactOS 0.4.17-dev-934-g091855f
|

Go to the source code of this file.
Macros | |
| #define | NDEBUG |
Functions | |
| static NTSTATUS | ArbpBuildAlternative (_In_ PARBITER_INSTANCE Arbiter, _In_ PIO_RESOURCE_DESCRIPTOR Descriptor, _Out_ PARBITER_ALTERNATIVE Alternative) |
| Expands one IO_RESOURCE_DESCRIPTOR into an ARBITER_ALTERNATIVE through the arbiter's UnpackRequirement callback and identifies it. | |
| static NTSTATUS | ArbpBuildAllocationStack (_In_ PARBITER_INSTANCE Arbiter, _In_ PLIST_ENTRY ArbitrationList, _In_ ULONG EntryCount) |
| Builds the allocation stack for an arbitration list into Arbiter->AllocationStack: one ARBITER_ALLOCATION_STATE per contributing entry, in list order, terminated by a state whose Entry is NULL, followed by the flattened ARBITER_ALTERNATIVE array the states point into. | |
| static NTSTATUS | ArbpTestAllocation (_In_ PARBITER_INSTANCE Arbiter, _In_ PLIST_ENTRY ArbitrationList) |
| Test-allocates every entry on an arbitration list into the arbiter's tentative allocation. The shared implementation behind ArbiterLibAttemptAllocation. | |
| static NTSTATUS | ArbpRetestAllocation (_In_ PARBITER_INSTANCE Arbiter, _In_ PLIST_ENTRY ArbitrationList) |
| Re-establishes a previously tested solution in the arbiter's tentative allocation without searching again: every entry's SelectedAlternative is re-materialized at the position recorded in its Assignment. | |
| NTSTATUS NTAPI | ArbiterLibTestAllocation (_In_ PARBITER_INSTANCE Arbiter, _Inout_ PARBITER_TEST_ALLOCATION_PARAMETERS Parameters) |
| The TestAllocation action: tentatively places every entry of the arbitration list, leaving the solution in PossibleAllocation for a later commit or rollback. | |
| NTSTATUS NTAPI | ArbiterLibRetestAllocation (_In_ PARBITER_INSTANCE Arbiter, _Inout_ PARBITER_RETEST_ALLOCATION_PARAMETERS Parameters) |
| The RetestAllocation action: deterministically re-establishes the placements a previous test chose, without searching. | |
| NTSTATUS NTAPI | ArbiterLibCommitAllocation (_In_ PARBITER_INSTANCE Arbiter) |
| The CommitAllocation action: the tentative PossibleAllocation becomes the committed Allocation, and the old committed list is recycled as the next scratch list. | |
| NTSTATUS NTAPI | ArbiterLibRollbackAllocation (_In_ PARBITER_INSTANCE Arbiter) |
| The RollbackAllocation action: discards the tentative allocation; the committed one is untouched. | |
| static NTSTATUS | ArbpBootAllocation (_In_ PARBITER_INSTANCE Arbiter, _In_ PLIST_ENTRY ArbitrationList) |
| Reserves each entry's firmware boot configuration in the committed range list, so devices left where the firmware put them keep their resources. The shared implementation behind ArbiterLibBootAllocation. | |
| NTSTATUS NTAPI | ArbiterLibBootAllocation (_In_ PARBITER_INSTANCE Arbiter, _Inout_ PARBITER_BOOT_ALLOCATION_PARAMETERS Parameters) |
| The BootAllocation action: records every entry's firmware boot configuration in the committed allocation. | |
| static BOOLEAN NTAPI | ArbpQueryConflictCallback (_In_ PVOID Context, _In_ PRTL_RANGE Range) |
| RtlFindRange conflict callback installed while a conflict query runs: records the range that blocks placement and reports it as a real conflict, so FindSuitableRange fails and the caller can enumerate the owner. | |
| static NTSTATUS | ArbpQueryConflict (_In_ PARBITER_INSTANCE Arbiter, _In_ PDEVICE_OBJECT PhysicalDeviceObject, _In_ PIO_RESOURCE_DESCRIPTOR ConflictingResource, _Out_ PULONG ConflictCount, _Out_ PARBITER_CONFLICT_INFO *Conflicts) |
| Enumerates every committed range that conflicts with a candidate resource for a device. The shared implementation behind ArbiterLibQueryConflict. | |
| NTSTATUS NTAPI | ArbiterLibQueryConflict (_In_ PARBITER_INSTANCE Arbiter, _Inout_ PARBITER_QUERY_CONFLICT_PARAMETERS Parameters) |
| The QueryConflict action: reports which devices' committed ranges collide with a candidate resource. | |
| #define NDEBUG |
Definition at line 14 of file transaction.c.
| NTSTATUS NTAPI ArbiterLibBootAllocation | ( | _In_ PARBITER_INSTANCE | Arbiter, |
| _Inout_ PARBITER_BOOT_ALLOCATION_PARAMETERS | Parameters | ||
| ) |
The BootAllocation action: records every entry's firmware boot configuration in the committed allocation.
| [in] | Arbiter | The arbiter instance performing the reservation. |
| [in,out] | Parameters | The action parameters carrying the arbitration list (pre-Vista builds receive the list directly). |
Definition at line 684 of file transaction.c.
Referenced by ArbiterLibInitializeInstance().
| NTSTATUS NTAPI ArbiterLibCommitAllocation | ( | _In_ PARBITER_INSTANCE | Arbiter | ) |
The CommitAllocation action: the tentative PossibleAllocation becomes the committed Allocation, and the old committed list is recycled as the next scratch list.
| [in] | Arbiter | The arbiter instance whose transaction is committed. |
Definition at line 515 of file transaction.c.
Referenced by ArbiterLibInitializeInstance().
| NTSTATUS NTAPI ArbiterLibQueryConflict | ( | _In_ PARBITER_INSTANCE | Arbiter, |
| _Inout_ PARBITER_QUERY_CONFLICT_PARAMETERS | Parameters | ||
| ) |
The QueryConflict action: reports which devices' committed ranges collide with a candidate resource.
| [in] | Arbiter | The arbiter instance performing the query. |
| [in,out] | Parameters | The action parameters carrying the device, the candidate resource and the output slots (pre-Vista builds receive them directly). |
Definition at line 937 of file transaction.c.
Referenced by ArbiterLibInitializeInstance().
| NTSTATUS NTAPI ArbiterLibRetestAllocation | ( | _In_ PARBITER_INSTANCE | Arbiter, |
| _Inout_ PARBITER_RETEST_ALLOCATION_PARAMETERS | Parameters | ||
| ) |
The RetestAllocation action: deterministically re-establishes the placements a previous test chose, without searching.
| [in] | Arbiter | The arbiter instance performing the retest. |
| [in,out] | Parameters | The action parameters carrying the arbitration list (pre-Vista builds receive the list directly). |
Definition at line 483 of file transaction.c.
Referenced by ArbiterLibInitializeInstance().
| NTSTATUS NTAPI ArbiterLibRollbackAllocation | ( | _In_ PARBITER_INSTANCE | Arbiter | ) |
The RollbackAllocation action: discards the tentative allocation; the committed one is untouched.
| [in] | Arbiter | The arbiter instance whose transaction is rolled back. |
Definition at line 543 of file transaction.c.
Referenced by ArbiterLibInitializeInstance().
| NTSTATUS NTAPI ArbiterLibTestAllocation | ( | _In_ PARBITER_INSTANCE | Arbiter, |
| _Inout_ PARBITER_TEST_ALLOCATION_PARAMETERS | Parameters | ||
| ) |
The TestAllocation action: tentatively places every entry of the arbitration list, leaving the solution in PossibleAllocation for a later commit or rollback.
| [in] | Arbiter | The arbiter instance performing the test. |
| [in,out] | Parameters | The action parameters carrying the arbitration list (pre-Vista builds receive the list directly). |
Definition at line 447 of file transaction.c.
Referenced by ArbiterLibInitializeInstance().
|
static |
Reserves each entry's firmware boot configuration in the committed range list, so devices left where the firmware put them keep their resources. The shared implementation behind ArbiterLibBootAllocation.
| [in] | Arbiter | The arbiter instance whose committed allocation receives the reservations. The ranges are added through the arbiter's own AddAllocation callback, owned by the device and tagged ARBITER_RANGE_BOOT_ALLOCATED so they read back as available to the owning device's later real allocation. |
| [in] | ArbitrationList | The entries whose boot configurations are to be reserved. Placement is lenient: an entry whose configuration is not one sane, fixed, aligned, exact range is silently skipped, because a malformed firmware config must not block the rest of boot process. |
Definition at line 582 of file transaction.c.
Referenced by ArbiterLibBootAllocation().
|
static |
Builds the allocation stack for an arbitration list into Arbiter->AllocationStack: one ARBITER_ALLOCATION_STATE per contributing entry, in list order, terminated by a state whose Entry is NULL, followed by the flattened ARBITER_ALTERNATIVE array the states point into.
| [in] | Arbiter | The arbiter instance whose AllocationStack buffer is (re)used, growing it when the list needs more room. |
| [in] | ArbitrationList | The (sorted) list of ARBITER_LIST_ENTRY nodes to flatten. Entries without alternatives contribute no state. |
| [in] | EntryCount | The number of entries on the list. |
Definition at line 126 of file transaction.c.
Referenced by ArbpTestAllocation().
|
static |
Expands one IO_RESOURCE_DESCRIPTOR into an ARBITER_ALTERNATIVE through the arbiter's UnpackRequirement callback and identifies it.
| [in] | Arbiter | The arbiter instance whose UnpackRequirement decodes the descriptor. |
| [in] | Descriptor | The requirement descriptor to expand. |
| [out] | Alternative | Receives the decoded window, length, alignment and the derived FIXED / SHARED / INVALID flags. The minimum is rounded up to the requested alignment first, so a misaligned window base does not later affect the range search. |
Definition at line 44 of file transaction.c.
Referenced by ArbpBootAllocation(), ArbpBuildAllocationStack(), ArbpQueryConflict(), and ArbpRetestAllocation().
|
static |
Enumerates every committed range that conflicts with a candidate resource for a device. The shared implementation behind ArbiterLibQueryConflict.
| [in] | Arbiter | The arbiter instance whose committed allocation is examined (through a scratch copy; the committed list is untouched). |
| [in] | PhysicalDeviceObject | The device the resource is being probed for. Its own ranges are never reported as conflicts. |
| [in] | ConflictingResource | The candidate requirement descriptor to probe. |
| [out] | ConflictCount | Receives the number of conflicts found. |
| [out] | Conflicts | Receives the ARBITER_CONFLICT_INFO array (pool tag TAG_ARBITER); the caller frees it. |
Definition at line 770 of file transaction.c.
Referenced by ArbiterLibQueryConflict().
RtlFindRange conflict callback installed while a conflict query runs: records the range that blocks placement and reports it as a real conflict, so FindSuitableRange fails and the caller can enumerate the owner.
| [in] | Context | Receives the conflicting range (a PRTL_RANGE pointer slot). |
| [in] | Range | The range RtlFindRange collided with. |
Definition at line 723 of file transaction.c.
Referenced by ArbpQueryConflict().
|
static |
Re-establishes a previously tested solution in the arbiter's tentative allocation without searching again: every entry's SelectedAlternative is re-materialized at the position recorded in its Assignment.
| [in] | Arbiter | The arbiter instance whose PossibleAllocation is rebuilt from the committed allocation. |
| [in] | ArbitrationList | The list of entries from an earlier successful test: each must carry the SelectedAlternative and Assignment that test produced, except entries whose Result is ArbiterResultNullRequest, which are skipped. |
Definition at line 330 of file transaction.c.
Referenced by ArbiterLibRetestAllocation().
|
static |
Test-allocates every entry on an arbitration list into the arbiter's tentative allocation. The shared implementation behind ArbiterLibAttemptAllocation.
| [in] | Arbiter | The arbiter instance whose PossibleAllocation receives the tentative solution. |
| [in] | ArbitrationList | The list of ARBITER_LIST_ENTRY nodes to place. Everything a listed device already owns is removed from the working list first, so a device does not conflict with itself (its boot configuration in particular). |
Definition at line 227 of file transaction.c.
Referenced by ArbiterLibTestAllocation().