]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Added 2 new PCDs for minimal and maximal valid year in RTC.
authorElvin Li <elvin.li@intel.com>
Fri, 23 Jan 2015 04:49:00 +0000 (04:49 +0000)
committerli-elvin <li-elvin@Edk2>
Fri, 23 Jan 2015 04:49:00 +0000 (04:49 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Elvin Li <elvin.li@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16642 6f19259b-4bc3-4df7-8a09-765794883524

PcAtChipsetPkg/PcAtChipsetPkg.dec
PcAtChipsetPkg/PcAtChipsetPkg.uni
PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c
PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf

index ac09bec6f5561dbe1b6a58c3cf675de514ef7ad4..11c31e1d5ae07557c23d0eb8610a86fe3496be09 100644 (file)
@@ -4,7 +4,7 @@
 # This package is designed to public interfaces and implementation which follows\r
 # PcAt defacto standard.\r
 #\r
-# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>\r
 #\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
   ## This PCD specifies the base address of the IO APIC.\r
   # @Prompt IO APIC base address.\r
   gPcAtChipsetPkgTokenSpaceGuid.PcdIoApicBaseAddress|0xFEC00000|UINT32|0x0000000C\r
+\r
+  ## This PCD specifies the minimal valid year in RTC.\r
+  # @Prompt Minimal valid year in RTC.\r
+  gPcAtChipsetPkgTokenSpaceGuid.PcdMinimalValidYear|1998|UINT16|0x0000000D\r
+\r
+  ## This PCD specifies the maximal valid year in RTC.\r
+  # @Prompt Maximal valid year in RTC.\r
+  gPcAtChipsetPkgTokenSpaceGuid.PcdMaximalValidYear|2099|UINT16|0x0000000E\r
   \r
 [PcdsFixedAtBuild, PcdsPatchableInModule]\r
   ## Defines the ACPI register set base address.\r
index 13bb48f6fdd633494608f0eab8d056b9fff3afa6..080f302ea791c990b5a1658d265766a13b994070 100644 (file)
Binary files a/PcAtChipsetPkg/PcAtChipsetPkg.uni and b/PcAtChipsetPkg/PcAtChipsetPkg.uni differ
index eb1a6567eedc85fce8e4e0a1b88ecf2f3669de2e..23f8d3b56f591a5c8654317372f5b25d54dea266 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   RTC Architectural Protocol GUID as defined in DxeCis 0.96.\r
 \r
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -955,8 +955,8 @@ RtcTimeFieldsValid (
   IN EFI_TIME *Time\r
   )\r
 {\r
-  if (Time->Year < 1998 ||\r
-      Time->Year > 2099 ||\r
+  if (Time->Year < PcdGet16 (PcdMinimalValidYear) ||\r
+      Time->Year > PcdGet16 (PcdMaximalValidYear) ||\r
       Time->Month < 1 ||\r
       Time->Month > 12 ||\r
       (!DayValid (Time)) ||\r
index e94fa58e6e4ec9855ab9b0f7f6bcbdad8bdc8fb4..9e5faf75d6b70f7ee4184746ab857d7fca7813de 100644 (file)
@@ -38,6 +38,7 @@
 [Packages]\r
   MdePkg/MdePkg.dec\r
   MdeModulePkg/MdeModulePkg.dec\r
+  PcAtChipsetPkg/PcAtChipsetPkg.dec\r
 \r
 [LibraryClasses]\r
   UefiRuntimeServicesTableLib\r
@@ -61,5 +62,8 @@
   \r
 [Pcd]\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdRealTimeClockUpdateTimeout  ## CONSUMES\r
+  gPcAtChipsetPkgTokenSpaceGuid.PcdMinimalValidYear             ## CONSUMES\r
+  gPcAtChipsetPkgTokenSpaceGuid.PcdMaximalValidYear             ## CONSUMES\r
+\r
 [UserExtensions.TianoCore."ExtraFiles"]\r
   PcRtcExtra.uni\r