From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id B6E6BAC0A7F for ; Fri, 5 Jan 2024 05:39:08 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=dzbqVxbiadHTlMNOZShQij23AJXPHOTDcQIy4CEd7AI=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1704433146; v=1; b=rWBipUMLXoNPf0C74Ao4IGF6YX3OMLksFulKb3sPz51omsozeUG3MmG+aCzVa6SMVNTVzHAC 74ptD7H1XxlNl74Sa4kcpCeXJ6WElLWEWePSLBUECM87/KGCkF49o10QhKlV2ZMF1+e1xFjIGD2 8P3pIR9tdLWiZeXlRGnQOEjs= X-Received: by 127.0.0.2 with SMTP id pAlOYY7687511xMnqPMar1Su; Thu, 04 Jan 2024 21:39:06 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by mx.groups.io with SMTP id smtpd.web10.17857.1704433145999051064 for ; Thu, 04 Jan 2024 21:39:06 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10943"; a="10810074" X-IronPort-AV: E=Sophos;i="6.04,332,1695711600"; d="scan'208";a="10810074" X-Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jan 2024 21:39:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10943"; a="1027668481" X-IronPort-AV: E=Sophos;i="6.04,332,1695711600"; d="scan'208";a="1027668481" X-Received: from shpfwdbuild001.ccr.corp.intel.com ([10.239.56.251]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jan 2024 21:39:04 -0800 From: "Ma, Hua" To: devel@edk2.groups.io Cc: Hua Ma Subject: [edk2-devel] [PATCH] UefiPayloadPkg: Add macro to enable selection of timer Date: Fri, 5 Jan 2024 13:38:51 +0800 Message-Id: MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,hua.ma@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 9Q4rrqssdLombQjvR1fJLNRzx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=rWBipUML; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io 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 --- 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/BootManagerMenuApp.inf +!if $(TIMER_SUPPORT) == "HPET" PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf +!elseif $(TIMER_SUPPORT) == "LAPIC" + OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe.inf { + + NestedInterruptTplLib|OvmfPkg/Library/NestedInterruptTplLib/NestedInterruptTplLib.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 (#113219): https://edk2.groups.io/g/devel/message/113219 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] -=-=-=-=-=-=-=-=-=-=-=-