Added needed casts
This commit is contained in:
parent
73f6ce4ab2
commit
37480ee490
1 changed files with 15 additions and 8 deletions
|
@ -40,7 +40,8 @@ grub_relocator_new (void)
|
||||||
|
|
||||||
ret->postchunks = ~(grub_addr_t) 0;
|
ret->postchunks = ~(grub_addr_t) 0;
|
||||||
ret->relocators_size = grub_relocator_jumper_size;
|
ret->relocators_size = grub_relocator_jumper_size;
|
||||||
grub_dprintf ("relocator", "relocators_size=%ld\n", ret->relocators_size);
|
grub_dprintf ("relocator", "relocators_size=%lu\n",
|
||||||
|
(unsigned long) ret->relocators_size);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,7 +104,8 @@ get_best_header (struct grub_relocator *rel,
|
||||||
hb = h;
|
hb = h;
|
||||||
hbp = hp;
|
hbp = hp;
|
||||||
*best_addr = addr;
|
*best_addr = addr;
|
||||||
grub_dprintf ("relocator", "picked %p/%lx\n", hb, addr);
|
grub_dprintf ("relocator", "picked %p/%lx\n", hb,
|
||||||
|
(unsigned long) addr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -146,7 +148,8 @@ get_best_header (struct grub_relocator *rel,
|
||||||
hb = h;
|
hb = h;
|
||||||
hbp = hp;
|
hbp = hp;
|
||||||
*best_addr = addr;
|
*best_addr = addr;
|
||||||
grub_dprintf ("relocator", "picked %p/%lx\n", hb, addr);
|
grub_dprintf ("relocator", "picked %p/%lx\n", hb,
|
||||||
|
(unsigned long) addr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -221,7 +224,8 @@ malloc_in_range (struct grub_relocator *rel,
|
||||||
hb = get_best_header (rel, start, end, align, size, rb, &hbp, &best_addr,
|
hb = get_best_header (rel, start, end, align, size, rb, &hbp, &best_addr,
|
||||||
from_low_priv, collisioncheck);
|
from_low_priv, collisioncheck);
|
||||||
|
|
||||||
grub_dprintf ("relocator", "best header %p/%lx\n", hb, best_addr);
|
grub_dprintf ("relocator", "best header %p/%lx\n", hb,
|
||||||
|
(unsigned long) best_addr);
|
||||||
|
|
||||||
if (!hb)
|
if (!hb)
|
||||||
{
|
{
|
||||||
|
@ -421,14 +425,16 @@ grub_relocator_alloc_chunk_addr (struct grub_relocator *rel, void **src,
|
||||||
rel->highestnonpostaddr = start + size;
|
rel->highestnonpostaddr = start + size;
|
||||||
}
|
}
|
||||||
|
|
||||||
grub_dprintf ("relocator", "relocators_size=%ld\n", rel->relocators_size);
|
grub_dprintf ("relocator", "relocators_size=%ld\n",
|
||||||
|
(unsigned long) rel->relocators_size);
|
||||||
|
|
||||||
if (start < target)
|
if (start < target)
|
||||||
rel->relocators_size += grub_relocator_backward_size;
|
rel->relocators_size += grub_relocator_backward_size;
|
||||||
if (start > target)
|
if (start > target)
|
||||||
rel->relocators_size += grub_relocator_forward_size;
|
rel->relocators_size += grub_relocator_forward_size;
|
||||||
|
|
||||||
grub_dprintf ("relocator", "relocators_size=%ld\n", rel->relocators_size);
|
grub_dprintf ("relocator", "relocators_size=%ld\n",
|
||||||
|
(unsigned long) rel->relocators_size);
|
||||||
|
|
||||||
chunk->src = start;
|
chunk->src = start;
|
||||||
chunk->target = target;
|
chunk->target = target;
|
||||||
|
@ -486,7 +492,8 @@ grub_relocator_alloc_chunk_align (struct grub_relocator *rel, void **src,
|
||||||
|
|
||||||
adjust_limits (rel, &min_addr2, &max_addr2, min_addr, max_addr);
|
adjust_limits (rel, &min_addr2, &max_addr2, min_addr, max_addr);
|
||||||
grub_dprintf ("relocator", "Adjusted limits from %lx-%lx to %lx-%lx\n",
|
grub_dprintf ("relocator", "Adjusted limits from %lx-%lx to %lx-%lx\n",
|
||||||
min_addr, max_addr, min_addr2, max_addr2);
|
(unsigned long) min_addr, (unsigned long) max_addr,
|
||||||
|
(unsigned long) min_addr2, (unsigned long) max_addr2);
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
@ -573,7 +580,7 @@ grub_relocator_prepare_relocs (struct grub_relocator *rel, grub_addr_t addr,
|
||||||
grub_addr_t rels0;
|
grub_addr_t rels0;
|
||||||
|
|
||||||
grub_dprintf ("relocator", "Preparing relocs (size=%ld)\n",
|
grub_dprintf ("relocator", "Preparing relocs (size=%ld)\n",
|
||||||
rel->relocators_size);
|
(unsigned long) rel->relocators_size);
|
||||||
|
|
||||||
if (!malloc_in_range (rel, 0, ~(grub_addr_t)0 - rel->relocators_size + 1,
|
if (!malloc_in_range (rel, 0, ~(grub_addr_t)0 - rel->relocators_size + 1,
|
||||||
grub_relocator_align,
|
grub_relocator_align,
|
||||||
|
|
Loading…
Reference in a new issue