mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
x86/boot: Allocate one extra module slot for Xen image placement
Commit9589927(x86/mb2: avoid Xen image when looking for module/crashkernel position) fixed relocation issues for Multiboot2 protocol. Unfortunately it missed to allocate module slot for Xen image placement in early boot path. So, let's fix it right now. Reported-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> master commit:4c5f9dbebcmaster date: 2018-09-27 11:17:47 +0100
This commit is contained in:
1 parent
451f9c8e02
commit
a2e35a7592
1 file changed
+6
-1
@@ -177,7 +177,12 @@ static multiboot_info_t *mbi2_reloc(u32 mbi_in)
|
||||
if ( mbi_out->mods_count )
|
||||
{
|
||||
mbi_out->flags |= MBI_MODULES;
|
||||
mbi_out->mods_addr = alloc_mem(mbi_out->mods_count * sizeof(*mbi_out_mods));
|
||||
/*
|
||||
* We have to allocate one more module slot here. At some point
|
||||
* __start_xen() may put Xen image placement into it.
|
||||
*/
|
||||
mbi_out->mods_addr = alloc_mem((mbi_out->mods_count + 1) *
|
||||
sizeof(*mbi_out_mods));
|
||||
mbi_out_mods = _p(mbi_out->mods_addr);
|
||||
}
|
||||
|
||||
|
||||