/* Write a 4 or 8 byte big endian cell  */
static void write_cell(u8 *addr, u64 val, int size)
/* Write a 4 or 8 byte big endian cell  */
static void write_cell(u8 *addr, u64 val, int size)
{
	int shift = (size - 1) * 8;
	while (size-- > 0) {
		*addr++ = (val >> shift) & 0xff;
		shift -= 8;
	}
}