relocator: Switch to own page table while moving chunks

We need to avoid clobbering existing table between starting of chunk movers
and the moment we install target page table. Generate temporary table for
this rather than hoping that we don't clobber existing one.

Fixes 64-bit GhostBSD on 64-bit EFI.

Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Vladimir Serbinenko authored and Daniel Kiper committed 2025-08-15 00:23:45 +02:00
1 parent 67a95527b5
commit 6898fcf74d
5 files changed
+123 -2

No files matched your search

+4 -1
View File
@@ -110,7 +110,7 @@ grub_relocator_new (void)
return NULL;
ret->postchunks = ~(grub_phys_addr_t) 0;
ret->relocators_size = grub_relocator_jumper_size;
ret->relocators_size = grub_relocator_jumper_size + grub_relocator_preamble_size;
grub_dprintf ("relocator", "relocators_size=%lu\n",
(unsigned long) ret->relocators_size);
return ret;
@@ -1605,6 +1605,9 @@ grub_relocator_prepare_relocs (struct grub_relocator *rel, grub_addr_t addr,
grub_free (to);
}
grub_cpu_relocator_preamble (rels);
rels += grub_relocator_preamble_size;
for (j = 0; j < nchunks; j++)
{
grub_dprintf ("relocator", "sorted chunk %p->%p, 0x%lx\n",