* [edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/BoardAcpiLib: Fix GP Fault in ACPI Enable SMI
@ 2021-08-11 23:40 Oram, Isaac W
2021-08-12 2:30 ` Nate DeSimone
2021-08-12 2:51 ` Nate DeSimone
0 siblings, 2 replies; 3+ messages in thread
From: Oram, Isaac W @ 2021-08-11 23:40 UTC (permalink / raw)
To: devel; +Cc: Nate DeSimone, Chasel Chiu
Fixed AcpiSmm library BoardAcpiLib to use the correct SMM services
table and DynamicSiliconLibrarySmmProtocol.
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmBoardAcpiEnableLib.inf | 4 ++--
Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmSiliconAcpiEnableLib.c | 16 ++++++++--------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmBoardAcpiEnableLib.inf b/Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmBoardAcpiEnableLib.inf
index fcbc94cc50..19d29ed40f 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmBoardAcpiEnableLib.inf
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmBoardAcpiEnableLib.inf
@@ -42,7 +42,7 @@
SmmBoardAcpiEnableLib.c
[Protocols]
- gDynamicSiLibraryProtocolGuid ## CONSUMES
+ gDynamicSiLibrarySmmProtocolGuid ## CONSUMES
[Depex]
- gDynamicSiLibraryProtocolGuid
+ gDynamicSiLibrarySmmProtocolGuid
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmSiliconAcpiEnableLib.c b/Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmSiliconAcpiEnableLib.c
index 2b8a35c7e8..484311811b 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmSiliconAcpiEnableLib.c
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmSiliconAcpiEnableLib.c
@@ -16,8 +16,8 @@
#include <Library/PcdLib.h>
#include <Library/DebugLib.h>
#include <PchAccess.h>
-#include <Protocol/DynamicSiLibraryProtocol.h>
-#include <Library/UefiBootServicesTableLib.h>
+#include <Protocol/DynamicSiLibrarySmmProtocol.h>
+#include <Library/SmmServicesTableLib.h>
/**
Clear Port 80h
@@ -61,9 +61,9 @@ SiliconEnableAcpi (
UINT16 Pm1Cnt;
UINT16 PchPmBase;
EFI_STATUS Status;
- DYNAMIC_SI_LIBARY_PROTOCOL *DynamicSiLibraryProtocol = NULL;
+ DYNAMIC_SI_LIBARY_SMM_PROTOCOL *DynamicSiLibrarySmmProtocol = NULL;
- Status = gBS->LocateProtocol (&gDynamicSiLibraryProtocolGuid, NULL, &DynamicSiLibraryProtocol);
+ Status = gSmst->SmmLocateProtocol (&gDynamicSiLibrarySmmProtocolGuid, NULL, &DynamicSiLibrarySmmProtocol);
if (EFI_ERROR (Status)) {
ASSERT_EFI_ERROR (Status);
return Status;
@@ -72,7 +72,7 @@ SiliconEnableAcpi (
//
// Init Power Management I/O Base aka ACPI Base
//
- PchPmBase = DynamicSiLibraryProtocol->PmcGetAcpiBase ();
+ PchPmBase = DynamicSiLibrarySmmProtocol->PmcGetAcpiBase ();
SmiEn = IoRead32 (PchPmBase + R_ACPI_IO_SMI_EN);
@@ -112,9 +112,9 @@ SiliconDisableAcpi (
UINT16 Pm1Cnt;
UINT16 PchPmBase;
EFI_STATUS Status;
- DYNAMIC_SI_LIBARY_PROTOCOL *DynamicSiLibraryProtocol = NULL;
+ DYNAMIC_SI_LIBARY_SMM_PROTOCOL *DynamicSiLibrarySmmProtocol = NULL;
- Status = gBS->LocateProtocol (&gDynamicSiLibraryProtocolGuid, NULL, &DynamicSiLibraryProtocol);
+ Status = gSmst->SmmLocateProtocol (&gDynamicSiLibrarySmmProtocolGuid, NULL, &DynamicSiLibrarySmmProtocol);
if (EFI_ERROR (Status)) {
ASSERT_EFI_ERROR (Status);
return Status;
@@ -123,7 +123,7 @@ SiliconDisableAcpi (
//
// Init Power Management I/O Base aka ACPI Base
//
- PchPmBase = DynamicSiLibraryProtocol->PmcGetAcpiBase ();
+ PchPmBase = DynamicSiLibrarySmmProtocol->PmcGetAcpiBase ();
Pm1Cnt = IoRead16 (PchPmBase + R_ACPI_IO_PM1_CNT);
--
2.27.0.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/BoardAcpiLib: Fix GP Fault in ACPI Enable SMI
2021-08-11 23:40 [edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/BoardAcpiLib: Fix GP Fault in ACPI Enable SMI Oram, Isaac W
@ 2021-08-12 2:30 ` Nate DeSimone
2021-08-12 2:51 ` Nate DeSimone
1 sibling, 0 replies; 3+ messages in thread
From: Nate DeSimone @ 2021-08-12 2:30 UTC (permalink / raw)
To: Oram, Isaac W, devel@edk2.groups.io; +Cc: Chiu, Chasel
Good Catch!
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
-----Original Message-----
From: Oram, Isaac W <isaac.w.oram@intel.com>
Sent: Wednesday, August 11, 2021 4:40 PM
To: devel@edk2.groups.io
Cc: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>
Subject: [edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/BoardAcpiLib: Fix GP Fault in ACPI Enable SMI
Fixed AcpiSmm library BoardAcpiLib to use the correct SMM services table and DynamicSiliconLibrarySmmProtocol.
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmBoardAcpiEnableLib.inf | 4 ++-- Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmSiliconAcpiEnableLib.c | 16 ++++++++--------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmBoardAcpiEnableLib.inf b/Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmBoardAcpiEnableLib.inf
index fcbc94cc50..19d29ed40f 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmBoardAcpiEnableLib.inf
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmBoardAc
+++ piEnableLib.inf
@@ -42,7 +42,7 @@
SmmBoardAcpiEnableLib.c
[Protocols]
- gDynamicSiLibraryProtocolGuid ## CONSUMES
+ gDynamicSiLibrarySmmProtocolGuid ## CONSUMES
[Depex]
- gDynamicSiLibraryProtocolGuid
+ gDynamicSiLibrarySmmProtocolGuid
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmSiliconAcpiEnableLib.c b/Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmSiliconAcpiEnableLib.c
index 2b8a35c7e8..484311811b 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmSiliconAcpiEnableLib.c
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmSilicon
+++ AcpiEnableLib.c
@@ -16,8 +16,8 @@
#include <Library/PcdLib.h>
#include <Library/DebugLib.h>
#include <PchAccess.h>
-#include <Protocol/DynamicSiLibraryProtocol.h>
-#include <Library/UefiBootServicesTableLib.h>
+#include <Protocol/DynamicSiLibrarySmmProtocol.h>
+#include <Library/SmmServicesTableLib.h>
/**
Clear Port 80h
@@ -61,9 +61,9 @@ SiliconEnableAcpi (
UINT16 Pm1Cnt;
UINT16 PchPmBase;
EFI_STATUS Status;
- DYNAMIC_SI_LIBARY_PROTOCOL *DynamicSiLibraryProtocol = NULL;
+ DYNAMIC_SI_LIBARY_SMM_PROTOCOL *DynamicSiLibrarySmmProtocol = NULL;
- Status = gBS->LocateProtocol (&gDynamicSiLibraryProtocolGuid, NULL, &DynamicSiLibraryProtocol);
+ Status = gSmst->SmmLocateProtocol (&gDynamicSiLibrarySmmProtocolGuid,
+ NULL, &DynamicSiLibrarySmmProtocol);
if (EFI_ERROR (Status)) {
ASSERT_EFI_ERROR (Status);
return Status;
@@ -72,7 +72,7 @@ SiliconEnableAcpi (
//
// Init Power Management I/O Base aka ACPI Base
//
- PchPmBase = DynamicSiLibraryProtocol->PmcGetAcpiBase ();
+ PchPmBase = DynamicSiLibrarySmmProtocol->PmcGetAcpiBase ();
SmiEn = IoRead32 (PchPmBase + R_ACPI_IO_SMI_EN);
@@ -112,9 +112,9 @@ SiliconDisableAcpi (
UINT16 Pm1Cnt;
UINT16 PchPmBase;
EFI_STATUS Status;
- DYNAMIC_SI_LIBARY_PROTOCOL *DynamicSiLibraryProtocol = NULL;
+ DYNAMIC_SI_LIBARY_SMM_PROTOCOL *DynamicSiLibrarySmmProtocol = NULL;
- Status = gBS->LocateProtocol (&gDynamicSiLibraryProtocolGuid, NULL, &DynamicSiLibraryProtocol);
+ Status = gSmst->SmmLocateProtocol (&gDynamicSiLibrarySmmProtocolGuid,
+ NULL, &DynamicSiLibrarySmmProtocol);
if (EFI_ERROR (Status)) {
ASSERT_EFI_ERROR (Status);
return Status;
@@ -123,7 +123,7 @@ SiliconDisableAcpi (
//
// Init Power Management I/O Base aka ACPI Base
//
- PchPmBase = DynamicSiLibraryProtocol->PmcGetAcpiBase ();
+ PchPmBase = DynamicSiLibrarySmmProtocol->PmcGetAcpiBase ();
Pm1Cnt = IoRead16 (PchPmBase + R_ACPI_IO_PM1_CNT);
--
2.27.0.windows.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/BoardAcpiLib: Fix GP Fault in ACPI Enable SMI
2021-08-11 23:40 [edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/BoardAcpiLib: Fix GP Fault in ACPI Enable SMI Oram, Isaac W
2021-08-12 2:30 ` Nate DeSimone
@ 2021-08-12 2:51 ` Nate DeSimone
1 sibling, 0 replies; 3+ messages in thread
From: Nate DeSimone @ 2021-08-12 2:51 UTC (permalink / raw)
To: Oram, Isaac W, devel@edk2.groups.io; +Cc: Chiu, Chasel
Pushed: https://github.com/tianocore/edk2-platforms/commit/cd4e6b7
-----Original Message-----
From: Oram, Isaac W <isaac.w.oram@intel.com>
Sent: Wednesday, August 11, 2021 4:40 PM
To: devel@edk2.groups.io
Cc: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>
Subject: [edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/BoardAcpiLib: Fix GP Fault in ACPI Enable SMI
Fixed AcpiSmm library BoardAcpiLib to use the correct SMM services table and DynamicSiliconLibrarySmmProtocol.
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmBoardAcpiEnableLib.inf | 4 ++-- Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmSiliconAcpiEnableLib.c | 16 ++++++++--------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmBoardAcpiEnableLib.inf b/Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmBoardAcpiEnableLib.inf
index fcbc94cc50..19d29ed40f 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmBoardAcpiEnableLib.inf
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmBoardAc
+++ piEnableLib.inf
@@ -42,7 +42,7 @@
SmmBoardAcpiEnableLib.c
[Protocols]
- gDynamicSiLibraryProtocolGuid ## CONSUMES
+ gDynamicSiLibrarySmmProtocolGuid ## CONSUMES
[Depex]
- gDynamicSiLibraryProtocolGuid
+ gDynamicSiLibrarySmmProtocolGuid
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmSiliconAcpiEnableLib.c b/Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmSiliconAcpiEnableLib.c
index 2b8a35c7e8..484311811b 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmSiliconAcpiEnableLib.c
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Library/BoardAcpiLib/SmmSilicon
+++ AcpiEnableLib.c
@@ -16,8 +16,8 @@
#include <Library/PcdLib.h>
#include <Library/DebugLib.h>
#include <PchAccess.h>
-#include <Protocol/DynamicSiLibraryProtocol.h>
-#include <Library/UefiBootServicesTableLib.h>
+#include <Protocol/DynamicSiLibrarySmmProtocol.h>
+#include <Library/SmmServicesTableLib.h>
/**
Clear Port 80h
@@ -61,9 +61,9 @@ SiliconEnableAcpi (
UINT16 Pm1Cnt;
UINT16 PchPmBase;
EFI_STATUS Status;
- DYNAMIC_SI_LIBARY_PROTOCOL *DynamicSiLibraryProtocol = NULL;
+ DYNAMIC_SI_LIBARY_SMM_PROTOCOL *DynamicSiLibrarySmmProtocol = NULL;
- Status = gBS->LocateProtocol (&gDynamicSiLibraryProtocolGuid, NULL, &DynamicSiLibraryProtocol);
+ Status = gSmst->SmmLocateProtocol (&gDynamicSiLibrarySmmProtocolGuid,
+ NULL, &DynamicSiLibrarySmmProtocol);
if (EFI_ERROR (Status)) {
ASSERT_EFI_ERROR (Status);
return Status;
@@ -72,7 +72,7 @@ SiliconEnableAcpi (
//
// Init Power Management I/O Base aka ACPI Base
//
- PchPmBase = DynamicSiLibraryProtocol->PmcGetAcpiBase ();
+ PchPmBase = DynamicSiLibrarySmmProtocol->PmcGetAcpiBase ();
SmiEn = IoRead32 (PchPmBase + R_ACPI_IO_SMI_EN);
@@ -112,9 +112,9 @@ SiliconDisableAcpi (
UINT16 Pm1Cnt;
UINT16 PchPmBase;
EFI_STATUS Status;
- DYNAMIC_SI_LIBARY_PROTOCOL *DynamicSiLibraryProtocol = NULL;
+ DYNAMIC_SI_LIBARY_SMM_PROTOCOL *DynamicSiLibrarySmmProtocol = NULL;
- Status = gBS->LocateProtocol (&gDynamicSiLibraryProtocolGuid, NULL, &DynamicSiLibraryProtocol);
+ Status = gSmst->SmmLocateProtocol (&gDynamicSiLibrarySmmProtocolGuid,
+ NULL, &DynamicSiLibrarySmmProtocol);
if (EFI_ERROR (Status)) {
ASSERT_EFI_ERROR (Status);
return Status;
@@ -123,7 +123,7 @@ SiliconDisableAcpi (
//
// Init Power Management I/O Base aka ACPI Base
//
- PchPmBase = DynamicSiLibraryProtocol->PmcGetAcpiBase ();
+ PchPmBase = DynamicSiLibrarySmmProtocol->PmcGetAcpiBase ();
Pm1Cnt = IoRead16 (PchPmBase + R_ACPI_IO_PM1_CNT);
--
2.27.0.windows.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-12 2:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-11 23:40 [edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/BoardAcpiLib: Fix GP Fault in ACPI Enable SMI Oram, Isaac W
2021-08-12 2:30 ` Nate DeSimone
2021-08-12 2:51 ` Nate DeSimone
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox