store = mga_readb(vm, 0x1234); 
static int matroxfb_getmemory(WPMINFO unsigned int maxSize, unsigned int *realSize){	vaddr_t vm;	unsigned int offs;	unsigned int offs2;	unsigned char store, orig;	unsigned char bytes[32];	unsigned char* tmp;	DBG(__FUNCTION__)	vm = ACCESS_FBINFO(video.vbase);	maxSize &= ~0x1FFFFF;	/* must be X*2MB (really it must be 2 or X*4MB) */	/* at least 2MB */	if (maxSize < 0x0200000) return 0;	if (maxSize > 0x2000000) maxSize = 0x2000000;	mga_outb(M_EXTVGA_INDEX, 0x03);	orig = mga_inb(M_EXTVGA_DATA);	mga_outb(M_EXTVGA_DATA, orig | 0x80);	store = mga_readb(vm, 0x1234);	tmp = bytes;	for (offs = 0x100000; offs < maxSize; offs += 0x200000)		*tmp++ = mga_readb(vm, offs);	for (offs = 0x100000; offs < maxSize; offs += 0x200000)		mga_writeb(vm, offs, 0x02);	if (ACCESS_FBINFO(features.accel.has_cacheflush))		mga_outb(M_CACHEFLUSH, 0x00);	else		mga_writeb(vm, 0x1234, 0x99);	for (offs = 0x100000; offs < maxSize; offs += 0x200000) {		if (mga_readb(vm, offs) != 0x02)			break;		mga_writeb(vm, offs, mga_readb(vm, offs) - 0x02);		if (mga_readb(vm, offs))			break;	}	tmp = bytes;	for (offs2 = 0x100000; offs2 < maxSize; offs2 += 0x200000)		mga_writeb(vm, offs2, *tmp++);	mga_writeb(vm, 0x1234, store);	mga_outb(M_EXTVGA_INDEX, 0x03);	mga_outb(M_EXTVGA_DATA, orig);	*realSize = offs - 0x100000;#ifdef CONFIG_FB_MATROX_MILLENIUM	ACCESS_FBINFO(interleave) = !(!isMillenium(MINFO) || ((offs - 0x100000) & 0x3FFFFF));#endif	return 1;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/6c12f30554f29069afd485ecd05a1d54c8aece9f/matroxfb_base.c/clean/drivers/video/matrox/matroxfb_base.c