Revision: 16770
http://sourceforge.net/p/edk2/code/16770
Author: hwu1225
Date: 2015-02-05 06:48:03 +0000 (Thu, 05 Feb 2015)
Log Message:
-----------
Added 2 new PCDs for minimal and maximal valid year in RTC.
(Sync patch r16642 from main trunk.)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Elvin Li <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
Revision Links:
--------------
http://sourceforge.net/p/edk2/code/16642
Modified Paths:
--------------
branches/UDK2014.SP1/PcAtChipsetPkg/PcAtChipsetPkg.dec
branches/UDK2014.SP1/PcAtChipsetPkg/PcAtChipsetPkg.uni
branches/UDK2014.SP1/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c
branches/UDK2014.SP1/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
Modified: branches/UDK2014.SP1/PcAtChipsetPkg/PcAtChipsetPkg.dec
===================================================================
--- branches/UDK2014.SP1/PcAtChipsetPkg/PcAtChipsetPkg.dec 2015-02-05
06:10:07 UTC (rev 16769)
+++ branches/UDK2014.SP1/PcAtChipsetPkg/PcAtChipsetPkg.dec 2015-02-05
06:48:03 UTC (rev 16770)
@@ -4,7 +4,7 @@
# This package is designed to public interfaces and implementation which
follows
# PcAt defacto standard.
#
-# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD
License
@@ -116,6 +116,14 @@
## This PCD specifies the base address of the IO APIC.
# @Prompt IO APIC base address.
gPcAtChipsetPkgTokenSpaceGuid.PcdIoApicBaseAddress|0xFEC00000|UINT32|0x0000000C
+
+ ## This PCD specifies the minimal valid year in RTC.
+ # @Prompt Minimal valid year in RTC.
+ gPcAtChipsetPkgTokenSpaceGuid.PcdMinimalValidYear|1998|UINT16|0x0000000D
+
+ ## This PCD specifies the maximal valid year in RTC.
+ # @Prompt Maximal valid year in RTC.
+ gPcAtChipsetPkgTokenSpaceGuid.PcdMaximalValidYear|2099|UINT16|0x0000000E
[PcdsFixedAtBuild, PcdsPatchableInModule]
## Defines the ACPI register set base address.
Modified: branches/UDK2014.SP1/PcAtChipsetPkg/PcAtChipsetPkg.uni
===================================================================
--- branches/UDK2014.SP1/PcAtChipsetPkg/PcAtChipsetPkg.uni 2015-02-05
06:10:07 UTC (rev 16769)
+++ branches/UDK2014.SP1/PcAtChipsetPkg/PcAtChipsetPkg.uni 2015-02-05
06:48:03 UTC (rev 16770)
@@ -10,7 +10,7 @@
- @@ -256,4 +256,16 @@
-\ No newline at end of file
+++++++\ No newline at end of file
Modified:
branches/UDK2014.SP1/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c
===================================================================
--- branches/UDK2014.SP1/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c
2015-02-05 06:10:07 UTC (rev 16769)
+++ branches/UDK2014.SP1/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c
2015-02-05 06:48:03 UTC (rev 16770)
@@ -1,7 +1,7 @@
/** @file
RTC Architectural Protocol GUID as defined in DxeCis 0.96.
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD
License
which accompanies this distribution. The full text of the license may be
found at
@@ -955,8 +955,8 @@
IN EFI_TIME *Time
)
{
- if (Time->Year < 1998 ||
- Time->Year > 2099 ||
+ if (Time->Year < PcdGet16 (PcdMinimalValidYear) ||
+ Time->Year > PcdGet16 (PcdMaximalValidYear) ||
Time->Month < 1 ||
Time->Month > 12 ||
(!DayValid (Time)) ||
Modified:
branches/UDK2014.SP1/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
===================================================================
---
branches/UDK2014.SP1/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
2015-02-05 06:10:07 UTC (rev 16769)
+++
branches/UDK2014.SP1/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
2015-02-05 06:48:03 UTC (rev 16770)
@@ -39,6 +39,7 @@
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
+ PcAtChipsetPkg/PcAtChipsetPkg.dec
[LibraryClasses]
UefiRuntimeServicesTableLib
@@ -62,5 +63,8 @@
[Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdRealTimeClockUpdateTimeout ## CONSUMES
+ gPcAtChipsetPkgTokenSpaceGuid.PcdMinimalValidYear ## CONSUMES
+ gPcAtChipsetPkgTokenSpaceGuid.PcdMaximalValidYear ## CONSUMES
+
[UserExtensions.TianoCore."ExtraFiles"]
PcRtcExtra.uni
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits