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 cmake: app mem partion flexibility 2019-11-05 08:44:26 -08:00
backports cmake: Fixed a bug where python 3.8 was not detected on Windows 2019-11-04 14:32:41 +01:00
bintools cmake: Toolchain abstraction: Abstraction of binary tool, strip. 2019-08-02 13:05:59 +02:00
compiler cmake: toolchain: Fix 'host' toolchain variant 2020-01-07 13:25:47 -05:00
emu x86: intel64: Split 'locore' and 'main' kernel images for QEMU 2020-01-08 07:49:24 -06:00
flash cmake: Don't test whether the installed west is the bootstrapper 2019-11-05 17:43:50 +01:00
ide license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
linker/ld cmake: ld: use linker prefix for undefined symbols 2020-01-07 17:09:38 +01:00
reports license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
toolchain toolchain: xcc: use Clang if exists 2020-01-07 17:09:38 +01:00
usage cmake: Split out board listing from usage 2019-04-25 09:14:06 -07:00
util license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
boards.cmake cmake: Split out board listing from usage 2019-04-25 09:14:06 -07:00
ccache.cmake license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
cfb.cmake generated/cfb_font_dice.h: don't leak absolute paths in comment 2019-06-19 08:40:59 -04:00
dts.cmake cmake: dts fixups 2019-12-18 21:42:43 +01:00
extensions.cmake cmake: Add sorting of linker snippets by key 2019-12-20 08:54:53 -05:00
extra_flags.cmake cmake: extra_flags: fix EXTRA_CPPFLAGS being applied as macros 2019-12-13 13:23:40 -05:00
gcc-m-cpu.cmake arch: arm: Add Cortex-R5 support 2019-08-09 22:50:50 +02:00
generic_toolchain.cmake cmake: Toolchain abstraction: Abstraction of binary tools, foundation. 2019-07-31 11:09:35 +02:00
git.cmake cmake: explain BUILD_VERSION and KERNEL_VERSION_* 2019-05-09 11:52:05 +02:00
hex.cmake license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
host-tools.cmake cmake: -fmacro-prefix-map=${WEST_TOPDIR}=WEST_TOPDIR 2019-11-06 21:17:56 +01:00
kconfig.cmake cmake: make shield list available to Kconfig 2020-01-02 17:02:41 -05:00
kobj.cmake cmake: Fix missing dependency 2019-05-16 07:47:18 -05:00
pristine.cmake license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
python.cmake cmake: require python 3.6 or later 2019-12-18 10:15:45 +01:00
target_toolchain.cmake cmake: Toolchain abstraction: Abstraction of binary tools, foundation. 2019-07-31 11:09:35 +02:00
version.cmake cmake: explain BUILD_VERSION and KERNEL_VERSION_* 2019-05-09 11:52:05 +02:00
zephyr_module.cmake cmake: zephyr_modules: Add west executable argument 2019-05-03 14:23:09 -04:00