Align scratch

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-09-22 00:52:33 +02:00
parent bf5f1dc6d2
commit 67c4bb722d

View file

@ -87,13 +87,16 @@ find_scratch (void *src, void *dst, unsigned long srcsize,
/* Decoding from ROM. */
if (((grub_addr_t) src & 0x10000000))
{
grub_decompressor_scratch = (char *) dst + dstsize;
grub_decompressor_scratch = (void *) ALIGN_UP((grub_addr_t) dst + dstsize,
256);
return;
}
#endif
if ((char *) src + srcsize > (char *) dst + dstsize)
grub_decompressor_scratch = (char *) src + srcsize;
grub_decompressor_scratch = (void *) ALIGN_UP ((grub_addr_t) src + srcsize,
256);
else
grub_decompressor_scratch = (char *) dst + dstsize;
grub_decompressor_scratch = (void *) ALIGN_UP ((grub_addr_t) dst + dstsize,
256);
return;
}