summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuo Dong <guo.dong@intel.com>2015-07-01 09:41:58 +0000
committergdong1 <gdong1@Edk2>2015-07-01 09:41:58 +0000
commit05de9ab296553c3ae54857f3ba63429010f3b245 (patch)
tree2128e711b422d226e51153b22039c91ffc5e50bc
parentf88762bc4020eb49547a9b9ea128eb6527faa549 (diff)
downloadedk2-platforms-05de9ab296553c3ae54857f3ba63429010f3b245.tar.xz
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 <guo.dong@intel.com> Reviewed-by: Maurice Ma <maurice.ma@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17791 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--CorebootModulePkg/Library/CbParseLib/CbParseLib.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/CorebootModulePkg/Library/CbParseLib/CbParseLib.c b/CorebootModulePkg/Library/CbParseLib/CbParseLib.c
index 66374b5a32..8509bd2f9e 100644
--- a/CorebootModulePkg/Library/CbParseLib/CbParseLib.c
+++ b/CorebootModulePkg/Library/CbParseLib/CbParseLib.c
@@ -395,6 +395,8 @@ CbParseSmbiosTable (
@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 @@ CbParseFadtInfo (
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 @@ CbParseFadtInfo (
}
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 @@ CbParseFadtInfo (
*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;
}
}