From: "Nate DeSimone" <nathaniel.l.desimone@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"Ma, Hua" <hua.ma@intel.com>
Subject: Re: [edk2-devel] [PATCH] UefiPayloadPkg: Add macro to enable selection of timer
Date: Wed, 10 Jan 2024 01:27:43 +0000 [thread overview]
Message-ID: <MW4PR11MB582148EE15A97E2A47B8D93ECD692@MW4PR11MB5821.namprd11.prod.outlook.com> (raw)
In-Reply-To: <d455196ef398d951b5c2ae3ac95d2e876522ccd2.1704424138.git.hua.ma@intel.com>
Hi Hua,
Please make TIMER_SUPPORT a FixedAtBuiildPcd instead of a build flag. Something like PcdDxeTimerSelection or similar.
Thanks,
Nate
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Ma, Hua
> Sent: Thursday, January 4, 2024 9:39 PM
> To: devel@edk2.groups.io
> Cc: Ma, Hua <hua.ma@intel.com>
> Subject: [edk2-devel] [PATCH] UefiPayloadPkg: Add macro to enable selection
> of timer
>
> Add macro to enable selection of timer
>
> - HPET: UEFI Payload will use HPET timer
> - LAPIC: UEFI Payload will use local APIC timer
>
> Signed-off-by: Hua Ma <hua.ma@intel.com>
> ---
> UefiPayloadPkg/UefiPayloadPkg.dsc | 16 ++++++++++++++++
> UefiPayloadPkg/UefiPayloadPkg.fdf | 4 ++++
> 2 files changed, 20 insertions(+)
>
> diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc
> b/UefiPayloadPkg/UefiPayloadPkg.dsc
> index b8b13ad201..4f195c1e52 100644
> --- a/UefiPayloadPkg/UefiPayloadPkg.dsc
> +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
> @@ -139,6 +139,12 @@
> # Note: for emulation platform such as QEMU, this may not work and should
> set it as FALSE
> DEFINE CPU_TIMER_LIB_ENABLE = TRUE
>
> + #
> + # HPET: UEFI Payload will use HPET timer # LAPIC: UEFI Payload will
> + use local APIC timer #
> + DEFINE TIMER_SUPPORT = HPET
> +
> DEFINE MULTIPLE_DEBUG_PORT_SUPPORT = FALSE
>
> [BuildOptions]
> @@ -676,7 +682,17 @@
>
> MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuAp
> p.inf
>
>
> +!if $(TIMER_SUPPORT) == "HPET"
> PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf
> +!elseif $(TIMER_SUPPORT) == "LAPIC"
> + OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf {
> + <LibraryClasses>
> +
> +NestedInterruptTplLib|OvmfPkg/Library/NestedInterruptTplLib/NestedInter
> +ruptTplLib.inf
> + }
> +!else
> + !error "Invalid TIMER_SUPPORT"
> +!endif
> +
> MdeModulePkg/Universal/Metronome/Metronome.inf
> MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
> MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
> diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf
> b/UefiPayloadPkg/UefiPayloadPkg.fdf
> index 835798be1c..7d04a8cffd 100644
> --- a/UefiPayloadPkg/UefiPayloadPkg.fdf
> +++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
> @@ -161,7 +161,11 @@ INF
> MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
> !endif
> INF UefiCpuPkg/CpuDxe/CpuDxe.inf
>
> +!if $(TIMER_SUPPORT) == "HPET"
> INF PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf
> +!elseif $(TIMER_SUPPORT) == "LAPIC"
> +INF OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf
> +!endif
> INF MdeModulePkg/Universal/Metronome/Metronome.inf
> INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
> INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
> --
> 2.39.1.windows.1
>
>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#113503): https://edk2.groups.io/g/devel/message/113503
Mute This Topic: https://groups.io/mt/103538255/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2024-01-10 1:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-05 5:38 [edk2-devel] [PATCH] UefiPayloadPkg: Add macro to enable selection of timer Ma, Hua
2024-01-09 23:48 ` Benjamin Doron
2024-01-10 1:28 ` Nate DeSimone
2024-01-10 2:09 ` Benjamin Doron
2024-01-10 1:27 ` Nate DeSimone [this message]
[not found] <17A75CEA85AC7172.16812@groups.io>
2024-01-05 6:19 ` Ma, Hua
2024-01-05 8:20 ` Guo, Gua
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=MW4PR11MB582148EE15A97E2A47B8D93ECD692@MW4PR11MB5821.namprd11.prod.outlook.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