Lijian Zhao has uploaded this change for review. ( https://review.coreboot.org/28542
Change subject: tianocore: Add option to use HPET timer ......................................................................
tianocore: Add option to use HPET timer
Default tianocore payload select to use 8254 timer instead of hpet timer, for SOC like cannonlake/coffeelake, 8254 timer had been clock gated. Add option for tianocore payload to use HPET timer.
BUG=N/A. TEST=Build and boot up into UEFI shell on whiskeylake rvp platform.
Change-Id: I857704b0ca128fc9da193ae26a33c7cf89ad7320 Signed-off-by: Lijian Zhao lijian.zhao@intel.com --- M payloads/external/tianocore/Kconfig M payloads/external/tianocore/Makefile A payloads/external/tianocore/patches/hpet/0001-CorebootPayload-Use-HPET-Timer.patch 3 files changed, 51 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/28542/1
diff --git a/payloads/external/tianocore/Kconfig b/payloads/external/tianocore/Kconfig index 596b191..4f4012b 100644 --- a/payloads/external/tianocore/Kconfig +++ b/payloads/external/tianocore/Kconfig @@ -88,4 +88,9 @@
endchoice
+config TIANOCORE_HPET_TIMER + bool "Tianocore Hpet Timer" + help + Use HPET Timer. + endif diff --git a/payloads/external/tianocore/Makefile b/payloads/external/tianocore/Makefile index 2f770d2..38bb999 100644 --- a/payloads/external/tianocore/Makefile +++ b/payloads/external/tianocore/Makefile @@ -54,6 +54,10 @@ fi
$(project_dir)/.version_$(TAG-y): fetch + ifeq ($(CONFIG_TIANOCORE_HPET_TIMER),y) + echo "Load HPET patches..."; + cp $(CURDIR)/patches/hpet/*.patch $(CURDIR)/patches/; + endif if ! [[ -e $(project_dir)/.version_$(STABLE_COMMIT_ID) ]] || \ [ "$(TAG-y)" = "origin/master" ] ; then \ rm -f .version_*; \ @@ -62,6 +66,8 @@ git checkout master; \ git branch -D coreboot 2>/dev/null; \ git checkout -b coreboot $(TAG-y); \ + echo "Load HPET patches..."; \ + cp $(CURDIR)/patches/hpet/*.patch $(CURDIR)/patches/; \ for patch in $(CURDIR)/patches/*.patch; do \ echo "Applying $$patch"; \ cd $(project_dir); \ diff --git a/payloads/external/tianocore/patches/hpet/0001-CorebootPayload-Use-HPET-Timer.patch b/payloads/external/tianocore/patches/hpet/0001-CorebootPayload-Use-HPET-Timer.patch new file mode 100644 index 0000000..381a283 --- /dev/null +++ b/payloads/external/tianocore/patches/hpet/0001-CorebootPayload-Use-HPET-Timer.patch @@ -0,0 +1,40 @@ +From ef32c984359f5e8ecedef92904a7be520b0fca9f Mon Sep 17 00:00:00 2001 +From: Lijian Zhao lijian.zhao@intel.com +Date: Fri, 7 Sep 2018 17:45:09 -0700 +Subject: [PATCH] CorebootPayload: Use HPET Timer + +Signed-off-by: Lijian Zhao lijian.zhao@intel.com +--- + CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc | 2 +- + CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc b/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc +index b6cdb697a5b0..98a5f364a7b3 100644 +--- a/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc ++++ b/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc +@@ -80,7 +80,7 @@ + # + # Chipset options + # +- DEFINE USE_HPET_TIMER = FALSE ++ DEFINE USE_HPET_TIMER = TRUE + + # + # Shell options: [BUILD_SHELL, FULL_BIN, MIN_BIN, NONE, UEFI] +diff --git a/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc b/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc +index c3fe099e5fec..8952aea98d7e 100644 +--- a/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc ++++ b/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc +@@ -80,7 +80,7 @@ + # + # Chipset options + # +- DEFINE USE_HPET_TIMER = FALSE ++ DEFINE USE_HPET_TIMER = TRUE + + # + # Shell options: [BUILD_SHELL, FULL_BIN, MIN_BIN, NONE, UEFI] +-- +2.17.1 +