File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ add_definitions(-D_NTSYSTEM_)
33
44list (APPEND SOURCE
55 arbiter.c
6- ordering.c)
6+ ordering.c
7+ range.c)
78
89add_library (arbiter ${SOURCE} )
910add_dependencies (arbiter bugcodes xdk )
Original file line number Diff line number Diff line change @@ -207,56 +207,6 @@ ArbiterLibSortArbitrationList(
207207 return STATUS_NOT_IMPLEMENTED ;
208208}
209209
210- CODE_SEG ("PAGE" )
211- BOOLEAN
212- NTAPI
213- ArbiterLibGetNextAllocationRange (
214- _In_ PARBITER_INSTANCE Arbiter ,
215- _Inout_ PARBITER_ALLOCATION_STATE ArbState )
216- {
217- PAGED_CODE ();
218-
219- UNIMPLEMENTED ;
220- return FALSE;
221- }
222-
223- CODE_SEG ("PAGE" )
224- BOOLEAN
225- NTAPI
226- ArbiterLibFindSuitableRange (
227- _In_ PARBITER_INSTANCE Arbiter ,
228- _Inout_ PARBITER_ALLOCATION_STATE ArbState )
229- {
230- PAGED_CODE ();
231-
232- UNIMPLEMENTED ;
233- return FALSE;
234- }
235-
236- CODE_SEG ("PAGE" )
237- VOID
238- NTAPI
239- ArbiterLibAddAllocation (
240- _In_ PARBITER_INSTANCE Arbiter ,
241- _Inout_ PARBITER_ALLOCATION_STATE ArbState )
242- {
243- PAGED_CODE ();
244-
245- UNIMPLEMENTED ;
246- }
247-
248- CODE_SEG ("PAGE" )
249- VOID
250- NTAPI
251- ArbiterLibBacktrackAllocation (
252- _In_ PARBITER_INSTANCE Arbiter ,
253- _Inout_ PARBITER_ALLOCATION_STATE ArbState )
254- {
255- PAGED_CODE ();
256-
257- UNIMPLEMENTED ;
258- }
259-
260210CODE_SEG ("PAGE" )
261211VOID
262212NTAPI
Original file line number Diff line number Diff line change 99
1010#define TAG_ARBITER 'ibrA'
1111
12+ /*
13+ * ARBITER_ALTERNATIVE.Priority:
14+ * The arbiter allocation engine walks the alternatives in increasing priority.
15+ * An ordinary alternative's priority is its ordering-list index biased by one
16+ * (except for IO_RESOURCE_PREFERRED, so preferred ranges sort first).
17+ * Once the orderings are exhausted it gets one final whole-window pass
18+ * at (PREFERRED_)RESERVED before getting set to EXHAUSTED.
19+ *
20+ * Public as any driver can modify these of any range that's passed down.
21+ */
22+ #define ARBITER_PRIORITY_NULL 0x00000000
23+ #define ARBITER_PRIORITY_PREFERRED_RESERVED 0x7FFFFFFD
24+ #define ARBITER_PRIORITY_RESERVED 0x7FFFFFFE
25+ #define ARBITER_PRIORITY_EXHAUSTED 0x7FFFFFFF
26+
27+ /* ARBITER_ALTERNATIVE.Flags */
28+ #define ARBITER_ALTERNATIVE_FLAG_FIXED 0x00000001 // one placement only
29+ #define ARBITER_ALTERNATIVE_FLAG_SHARED 0x00000002 // CmResourceShareShared
30+
31+ /*
32+ * Range attribute bits
33+ *
34+ * ARBITER_RANGE_SHARED_DRIVER:
35+ * Marks a range with a CmResourceShareDriverExclusive
36+ *
37+ * ARBITER_RANGE_BOOT_ALLOCATED:
38+ * Marks a firmware boot configuration
39+ */
40+ #define ARBITER_RANGE_SHARED_DRIVER 0x0
41+ #define ARBITER_RANGE_BOOT_ALLOCATED 0x04
42+
43+ /* ARBITER_ALLOCATION_STATE.Flags */
44+ #define ARBITER_STATE_FLAG_NULL_CONFLICT_OK 0x0001 // a NULL-owner conflict is OK
45+
1246typedef struct _ARBITER_ALTERNATIVE
1347{
1448 UINT64 Minimum ;
You can’t perform that action at this time.
0 commit comments