linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Khalid Ali <khaliidcaliy@gmail.com>
To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
	dave.hansen@linux.intel.com, ubizjak@gmail.com
Cc: x86@kernel.org, hpa@zytor.com, linux-efi@vger.kernel.org,
	linux-kernel@vger.kernel.org, Khalid Ali <khaliidcaliy@gmail.com>
Subject: [PATCH v1 0/3] x86/boot: Supply boot_param in rdi instead of rsi from startup_64()
Date: Mon, 23 Jun 2025 08:14:55 +0000	[thread overview]
Message-ID: <20250623081458.1243-1-khaliidcaliy@gmail.com> (raw)

From: Khalid Ali <khaliidcaliy@gmail.com>

The current kernel entry point takes one argument which is boot_param
from RSI. The only argument entry point recieves is pointer to
boot_param.

In order to comply with the ABI calling convension the entry point must
recieve the boot_param from RDI instead of RSI. There were no specific
use case used for RDI, so the kernel can safely recieve argument from
that register to better comply with ABI.

This patch makes the kernel to recieve boot_param which is the only
argument it recieves, from RDI instead of RSI. All changes needed for
stability and clarity have being changed.

Changelog:
 * Kernel uncompressed entry point expects boot_param from RDI instead
   of RSI.
 * The decompressor has being adjusted to supply argument from RDI
   instead RSI.
 * libstub has being adjusted to supply argument from RDI instead of RSI.

After throughly tested there were no regression and UDs has being
observed. Looking forward for feedback.

 arch/x86/boot/compressed/head_64.S      | 2 +-
 arch/x86/kernel/head_64.S               | 4 ++--
 drivers/firmware/efi/libstub/x86-stub.c | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

-- 
2.49.0


             reply	other threads:[~2025-06-23  8:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-23  8:14 Khalid Ali [this message]
2025-06-23 12:33 ` [PATCH v1 0/3] x86/boot: Supply boot_param in rdi instead of rsi from startup_64() Brian Gerst
2025-06-23 16:29   ` Khalid Ali
2025-06-23 18:19     ` H. Peter Anvin
2025-06-23 18:39       ` Khalid Ali
2025-06-23 19:24         ` Brian Gerst
2025-06-24  0:43           ` H. Peter Anvin
2025-06-24  0:49         ` H. Peter Anvin

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=20250623081458.1243-1-khaliidcaliy@gmail.com \
    --to=khaliidcaliy@gmail.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=ubizjak@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).