zephyr/cmake
Stephanos Ioannidis 04e874485b x86: intel64: Split 'locore' and 'main' kernel images for QEMU
This commit splits the 'locore' and 'main' memory regions into
separate executable images and specifies the 'locore' as the boot
kernel, in order to prevent the QEMU direct multiboot kernel loader
from overwriting the BIOS and option ROM areas located in between
the two memory regions.

The Zephyr x86-64 kernel image consists of two discontiguous load
memory regions: 'locore' at 0x8000 and 'main' at 0x100000, but the
QEMU treats these as single contiguous memory region starting at
0x8000 and ending at (0x100000 + MAIN_IMAGE_SIZE - 1).

This results in the direct multiboot kernel loader overwriting the
BIOS and option ROM areas as part of the kernel loading process, and
causes any writable system regions to be corrupted (e.g. KVMVAPIC ROM).

By splitting the two discontiguous memory regions into separate images
and specifying only the boot image (i.e. 'locore') as the '-kernel',
it is possible to work around the QEMU direct kernel loading design
limitation.

This workaround is required to support the QEMU v4.2.0 and above.

For more details, refer to the issue zephyrproject-rtos/sdk-ng#168.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-01-08 07:49:24 -06:00
..
app
backports
bintools
compiler
emu x86: intel64: Split 'locore' and 'main' kernel images for QEMU 2020-01-08 07:49:24 -06:00
flash
ide
linker/ld
reports
toolchain
usage
util
boards.cmake
ccache.cmake
cfb.cmake
dts.cmake
extensions.cmake
extra_flags.cmake
gcc-m-cpu.cmake
generic_toolchain.cmake
git.cmake
hex.cmake
host-tools.cmake
kconfig.cmake
kobj.cmake
pristine.cmake
python.cmake
target_toolchain.cmake
version.cmake
zephyr_module.cmake