1 This patch by David S. Miller.
3 --- XFree86-4.1.0/xc/config/cf/linux.cf.~1~ Sun Jun 3 19:44:40 2001
4 +++ XFree86-4.1.0/xc/config/cf/linux.cf Sun Jun 3 19:44:48 2001
7 # define LinuxMachineDefines -D__sparc__
8 # define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
9 -# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
10 +# define ServerExtraDefines -DHAVE_DOMAINS -DGCCUSESGAS XFree86ServerDefines
11 # define AsVISOption -Av9a
12 # ifdef Sparc64Architecture
13 # define AsOutputArchSize 64
14 --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/common/xf86.h.~1~ Sun Jun 3 19:44:40 2001
15 +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/common/xf86.h Sun Jun 3 19:44:48 2001
17 resPtr xf86ReallocatePciResources(int entityIndex, resPtr pRes);
18 resPtr xf86SetOperatingState(resList list, int entityIndex, int mask);
19 void xf86EnterServerState(xf86State state);
20 -resRange xf86GetBlock(long type, memType size,
21 +resRange xf86GetBlock(long type,
26 memType window_start, memType window_end,
27 memType align_mask, resPtr avoid);
28 -resRange xf86GetSparse(long type, memType fixed_bits,
29 +resRange xf86GetSparse(long type,
34 memType decode_mask, memType address_mask,
36 memType xf86ChkConflict(resRange *rgp, int entityIndex);
37 --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/common/xf86Bus.c.~1~ Sun Jun 3 19:44:40 2001
38 +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/common/xf86Bus.c Sun Jun 3 19:44:48 2001
43 + /* NOTE: Assumes that entities live inside of a single
46 if (res->entityIndex == entityIndex &&
47 (type & ResAccMask & res->res_type))
54 + /* A resource cannot conflict with a range in a different
57 + if (pRes->res_domain != range->domain)
61 switch (pRes->res_type & ResExtMask) {
63 if (range->rBegin < pRes->block_end &&
65 memType val, tmp, prev;
69 + /* A resource cannot conflict with a range in a different
72 + if (pRes->res_domain != range->domain)
76 switch (pRes->res_type & ResExtMask) {
78 tmp = pRes->sparse_mask & range->rMask;
80 * depending on the types of the resource ranges and their locations
83 -needCheck(resPtr pRes, long type, int entityIndex, xf86State state)
84 +needCheck(resPtr pRes, long type, int domain, int entityIndex, xf86State state)
86 /* the same entity shouldn't conflict with itself */
88 @@ -1031,6 +1050,14 @@
89 if (!(pRes->res_type & type & ResPhysMask))
93 + /* A resource cannot conflict with something in a different
96 + if (pRes->res_domain != domain)
101 * Resources set by BIOS (ResBios) are allowed to conflict
102 * with resources marked (ResBios).
103 @@ -1111,7 +1138,11 @@
107 - if (!needCheck(pRes,rgp->type, entityIndex ,state)) {
110 + domain = rgp->domain;
112 + if (!needCheck(pRes,rgp->type,domain,entityIndex,state)) {
116 @@ -1274,16 +1305,20 @@
119 if ((list->res_type & ResPhysMask) == type) {
122 + domain = list->res_domain;
124 switch (list->res_type & ResExtMask) {
126 - xf86ErrorFVerb(verb, "\t[%d] %d\t0x%08x - 0x%08x (0x%x)",
127 - i, list->entityIndex, list->block_begin,
128 + xf86ErrorFVerb(verb, "\t[%d] %d %x\t0x%08x - 0x%08x (0x%x)",
129 + i, list->entityIndex, domain, list->block_begin,
131 list->block_end - list->block_begin + 1);
134 - xf86ErrorFVerb(verb, "\t[%d] %d\t0x%08x - 0x%08x ",
135 - i, list->entityIndex,
136 + xf86ErrorFVerb(verb, "\t[%d] %d %x\t0x%08x - 0x%08x ",
137 + i, list->entityIndex, domain,
138 list->sparse_base,list->sparse_mask);
141 @@ -1408,6 +1443,9 @@
143 && ((pRes->res_type & ResPhysMask) ==
144 (target->res_type & ResPhysMask))
146 + && pRes->res_domain == target->res_domain
148 && pRes->block_begin <= target->block_end
149 && pRes->block_end >= target->block_begin) {
150 /* Possibly ignore estimated resources */
151 @@ -1460,12 +1498,16 @@
152 #define ALIGN(x,a) ((x) + a) &~(a)
155 -xf86GetBlock(long type, memType size,
156 +xf86GetBlock(long type,
161 memType window_start, memType window_end,
162 memType align_mask, resPtr avoid)
164 memType min, max, tmp;
165 - resRange r = {ResEnd,0,0};
167 resPtr res_range = ResRange;
170 @@ -1478,7 +1520,11 @@
171 type = (type & ~(ResExtMask | ResBios | ResEstimated)) | ResBlock;
174 - if (type & res_range->res_type & ResPhysMask) {
175 + if ((type & res_range->res_type & ResPhysMask)
177 + && (domain == res_range->res_domain)
180 if (res_range->block_begin > window_start)
181 min = res_range->block_begin;
183 @@ -1490,7 +1536,7 @@
184 min = ALIGN(min,align_mask);
185 /* do not produce an overflow! */
186 while (min < max && (max - min) >= (size - 1)) {
187 - RANGE(r,min,min + size - 1,type);
188 + RANGE(r,min,min + size - 1,type,domain);
189 tmp = ChkConflict(&r,Acc,SETUP);
191 tmp = ChkConflict(&r,avoid,SETUP);
192 @@ -1503,7 +1549,7 @@
194 res_range = res_range->next;
196 - RANGE(r,0,0,ResEnd);
197 + RANGE(r,0,0,ResEnd,domain);
201 @@ -1557,10 +1603,14 @@
205 -xf86GetSparse(long type, memType fixed_bits,
206 +xf86GetSparse(long type,
210 + memType fixed_bits,
211 memType decode_mask, memType address_mask, resPtr avoid)
213 - resRange r = {ResEnd,0,0};
218 @@ -1602,7 +1652,7 @@
221 base = make_base(counter,new_mask) | fixed_bits;
222 - RANGE(r,base,address_mask,type);
223 + RANGE(r,base,address_mask,type,domain);
224 conflict = ChkConflict(&r,Acc,SETUP);
226 conflict = ChkConflict(&r,avoid,SETUP);
227 @@ -1617,7 +1667,7 @@
228 if (counter > max_counter) break;
230 if (!new_mask && (new_mask == decode_mask)) {
231 - RANGE(r,0,0,ResEnd);
232 + RANGE(r,0,0,ResEnd,domain);
236 @@ -1640,7 +1690,7 @@
239 base = make_base(counter1,mask1);
240 - RANGE(r,base,address_mask,type);
241 + RANGE(r,base,address_mask,type,domain);
242 conflict = ChkConflict(&r,Acc,SETUP);
244 conflict = ChkConflict(&r,avoid,SETUP);
245 @@ -1655,7 +1705,7 @@
247 if (counter > max_counter) break;
249 - RANGE(r,0,0,ResEnd);
250 + RANGE(r,0,0,ResEnd,domain);
254 @@ -2686,6 +2736,9 @@
257 new.type = (range.type & ~ResExtMask) | ResSparse;
259 + new.domain = range.domain;
264 @@ -2726,7 +2779,11 @@
268 - if (range.type & list->res_type & ResPhysMask) {
269 + if ((range.type & list->res_type & ResPhysMask)
271 + && (range.domain == list->res_domain)
274 switch (range.type & ResExtMask) {
276 if ((list->res_type & ResExtMask) == ResBlock) {
277 @@ -2736,21 +2793,21 @@
278 else if (range.rBegin < list->block_begin
279 && range.rEnd > list->block_end) {
280 RANGE(range1, range.rBegin, list->block_begin - 1,
282 + range.type, range.domain);
283 RANGE(range2, list->block_end + 1, range.rEnd,
285 + range.type, range.domain);
286 return (x_isSubsetOf(range1,list->next,list2) &&
287 x_isSubsetOf(range2,list->next,list2));
289 else if (range.rBegin >= list->block_begin
290 && range.rBegin <= list->block_end) {
291 RANGE(range1, list->block_end + 1, range.rEnd,
293 + range.type, range.domain);
294 return (x_isSubsetOf(range1,list->next,list2));
295 } else if (range.rEnd >= list->block_begin
296 && range.rEnd <= list->block_end) {
297 RANGE(range1,range.rBegin, list->block_begin - 1,
299 + range.type, range.domain);
300 return (x_isSubsetOf(range1,list->next,list2));
303 @@ -2791,7 +2848,7 @@
304 | ((~list->sparse_base & list->sparse_mask)
305 & ~range.rMask)) & range1.rMask,
306 ((range.rMask | list->sparse_mask) & ~test)
307 - | (1 << i), range.type);
308 + | (1 << i), range.type, range.domain);
309 return (x_isSubsetOf(range1,list->next,list2));
312 @@ -2885,7 +2942,11 @@
316 - if (Range.type & list->res_type & ResPhysMask) {
317 + if ((Range.type & list->res_type & ResPhysMask)
319 + && (Range.domain == list->res_domain)
322 switch (Range.type & ResExtMask) {
324 switch (list->res_type & ResExtMask) {
325 @@ -2900,6 +2961,9 @@
326 range.rEnd = list->block_end;
327 if (range.rEnd > range.rBegin) {
328 range.type = Range.type;
330 + range.domain = Range.domain;
332 new = xf86AddResToList(new,&range,-1);
335 @@ -2917,7 +2981,7 @@
336 | (~range.rMask & list->sparse_base)
337 | (~list->sparse_mask & range.rBase),
338 range.rMask | list->sparse_mask,
340 + Range.type, Range.domain);
341 new = xf86AddResToList(new,&range,-1);
344 @@ -2956,11 +3020,11 @@
345 switch (Range.type & ResExtMask) {
347 if (Range.rBegin > 0) {
348 - RANGE(range, 0, Range.rBegin - 1, Range.type);
349 + RANGE(range, 0, Range.rBegin - 1, Range.type,Range.domain);
350 new = xf86AddResToList(new,&range,-1);
352 if (Range.rEnd < (memType)~0) {
353 - RANGE(range,Range.rEnd + 1, (memType)~0, Range.type);
354 + RANGE(range,Range.rEnd + 1, (memType)~0, Range.type, Range.domain);
355 new = xf86AddResToList(new,&range,-1);
358 @@ -2968,7 +3032,7 @@
360 for (i = 0; i < sizeof(memType); i++) {
362 - RANGE(range,(~Range.rMask & range.rMask),(1 << i), Range.type);
363 + RANGE(range,(~Range.rMask & range.rMask),(1 << i), Range.type, Range.domain);
364 new = xf86AddResToList(new,&range,-1);
367 @@ -2991,6 +3055,21 @@
374 +xf86ExtractDomainFromList(resPtr list, unsigned int domain)
379 + if (list->res_domain == domain)
380 + ret = xf86AddResToList(ret,&(list->val),list->entityIndex);
387 /*------------------------------------------------------------*/
388 static void CheckGenericGA(void);
389 --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/common/xf86Bus.h.~1~ Sun Jun 3 19:44:40 2001
390 +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/common/xf86Bus.h Sun Jun 3 19:44:48 2001
392 Bool xf86IsSubsetOf(resRange range, resPtr list);
393 Bool xf86IsListSubsetOf(resPtr list, resPtr BaseList);
394 resPtr xf86ExtractTypeFromList(resPtr list, unsigned long type);
396 +resPtr xf86ExtractDomainFromList(resPtr list, unsigned int domain);
398 resPtr findIntersect(resRange Range, resPtr list);
399 resPtr xf86FindIntersect(resRange Range, resPtr list);
400 void RemoveOverlaps(resPtr target, resPtr list, Bool pow2Alignment,
401 --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/common/xf86Resources.h~ Tue Jul 31 23:17:31 2001
402 +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/common/xf86Resources.h Tue Jul 31 23:17:33 2001
407 -#define _END {ResEnd,0,0}
409 +#define DEFAULT_DOMAIN 0,
411 +#define DEFAULT_DOMAIN /**/
414 +#define _END {ResEnd, DEFAULT_DOMAIN 0,0}
416 #define _VGA_EXCLUSIVE \
417 - {ResExcMemBlock | ResBios | ResBus, 0x000A0000, 0x000AFFFF},\
418 - {ResExcMemBlock | ResBios | ResBus, 0x000B0000, 0x000B7FFF},\
419 - {ResExcMemBlock | ResBios | ResBus, 0x000B8000, 0x000BFFFF},\
420 - {ResExcIoBlock | ResBios | ResBus, 0x03B0, 0x03BB},\
421 - {ResExcIoBlock | ResBios | ResBus, 0x03C0, 0x03DF}
422 + {ResExcMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000A0000, 0x000AFFFF},\
423 + {ResExcMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B0000, 0x000B7FFF},\
424 + {ResExcMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B8000, 0x000BFFFF},\
425 + {ResExcIoBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x03B0, 0x03BB},\
426 + {ResExcIoBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x03C0, 0x03DF}
428 #define _VGA_SHARED \
429 - {ResShrMemBlock | ResBios | ResBus, 0x000A0000, 0x000AFFFF},\
430 - {ResShrMemBlock | ResBios | ResBus, 0x000B0000, 0x000B7FFF},\
431 - {ResShrMemBlock | ResBios | ResBus, 0x000B8000, 0x000BFFFF},\
432 - {ResShrIoBlock | ResBios | ResBus, 0x03B0, 0x03BB},\
433 - {ResShrIoBlock | ResBios | ResBus, 0x03C0, 0x03DF}
434 + {ResShrMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000A0000, 0x000AFFFF},\
435 + {ResShrMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B0000, 0x000B7FFF},\
436 + {ResShrMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B8000, 0x000BFFFF},\
437 + {ResShrIoBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x03B0, 0x03BB},\
438 + {ResShrIoBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x03C0, 0x03DF}
440 #define _VGA_SHARED_MEM \
441 - {ResShrMemBlock | ResBios | ResBus, 0x000A0000, 0x000AFFFF},\
442 - {ResShrMemBlock | ResBios | ResBus, 0x000B0000, 0x000B7FFF},\
443 - {ResShrMemBlock | ResBios | ResBus, 0x000B8000, 0x000BFFFF}
444 + {ResShrMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000A0000, 0x000AFFFF},\
445 + {ResShrMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B0000, 0x000B7FFF},\
446 + {ResShrMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B8000, 0x000BFFFF}
448 #define _VGA_SHARED_IO \
449 - {ResShrIoBlock | ResBios | ResBus, 0x03B0, 0x03BB},\
450 - {ResShrIoBlock | ResBios | ResBus, 0x03C0, 0x03DF}
451 + {ResShrIoBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x03B0, 0x03BB},\
452 + {ResShrIoBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x03C0, 0x03DF}
455 * Exclusive unused VGA: resources unneeded but cannot be disabled.
456 * Like old Millennium.
458 #define _VGA_EXCLUSIVE_UNUSED \
459 - {ResExcUusdMemBlock | ResBios | ResBus, 0x000A0000, 0x000AFFFF},\
460 - {ResExcUusdMemBlock | ResBios | ResBus, 0x000B0000, 0x000B7FFF},\
461 - {ResExcUusdMemBlock | ResBios | ResBus, 0x000B8000, 0x000BFFFF},\
462 - {ResExcUusdIoBlock | ResBios | ResBus, 0x03B0, 0x03BB},\
463 - {ResExcUusdIoBlock | ResBios | ResBus, 0x03C0, 0x03DF}
464 + {ResExcUusdMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000A0000, 0x000AFFFF},\
465 + {ResExcUusdMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B0000, 0x000B7FFF},\
466 + {ResExcUusdMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B8000, 0x000BFFFF},\
467 + {ResExcUusdIoBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x03B0, 0x03BB},\
468 + {ResExcUusdIoBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x03C0, 0x03DF}
471 * Shared unused VGA: resources unneeded but cannot be disabled
472 * independently. This is used to determine if a device needs RAC.
474 #define _VGA_SHARED_UNUSED \
475 - {ResShrUusdMemBlock | ResBios | ResBus, 0x000A0000, 0x000AFFFF},\
476 - {ResShrUusdMemBlock | ResBios | ResBus, 0x000B0000, 0x000B7FFF},\
477 - {ResShrUusdMemBlock | ResBios | ResBus, 0x000B8000, 0x000BFFFF},\
478 - {ResShrUusdIoBlock | ResBios | ResBus, 0x03B0, 0x03BB},\
479 - {ResShrUusdIoBlock | ResBios | ResBus, 0x03C0, 0x03DF}
480 + {ResShrUusdMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000A0000, 0x000AFFFF},\
481 + {ResShrUusdMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B0000, 0x000B7FFF},\
482 + {ResShrUusdMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B8000, 0x000BFFFF},\
483 + {ResShrUusdIoBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x03B0, 0x03BB},\
484 + {ResShrUusdIoBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x03C0, 0x03DF}
487 * Sparse versions of the above for those adapters that respond to all ISA
488 * aliases of VGA ports.
490 #define _VGA_EXCLUSIVE_SPARSE \
491 - {ResExcMemBlock | ResBios | ResBus, 0x000A0000, 0x000AFFFF},\
492 - {ResExcMemBlock | ResBios | ResBus, 0x000B0000, 0x000B7FFF},\
493 - {ResExcMemBlock | ResBios | ResBus, 0x000B8000, 0x000BFFFF},\
494 - {ResExcIoSparse | ResBios | ResBus, 0x03B0, 0x03F8},\
495 - {ResExcIoSparse | ResBios | ResBus, 0x03B8, 0x03FC},\
496 - {ResExcIoSparse | ResBios | ResBus, 0x03C0, 0x03E0}
497 + {ResExcMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000A0000, 0x000AFFFF},\
498 + {ResExcMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B0000, 0x000B7FFF},\
499 + {ResExcMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B8000, 0x000BFFFF},\
500 + {ResExcIoSparse | ResBios | ResBus, DEFAULT_DOMAIN 0x03B0, 0x03F8},\
501 + {ResExcIoSparse | ResBios | ResBus, DEFAULT_DOMAIN 0x03B8, 0x03FC},\
502 + {ResExcIoSparse | ResBios | ResBus, DEFAULT_DOMAIN 0x03C0, 0x03E0}
504 #define _VGA_SHARED_SPARSE \
505 - {ResShrMemBlock | ResBios | ResBus, 0x000A0000, 0x000AFFFF},\
506 - {ResShrMemBlock | ResBios | ResBus, 0x000B0000, 0x000B7FFF},\
507 - {ResShrMemBlock | ResBios | ResBus, 0x000B8000, 0x000BFFFF},\
508 - {ResShrIoSparse | ResBios | ResBus, 0x03B0, 0x03F8},\
509 - {ResShrIoSparse | ResBios | ResBus, 0x03B8, 0x03FC},\
510 - {ResShrIoSparse | ResBios | ResBus, 0x03C0, 0x03E0}
511 + {ResShrMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000A0000, 0x000AFFFF},\
512 + {ResShrMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B0000, 0x000B7FFF},\
513 + {ResShrMemBlock | ResBios | ResBus, DEFAULT_DOMAIN 0x000B8000, 0x000BFFFF},\
514 + {ResShrIoSparse | ResBios | ResBus, DEFAULT_DOMAIN 0x03B0, 0x03F8},\
515 + {ResShrIoSparse | ResBios | ResBus, DEFAULT_DOMAIN 0x03B8, 0x03FC},\
516 + {ResShrIoSparse | ResBios | ResBus, DEFAULT_DOMAIN 0x03C0, 0x03E0}
518 #define _8514_EXCLUSIVE \
519 - {ResExcIoSparse | ResBios | ResBus, 0x02E8, 0x03F8}
520 + {ResExcIoSparse | ResBios | ResBus, DEFAULT_DOMAIN 0x02E8, 0x03F8}
522 #define _8514_SHARED \
523 - {ResShrIoSparse | ResBios | ResBus, 0x02E8, 0x03F8}
524 + {ResShrIoSparse | ResBios | ResBus, DEFAULT_DOMAIN 0x02E8, 0x03F8}
526 /* predefined resources */
527 extern resRange resVgaExclusive[];
529 #define RES_SHARED_8514 res8514Shared
531 #define _PCI_AVOID_PC_STYLE \
532 - {ResExcIoSparse | ResBus, 0x0100, 0x0300},\
533 - {ResExcIoSparse | ResBus, 0x0200, 0x0200},\
534 - {ResExcMemBlock | ResBus, 0xA0000,0xFFFFF}
535 + {ResExcIoSparse | ResBus, DEFAULT_DOMAIN 0x0100, 0x0300},\
536 + {ResExcIoSparse | ResBus, DEFAULT_DOMAIN 0x0200, 0x0200},\
537 + {ResExcMemBlock | ResBus, DEFAULT_DOMAIN 0xA0000,0xFFFFF}
539 extern resRange PciAvoid[];
541 --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c.~1~ Sun Jun 3 19:44:40 2001
542 +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c Sun Jun 3 19:44:48 2001
544 ? pciBusAddrToHostAddr(tag,PCI_MEM_SIZE,size) \
545 : pciBusAddrToHostAddr(tag,PCI_IO_SIZE,size))
546 #define PCI_M_RANGE(range,tag,begin,end,type) \
547 - { RANGE(range,B2M(tag,begin),B2M(tag,end),type); }
548 + { RANGE(range,B2M(tag,begin),B2M(tag,end),type,xf86GetPciDomain(tag)); }
549 #define PCI_I_RANGE(range,tag,begin,end,type) \
550 - { RANGE(range,B2I(tag,begin),B2I(tag,end),type); }
551 + { RANGE(range,B2I(tag,begin),B2I(tag,end),type,xf86GetPciDomain(tag)); }
552 #define PCI_X_RANGE(range,tag,begin,end,type) \
553 { if (type & ResMem) PCI_M_RANGE(range,tag,begin,end,type); \
554 else PCI_I_RANGE(range,tag,begin,end,type); }
555 @@ -1039,9 +1039,15 @@
556 PciBusPtr pbp = xf86PciBus, pbp1 = xf86PciBus;
563 if (!pvp) return FALSE;
564 tag = pciTag(pvp->bus,pvp->device,pvp->func);
566 + domain = xf86GetPciDomain(tag);
571 @@ -1232,12 +1238,20 @@
575 - if (type & w->res_type & ResPhysMask) {
576 + if ((type & w->res_type & ResPhysMask)
578 + && (domain == w->res_domain)
582 ErrorF("block_begin: 0x%lx block_end: 0x%lx\n",w->block_begin,
585 - range = xf86GetBlock(type,PCI_SIZE(type,tag,alignment + 1),
586 + range = xf86GetBlock(type,
590 + PCI_SIZE(type,tag,alignment + 1),
591 w->block_begin, w->block_end,
592 PCI_SIZE(type,tag,alignment),avoid);
593 if (range.type != ResEnd)
594 @@ -1250,12 +1264,20 @@
595 if (range.type == ResEnd && w_2nd) {
598 - if (type & w_2nd->res_type & ResPhysMask) {
599 + if ((type & w_2nd->res_type & ResPhysMask)
601 + && (domain == w_2nd->res_domain)
605 ErrorF("block_begin: 0x%lx block_end: 0x%lx\n",w_2nd->block_begin,
608 - range = xf86GetBlock(type,PCI_SIZE(type,tag,alignment + 1),
609 + range = xf86GetBlock(type,
613 + PCI_SIZE(type,tag,alignment + 1),
614 w_2nd->block_begin, w_2nd->block_end,
615 PCI_SIZE(type,tag,alignment),avoid);
616 if (range.type != ResEnd)
617 @@ -1323,7 +1345,7 @@
620 xf86FixPciResource(int entityIndex, int prt, memType alignment,
624 pciVideoPtr pvp = xf86GetPciInfoForEntity(entityIndex);
625 return fixPciResource(prt, alignment, pvp, type);
626 @@ -1481,6 +1503,9 @@
629 range = xf86GetBlock(ResExcMemBlock,
631 + xf86GetPciDomain(TAG(pvp)),
633 PCI_SIZE(ResMem, TAG(pvp), 1 << biosSize),
634 m->block_begin, m->block_end,
635 PCI_SIZE(ResMem, TAG(pvp), alignment),
636 @@ -1730,10 +1755,9 @@
637 PciBusPtr *pnPciBus = &PciBusBase;
643 - resPtr pciBusAccWindows = xf86PciBusAccWindowsFromOS();
645 if (pciInfo == NULL) return NULL;
647 /* Add each PCI-PCI bridge */
648 @@ -1856,13 +1880,25 @@
649 PciBus->secondary = -1; /* to be set below */
650 PciBus->subclass = sub_class;
651 PciBus->brcontrol = PCI_PCI_BRIDGE_VGA_EN;
653 + domain = xf86GetPciDomain(pcrp->tag);
655 + /* XXX A memory leak has returned here... -DaveM */
656 PciBus->preferred_io = xf86ExtractTypeFromList(
657 - pciBusAccWindows,ResIo);
658 + xf86PciBusAccWindowsFromOS(domain),ResIo);
659 PciBus->preferred_mem = xf86ExtractTypeFromList(
660 - pciBusAccWindows,ResMem);
661 + xf86PciBusAccWindowsFromOS(domain),ResMem);
662 PciBus->preferred_pmem = xf86ExtractTypeFromList(
663 - pciBusAccWindows,ResMem);
664 + xf86PciBusAccWindowsFromOS(domain),ResMem);
665 xf86MsgVerb(X_INFO,3,"Host-to-PCI bridge:\n");
667 + xf86MsgVerb(X_INFO,3,"Preferred I/O:\n");
668 + xf86PrintResList(3,PciBus->preferred_io);
669 + xf86MsgVerb(X_INFO,3,"Preferred MEM:\n");
670 + xf86PrintResList(3,PciBus->preferred_mem);
671 + xf86MsgVerb(X_INFO,3,"Preferred Prefetchable MEM:\n");
672 + xf86PrintResList(3,PciBus->preferred_pmem);
677 @@ -1892,12 +1928,23 @@
678 PciBus->primary = -1;
679 PciBus->secondary = i;
680 PciBus->subclass = PCI_SUBCLASS_BRIDGE_HOST;
683 + /* Find a device on this bus. */
684 + for (pcrpp = pciInfo, pcrp = *pcrpp; pcrp; pcrp = *(++pcrpp)) {
685 + if (pcrp->busnum == i)
689 + if (pcrp) domain = xf86GetPciDomain(pcrp->tag);
691 + /* XXX A memory leak has returned here... -DaveM */
692 PciBus->preferred_io = xf86ExtractTypeFromList(
693 - pciBusAccWindows,ResIo);
694 + xf86PciBusAccWindowsFromOS(domain),ResIo);
695 PciBus->preferred_mem = xf86ExtractTypeFromList(
696 - pciBusAccWindows,ResMem);
697 + xf86PciBusAccWindowsFromOS(domain),ResMem);
698 PciBus->preferred_pmem = xf86ExtractTypeFromList(
699 - pciBusAccWindows,ResMem);
700 + xf86PciBusAccWindowsFromOS(domain),ResMem);
701 xf86MsgVerb(X_INFO,3,"Host-to-PCI bridge:\n");
704 @@ -1928,7 +1975,6 @@
705 printBridgeInfo(PciBus);
708 - xf86FreeResList(pciBusAccWindows);
712 --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/common/xf86str.h.~1~ Sun Jun 3 19:44:40 2001
713 +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/common/xf86str.h Sun Jun 3 19:44:48 2001
714 @@ -593,15 +593,27 @@
717 long type; /* shared, exclusive, unused etc. */
719 + unsigned int domain;
723 } resRange, *resList;
725 -#define RANGE(r,u,v,t) {\
727 +#define RANGE(r,u,v,t,d) {\
734 +#define RANGE(r,u,v,t,d) {\
744 #define block_begin val.rBegin
745 #define block_end val.rEnd
746 #define res_type val.type
748 +#define res_domain val.domain
753 --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/ati/Imakefile.~1~ Sun Jun 3 19:44:41 2001
754 +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/ati/Imakefile Sun Jun 3 19:44:48 2001
756 # ifndef ATIAvoidCPIO
757 # define ATIAvoidCPIO NO
759 -#elif defined(SparcArchitecture) || 1
761 # undef ATIAvoidCPIO /* Clobber any previous setting */
762 # define ATIAvoidCPIO YES
765 -#if defined(PpcArchitecture)
766 +#if defined(PpcArchitecture) || defined(SparcArchitecture)
767 # undef ATIAvoidNonPCI
768 # define ATIAvoidNonPCI YES
769 #elif !defined(ATIAvoidNonPCI)
770 --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/ati/aticonfig.c.~1~ Sun Jun 3 19:44:41 2001
771 +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/ati/aticonfig.c Sun Jun 3 19:44:48 2001
773 #include "aticursor.h"
774 #include "atioption.h"
775 #include "atistruct.h"
776 +#include "atichip.h"
779 * Non-publicised XF86Config options.
783 ReferenceClock = ((double)157500000.0) / ((double)11.0);
785 + if (pATI->Chip == ATI_CHIP_264XL)
786 + ReferenceClock = ((double)315000000.0) / ((double)11.0);
792 --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/ati/atimach64.c.~1~ Sun Jun 3 19:44:41 2001
793 +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/ati/atimach64.c Sun Jun 3 19:44:48 2001
794 @@ -1602,6 +1602,24 @@
798 +#if X_BYTE_ORDER == X_BIG_ENDIAN
799 + case 0: xf86WriteMmio32Be(pDst + 0, 0, *(pSrc + 0));
800 + case 1: xf86WriteMmio32Be(pDst + 1, 0, *(pSrc + 1));
801 + case 2: xf86WriteMmio32Be(pDst + 2, 0, *(pSrc + 2));
802 + case 3: xf86WriteMmio32Be(pDst + 3, 0, *(pSrc + 3));
803 + case 4: xf86WriteMmio32Be(pDst + 4, 0, *(pSrc + 4));
804 + case 5: xf86WriteMmio32Be(pDst + 5, 0, *(pSrc + 5));
805 + case 6: xf86WriteMmio32Be(pDst + 6, 0, *(pSrc + 6));
806 + case 7: xf86WriteMmio32Be(pDst + 7, 0, *(pSrc + 7));
807 + case 8: xf86WriteMmio32Be(pDst + 8, 0, *(pSrc + 8));
808 + case 9: xf86WriteMmio32Be(pDst + 9, 0, *(pSrc + 9));
809 + case 10: xf86WriteMmio32Be(pDst + 10, 0, *(pSrc + 10));
810 + case 11: xf86WriteMmio32Be(pDst + 11, 0, *(pSrc + 11));
811 + case 12: xf86WriteMmio32Be(pDst + 12, 0, *(pSrc + 12));
812 + case 13: xf86WriteMmio32Be(pDst + 13, 0, *(pSrc + 13));
813 + case 14: xf86WriteMmio32Be(pDst + 14, 0, *(pSrc + 14));
814 + case 15: xf86WriteMmio32Be(pDst + 15, 0, *(pSrc + 15));
816 case 0: MMIO_OUT32(pDst + 0, 0, *(pSrc + 0));
817 case 1: MMIO_OUT32(pDst + 1, 0, *(pSrc + 1));
818 case 2: MMIO_OUT32(pDst + 2, 0, *(pSrc + 2));
819 @@ -1618,6 +1636,7 @@
820 case 13: MMIO_OUT32(pDst + 13, 0, *(pSrc + 13));
821 case 14: MMIO_OUT32(pDst + 14, 0, *(pSrc + 14));
822 case 15: MMIO_OUT32(pDst + 15, 0, *(pSrc + 15));
825 default: /* Muffle compiler */
827 --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsdResource.c.~1~ Sun Jun 3 19:44:41 2001
828 +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsdResource.c Sun Jun 3 19:44:48 2001
831 resRange PciAvoid[] = {_PCI_AVOID_PC_STYLE, _END};
833 +#define MIN_SYSTEM_DOMAIN 0
835 +#define MAX_SYSTEM_DOMAIN 255
837 +#define MAX_SYSTEM_DOMAIN 0
839 +#define ISA_SYSTEM_DOMAIN 0
842 xf86BusAccWindowsFromOS(void)
848 - RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
849 - ret = xf86AddResToList(ret, &range, -1);
850 + for (domain = MIN_SYSTEM_DOMAIN; domain <= MAX_SYSTEM_DOMAIN; domain++) {
851 + RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock, domain);
852 + ret = xf86AddResToList(ret, &range, -1);
854 + RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock, domain);
855 + ret = xf86AddResToList(ret, &range, -1);
858 - RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock);
859 - ret = xf86AddResToList(ret, &range, -1);
864 -xf86PciBusAccWindowsFromOS(void)
865 +xf86PciBusAccWindowsFromOS(int domain)
870 * region 0x40000000-0xbfffffff for DMA but this only matters if
871 * the bios screws up the pci region mappings.
873 - RANGE(range, 0x80000000, 0xffffffff, ResExcMemBlock);
874 + RANGE(range, 0x80000000, 0xffffffff, ResExcMemBlock, domain);
875 ret = xf86AddResToList(ret, &range, -1);
877 - RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock);
878 + RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock, domain);
879 ret = xf86AddResToList(ret, &range, -1);
886 - RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
887 + RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock, ISA_SYSTEM_DOMAIN);
888 ret = xf86AddResToList(ret, &range, -1);
890 - RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock);
891 + RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock, ISA_SYSTEM_DOMAIN);
892 ret = xf86AddResToList(ret, &range, -1);
896 xf86AccResFromOS(resPtr ret)
900 + int domain = MIN_SYSTEM_DOMAIN;
905 + domain = ret->res_domain;
909 * Fallback is to claim the following areas:
911 * 0x000c0000 - 0x000effff location of VGA and other extensions ROMS
914 - RANGE(range, 0x000c0000, 0x000effff, ResExcMemBlock);
915 + RANGE(range, 0x000c0000, 0x000effff, ResExcMemBlock, domain);
916 ret = xf86AddResToList(ret, &range, -1);
920 * along with their sparse I/O aliases, but that's too imprecise. Instead
921 * claim a bare minimum here.
923 - RANGE(range, 0x00000000, 0x000000ff, ResExcIoBlock); /* For mainboard */
924 + RANGE(range, 0x00000000, 0x000000ff, ResExcIoBlock, domain); /* For mainboard */
925 ret = xf86AddResToList(ret, &range, -1);
928 * At minimum, the top and bottom resources must be claimed, so that
929 * resources that are (or appear to be) unallocated can be relocated.
931 - RANGE(range, 0x00000000, 0x00000000, ResExcMemBlock);
932 + RANGE(range, 0x00000000, 0x00000000, ResExcMemBlock, domain);
933 ret = xf86AddResToList(ret, &range, -1);
934 - RANGE(range, 0xffffffff, 0xffffffff, ResExcMemBlock);
935 + RANGE(range, 0xffffffff, 0xffffffff, ResExcMemBlock, domain);
936 ret = xf86AddResToList(ret, &range, -1);
937 -/* RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock);
938 +/* RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock, domain);
939 ret = xf86AddResToList(ret, &range, -1); */
940 - RANGE(range, 0xffffffff, 0xffffffff, ResExcIoBlock);
941 + RANGE(range, 0xffffffff, 0xffffffff, ResExcIoBlock, domain);
942 ret = xf86AddResToList(ret, &range, -1);
945 @@ -109,30 +129,38 @@
947 resRange PciAvoid[] = {_PCI_AVOID_PC_STYLE, _END};
949 +#define MIN_SYSTEM_DOMAIN 0
950 +#define MAX_SYSTEM_DOMAIN 0
951 +#define ISA_SYSTEM_DOMAIN 0
954 xf86BusAccWindowsFromOS(void)
960 - RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
961 - ret = xf86AddResToList(ret, &range, -1);
962 + for (domain = MIN_SYSTEM_DOMAIN; domain <= MAX_SYSTEM_DOMAIN; domain++) {
963 + RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock, domain);
964 + ret = xf86AddResToList(ret, &range, -1);
966 + RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock, domain);
967 + ret = xf86AddResToList(ret, &range, -1);
970 - RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
971 - ret = xf86AddResToList(ret, &range, -1);
976 -xf86PciBusAccWindowsFromOS(void)
977 +xf86PciBusAccWindowsFromOS(int domain)
982 - RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
983 + RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock, domain);
984 ret = xf86AddResToList(ret, &range, -1);
986 - RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
987 + RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock, domain);
988 ret = xf86AddResToList(ret, &range, -1);
991 --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/bus/Imakefile.~1~ Sun Jun 3 19:44:41 2001
992 +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/bus/Imakefile Sun Jun 3 19:44:48 2001
994 PCIDRVRSRC = axpPci.c
995 PCIDRVROBJ = axpPci.o
997 -#elif (defined(LinuxArchitecture) || defined(SunArchitecture)) && \
998 - defined(SparcArchitecture)
999 +#elif defined(LinuxArchitecture) && defined(SparcArchitecture)
1001 +XCOMM Sparc SBUS driver, generic linux PCI driver
1003 +PCIDRVRSRC = linuxPci.c
1004 +PCIDRVROBJ = linuxPci.o
1005 +SBUSDRVSRC = Sbus.c
1006 +SBUSDRVOBJ = Sbus.o
1008 +#elif defined(SunArchitecture) && defined(SparcArchitecture)
1010 XCOMM Sparc PCI driver
1012 --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.c.~1~ Sun Jun 3 19:44:41 2001
1013 +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.c Sun Jun 3 19:44:48 2001
1014 @@ -1015,6 +1015,13 @@
1016 #if defined(INCLUDE_XF86_MAP_PCI_MEM)
1018 +#ifdef HAVE_DOMAINS
1019 +int xf86GetPciDomain(PCITAG Tag)
1026 xf86MapPciMem(int ScreenNum, int Flags, PCITAG Tag, ADDRESS Base,
1028 --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.h.~1~ Sun Jun 3 19:44:41 2001
1029 +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.h Sun Jun 3 19:44:48 2001
1030 @@ -152,9 +152,11 @@
1031 # if !defined(PowerMAX_OS)
1032 # define INCLUDE_XF86_MAP_PCI_MEM
1034 -#elif defined(__sparc__) && (defined(linux) || defined(sun))
1035 +#elif defined(__sparc__) && defined(sun)
1036 # define ARCH_PCI_INIT sparcPciInit
1037 # define INCLUDE_XF86_MAP_PCI_MEM
1038 +#elif defined(__sparc__) && defined(linux)
1039 +# define ARCH_PCI_INIT linuxPciInit
1040 #elif defined(__alpha__) && defined(linux)
1041 # define ARCH_PCI_INIT axpPciInit
1042 # define INCLUDE_XF86_MAP_PCI_MEM
1043 --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/bus/linuxPci.c.~1~ Sun Jun 3 19:44:41 2001
1044 +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/bus/linuxPci.c Sun Jun 3 19:44:48 2001
1046 #define PCI_CPU(val) (val)
1049 +/* Ioctls for /proc/bus/pci/X/Y nodes. */
1050 +#define PCIIOC_BASE ('P' << 24 | 'C' << 16 | 'I' << 8)
1051 +#define PCIIOC_CONTROLLER (PCIIOC_BASE | 0x00) /* Get controller for PCI device. */
1052 +#define PCIIOC_MMAP_IS_IO (PCIIOC_BASE | 0x01) /* Set mmap state to I/O space. */
1053 +#define PCIIOC_MMAP_IS_MEM (PCIIOC_BASE | 0x02) /* Set mmap state to MEM space. */
1054 +#define PCIIOC_WRITE_COMBINE (PCIIOC_BASE | 0x03) /* Enable/disable write-combining. */
1059 @@ -167,3 +174,129 @@
1064 +#ifndef INCLUDE_XF86_MAP_PCI_MEM
1066 +#ifdef HAVE_DOMAINS
1067 +int xf86GetPciDomain(PCITAG Tag)
1071 + if (-1 != (fd = linuxPciOpenFile(Tag))) {
1072 + int err = ioctl(fd, PCIIOC_CONTROLLER, 0);
1085 +xf86MapPciGeneric(int ScreenNum, int Flags, PCITAG Tag, ADDRESS Base,
1086 + unsigned long Size, int io_space)
1092 + if (-1 != (fd = linuxPciOpenFile(Tag))) {
1093 + ADDRESS realBase, alignOff;
1096 + int err, mapflags;
1099 + err = ioctl(fd, PCIIOC_MMAP_IS_IO, 0);
1101 + err = ioctl(fd, PCIIOC_MMAP_IS_MEM, 0);
1106 + if (Flags & VIDMEM_READSIDEEFFECT) {
1107 + save = pciReadLong(Tag, PCI_CMD_STAT_REG);
1108 + pciWriteLong(Tag, PCI_CMD_STAT_REG,
1109 + save & ~PCI_CMD_MEM_ENABLE);
1112 + mapflags = MAP_SHARED;
1113 +#if defined(__ia64__)
1114 +#ifndef MAP_WRITECOMBINED
1115 +#define MAP_WRITECOMBINED 0x00010000
1117 +#ifndef MAP_NONCACHED
1118 +#define MAP_NONCACHED 0x00020000
1120 + if (Flags & VIDMEM_FRAMEBUFFER)
1121 + mapflags |= MAP_WRITECOMBINED;
1123 + mapflags |= MAP_NONCACHED;
1124 +#else /* !(__ia64__) */
1125 + err = ioctl(fd, PCIIOC_WRITE_COMBINE,
1126 + (Flags & VIDMEM_FRAMEBUFFER) ? 1 : 0);
1128 + goto fail_restore_cmd_stat;
1131 + realBase = Base & ~(getpagesize() - 1);
1132 + alignOff = Base - realBase;
1134 + p = mmap(NULL, Size + alignOff, PROT_READ | PROT_WRITE,
1135 + mapflags, fd, realBase);
1137 + if (!p || p == (pointer) -1) {
1138 + FatalError("xf86MapPciMem: Could not mmap PCI memory "
1139 + "[base=0x%x,size=%x] (%s)\n",
1140 + Base, Size, strerror(errno));
1141 + goto fail_restore_cmd_stat;
1144 + if (Flags & VIDMEM_READSIDEEFFECT) {
1145 + xf86MapReadSideEffects(ScreenNum, Flags, p, Size);
1146 + pciWriteLong(Tag, PCI_CMD_STAT_REG, save);
1149 + xf86MakeNewMapping(ScreenNum, Flags, Base, Size, p);
1151 + return (pointer) ((char *)p + alignOff);
1153 + fail_restore_cmd_stat:
1154 + if (Flags & VIDMEM_READSIDEEFFECT)
1155 + pciWriteLong(Tag, PCI_CMD_STAT_REG, save);
1165 +xf86MapPciMem(int ScreenNum, int Flags, PCITAG Tag, ADDRESS Base,
1166 + unsigned long Size)
1168 + return xf86MapPciGeneric(ScreenNum, Flags, Tag,
1173 +xf86MapPciIo(int ScreenNum, int Flags, PCITAG Tag, ADDRESS Base,
1174 + unsigned long Size)
1176 + return xf86MapPciGeneric(ScreenNum, Flags, Tag,
1181 +xf86ReadPciBIOS(unsigned long Offset, PCITAG Tag, int basereg,
1182 + unsigned char *Buf, int Len)
1184 + xf86Msg(X_WARNING, "xf86ReadPciBIOS: Unsupported on this platform.\n");
1188 +#endif /* !(INCLUDE_XF86_MAP_PCI_MEM) */
1189 --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/bus/xf86Pci.h.~1~ Sun Jun 3 19:44:41 2001
1190 +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/bus/xf86Pci.h Sun Jun 3 19:44:48 2001
1192 ADDRESS Base, unsigned long Size);
1193 int xf86ReadPciBIOS(unsigned long Offset, PCITAG Tag, int basereg,
1194 unsigned char *Buf, int Len);
1195 +#ifdef HAVE_DOMAINS
1196 +int xf86GetPciDomain(PCITAG Tag);
1198 pciConfigPtr *xf86scanpci(int flags);
1200 /* Old sytle PCI access functions (for compatibility) */
1201 --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c.~1~ Sun Jun 3 19:44:41 2001
1202 +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/linux/lnxResource.c Sun Jun 3 19:44:48 2001
1205 resRange PciAvoid[] = {_PCI_AVOID_PC_STYLE, _END};
1207 +#define MIN_SYSTEM_DOMAIN 0
1208 +#ifdef HAVE_DOMAINS
1209 +#define MAX_SYSTEM_DOMAIN 255
1211 +#define MAX_SYSTEM_DOMAIN 0
1213 +#define ISA_SYSTEM_DOMAIN 0
1216 xf86BusAccWindowsFromOS(void)
1222 - RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
1223 - ret = xf86AddResToList(ret, &range, -1);
1224 + for (domain = MIN_SYSTEM_DOMAIN; domain <= MAX_SYSTEM_DOMAIN; domain++) {
1225 + RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock, domain);
1226 + ret = xf86AddResToList(ret, &range, -1);
1228 - RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock);
1229 - ret = xf86AddResToList(ret, &range, -1);
1230 + RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock, domain);
1231 + ret = xf86AddResToList(ret, &range, -1);
1237 -xf86PciBusAccWindowsFromOS(void)
1238 +xf86PciBusAccWindowsFromOS(int domain)
1243 * sparse address space are an image of the ISA bus range
1245 if (_bus_base_sparse()) {
1246 - RANGE(range, 0x00000000, 0x07ffffff, ResExcMemBlock);
1247 + RANGE(range, 0x00000000, 0x07ffffff, ResExcMemBlock, domain);
1248 ret = xf86AddResToList(ret, &range, -1);
1249 - RANGE(range, 0x09000000, 0x0fffffff, ResExcMemBlock);
1250 + RANGE(range, 0x09000000, 0x0fffffff, ResExcMemBlock, domain);
1251 ret = xf86AddResToList(ret, &range, -1);
1252 - RANGE(range, 0x11000000, 0x17ffffff, ResExcMemBlock);
1253 + RANGE(range, 0x11000000, 0x17ffffff, ResExcMemBlock, domain);
1254 ret = xf86AddResToList(ret, &range, -1);
1255 - RANGE(range, 0x19000000, 0x1fffffff, ResExcMemBlock);
1256 + RANGE(range, 0x19000000, 0x1fffffff, ResExcMemBlock, domain);
1257 ret = xf86AddResToList(ret, &range, -1);
1258 - RANGE(range, 0x21000000, 0x27ffffff, ResExcMemBlock);
1259 + RANGE(range, 0x21000000, 0x27ffffff, ResExcMemBlock, domain);
1260 ret = xf86AddResToList(ret, &range, -1);
1261 - RANGE(range, 0x29000000, 0x2fffffff, ResExcMemBlock);
1262 + RANGE(range, 0x29000000, 0x2fffffff, ResExcMemBlock, domain);
1263 ret = xf86AddResToList(ret, &range, -1);
1264 - RANGE(range, 0x31000000, 0x37ffffff, ResExcMemBlock);
1265 + RANGE(range, 0x31000000, 0x37ffffff, ResExcMemBlock, domain);
1266 ret = xf86AddResToList(ret, &range, -1);
1267 - RANGE(range, 0x39000000, 0x3fffffff, ResExcMemBlock);
1268 + RANGE(range, 0x39000000, 0x3fffffff, ResExcMemBlock, domain);
1269 ret = xf86AddResToList(ret, &range, -1);
1270 - RANGE(range, 0x41000000, 0x47ffffff, ResExcMemBlock);
1271 + RANGE(range, 0x41000000, 0x47ffffff, ResExcMemBlock, domain);
1272 ret = xf86AddResToList(ret, &range, -1);
1273 - RANGE(range, 0x49000000, 0x4fffffff, ResExcMemBlock);
1274 + RANGE(range, 0x49000000, 0x4fffffff, ResExcMemBlock, domain);
1275 ret = xf86AddResToList(ret, &range, -1);
1276 - RANGE(range, 0x51000000, 0x57ffffff, ResExcMemBlock);
1277 + RANGE(range, 0x51000000, 0x57ffffff, ResExcMemBlock, domain);
1278 ret = xf86AddResToList(ret, &range, -1);
1279 - RANGE(range, 0x59000000, 0x5fffffff, ResExcMemBlock);
1280 + RANGE(range, 0x59000000, 0x5fffffff, ResExcMemBlock, domain);
1281 ret = xf86AddResToList(ret, &range, -1);
1282 - RANGE(range, 0x61000000, 0x67ffffff, ResExcMemBlock);
1283 + RANGE(range, 0x61000000, 0x67ffffff, ResExcMemBlock, domain);
1284 ret = xf86AddResToList(ret, &range, -1);
1285 - RANGE(range, 0x69000000, 0x6fffffff, ResExcMemBlock);
1286 + RANGE(range, 0x69000000, 0x6fffffff, ResExcMemBlock, domain);
1287 ret = xf86AddResToList(ret, &range, -1);
1288 - RANGE(range, 0x71000000, 0x77ffffff, ResExcMemBlock);
1289 + RANGE(range, 0x71000000, 0x77ffffff, ResExcMemBlock, domain);
1290 ret = xf86AddResToList(ret, &range, -1);
1291 - RANGE(range, 0x79000000, 0x7fffffff, ResExcMemBlock);
1292 + RANGE(range, 0x79000000, 0x7fffffff, ResExcMemBlock, domain);
1293 ret = xf86AddResToList(ret, &range, -1);
1294 - RANGE(range, 0x81000000, 0x87ffffff, ResExcMemBlock);
1295 + RANGE(range, 0x81000000, 0x87ffffff, ResExcMemBlock, domain);
1296 ret = xf86AddResToList(ret, &range, -1);
1297 - RANGE(range, 0x89000000, 0x8fffffff, ResExcMemBlock);
1298 + RANGE(range, 0x89000000, 0x8fffffff, ResExcMemBlock, domain);
1299 ret = xf86AddResToList(ret, &range, -1);
1300 - RANGE(range, 0x91000000, 0x97ffffff, ResExcMemBlock);
1301 + RANGE(range, 0x91000000, 0x97ffffff, ResExcMemBlock, domain);
1302 ret = xf86AddResToList(ret, &range, -1);
1303 - RANGE(range, 0x99000000, 0x9fffffff, ResExcMemBlock);
1304 + RANGE(range, 0x99000000, 0x9fffffff, ResExcMemBlock, domain);
1305 ret = xf86AddResToList(ret, &range, -1);
1306 - RANGE(range, 0xa1000000, 0xa7ffffff, ResExcMemBlock);
1307 + RANGE(range, 0xa1000000, 0xa7ffffff, ResExcMemBlock, domain);
1308 ret = xf86AddResToList(ret, &range, -1);
1309 - RANGE(range, 0xa9000000, 0xafffffff, ResExcMemBlock);
1310 + RANGE(range, 0xa9000000, 0xafffffff, ResExcMemBlock, domain);
1311 ret = xf86AddResToList(ret, &range, -1);
1312 - RANGE(range, 0xb1000000, 0xb7ffffff, ResExcMemBlock);
1313 + RANGE(range, 0xb1000000, 0xb7ffffff, ResExcMemBlock, domain);
1314 ret = xf86AddResToList(ret, &range, -1);
1315 - RANGE(range, 0xb9000000, 0xbfffffff, ResExcMemBlock);
1316 + RANGE(range, 0xb9000000, 0xbfffffff, ResExcMemBlock, domain);
1317 ret = xf86AddResToList(ret, &range, -1);
1318 - RANGE(range, 0xc1000000, 0xc7ffffff, ResExcMemBlock);
1319 + RANGE(range, 0xc1000000, 0xc7ffffff, ResExcMemBlock, domain);
1320 ret = xf86AddResToList(ret, &range, -1);
1321 - RANGE(range, 0xc9000000, 0xcfffffff, ResExcMemBlock);
1322 + RANGE(range, 0xc9000000, 0xcfffffff, ResExcMemBlock, domain);
1323 ret = xf86AddResToList(ret, &range, -1);
1324 - RANGE(range, 0xd1000000, 0xd7ffffff, ResExcMemBlock);
1325 + RANGE(range, 0xd1000000, 0xd7ffffff, ResExcMemBlock, domain);
1326 ret = xf86AddResToList(ret, &range, -1);
1327 - RANGE(range, 0xd9000000, 0xdfffffff, ResExcMemBlock);
1328 + RANGE(range, 0xd9000000, 0xdfffffff, ResExcMemBlock, domain);
1329 ret = xf86AddResToList(ret, &range, -1);
1330 - RANGE(range, 0xe1000000, 0xe7ffffff, ResExcMemBlock);
1331 + RANGE(range, 0xe1000000, 0xe7ffffff, ResExcMemBlock, domain);
1332 ret = xf86AddResToList(ret, &range, -1);
1333 - RANGE(range, 0xe9000000, 0xefffffff, ResExcMemBlock);
1334 + RANGE(range, 0xe9000000, 0xefffffff, ResExcMemBlock, domain);
1335 ret = xf86AddResToList(ret, &range, -1);
1336 - RANGE(range, 0xf1000000, 0xf7ffffff, ResExcMemBlock);
1337 + RANGE(range, 0xf1000000, 0xf7ffffff, ResExcMemBlock, domain);
1338 ret = xf86AddResToList(ret, &range, -1);
1339 - RANGE(range, 0xf9000000, 0xffffffff, ResExcMemBlock);
1340 + RANGE(range, 0xf9000000, 0xffffffff, ResExcMemBlock, domain);
1341 ret = xf86AddResToList(ret, &range, -1);
1343 - RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
1344 + RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock, domain);
1345 ret = xf86AddResToList(ret, &range, -1);
1347 - RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock);
1348 + RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock, domain);
1349 ret = xf86AddResToList(ret, &range, -1);
1352 @@ -118,10 +129,10 @@
1356 - RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
1357 + RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock, ISA_SYSTEM_DOMAIN);
1358 ret = xf86AddResToList(ret, &range, -1);
1360 - RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock);
1361 + RANGE(range, 0x00000000, 0xffffffff, ResExcIoBlock, ISA_SYSTEM_DOMAIN);
1362 ret = xf86AddResToList(ret, &range, -1);
1365 @@ -130,6 +141,14 @@
1366 xf86AccResFromOS(resPtr ret)
1369 +#ifdef HAVE_DOMAINS
1370 + int domain = MIN_SYSTEM_DOMAIN;
1373 +#ifdef HAVE_DOMAINS
1375 + domain = ret->res_domain;
1379 * Fallback is to claim the following areas:
1381 * 0x000c0000 - 0x000effff location of VGA and other extensions ROMS
1384 - RANGE(range, 0x000c0000, 0x000effff, ResExcMemBlock);
1385 + RANGE(range, 0x000c0000, 0x000effff, ResExcMemBlock, domain);
1386 ret = xf86AddResToList(ret, &range, -1);
1389 @@ -145,20 +164,20 @@
1390 * along with their sparse I/O aliases, but that's too imprecise. Instead
1391 * claim a bare minimum here.
1393 - RANGE(range, 0x00000000, 0x000000ff, ResExcIoBlock); /* For mainboard */
1394 + RANGE(range, 0x00000000, 0x000000ff, ResExcIoBlock, domain); /* For mainboard */
1395 ret = xf86AddResToList(ret, &range, -1);
1398 * At minimum, the top and bottom resources must be claimed, so that
1399 * resources that are (or appear to be) unallocated can be relocated.
1401 - RANGE(range, 0x00000000, 0x00000000, ResExcMemBlock);
1402 + RANGE(range, 0x00000000, 0x00000000, ResExcMemBlock, domain);
1403 ret = xf86AddResToList(ret, &range, -1);
1404 - RANGE(range, 0xffffffff, 0xffffffff, ResExcMemBlock);
1405 + RANGE(range, 0xffffffff, 0xffffffff, ResExcMemBlock, domain);
1406 ret = xf86AddResToList(ret, &range, -1);
1407 -/* RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock);
1408 +/* RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock, domain);
1409 ret = xf86AddResToList(ret, &range, -1); */
1410 - RANGE(range, 0xffffffff, 0xffffffff, ResExcIoBlock);
1411 + RANGE(range, 0xffffffff, 0xffffffff, ResExcIoBlock, domain);
1412 ret = xf86AddResToList(ret, &range, -1);
1414 /* XXX add others */
1415 @@ -172,9 +191,18 @@
1419 +#ifndef HAVE_DOMAINS
1420 +#error This platform cannot operate correctly without HAVE_DOMAINS defined
1422 resRange PciAvoid[] = {_END};
1423 +#define MIN_SYSTEM_DOMAIN 0
1424 +#define MAX_SYSTEM_DOMAIN 255
1425 +#define ISA_SYSTEM_DOMAIN 0
1427 resRange PciAvoid[] = {_PCI_AVOID_PC_STYLE, _END};
1428 +#define MIN_SYSTEM_DOMAIN 0
1429 +#define MAX_SYSTEM_DOMAIN 0
1430 +#define ISA_SYSTEM_DOMAIN 0
1434 @@ -182,32 +210,36 @@
1440 - RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
1441 - ret = xf86AddResToList(ret, &range, -1);
1442 + for (domain = MIN_SYSTEM_DOMAIN; domain <= MAX_SYSTEM_DOMAIN; domain++) {
1443 + RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock, domain);
1444 + ret = xf86AddResToList(ret, &range, -1);
1447 - RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock);
1448 + RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock, domain);
1450 - RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
1451 + RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock, domain);
1453 - ret = xf86AddResToList(ret, &range, -1);
1454 + ret = xf86AddResToList(ret, &range, -1);
1461 -xf86PciBusAccWindowsFromOS(void)
1462 +xf86PciBusAccWindowsFromOS(int domain)
1467 - RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
1468 + RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock, domain);
1469 ret = xf86AddResToList(ret, &range, -1);
1472 - RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock);
1473 + RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock, domain);
1475 - RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
1476 + RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock, domain);
1478 ret = xf86AddResToList(ret, &range, -1);
1480 @@ -219,13 +251,13 @@
1484 - RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
1485 + RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock, ISA_SYSTEM_DOMAIN);
1486 ret = xf86AddResToList(ret, &range, -1);
1489 - RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock);
1490 + RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock, ISA_SYSTEM_DOMAIN);
1492 - RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
1493 + RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock, ISA_SYSTEM_DOMAIN);
1495 ret = xf86AddResToList(ret, &range, -1);
1497 @@ -235,21 +267,29 @@
1498 xf86AccResFromOS(resPtr ret)
1501 +#ifdef HAVE_DOMAINS
1502 + int domain = MIN_SYSTEM_DOMAIN;
1505 +#ifdef HAVE_DOMAINS
1507 + domain = ret->res_domain;
1511 * At minimum, the top and bottom resources must be claimed, so that
1512 * resources that are (or appear to be) unallocated can be relocated.
1514 - RANGE(range, 0x00000000, 0x00000000, ResExcMemBlock);
1515 + RANGE(range, 0x00000000, 0x00000000, ResExcMemBlock, domain);
1516 ret = xf86AddResToList(ret, &range, -1);
1517 - RANGE(range, 0xffffffff, 0xffffffff, ResExcMemBlock);
1518 + RANGE(range, 0xffffffff, 0xffffffff, ResExcMemBlock, domain);
1519 ret = xf86AddResToList(ret, &range, -1);
1520 - RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock);
1521 + RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock, domain);
1522 ret = xf86AddResToList(ret, &range, -1);
1524 - RANGE(range, 0x00ffffff, 0x00ffffff, ResExcIoBlock);
1525 + RANGE(range, 0x00ffffff, 0x00ffffff, ResExcIoBlock, domain);
1527 - RANGE(range, 0x0000ffff, 0x0000ffff, ResExcIoBlock);
1528 + RANGE(range, 0x0000ffff, 0x0000ffff, ResExcIoBlock, domain);
1530 ret = xf86AddResToList(ret, &range, -1);
1532 --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/shared/stdResource.c.~1~ Sun Jun 3 19:44:41 2001
1533 +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/shared/stdResource.c Sun Jun 3 19:44:48 2001
1535 resRange PciAvoid[] = {_PCI_AVOID_PC_STYLE, _END};
1538 +#define MIN_SYSTEM_DOMAIN 0
1539 +#define MAX_SYSTEM_DOMAIN 0
1540 +#define ISA_SYSTEM_DOMAIN 0
1543 xf86StdBusAccWindowsFromOS(void)
1545 /* Fallback is to allow addressing of all memory space */
1550 - RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
1551 - ret = xf86AddResToList(ret, &range, -1);
1552 + for (domain = MIN_SYSTEM_DOMAIN; domain <= MAX_SYSTEM_DOMAIN; domain++) {
1553 + RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock, domain);
1554 + ret = xf86AddResToList(ret, &range, -1);
1556 + /* Fallback is to allow addressing of all I/O space */
1557 + RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock, domain);
1558 + ret = xf86AddResToList(ret, &range, -1);
1561 - /* Fallback is to allow addressing of all I/O space */
1562 - RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
1563 - ret = xf86AddResToList(ret, &range, -1);
1568 -xf86StdPciBusAccWindowsFromOS(void)
1569 +xf86StdPciBusAccWindowsFromOS(int domain)
1571 /* Fallback is to allow addressing of all memory space */
1575 - RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
1576 + RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock, domain);
1577 ret = xf86AddResToList(ret, &range, -1);
1579 /* Fallback is to allow addressing of all I/O space */
1580 - RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
1581 + RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock, domain);
1582 ret = xf86AddResToList(ret, &range, -1);
1589 - RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
1590 + RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock, ISA_SYSTEM_DOMAIN);
1591 ret = xf86AddResToList(ret, &range, -1);
1593 /* Fallback is to allow addressing of all I/O space */
1594 - RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
1595 + RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock, ISA_SYSTEM_DOMAIN);
1596 ret = xf86AddResToList(ret, &range, -1);
1600 xf86StdAccResFromOS(resPtr ret)
1603 +#ifdef HAVE_DOMAINS
1604 + int domain = MIN_SYSTEM_DOMAIN;
1607 +#ifdef HAVE_DOMAINS
1609 + domain = ret->res_domain;
1613 * Fallback is to claim the following areas:
1614 @@ -91,22 +107,22 @@
1617 /* Fallback is to claim 0x0 - 0x9ffff and 0x100000 - 0x7fffffff */
1618 - RANGE(range, 0x00000000, 0x0009ffff, ResExcMemBlock);
1619 + RANGE(range, 0x00000000, 0x0009ffff, ResExcMemBlock, domain);
1620 ret = xf86AddResToList(ret, &range, -1);
1621 - RANGE(range, 0x000c0000, 0x000effff, ResExcMemBlock);
1622 + RANGE(range, 0x000c0000, 0x000effff, ResExcMemBlock, domain);
1623 ret = xf86AddResToList(ret, &range, -1);
1624 - RANGE(range, 0x000f0000, 0x000fffff, ResExcMemBlock);
1625 + RANGE(range, 0x000f0000, 0x000fffff, ResExcMemBlock, domain);
1626 ret = xf86AddResToList(ret, &range, -1);
1627 RANGE(range, 0x00100000, 0x3fffffff,
1628 - ResExcMemBlock | ResBios | ResEstimated);
1629 + ResExcMemBlock | ResBios | ResEstimated, domain);
1630 ret = xf86AddResToList(ret, &range, -1);
1632 - RANGE(range, 0xfec00000, 0xfecfffff, ResExcMemBlock | ResBios);
1633 + RANGE(range, 0xfec00000, 0xfecfffff, ResExcMemBlock | ResBios, domain);
1634 ret = xf86AddResToList(ret, &range, -1);
1635 - RANGE(range, 0xfee00000, 0xfeefffff, ResExcMemBlock | ResBios);
1636 + RANGE(range, 0xfee00000, 0xfeefffff, ResExcMemBlock | ResBios, domain);
1637 ret = xf86AddResToList(ret, &range, -1);
1639 - RANGE(range, 0xffe00000, 0xffffffff, ResExcMemBlock | ResBios);
1640 + RANGE(range, 0xffe00000, 0xffffffff, ResExcMemBlock | ResBios, domain);
1641 ret = xf86AddResToList(ret, &range, -1);
1644 @@ -114,20 +130,20 @@
1645 * along with their sparse I/O aliases, but that's too imprecise. Instead
1646 * claim a bare minimum here.
1648 - RANGE(range, 0x00000000, 0x000000ff, ResExcIoBlock); /* For mainboard */
1649 + RANGE(range, 0x00000000, 0x000000ff, ResExcIoBlock, domain); /* For mainboard */
1650 ret = xf86AddResToList(ret, &range, -1);
1653 * At minimum, the top and bottom resources must be claimed, so that
1654 * resources that are (or appear to be) unallocated can be relocated.
1656 -/* RANGE(range, 0x00000000, 0x00000000, ResExcMemBlock);
1657 +/* RANGE(range, 0x00000000, 0x00000000, ResExcMemBlock, domain);
1658 ret = xf86AddResToList(ret, &range, -1);
1659 - RANGE(range, 0xffffffff, 0xffffffff, ResExcMemBlock);
1660 + RANGE(range, 0xffffffff, 0xffffffff, ResExcMemBlock, domain);
1661 ret = xf86AddResToList(ret, &range, -1);
1662 - RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock);
1663 + RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock, domain);
1664 ret = xf86AddResToList(ret, &range, -1); */
1665 - RANGE(range, 0x0000ffff, 0x0000ffff, ResExcIoBlock);
1666 + RANGE(range, 0x0000ffff, 0x0000ffff, ResExcIoBlock, domain);
1667 ret = xf86AddResToList(ret, &range, -1);
1669 /* XXX add others */
1670 --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/shared/vidmem.c.~1~ Sun Jun 3 19:44:41 2001
1671 +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/shared/vidmem.c Sun Jun 3 19:44:48 2001
1672 @@ -135,6 +135,29 @@
1677 +xf86MakeNewMapping(int ScreenNum, int Flags, unsigned long Base, unsigned long Size, pointer Vbase)
1682 + vp = getVidMapRec(ScreenNum);
1683 + mp = newMapping(vp);
1684 + mp->physBase = Base;
1686 + mp->virtBase = Vbase;
1687 + mp->flags = Flags;
1691 +xf86InitVidMem(void)
1693 + if (!vidMemInfo.initialised) {
1694 + memset(&vidMemInfo, 0, sizeof(VidMemInfo));
1695 + xf86OSInitVidMem(&vidMemInfo);
1700 xf86MapVidMem(int ScreenNum, int Flags, unsigned long Base, unsigned long Size)
1702 --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/xf86_OSproc.h.~1~ Sun Jun 3 19:44:41 2001
1703 +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/os-support/xf86_OSproc.h Sun Jun 3 19:44:48 2001
1705 /* public functions */
1706 extern Bool xf86LinearVidMem(void);
1707 extern Bool xf86CheckMTRR(int);
1708 +extern void xf86MakeNewMapping(int, int, unsigned long, unsigned long, pointer);
1709 +extern void xf86InitVidMem(void);
1710 extern pointer xf86MapVidMem(int, int, unsigned long, unsigned long);
1711 extern void xf86UnMapVidMem(int, pointer, unsigned long);
1712 extern void xf86MapReadSideEffects(int, int, pointer, unsigned long);
1713 @@ -235,13 +237,13 @@
1714 /* RAC-related privs */
1715 /* internal to os-support layer */
1716 resPtr xf86StdBusAccWindowsFromOS(void);
1717 -resPtr xf86StdPciAccWindowsFromOS(void);
1718 +resPtr xf86StdPciAccWindowsFromOS(int domain);
1719 resPtr xf86StdIsaAccWindowsFromOS(void);
1720 resPtr xf86StdAccResFromOS(resPtr ret);
1722 /* available to the common layer */
1723 resPtr xf86BusAccWindowsFromOS(void);
1724 -resPtr xf86PciBusAccWindowsFromOS(void);
1725 +resPtr xf86PciBusAccWindowsFromOS(int domain);
1726 resPtr xf86IsaBusAccWindowsFromOS(void);
1727 resPtr xf86AccResFromOS(resPtr ret);
1728 #endif /* NEED_OS_RAC_PROTOS */