plan 9 kernel history: overview | file list | diff list

2000/0611/pc/vgamach64xx.c (diff list | history)

2000/0606/sys/src/9/pc/vgamach64xx.c:85,912000/0611/sys/src/9/pc/vgamach64xx.c:85,91 (short | long | prev | next)
1998/0507    
mach64xxlinear(VGAscr* scr, int* size, int* align) 
{ 
1999/1005    
	ulong aperture, osize, oaperture; 
1998/0507    
	int oapsize, wasupamem; 
2000/0611    
	int i, oapsize, wasupamem; 
1998/0507    
	Pcidev *p; 
1999/1005    
	Physseg seg; 
1998/0507    
 
2000/0606/sys/src/9/pc/vgamach64xx.c:93,1082000/0611/sys/src/9/pc/vgamach64xx.c:93,118
1998/0507    
	oaperture = scr->aperture; 
	oapsize = scr->apsize; 
	wasupamem = scr->isupamem; 
	if(wasupamem) 
		upafree(oaperture, oapsize); 
	scr->isupamem = 0; 
 
	if(p = mach64xxpci()){ 
		aperture = p->mem[0].bar & ~0x0F; 
		*size = p->mem[0].size; 
2000/0611    
		for(i=0; i<nelem(p->mem); i++){ 
			if(p->mem[i].size >= *size 
			&& ((p->mem[i].bar & ~0x0F) & (*align-1)) == 0) 
				break; 
		} 
		if(i >= nelem(p->mem)){ 
			print("vgamach64xx: aperture not found\n"); 
			return 0; 
		} 
		aperture = p->mem[i].bar & ~0x0F; 
		*size = p->mem[i].size; 
1998/0507    
	} 
	else 
		aperture = 0; 
2000/0611    
 
	if(wasupamem) 
		upafree(oaperture, oapsize); 
	scr->isupamem = 0; 
1998/0507    
 
	aperture = upamalloc(aperture, *size, *align); 
	if(aperture == 0){ 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)