From: Tzung-Bi Shih <tzungbi@kernel.org>
To: Michal Gorlas <michal.gorlas@9elements.com>
Cc: Brian Norris <briannorris@chromium.org>,
Julius Werner <jwerner@chromium.org>,
linux-kernel@vger.kernel.org, chrome-platform@lists.linux.dev,
Marcello Sylvester Bauer <marcello.bauer@9elements.com>
Subject: Re: [PATCH v2 2/3] firmware: coreboot: loader for Linux-owned SMI handler
Date: Fri, 27 Jun 2025 02:49:21 +0000 [thread overview]
Message-ID: <aF4GsTGNSHQKn7Ms@google.com> (raw)
In-Reply-To: <aF0x-d-uBbMQxrxO@cyber-t14sg4>
On Thu, Jun 26, 2025 at 01:41:45PM +0200, Michal Gorlas wrote:
> On Wed, Jun 25, 2025 at 02:26:11PM +0200, Michal Gorlas wrote:
> > > > +
> > > > + /*
> > > > + * Gives SMI some time in case it takes longer than expected.
> > > > + * Only useful on real hardware (tested on RaptorLake), not needed on emulation.
> > > > + */
> > > > + mdelay(100);
> > >
> > > This looks weird. Are there some ways for Linux to be aware of the SMI has
> > > completed?
> >
> > Not in a straight forward fashion. On Intel SoCs we could read MSR_SMI_COUNT
> > [1] before and after sending an SMI, and wait till it increments. I am
> > not aware about any unified way that works for AMD SoCs. However, so far
> > none of the AMD boards supported by coreboot was tested with MM payload,
> > so to make it Intel-only in v3 is not a bad idea.
> >
> > [1]: https://elixir.bootlin.com/linux/v6.16-rc3/source/arch/x86/include/asm/msr-index.h#L880
>
> As a follow-up here, making COREBOOT_PAYLOAD_MM dependent on !SMP
> resolves the need of acknowledging SMI completion. If SMI takes longer,
> Linux is just stalled until SMI handler gives the CPU back to the caller.
> I think for this case it could be the way, LinuxBoot is by default
> compiled without SMP support anyways when used as coreboot's payload [1],
> [2].
>
> [1]: https://github.com/coreboot/coreboot/blob/main/payloads/external/LinuxBoot/x86_64/defconfig
> [2]: https://github.com/coreboot/coreboot/blob/main/payloads/external/LinuxBoot/i386/defconfig
To make sure I understand: do you mean the trigger_smi() becomes a blocking
call without a timeout?
I may misunderstand: depends on !SMP which also means it can't use on most
modern architectures.
next prev parent reply other threads:[~2025-06-27 2:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-16 14:01 [PATCH v2 0/3] firmware: coreboot: Support for System Management Interrupt (SMI) handling in coreboot payload (MM payload concept) Michal Gorlas
2025-06-16 14:01 ` [PATCH v2 1/3] firmware: coreboot: support for parsing SMM related informations from coreboot tables Michal Gorlas
2025-06-25 5:58 ` Tzung-Bi Shih
2025-06-16 14:01 ` [PATCH v2 2/3] firmware: coreboot: loader for Linux-owned SMI handler Michal Gorlas
2025-06-25 5:58 ` Tzung-Bi Shih
2025-06-25 12:26 ` Michal Gorlas
2025-06-26 11:41 ` Michal Gorlas
2025-06-27 2:49 ` Tzung-Bi Shih [this message]
2025-06-27 11:40 ` Michal Gorlas
2025-06-27 2:33 ` Tzung-Bi Shih
2025-06-16 14:01 ` [PATCH v2 3/3] firmware: coreboot: Linux-owned SMI handler to be loaded by coreboot Michal Gorlas
2025-06-25 5:58 ` [PATCH v2 0/3] firmware: coreboot: Support for System Management Interrupt (SMI) handling in coreboot payload (MM payload concept) Tzung-Bi Shih
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=aF4GsTGNSHQKn7Ms@google.com \
--to=tzungbi@kernel.org \
--cc=briannorris@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=jwerner@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcello.bauer@9elements.com \
--cc=michal.gorlas@9elements.com \
/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
all inboxes | Powered by JetHome®