|
ReactOS 0.4.17-dev-934-g091855f
|

Go to the source code of this file.
Macros | |
| #define | NDEBUG |
| #define | ARBITER_ORDERING_GRANULARITY 16 |
| #define | ARBITER_ORDERING_LIMIT 1024 |
| #define | ARBP_POLICY_ROOT L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\Arbiters\\" |
| #define | ARBP_LONGEST_SUBKEY L"ReservedResources" |
Typedefs | |
| typedef VOID(NTAPI * | PARB_RANGE_CALLBACK) (_In_ PARBITER_INSTANCE Arbiter, _In_opt_ PVOID Context, _In_ ULONGLONG Start, _In_ ULONGLONG End) |
Functions | |
| static NTSTATUS | ArbpCreateOrderingList (_Out_ PARBITER_ORDERING_LIST OrderingList) |
| VOID NTAPI | ArbiterLibFreeOrderingList (_Inout_ PARBITER_ORDERING_LIST OrderingList) |
| NTSTATUS NTAPI | ArbiterLibAddOrdering (_Inout_ PARBITER_ORDERING_LIST OrderingList, _In_ UINT64 Start, _In_ UINT64 End) |
| static NTSTATUS | ArbpExcludeOrderingRange (_Inout_ PARBITER_ORDERING_LIST OrderingList, _In_ UINT64 Start, _In_ UINT64 End) |
| Removes [Start, End] from every window of an ordering list, splitting windows that straddle it. | |
| static NTSTATUS | ArbpOpenPolicySubkey (_In_ PCWSTR SubkeyName, _Out_ PHANDLE KeyHandle) |
| static NTSTATUS | ArbpReadPolicyValue (_In_ HANDLE KeyHandle, _In_ PCWSTR ValueName, _Out_ PKEY_VALUE_FULL_INFORMATION *Value) |
| static BOOLEAN | ArbpDescriptorMatchesArbiter (_In_ PARBITER_INSTANCE Arbiter, _In_ UCHAR DescriptorType) |
| static NTSTATUS | ArbpForEachRegistryRange (_In_ PARBITER_INSTANCE Arbiter, _In_ PCWSTR Subkey, _In_ PCWSTR ValueName, _In_opt_ PARB_TRANSLATE_ORDERING Translate, _In_ PARB_RANGE_CALLBACK Callback, _In_opt_ PVOID Context) |
| static VOID NTAPI | ArbpAddOrderingCallback (_In_ PARBITER_INSTANCE Arbiter, _In_opt_ PVOID Context, _In_ ULONGLONG Start, _In_ ULONGLONG End) |
| static VOID NTAPI | ArbpAddReservedCallback (_In_ PARBITER_INSTANCE Arbiter, _In_opt_ PVOID Context, _In_ ULONGLONG Start, _In_ ULONGLONG End) |
| Range callback moving one reserved window into last-resort territory: recorded in the arbiter's ReservedList and pruned out of every ordering window, including the full-range fallback. | |
| static VOID NTAPI | ArbpAddRangeCallback (_In_ PARBITER_INSTANCE Arbiter, _In_opt_ PVOID Context, _In_ ULONGLONG Start, _In_ ULONGLONG End) |
| Range callback carving one window out of a range list as an unowned blocking range, so it is never handed to a device. | |
| static VOID NTAPI | ArbpMmConfigCallback (_In_ PARBITER_INSTANCE Arbiter, _In_opt_ PVOID Context, _In_ ULONGLONG Start, _In_ ULONGLONG End) |
| Range callback recording the MMCONFIG (ECAM) window and reserving it in a range list as a boot allocation. | |
| NTSTATUS NTAPI | ArbiterLibDefaultAssignmentOrdering (_Inout_ PARBITER_INSTANCE Arbiter, _In_ PCWSTR AllocationOrderName, _In_ PCWSTR ReservedResourcesName, _In_opt_ PARB_TRANSLATE_ORDERING TranslateOrderingFunction) |
| Builds the arbiter's allocation ordering from the registry policy, most-preferred window first. | |
| NTSTATUS NTAPI | ArbiterLibAddInaccessibleAllocationRange (_In_ PARBITER_INSTANCE Arbiter, _In_ PCWSTR OrderingName, _Inout_ PRTL_RANGE_LIST RangeList) |
| Carves the firmware-reported inaccessible ranges (Arbiters\InaccessibleRange<OrderingName>) out of a range list as unowned blocking ranges, so they are never handed to a device. | |
| NTSTATUS NTAPI | ArbiterLibAddMmConfigRangeAsBootReserved (_In_ PARBITER_INSTANCE Arbiter, _Inout_ PRTL_RANGE_LIST RangeList) |
| Reserves the PCI-Express enhanced-config (MMCONFIG / ECAM) MMIO window (Arbiters\ReservedResources\MmConfigRange) in a range list, and records it for ArbiterLibIsConflictWithMmConfigRange. | |
| BOOLEAN NTAPI | ArbiterLibIsConflictWithMmConfigRange (_In_ ULONGLONG Start, _In_ ULONGLONG End) |
| Determines whether a range overlaps the recorded MMCONFIG window. | |
Variables | |
| static ULONGLONG | ArbpMmConfigStart = 1 |
| static ULONGLONG | ArbpMmConfigEnd = 0 |
| #define ARBITER_ORDERING_GRANULARITY 16 |
Definition at line 17 of file ordering.c.
| #define ARBITER_ORDERING_LIMIT 1024 |
Definition at line 18 of file ordering.c.
| #define ARBP_LONGEST_SUBKEY L"ReservedResources" |
Definition at line 21 of file ordering.c.
| #define ARBP_POLICY_ROOT L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\Arbiters\\" |
Definition at line 20 of file ordering.c.
| #define NDEBUG |
Definition at line 14 of file ordering.c.
| typedef VOID(NTAPI * PARB_RANGE_CALLBACK) (_In_ PARBITER_INSTANCE Arbiter, _In_opt_ PVOID Context, _In_ ULONGLONG Start, _In_ ULONGLONG End) |
Definition at line 206 of file ordering.c.
| NTSTATUS NTAPI ArbiterLibAddInaccessibleAllocationRange | ( | _In_ PARBITER_INSTANCE | Arbiter, |
| _In_ PCWSTR | OrderingName, | ||
| _Inout_ PRTL_RANGE_LIST | RangeList | ||
| ) |
Carves the firmware-reported inaccessible ranges (Arbiters\InaccessibleRange<OrderingName>) out of a range list as unowned blocking ranges, so they are never handed to a device.
| [in] | Arbiter | The arbiter instance the ranges are filtered for. |
| [in] | OrderingName | The InaccessibleRange value to read. |
| [in,out] | RangeList | The range list to carve the windows out of. |
Definition at line 634 of file ordering.c.
| NTSTATUS NTAPI ArbiterLibAddMmConfigRangeAsBootReserved | ( | _In_ PARBITER_INSTANCE | Arbiter, |
| _Inout_ PRTL_RANGE_LIST | RangeList | ||
| ) |
Reserves the PCI-Express enhanced-config (MMCONFIG / ECAM) MMIO window (Arbiters\ReservedResources\MmConfigRange) in a range list, and records it for ArbiterLibIsConflictWithMmConfigRange.
| [in] | Arbiter | The arbiter instance the window is filtered for. |
| [in,out] | RangeList | The range list to reserve the window in. |
Definition at line 663 of file ordering.c.
| NTSTATUS NTAPI ArbiterLibAddOrdering | ( | _Inout_ PARBITER_ORDERING_LIST | OrderingList, |
| _In_ UINT64 | Start, | ||
| _In_ UINT64 | End | ||
| ) |
Definition at line 78 of file ordering.c.
Referenced by ArbiterLibDefaultAssignmentOrdering(), ArbpAddOrderingCallback(), ArbpAddReservedCallback(), and ArbpExcludeOrderingRange().
| NTSTATUS NTAPI ArbiterLibDefaultAssignmentOrdering | ( | _Inout_ PARBITER_INSTANCE | Arbiter, |
| _In_ PCWSTR | AllocationOrderName, | ||
| _In_ PCWSTR | ReservedResourcesName, | ||
| _In_opt_ PARB_TRANSLATE_ORDERING | TranslateOrderingFunction | ||
| ) |
Builds the arbiter's allocation ordering from the registry policy, most-preferred window first.
| [in,out] | Arbiter | The arbiter instance whose OrderingList and ReservedList are (re)created. Callers may rebuild an existing ordering against a different policy table (see pcix!ario_ApplyBrokenVideoHack). |
| [in] | AllocationOrderName | The AllocationOrder value naming this arbiter's preferred windows. The engine walks the resulting list in index order, so index 0 is the most-preferred window. |
| [in] | ReservedResourcesName | The ReservedResources value naming this arbiter's last-resort windows: each is recorded in the ReservedList for the engine's final pass and pruned out of every ordering window, so it is only ever offered once all orderings fail. |
| [in] | TranslateOrderingFunction | Optional per-arbiter descriptor translation. |
Definition at line 571 of file ordering.c.
Referenced by ArbiterLibInitializeInstance(), and ario_ApplyBrokenVideoHack().
| VOID NTAPI ArbiterLibFreeOrderingList | ( | _Inout_ PARBITER_ORDERING_LIST | OrderingList | ) |
Definition at line 60 of file ordering.c.
Referenced by ArbiterLibDefaultAssignmentOrdering(), ArbiterLibDeleteInstance(), ArbpExcludeOrderingRange(), and ario_ApplyBrokenVideoHack().
Determines whether a range overlaps the recorded MMCONFIG window.
| [in] | Start | The inclusive start of the range to test. |
| [in] | End | The inclusive end of the range to test. |
Definition at line 689 of file ordering.c.
Referenced by ArbiterLibFindSuitableRange().
|
static |
Definition at line 415 of file ordering.c.
Referenced by ArbiterLibDefaultAssignmentOrdering().
|
static |
Range callback carving one window out of a range list as an unowned blocking range, so it is never handed to a device.
| [in] | Arbiter | Unused. |
| [in] | Context | The RTL_RANGE_LIST to add the blocking range to. |
| [in] | Start | The inclusive start of the window. |
| [in] | End | The inclusive end of the window. |
Definition at line 490 of file ordering.c.
Referenced by ArbiterLibAddInaccessibleAllocationRange().
|
static |
Range callback moving one reserved window into last-resort territory: recorded in the arbiter's ReservedList and pruned out of every ordering window, including the full-range fallback.
| [in] | Arbiter | The arbiter instance whose lists are adjusted. |
| [in] | Context | Unused. |
| [in] | Start | The inclusive start of the reserved window. |
| [in] | End | The inclusive end of the reserved window. |
Definition at line 456 of file ordering.c.
Referenced by ArbiterLibDefaultAssignmentOrdering().
|
static |
Definition at line 37 of file ordering.c.
Referenced by ArbiterLibDefaultAssignmentOrdering(), and ArbpExcludeOrderingRange().
|
static |
Definition at line 292 of file ordering.c.
Referenced by ArbpForEachRegistryRange().
|
static |
Removes [Start, End] from every window of an ordering list, splitting windows that straddle it.
| [in,out] | OrderingList | The ordering list to prune. The pruned set is built in a temporary list and swapped in on success; on failure the original list is left untouched. |
| [in] | Start | The inclusive start of the range to remove. |
| [in] | End | The inclusive end of the range to remove. Must not be below Start. |
Definition at line 146 of file ordering.c.
Referenced by ArbpAddReservedCallback().
|
static |
Definition at line 313 of file ordering.c.
Referenced by ArbiterLibAddInaccessibleAllocationRange(), ArbiterLibAddMmConfigRangeAsBootReserved(), and ArbiterLibDefaultAssignmentOrdering().
|
static |
Range callback recording the MMCONFIG (ECAM) window and reserving it in a range list as a boot allocation.
| [in] | Arbiter | Unused. |
| [in] | Context | The RTL_RANGE_LIST to reserve the window in. |
| [in] | Start | The inclusive start of the ECAM window. |
| [in] | End | The inclusive end of the ECAM window. |
Definition at line 523 of file ordering.c.
Referenced by ArbiterLibAddMmConfigRangeAsBootReserved().
Definition at line 217 of file ordering.c.
Referenced by ArbpForEachRegistryRange().
|
static |
Definition at line 244 of file ordering.c.
Referenced by ArbpForEachRegistryRange().
|
static |
Definition at line 29 of file ordering.c.
Referenced by ArbiterLibIsConflictWithMmConfigRange(), and ArbpMmConfigCallback().
|
static |
Definition at line 28 of file ordering.c.
Referenced by ArbiterLibIsConflictWithMmConfigRange(), and ArbpMmConfigCallback().