On 20/03/2024 6:00 pm, Shawn Anastasio wrote:
> Some boot mechanisms, including the new linux file_load kexec systemcall
> used by system firmware v2.10 on RaptorCS systems will try to honor the
> physical address field of the ELF LOAD section header, which will fail
> when the address is based off of XEN_VIRT_START (0xc000000000000000).
>
> To ensure that the physical address of the LOAD section header starts at
> 0x0, import the DECL_SECTION macro from x86's xen.lds.S.
>
> Signed-off-by: Shawn Anastasio <sanasta...@raptorengineering.com>
> ---
>  xen/arch/ppc/xen.lds.S | 30 ++++++++++++++++++------------
>  1 file changed, 18 insertions(+), 12 deletions(-)
>
> diff --git a/xen/arch/ppc/xen.lds.S b/xen/arch/ppc/xen.lds.S
> index 05b6db2728..0ed285f0a7 100644
> --- a/xen/arch/ppc/xen.lds.S
> +++ b/xen/arch/ppc/xen.lds.S
> @@ -4,6 +4,12 @@
>  OUTPUT_ARCH(powerpc:common64)
>  ENTRY(start)
>  
> +#ifdef CONFIG_LD_IS_GNU
> +# define DECL_SECTION(x) x : AT(ADDR(#x) - XEN_VIRT_START)
> +#else
> +# define DECL_SECTION(x) x : AT(ADDR(x) - XEN_VIRT_START)
> +#endif

Could you put this in xen.lds.h please, and dedup it from x86 ?

With that done, Acked-by: Andrew Cooper <andrew.coop...@citrix.com>

Reply via email to