mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-29 12:35:48 +00:00
When LaaG boots with bzImage module file, only protected mode code need to be loaded to guest space since the VM will boot from protected mode directly. Futhermore, per Linux boot protocol the protected mode code better to be aligned with kernel_alignment field in zeropage, otherwise kernel will take time to do "rep movs" to the aligned address. In previous code, the bzImage is loaded to the address where aligned with kernel_alignment, this would make the protected mode code unalign with kernel_alignment. If the kernel is configured with CONFIG_RELOCATABLE=n, the guest would not boot. This patch fixed this issue. Tracked-On: #6323 Signed-off-by: Victor Sun <victor.sun@intel.com> Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>