[edk2] [Patch] Add BIOS Item "RTC Battery Present"

2015-11-03 Thread lushifex
Signed-off-by: lushifex 
---
 Vlv2DeviceRefCodePkg/AcpiTablesPCAT/GloblNvs.asl   |   5 +++--
 Vlv2DeviceRefCodePkg/AcpiTablesPCAT/PciTree.asl|  14 --
 Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c  |   3 ++-
 Vlv2TbltDevicePkg/Include/Guid/SetupVariable.h |   2 +-
 Vlv2TbltDevicePkg/Include/Protocol/GlobalNvsArea.h |   3 ++-
 .../PlatformSetupDxe/SouthClusterConfig.vfi|  10 +-
 Vlv2TbltDevicePkg/PlatformSetupDxe/UqiList.uni | Bin 65892 -> 66540 bytes
 Vlv2TbltDevicePkg/PlatformSetupDxe/VfrStrings.uni  | Bin 214666 -> 215420 bytes
 8 files changed, 29 insertions(+), 8 deletions(-)

diff --git a/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/GloblNvs.asl 
b/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/GloblNvs.asl
index fffc829..21e526c 100644
--- a/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/GloblNvs.asl
+++ b/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/GloblNvs.asl
@@ -3,11 +3,11 @@
 ;**;
 ;*Intel Corporation - ACPI Reference Code for the Baytrail*;
 ;*Family of Customer Reference Boards.*;
 ;**;
 ;**;
-;*Copyright (c)  1999  - 2014, Intel Corporation. All rights reserved   *;
+;*Copyright (c)  1999  - 2015, Intel Corporation. All rights reserved   *;
 ;
 ; This program and the accompanying materials are licensed and made available 
under
 ; the terms and conditions of the BSD License that accompanies this 
distribution.
 ; The full text of the license may be found at
 ; http://opensource.org/licenses/bsd-license.php.
@@ -345,8 +345,9 @@ Field(GNVS,AnyAcc,Lock,Preserve)
   UTS,  8,  //(788) Enable Test Device connected to URT for WHCK test.
   SCPE, 8,  //(789) Allow higher performance on AC/USB - Enable/Disable
   Offset(792),
   EDPV, 8,  //(792) Check for eDP display device
   DIDX, 32, //(793) Device ID for eDP device
-  IOT,  8,  //(794) MinnowBoard Max JP1 is configured for MSFT IOT 
project.   
+  IOT,  8,  //(794) MinnowBoard Max JP1 is configured for MSFT IOT 
project.
+  BATT, 8,  //(795) The Flag of RTC Battery Prensent.  
 }
 
diff --git a/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/PciTree.asl 
b/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/PciTree.asl
index 84a7ee2..2a57d0f 100644
--- a/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/PciTree.asl
+++ b/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/PciTree.asl
@@ -3,11 +3,11 @@
 ;**;
 ;*Intel Corporation - ACPI Reference Code for the Sandy Bridge*;
 ;*Family of Customer Reference Boards.*;
 ;**;
 ;**;
-;*Copyright (c) 2012  - 2014, Intel Corporation. All rights reserved*;
+;*Copyright (c) 2012  - 2015, Intel Corporation. All rights reserved*;
 ;
 ; This program and the accompanying materials are licensed and made available 
under
 ; the terms and conditions of the BSD License that accompanies this 
distribution.
 ; The full text of the license may be found at
 ; http://opensource.org/licenses/bsd-license.php.
@@ -19,20 +19,30 @@
 ;**;
 ;**/
 
 Scope(\_SB)
 {
-
 //RTC
   Device(RTC)// RTC
   {
 Name(_HID,EISAID("PNP0B00"))
 
 Name(_CRS,ResourceTemplate()
 {
   IO(Decode16,0x70,0x70,0x01,0x08)
 })
+
+Method(_STA,0,Serialized) {
+
+  //
+  // Report RTC Battery is Prensent or Not Present.
+  //
+  If (LEqual(BATT, 1)) {
+Return (0xF)
+  }
+  Return (0x0)
+}
   }
 //RTC
 
   Device(HPET)   // High Performance Event Timer
   {
diff --git a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c 
b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
index c39c36d..2ff14ec 100644
--- a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
+++ b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
@@ -1,8 +1,8 @@
 /** @file
 
-  Copyright (c) 2004  - 2014, Intel Corporation. All rights reserved.
+  Copyright (c) 2004  - 2015, Intel Corporation. All rights reserved.


 
   This program and the accompanying materials are licensed and made available 
under
 
   the terms and conditions of the BSD License that accompanies this 
distribution.  
@@ -966,10 +966,11 @@ AcpiPlatformEntryPoint (
   mGlobalNvsArea.Area->PreviousDeviceList = 0x0F ;
 
   mGlobalNvsArea.Area->UartSelection = mSystemConfiguration.UartInterface;
   mGlobalNvsArea.Area->PcuUart1Enable = mSystemConfiguration.PcuUart1;
   

Re: [edk2] [Patch] Add BIOS Item "RTC Battery Present"

2015-11-03 Thread He, Tim
Reviewed-by: Tim He <tim...@intel.com>

-Original Message-
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of lushifex
Sent: Wednesday, November 04, 2015 1:05 PM
To: edk2-devel@lists.01.org
Subject: [edk2] [Patch] Add BIOS Item "RTC Battery Present"

Signed-off-by: lushifex <shifeix.a...@intel.com>
---
 Vlv2DeviceRefCodePkg/AcpiTablesPCAT/GloblNvs.asl   |   5 +++--
 Vlv2DeviceRefCodePkg/AcpiTablesPCAT/PciTree.asl|  14 --
 Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c  |   3 ++-
 Vlv2TbltDevicePkg/Include/Guid/SetupVariable.h |   2 +-
 Vlv2TbltDevicePkg/Include/Protocol/GlobalNvsArea.h |   3 ++-
 .../PlatformSetupDxe/SouthClusterConfig.vfi|  10 +-
 Vlv2TbltDevicePkg/PlatformSetupDxe/UqiList.uni | Bin 65892 -> 66540 bytes
 Vlv2TbltDevicePkg/PlatformSetupDxe/VfrStrings.uni  | Bin 214666 -> 215420 bytes
 8 files changed, 29 insertions(+), 8 deletions(-)

diff --git a/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/GloblNvs.asl 
b/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/GloblNvs.asl
index fffc829..21e526c 100644
--- a/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/GloblNvs.asl
+++ b/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/GloblNvs.asl
@@ -3,11 +3,11 @@
 ;**;
 ;*Intel Corporation - ACPI Reference Code for the Baytrail*;
 ;*Family of Customer Reference Boards.*;
 ;**;
 ;**;
-;*Copyright (c)  1999  - 2014, Intel Corporation. All rights reserved   *;
+;*Copyright (c)  1999  - 2015, Intel Corporation. All rights reserved   *;
 ;
 ; This program and the accompanying materials are licensed and made available 
under  ; the terms and conditions of the BSD License that accompanies this 
distribution.
 ; The full text of the license may be found at  ; 
http://opensource.org/licenses/bsd-license.php.
@@ -345,8 +345,9 @@ Field(GNVS,AnyAcc,Lock,Preserve)
   UTS,  8,  //(788) Enable Test Device connected to URT for WHCK test.
   SCPE, 8,  //(789) Allow higher performance on AC/USB - Enable/Disable
   Offset(792),
   EDPV, 8,  //(792) Check for eDP display device
   DIDX, 32, //(793) Device ID for eDP device
-  IOT,  8,  //(794) MinnowBoard Max JP1 is configured for MSFT IOT 
project.   
+  IOT,  8,  //(794) MinnowBoard Max JP1 is configured for MSFT IOT 
project.
+  BATT, 8,  //(795) The Flag of RTC Battery Prensent.  
 }
 
diff --git a/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/PciTree.asl 
b/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/PciTree.asl
index 84a7ee2..2a57d0f 100644
--- a/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/PciTree.asl
+++ b/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/PciTree.asl
@@ -3,11 +3,11 @@
 ;**;
 ;*Intel Corporation - ACPI Reference Code for the Sandy Bridge*;
 ;*Family of Customer Reference Boards.*;
 ;**;
 ;**;
-;*Copyright (c) 2012  - 2014, Intel Corporation. All rights reserved*;
+;*Copyright (c) 2012  - 2015, Intel Corporation. All rights reserved*;
 ;
 ; This program and the accompanying materials are licensed and made available 
under  ; the terms and conditions of the BSD License that accompanies this 
distribution.
 ; The full text of the license may be found at  ; 
http://opensource.org/licenses/bsd-license.php.
@@ -19,20 +19,30 @@
 ;**;
 ;**/
 
 Scope(\_SB)
 {
-
 //RTC
   Device(RTC)// RTC
   {
 Name(_HID,EISAID("PNP0B00"))
 
 Name(_CRS,ResourceTemplate()
 {
   IO(Decode16,0x70,0x70,0x01,0x08)
 })
+
+Method(_STA,0,Serialized) {
+
+  //
+  // Report RTC Battery is Prensent or Not Present.
+  //
+  If (LEqual(BATT, 1)) {
+Return (0xF)
+  }
+  Return (0x0)
+}
   }
 //RTC
 
   Device(HPET)   // High Performance Event Timer
   {
diff --git a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c 
b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
index c39c36d..2ff14ec 100644
--- a/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
+++ b/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
@@ -1,8 +1,8 @@
 /** @file
 
-  Copyright (c) 2004  - 2014, Intel Corporation. All rights reserved.
+  Copyright (c) 2004  - 2015, Intel Corporation. All rights 
+ reserved.


 
   This program and the accompanying materials are licensed and made available 
under
 
   the terms and conditio