]> xenbits.xensource.com Git - xen.git/commit
xen/common: dom0less: introduce common kernel.c
authorOleksii Kurochko <oleksii.kurochko@gmail.com>
Mon, 5 May 2025 18:10:36 +0000 (20:10 +0200)
committerStefano Stabellini <stefano.stabellini@amd.com>
Mon, 5 May 2025 21:38:59 +0000 (14:38 -0700)
commita7ee73f581575d29098140a0ae32da1755262de1
tree704a3864832ec20bf0665d692c2cd0c9cacd2258
parenta03848f23b91905e764bfce37e10ae7c4dfcd512
xen/common: dom0less: introduce common kernel.c

The following functions don't have arch specific things so it is moved to
common:
- kernel_prboe()
- kernel_load()
- output_length()

Functions necessary for dom0less are only moved.

The following changes are done:
- Swap __init and return type of kernel_decompress() function to be
  consistent with defintions of functions in other files. The same
  for output_length().
- Wrap by "ifdef CONFIG_ARM" the call of kernel_uimage_probe() in
  kernel_probe() as uImage isn't really used nowadays thereby leave
  kernel_uimage_probe() call here just for compatability with Arm code.
- Introduce kernel_zimage_probe() to cover the case that arch can have
  different zimage header.
- Add ASSERT() for kernel_load() to check that it argument isn't NULL.
- Make kernel_uimage_probe() non-static in Arm's code as it is used in
  common/kernel.c.

Introduce CONFIG_DOMAIN_BUILD_HELPERS to not provide stubs for archs
which don't provide enough functionality to enable it.
Select CONFIG_DOMAIN_BUILD_HELPERS for CONFIG_ARM as only Arm supports
it, at the moment.

Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/Kconfig
xen/arch/arm/kernel.c
xen/common/Kconfig
xen/common/device-tree/Makefile
xen/common/device-tree/kernel.c [new file with mode: 0644]
xen/include/xen/fdt-kernel.h