public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 0/2] Place APs to suitable state on Legacy OS boot
@ 2016-11-11 11:57 Jeff Fan
  2016-11-11 11:57 ` [PATCH 1/2] UefiCpuPkg/DxeMpLib: Rename MpInitExitBootServicesCallback() Jeff Fan
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Jeff Fan @ 2016-11-11 11:57 UTC (permalink / raw)
  To: edk2-devel

Currently, DxeMpLib only places APs into specified c-state in Exit Boot Service
callback function for UEFI OS boot. We need to put APs into specified c-state
for legacy OS boot also.

https://bugzilla.tianocore.org/show_bug.cgi?id=210

Jeff Fan (2):
  UefiCpuPkg/DxeMpLib: Rename MpInitExitBootServicesCallback()
  UefiCpuPkg/DxeMpLib: Place APs to suitable state on Legacy OS boot

 UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf |  1 +
 UefiCpuPkg/Library/MpInitLib/DxeMpLib.c       | 18 +++++++++++++++---
 2 files changed, 16 insertions(+), 3 deletions(-)

-- 
2.9.3.windows.2



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] UefiCpuPkg/DxeMpLib: Rename MpInitExitBootServicesCallback()
  2016-11-11 11:57 [PATCH 0/2] Place APs to suitable state on Legacy OS boot Jeff Fan
@ 2016-11-11 11:57 ` Jeff Fan
  2016-11-11 11:57 ` [PATCH 2/2] UefiCpuPkg/DxeMpLib: Place APs to suitable state on Legacy OS boot Jeff Fan
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Jeff Fan @ 2016-11-11 11:57 UTC (permalink / raw)
  To: edk2-devel
  Cc: Laszlo Ersek, Paolo Bonzini, Feng Tian, Jiewen Yao,
	Michael D Kinney

Rename MpInitExitBootServicesCallback() to MpInitChangeApLoopCallback() because
it will not only be invoked on Exit Boot Service Event, but also will be invoked
on Legacy Ready To Boot Event.

https://bugzilla.tianocore.org/show_bug.cgi?id=210

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
---
 UefiCpuPkg/Library/MpInitLib/DxeMpLib.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c b/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c
index 4b929ff..7ba4b80 100644
--- a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c
+++ b/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c
@@ -261,7 +261,7 @@ RelocateApLoop (
 **/
 VOID
 EFIAPI
-MpInitExitBootServicesCallback (
+MpInitChangeApLoopCallback (
   IN EFI_EVENT                Event,
   IN VOID                     *Context
   )
@@ -273,7 +273,7 @@ MpInitExitBootServicesCallback (
   CpuMpData->PmCodeSegment = GetProtectedModeCS ();
   CpuMpData->ApLoopMode = PcdGet8 (PcdCpuApLoopMode);
   WakeUpAP (CpuMpData, TRUE, 0, RelocateApLoop, mReservedApLoopFunc);
-  DEBUG ((DEBUG_INFO, "MpInitExitBootServicesCallback() done!\n"));
+  DEBUG ((DEBUG_INFO, "%a() done!\n", __FUNCTION__));
 }
 
 /**
@@ -343,7 +343,7 @@ InitMpGlobalData (
   Status = gBS->CreateEvent (
                   EVT_SIGNAL_EXIT_BOOT_SERVICES,
                   TPL_CALLBACK,
-                  MpInitExitBootServicesCallback,
+                  MpInitChangeApLoopCallback,
                   NULL,
                   &mMpInitExitBootServicesEvent
                   );
-- 
2.9.3.windows.2



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] UefiCpuPkg/DxeMpLib: Place APs to suitable state on Legacy OS boot
  2016-11-11 11:57 [PATCH 0/2] Place APs to suitable state on Legacy OS boot Jeff Fan
  2016-11-11 11:57 ` [PATCH 1/2] UefiCpuPkg/DxeMpLib: Rename MpInitExitBootServicesCallback() Jeff Fan
@ 2016-11-11 11:57 ` Jeff Fan
  2016-11-11 12:33 ` [PATCH 0/2] " Laszlo Ersek
  2016-11-14  1:37 ` Tian, Feng
  3 siblings, 0 replies; 6+ messages in thread
From: Jeff Fan @ 2016-11-11 11:57 UTC (permalink / raw)
  To: edk2-devel
  Cc: Laszlo Ersek, Paolo Bonzini, Feng Tian, Jiewen Yao,
	Michael D Kinney

Currently, DxeMpLib only places APs into specified c-state in Exit Boot Service
callback function for UEFI OS boot. We need to put APs into specified c-state
for legacy OS boot also.

https://bugzilla.tianocore.org/show_bug.cgi?id=210

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
---
 UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf |  1 +
 UefiCpuPkg/Library/MpInitLib/DxeMpLib.c       | 12 ++++++++++++
 2 files changed, 13 insertions(+)

diff --git a/UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf b/UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
index 03a8994..972c9ad 100644
--- a/UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
+++ b/UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
@@ -58,6 +58,7 @@
 
 [Guids]
   gEfiEventExitBootServicesGuid                 ## CONSUMES  ## Event
+  gEfiEventLegacyBootGuid                       ## CONSUMES  ## Event
 
 [Pcd]
   gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber        ## CONSUMES
diff --git a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c b/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c
index 7ba4b80..793d947 100644
--- a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c
+++ b/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c
@@ -22,6 +22,7 @@
 CPU_MP_DATA      *mCpuMpData = NULL;
 EFI_EVENT        mCheckAllApsEvent = NULL;
 EFI_EVENT        mMpInitExitBootServicesEvent = NULL;
+EFI_EVENT        mLegacyBootEvent = NULL;
 volatile BOOLEAN mStopCheckAllApsStatus = TRUE;
 VOID             *mReservedApLoopFunc = NULL;
 
@@ -340,6 +341,7 @@ InitMpGlobalData (
                   AP_CHECK_INTERVAL
                   );
   ASSERT_EFI_ERROR (Status);
+
   Status = gBS->CreateEvent (
                   EVT_SIGNAL_EXIT_BOOT_SERVICES,
                   TPL_CALLBACK,
@@ -348,6 +350,16 @@ InitMpGlobalData (
                   &mMpInitExitBootServicesEvent
                   );
   ASSERT_EFI_ERROR (Status);
+
+  Status = gBS->CreateEventEx (
+                  EVT_NOTIFY_SIGNAL,
+                  TPL_CALLBACK,
+                  MpInitChangeApLoopCallback,
+                  NULL,
+                  &gEfiEventLegacyBootGuid,
+                  &mLegacyBootEvent
+                  );
+  ASSERT_EFI_ERROR (Status);
 }
 
 /**
-- 
2.9.3.windows.2



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] Place APs to suitable state on Legacy OS boot
  2016-11-11 11:57 [PATCH 0/2] Place APs to suitable state on Legacy OS boot Jeff Fan
  2016-11-11 11:57 ` [PATCH 1/2] UefiCpuPkg/DxeMpLib: Rename MpInitExitBootServicesCallback() Jeff Fan
  2016-11-11 11:57 ` [PATCH 2/2] UefiCpuPkg/DxeMpLib: Place APs to suitable state on Legacy OS boot Jeff Fan
@ 2016-11-11 12:33 ` Laszlo Ersek
  2016-11-11 12:39   ` Fan, Jeff
  2016-11-14  1:37 ` Tian, Feng
  3 siblings, 1 reply; 6+ messages in thread
From: Laszlo Ersek @ 2016-11-11 12:33 UTC (permalink / raw)
  To: Jeff Fan; +Cc: edk2-devel, Feng Tian, Jiewen Yao, Michael D Kinney,
	Paolo Bonzini

On 11/11/16 12:57, Jeff Fan wrote:
> Currently, DxeMpLib only places APs into specified c-state in Exit Boot Service
> callback function for UEFI OS boot. We need to put APs into specified c-state
> for legacy OS boot also.
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=210
> 
> Jeff Fan (2):
>   UefiCpuPkg/DxeMpLib: Rename MpInitExitBootServicesCallback()
>   UefiCpuPkg/DxeMpLib: Place APs to suitable state on Legacy OS boot
> 
>  UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf |  1 +
>  UefiCpuPkg/Library/MpInitLib/DxeMpLib.c       | 18 +++++++++++++++---
>  2 files changed, 16 insertions(+), 3 deletions(-)
> 

>From a cursory look, it looks good to me, but I think I'll leave the
official review on this to Mike et al :)

Also, a meta-hint: when you post a cover letter for a patch series, it
is best to collect all the CC's from the patches, sort them uniquely,
and then add the resulting CC list to the cover letter as well. This way
every CC'd person will receive the high level description for the entire
set.

https://github.com/tianocore/tianocore.github.io/wiki/Laszlo's-unkempt-git-guide-for-edk2-contributors-and-maintainers#contrib-23

    * finally, add all of the Cc: tags to the cover letter that you
      used across all of the patches. This will ensure that even if a
      maintainer is involved in reviewing one or two of your patches
      across the series, he or she will get a copy of your cover
      letter, which outlines the full feature or bugfix.

Thanks,
Laszlo


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] Place APs to suitable state on Legacy OS boot
  2016-11-11 12:33 ` [PATCH 0/2] " Laszlo Ersek
@ 2016-11-11 12:39   ` Fan, Jeff
  0 siblings, 0 replies; 6+ messages in thread
From: Fan, Jeff @ 2016-11-11 12:39 UTC (permalink / raw)
  To: Laszlo Ersek
  Cc: edk2-devel@ml01.01.org, Tian, Feng, Yao, Jiewen,
	Kinney, Michael D, Paolo Bonzini

Laszlo,

Got you. It's a good suggestion!

Jeff

-----Original Message-----
From: Laszlo Ersek [mailto:lersek@redhat.com] 
Sent: Friday, November 11, 2016 8:33 PM
To: Fan, Jeff
Cc: edk2-devel@ml01.01.org; Tian, Feng; Yao, Jiewen; Kinney, Michael D; Paolo Bonzini
Subject: Re: [edk2] [PATCH 0/2] Place APs to suitable state on Legacy OS boot

On 11/11/16 12:57, Jeff Fan wrote:
> Currently, DxeMpLib only places APs into specified c-state in Exit 
> Boot Service callback function for UEFI OS boot. We need to put APs 
> into specified c-state for legacy OS boot also.
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=210
> 
> Jeff Fan (2):
>   UefiCpuPkg/DxeMpLib: Rename MpInitExitBootServicesCallback()
>   UefiCpuPkg/DxeMpLib: Place APs to suitable state on Legacy OS boot
> 
>  UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf |  1 +
>  UefiCpuPkg/Library/MpInitLib/DxeMpLib.c       | 18 +++++++++++++++---
>  2 files changed, 16 insertions(+), 3 deletions(-)
> 

>From a cursory look, it looks good to me, but I think I'll leave the official review on this to Mike et al :)

Also, a meta-hint: when you post a cover letter for a patch series, it is best to collect all the CC's from the patches, sort them uniquely, and then add the resulting CC list to the cover letter as well. This way every CC'd person will receive the high level description for the entire set.

https://github.com/tianocore/tianocore.github.io/wiki/Laszlo's-unkempt-git-guide-for-edk2-contributors-and-maintainers#contrib-23

    * finally, add all of the Cc: tags to the cover letter that you
      used across all of the patches. This will ensure that even if a
      maintainer is involved in reviewing one or two of your patches
      across the series, he or she will get a copy of your cover
      letter, which outlines the full feature or bugfix.

Thanks,
Laszlo


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] Place APs to suitable state on Legacy OS boot
  2016-11-11 11:57 [PATCH 0/2] Place APs to suitable state on Legacy OS boot Jeff Fan
                   ` (2 preceding siblings ...)
  2016-11-11 12:33 ` [PATCH 0/2] " Laszlo Ersek
@ 2016-11-14  1:37 ` Tian, Feng
  3 siblings, 0 replies; 6+ messages in thread
From: Tian, Feng @ 2016-11-14  1:37 UTC (permalink / raw)
  To: Fan, Jeff, edk2-devel@ml01.01.org; +Cc: Tian, Feng

Reviewed-by: Feng Tian <feng.tian@intel.com>

Thanks
Feng

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jeff Fan
Sent: Friday, November 11, 2016 7:58 PM
To: edk2-devel@ml01.01.org
Subject: [edk2] [PATCH 0/2] Place APs to suitable state on Legacy OS boot

Currently, DxeMpLib only places APs into specified c-state in Exit Boot Service callback function for UEFI OS boot. We need to put APs into specified c-state for legacy OS boot also.

https://bugzilla.tianocore.org/show_bug.cgi?id=210

Jeff Fan (2):
  UefiCpuPkg/DxeMpLib: Rename MpInitExitBootServicesCallback()
  UefiCpuPkg/DxeMpLib: Place APs to suitable state on Legacy OS boot

 UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf |  1 +
 UefiCpuPkg/Library/MpInitLib/DxeMpLib.c       | 18 +++++++++++++++---
 2 files changed, 16 insertions(+), 3 deletions(-)

--
2.9.3.windows.2

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-11-14  1:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-11 11:57 [PATCH 0/2] Place APs to suitable state on Legacy OS boot Jeff Fan
2016-11-11 11:57 ` [PATCH 1/2] UefiCpuPkg/DxeMpLib: Rename MpInitExitBootServicesCallback() Jeff Fan
2016-11-11 11:57 ` [PATCH 2/2] UefiCpuPkg/DxeMpLib: Place APs to suitable state on Legacy OS boot Jeff Fan
2016-11-11 12:33 ` [PATCH 0/2] " Laszlo Ersek
2016-11-11 12:39   ` Fan, Jeff
2016-11-14  1:37 ` Tian, Feng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox