Revision: 17791
          http://sourceforge.net/p/edk2/code/17791
Author:   gdong1
Date:     2015-07-01 09:41:58 +0000 (Wed, 01 Jul 2015)
Log Message:
-----------
CorebootModulePkg: Get power management register addresses.

This patch will get power management event register address and power 
management GPE enable register address. 
Add missing code in CbParseLib.c.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Guo Dong <[email protected]>
Reviewed-by: Maurice Ma <[email protected]>

Modified Paths:
--------------
    trunk/edk2/CorebootModulePkg/Library/CbParseLib/CbParseLib.c

Modified: trunk/edk2/CorebootModulePkg/Library/CbParseLib/CbParseLib.c
===================================================================
--- trunk/edk2/CorebootModulePkg/Library/CbParseLib/CbParseLib.c        
2015-07-01 08:45:46 UTC (rev 17790)
+++ trunk/edk2/CorebootModulePkg/Library/CbParseLib/CbParseLib.c        
2015-07-01 09:41:58 UTC (rev 17791)
@@ -395,6 +395,8 @@
   @param  pPmTimerReg        Pointer to the address of power management timer 
register
   @param  pResetReg          Pointer to the address of system reset register
   @param  pResetValue        Pointer to the value to be writen to the system 
reset register
+  @param  pPmEvtReg          Pointer to the address of power management event 
register
+  @param  pPmGpeEnReg        Pointer to the address of power management GPE 
enable register
 
   @retval RETURN_SUCCESS     Successfully find out all the required fadt 
information.
   @retval RETURN_NOT_FOUND   Failed to find the fadt table.
@@ -405,7 +407,9 @@
   OUT UINTN      *pPmCtrlReg,
   OUT UINTN      *pPmTimerReg,
   OUT UINTN      *pResetReg,
-  OUT UINTN      *pResetValue
+  OUT UINTN      *pResetValue,
+  OUT UINTN      *pPmEvtReg,
+  OUT UINTN      *pPmGpeEnReg
   )
 {
   EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER  *Rsdp;
@@ -464,6 +468,16 @@
         }
         DEBUG ((EFI_D_INFO, "Reset Value 0x%x\n", Fadt->ResetValue));
 
+        if (pPmEvtReg != NULL) {   
+          *pPmEvtReg = Fadt->Pm1aEvtBlk;
+          DEBUG ((EFI_D_INFO, "PmEvt Reg 0x%x\n", Fadt->Pm1aEvtBlk));
+        }
+
+        if (pPmGpeEnReg != NULL) {   
+          *pPmGpeEnReg = Fadt->Gpe0Blk + Fadt->Gpe0BlkLen / 2;
+          DEBUG ((EFI_D_INFO, "PmGpeEn Reg 0x%x\n", *pPmGpeEnReg));
+        }
+
         return RETURN_SUCCESS;
       }
     }
@@ -495,6 +509,15 @@
           *pResetValue = Fadt->ResetValue;
         DEBUG ((EFI_D_ERROR, "Reset Value 0x%x\n", Fadt->ResetValue));
 
+        if (pPmEvtReg != NULL) {   
+          *pPmEvtReg = Fadt->Pm1aEvtBlk;
+           DEBUG ((EFI_D_INFO, "PmEvt Reg 0x%x\n", Fadt->Pm1aEvtBlk));
+        }
+
+        if (pPmGpeEnReg != NULL) {   
+          *pPmGpeEnReg = Fadt->Gpe0Blk + Fadt->Gpe0BlkLen / 2;
+          DEBUG ((EFI_D_INFO, "PmGpeEn Reg 0x%x\n", *pPmGpeEnReg));
+        }        
         return RETURN_SUCCESS;
       }
     }


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to