mlen = (Offset + Len + psize - 1) & ~psize;
mlen = (Offset + Len + psize - 1) & ~(psize - 1);
int xf86ReadBIOS(Base, Offset, Buf, Len)unsigned long Base;unsigned long Offset;unsigned char *Buf;int Len;{	int fd;	unsigned char *ptr;	int mlen;	int psize = 4096;	/* XXX x86 only */	if ((fd = open(DEV_MEM, O_RDONLY)) < 0)	{		ErrorF("xf86ReadBios: Failed to open %s (%s)\n", DEV_MEM,		       strerror(errno));		return(-1);	}	mlen = (Offset + Len + psize - 1) & ~psize;	ptr = (unsigned char *)mmap((caddr_t)0, mlen, PROT_READ, MAP_SHARED,				    fd, (off_t)Base);	if ((int)ptr == -1)	{		ErrorF("xf86ReadBios: %s mmap failed\n", DEV_MEM);		close(fd);		return(-1);	}	(void)memcpy(Buf, (void *)(ptr + Offset), Len);	(void)munmap((caddr_t)ptr, mlen);	(void)close(fd);	return(Len);}