]> xenbits.xensource.com Git - xen.git/commit
xen/arm64: check XSM Magic from the second unknown module.
authorFu Wei <fu.wei@linaro.org>
Tue, 5 Apr 2016 16:46:36 +0000 (00:46 +0800)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 8 Apr 2016 15:58:51 +0000 (11:58 -0400)
commitca32012341f3de7d3975407fb963e6028f0d0c8b
treeffc79acab738c01af00bd4da6a58d091642d43fb
parentc7445d8c8eb34ca97cd2a28cc9d874df40d94557
xen/arm64: check XSM Magic from the second unknown module.

This patch adds a has_xsm_magic helper function for detecting XSM
from the second unknown module.

If Xen can't get the kind of module from compatible, we guess the kind of
these unknowns respectively:
    (1) The first unknown must be kernel.
    (2) Detect the XSM Magic from the 2nd unknown:
        a. If it's XSM, set the kind as XSM, and that also means we
won't load ramdisk;
b. if it's not XSM, set the kind as ramdisk.
So if user want to load ramdisk, it must be the 2nd unknown.
We also detect the XSM Magic for the following unknowns, then set its kind
according to the return value of has_xsm_magic.

By this way, arm64 behavior can be compatible to x86 and can simplify
multi-arch bootloader such as GRUB.

Signed-off-by: Fu Wei <fu.wei@linaro.org>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Acked-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/bootfdt.c
xen/include/xsm/xsm.h
xen/xsm/xsm_core.c
xen/xsm/xsm_policy.c