Exemple #1
0
static pointer
armMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
{
	struct memAccess *memInfoP;
	
	if((memInfoP = checkMapInfo(FALSE, Region)) != NULL)
	{
	    /*
	     ** xf86 passes in a physical address offset from the start
	     ** of physical memory, but xf86MapInfoMap expects an 
	     ** offset from the start of the specified region - it gets 
	     ** the physical address of the region from the display driver.
	     */
	    switch(Region)
	    {
	        case LINEAR_REGION:
		    if (vgaPhysLinearBase)
		    {
			Base -= vgaPhysLinearBase;
		    }
		    break;
		case VGA_REGION:
		    Base -= 0xA0000;
		    break;
	    }
	    
	    base = xf86MapInfoMap(memInfoP, Base, Size);
	    return (base);
	}
	return mapVidMem(ScreenNum, Base, Size, flags);
}
Exemple #2
0
static void
armUnmapVidMem(int ScreenNum, void *Base, unsigned long Size)
{
    struct memAccess *memInfoP;

    if ((memInfoP = checkMapInfo(FALSE, Region)) != NULL) {
        xf86MapInfoUnmap(memInfoP, Base, Size);
    }
    unmapVidMem(ScreenNum, Base, Size);
}