public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Michael Brown" <mcb30@ipxe.org>
To: devel@edk2.groups.io, lersek@redhat.com
Cc: Ray Ni <ray.ni@intel.com>, Gerd Hoffmann <kraxel@redhat.com>,
	 Michael D Kinney <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] [PATCH v2 1/2] MdeModulePkg: Move NestedInterruptTplLib to MdeModulePkg
Date: Tue, 23 Jan 2024 14:10:06 +0000	[thread overview]
Message-ID: <0102018d36a826b6-ba133eb4-78e0-49fd-88d2-4d807a5f0d6d-000000@eu-west-1.amazonses.com> (raw)
In-Reply-To: <3c38a732-1a40-cace-91e6-49a7009e59c1@redhat.com>

On 22/01/2024 10:36, Laszlo Ersek wrote:
> (1) Does LocalApicTimerDxe have any other dependencies on OvmfPkg than
> the library class header?
> 
> In other words, can't we remove "OvmfPkg/OvmfPkg.dec" from this
> [Packages] section, too?
> 
> I can't see anything else, so I'd suggest to remove
> "OvmfPkg/OvmfPkg.dec", but I could be missing something.

Good catch, thank you.  I have removed it and OvmfPkg still builds 
without errors, so I think it can go.

> Therefore, I suggest adding "NestedInterruptTplLib.inf" to
> "MdeModulePkg.dsc". AIUI, right now the library instance is x86-only
> (with a proposal on-list for the AARCH64 extension). Therefore, the
> section in "MdeModulePkg.dsc" to add the INF file to would be:
> 
> [Components.IA32, Components.X64]
> 
> Within that section, library instances and drivers are apparently not
> listed in lexicographical order, so maybe just tack the new line to the
> bottom.
> 
> For build-testing, run the command
> 
>    build \
>      -a IA32 -a X64 \
>      -b NOOPT \
>      -p MdeModulePkg/MdeModulePkg.dsc \
>      -t GCC5 \
>      -m MdeModulePkg/Library/NestedInterruptTplLib/NestedInterruptTplLib.inf

Thank you very much!  I have made all of the changes that you suggested 
(in both emails).

Following Ray's concerns about the ability to test this code, I have 
also added a self-test capability.  This deliberately triggers a 
configurable number of delays within NestedInterruptRestoreTPL() to 
force the system to experience a nested interrupt.  The code verifies that:

a) the architecture's implementation of DisableInterruptsOnIret() is 
behaving as specified, and

b) the platform's timer interrupt handler is correctly rearming the 
timer interrupt before calling NestedInterruptRestoreTPL().

I've also added AArch64 and ARM implementations for 
DisableInterruptsOnIret(), which I shall test shortly.

Patch series v3 to follow.

Thanks,

Michael



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114198): https://edk2.groups.io/g/devel/message/114198
Mute This Topic: https://groups.io/mt/103852900/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2024-01-23 14:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <17AC1CE6B1CDE741.7395@groups.io>
2024-01-20 17:08 ` [edk2-devel] [PATCH v2 0/2] Move NestedInterruptTplLib to MdeModulePkg Michael Brown
     [not found] ` <20240120170814.1777073-1-mcb30@ipxe.org>
2024-01-20 17:08   ` [edk2-devel] [PATCH v2 1/2] MdeModulePkg: " Michael Brown
2024-01-22 10:36     ` Laszlo Ersek
2024-01-23 14:10       ` Michael Brown [this message]
2024-01-20 17:08   ` [edk2-devel] [PATCH v2 2/2] MdeModulePkg: Add missing Iret.h to NestedInterruptTplLib sources list Michael Brown
2024-01-22 10:39     ` Laszlo Ersek

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-list 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=0102018d36a826b6-ba133eb4-78e0-49fd-88d2-4d807a5f0d6d-000000@eu-west-1.amazonses.com \
    --to=devel@edk2.groups.io \
    /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