lkml.org 
[lkml]   [2017]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kexec, x86/purgatory: Cleanup the unholy mess
On Fri, 10 Mar 2017, Mike Galbraith wrote:
> Stuffing the lot into .kexec-purgatory worked.

You beat me to it :)

And that's how that whole thing should have been done in the very beginning
instead of relying on uncomprehensible compile/link magics.

Thanks,

tglx

> ---
> arch/x86/purgatory/purgatory.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> --- a/arch/x86/purgatory/purgatory.c
> +++ b/arch/x86/purgatory/purgatory.c
> @@ -16,13 +16,13 @@
> #include "sha256.h"
> #include "../boot/string.h"
>
> -unsigned long purgatory_backup_dest;
> -unsigned long purgatory_backup_src;
> -unsigned long purgatory_backup_sz;
> +unsigned long purgatory_backup_dest __section(.kexec-purgatory);
> +unsigned long purgatory_backup_src __section(.kexec-purgatory);
> +unsigned long purgatory_backup_sz __section(.kexec-purgatory);
>
> -u8 purgatory_sha256_digest[SHA256_DIGEST_SIZE];
> +u8 purgatory_sha256_digest[SHA256_DIGEST_SIZE] __section(.kexec-purgatory);
>
> -struct kexec_sha_region purgatory_sha_regions[KEXEC_SEGMENT_MAX];
> +struct kexec_sha_region purgatory_sha_regions[KEXEC_SEGMENT_MAX] __section(.kexec-purgatory);
>
> /*
> * On x86, second kernel requries first 640K of memory to boot. Copy
>

\
 
 \ /
  Last update: 2017-03-10 15:57    [W:0.252 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site