From: Joerg Roedel <jroedel@suse.de>
To: Arvind Sankar <nivedita@alum.mit.edu>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/5] x86/boot: Initialize boot_params in startup code
Date: Thu, 8 Oct 2020 11:04:20 +0200 [thread overview]
Message-ID: <20201008090420.GD3209@suse.de> (raw)
In-Reply-To: <20201007195351.776555-2-nivedita@alum.mit.edu>
On Wed, Oct 07, 2020 at 03:53:47PM -0400, Arvind Sankar wrote:
> Save the boot_params pointer passed in by the bootloader in
> startup_32/64. This avoids having to initialize it in two different
> places in C code, and having to preserve SI through the early assembly
> code.
>
> Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Nice cleanup!
> /*
> * Jump to the extracted kernel.
> */
> - xorl %ebx, %ebx
> + movl boot_params@GOTOFF(%ebx), %esi
> jmp *%eax
> SYM_FUNC_END(.Lrelocated)
>
> @@ -209,6 +208,8 @@ SYM_DATA_START_LOCAL(gdt)
> .quad 0x00cf92000000ffff /* __KERNEL_DS */
> SYM_DATA_END_LABEL(gdt, SYM_L_LOCAL, gdt_end)
>
> +SYM_DATA(boot_params, .long 0)
> +
You should add a comment here that boot_params needs to be in the .data
section because in .bss it would get zeroed out again later. Same
applies to the 64bit version of this.
With that changed:
Reviewed-by: Joerg Roedel <jroedel@suse.de>
next prev parent reply other threads:[~2020-10-08 9:04 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-07 19:53 [PATCH 0/5] Couple of bugfixes to sev-es series Arvind Sankar
2020-10-07 19:53 ` [PATCH 1/5] x86/boot: Initialize boot_params in startup code Arvind Sankar
2020-10-08 9:04 ` Joerg Roedel [this message]
2020-10-08 13:44 ` Arvind Sankar
2020-10-07 19:53 ` [PATCH 2/5] x86/boot: Move get_cmd_line_ptr() and COMMAND_LINE_SIZE into misc.h Arvind Sankar
2020-10-08 9:11 ` Joerg Roedel
2020-10-08 9:30 ` Borislav Petkov
2020-10-08 13:47 ` Arvind Sankar
2020-10-08 15:10 ` Borislav Petkov
2020-10-08 15:30 ` Arvind Sankar
2020-10-08 16:16 ` Borislav Petkov
2020-10-07 19:53 ` [PATCH 3/5] x86/boot/64: Change add_identity_map() to take size for ease of use Arvind Sankar
2020-10-08 9:14 ` Joerg Roedel
2020-10-08 13:49 ` Arvind Sankar
2020-10-07 19:53 ` [PATCH 4/5] x86/boot/64: Explicitly map boot_params and command line Arvind Sankar
2020-10-08 9:17 ` Joerg Roedel
2020-10-08 9:48 ` Joerg Roedel
2020-10-08 13:57 ` Arvind Sankar
2020-10-07 19:53 ` [PATCH 5/5] x86/head/64: Disable stack protection for head$(BITS).o Arvind Sankar
2020-10-08 8:42 ` Joerg Roedel
2020-10-08 14:52 ` Arvind Sankar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201008090420.GD3209@suse.de \
--to=jroedel@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=nivedita@alum.mit.edu \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.