x86/boot: Clean up l?_bootmap[] construction
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 6 Jan 2020 13:37:54 +0000 (13:37 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 10 Jan 2020 17:45:30 +0000 (17:45 +0000)
commita8d27a54cc9cccac38a515cdf6339d5ef9d4fcb8
treeda3db345e9ed24fecb37bb92141473edc4e5bc26
parent7cd7f2f5e116933624bc3e6c9fb47976ab0a42a7
x86/boot: Clean up l?_bootmap[] construction

The need for Xen to be identity mapped into the bootmap is not obvious, and
differs between the MB and EFI boot paths.

The EFI side is further complicated by an attempt to cope with with l2_bootmap
only being 4k long.  This is undocumented, confusing, only works if Xen is the
single object wanting mapping.

The pageables are common to both the MB and EFI builds, so simplify the EFI
bootmap construction code to make exactly one identity-map of Xen, which now
makes the two paths consistent.  Comment both pieces of logic, explaining what
the mappings are needed for.

Finally, leave a linker assert covering the fact that plenty of code blindly
assumes that Xen is less that 16M.  This wants fixing in due course.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/boot/head.S
xen/arch/x86/efi/efi-boot.h
xen/arch/x86/xen.lds.S