All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-efi@vger.kernel.org
Subject: Re: [GIT PULL] EFI updates for v6.15
Date: Tue, 1 Apr 2025 10:32:19 +0200	[thread overview]
Message-ID: <Z-ukkz_83lAvm49n@gmail.com> (raw)
In-Reply-To: <CAMj1kXFEgLz2LCzOVZ=+V9aESJEReWr2mguDJzV=roTKQpZccg@mail.gmail.com>


* Ard Biesheuvel <ardb@kernel.org> wrote:

> > Look into arch/x86/lib/ and you'll see that EFI functionality 
> > doesn't really fit there.
> 
> Again, EFI is only one aspect of this. The SEV-SNP startup code and 
> the early 5-level paging are used by non-EFI boot as well. But they 
> suffer from the same issue (C code that runs so early that it does 
> not tolerate ordinary non-PIC codegen with instrumentation etc)
> 
> Should we maybe classify this as startup code? And put it in 
> arch/x86/boot/startup or arch/x86/kernel/startup?

Yeah, so the canonical place for platform startup code is 
arch/x86/platform/, we could certainly open up arch/x86/platform/efi/ 
there too, in addition to arch/x86/boot/efi/.

Not that it's enforced consistently or historically: in principle we 
ought to have an arch/x86/platform/pc/ directory and move a lot of 
arch/x86/kernel/ there.

Plus the line is a bit fuzzy: as the system is brought up, exactly 
where is the line between boot loading and platform setup: everything 
up to the start_kernel() call is boot code? I don't think that's 
strictly true: for example x86_early_init_platform_quirks() is called 
before start_kernel(), and it's clearly platform setup code.

But in general, platform specific startup and runtime code's best home 
is arch/x86/platform/.

Thanks,

	Ingo

  reply	other threads:[~2025-04-01  8:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-28  7:05 [GIT PULL] EFI updates for v6.15 Ard Biesheuvel
2025-03-29 18:46 ` Linus Torvalds
2025-03-29 19:07   ` Ard Biesheuvel
2025-03-29 19:44     ` Linus Torvalds
2025-03-30  8:10     ` Ingo Molnar
2025-03-31 13:55       ` Ard Biesheuvel
2025-03-31 16:55         ` Ingo Molnar
2025-04-01  6:44           ` Ard Biesheuvel
2025-04-01  8:32             ` Ingo Molnar [this message]
2025-04-01  8:56               ` Ard Biesheuvel
2025-04-01  9:08                 ` Ingo Molnar
2025-04-01  9:10                   ` Ard Biesheuvel
2025-03-29 19:56 ` pr-tracker-bot

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=Z-ukkz_83lAvm49n@gmail.com \
    --to=mingo@kernel.org \
    --cc=ardb@kernel.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=torvalds@linux-foundation.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.