* [[POC2] 1/2] UefiCpuPkg/LocalApicLib: Rename GetProcessorLocation()
2016-11-01 2:56 [[POC2] 0/2] UefiCpuPkg/LocalApicLib: Rename GetProcessorLocation() Jeff Fan
@ 2016-11-01 2:56 ` Jeff Fan
2016-11-01 2:57 ` [[POC2] 2/2] UefiCpuPkg/LocalApicLib: Add EFIAPI for GetProcessorLocationByApicId() Jeff Fan
2016-11-01 3:07 ` [[POC2] 0/2] UefiCpuPkg/LocalApicLib: Rename GetProcessorLocation() Kinney, Michael D
2 siblings, 0 replies; 5+ messages in thread
From: Jeff Fan @ 2016-11-01 2:56 UTC (permalink / raw)
To: edk2-devel; +Cc: Leo Duran, Michael Kinney, Feng Tian
GetProcessorLocation() is too generic and will conflict with the API defined in
Galileo Board Software Package v1.0.0.
This update is just to rename GetProcessorLocation() to one specific name
GetProcessorLocationByApicId().
Contributed-under: TianoCore Contribution Agreement 1.0
Cc: Leo Duran <leo.duran@amd.com>
Cc: Michael Kinney <Michael.d.kinney@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
---
UefiCpuPkg/Include/Library/LocalApicLib.h | 2 +-
UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c | 2 +-
UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c | 2 +-
UefiCpuPkg/Library/MpInitLib/MpLib.c | 2 +-
UefiCpuPkg/PiSmmCpuDxeSmm/CpuService.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/UefiCpuPkg/Include/Library/LocalApicLib.h b/UefiCpuPkg/Include/Library/LocalApicLib.h
index fae780d..a1611f1 100644
--- a/UefiCpuPkg/Include/Library/LocalApicLib.h
+++ b/UefiCpuPkg/Include/Library/LocalApicLib.h
@@ -424,7 +424,7 @@ GetApicMsiValue (
@param[out] Thread Returns the processor thread ID.
**/
VOID
-GetProcessorLocation(
+GetProcessorLocationByApicId (
IN UINT32 InitialApicId,
OUT UINT32 *Package OPTIONAL,
OUT UINT32 *Core OPTIONAL,
diff --git a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c b/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c
index 5976403..8384913 100644
--- a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c
+++ b/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c
@@ -955,7 +955,7 @@ GetApicMsiValue (
@param[out] Thread Returns the processor thread ID.
**/
VOID
-GetProcessorLocation(
+GetProcessorLocationByApicId (
IN UINT32 InitialApicId,
OUT UINT32 *Package OPTIONAL,
OUT UINT32 *Core OPTIONAL,
diff --git a/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c b/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c
index 91ffd24..1e3c039 100644
--- a/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c
+++ b/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c
@@ -1050,7 +1050,7 @@ GetApicMsiValue (
@param[out] Thread Returns the processor thread ID.
**/
VOID
-GetProcessorLocation(
+GetProcessorLocationByApicId (
IN UINT32 InitialApicId,
OUT UINT32 *Package OPTIONAL,
OUT UINT32 *Core OPTIONAL,
diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpInitLib/MpLib.c
index f205b6b..56b870e 100644
--- a/UefiCpuPkg/Library/MpInitLib/MpLib.c
+++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c
@@ -1325,7 +1325,7 @@ MpInitLibGetProcessorInfo (
//
// Get processor location information
//
- GetProcessorLocation (
+ GetProcessorLocationByApicId (
CpuMpData->CpuData[ProcessorNumber].ApicId,
&ProcessorInfoBuffer->Location.Package,
&ProcessorInfoBuffer->Location.Core,
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuService.c b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuService.c
index 93ebb9e..29f3a58 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuService.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuService.c
@@ -161,7 +161,7 @@ SmmAddProcessor (
gSmmCpuPrivate->ProcessorInfo[Index].ProcessorId == INVALID_APIC_ID) {
gSmmCpuPrivate->ProcessorInfo[Index].ProcessorId = ProcessorId;
gSmmCpuPrivate->ProcessorInfo[Index].StatusFlag = 0;
- GetProcessorLocation (
+ GetProcessorLocationByApicId (
(UINT32)ProcessorId,
&gSmmCpuPrivate->ProcessorInfo[Index].Location.Package,
&gSmmCpuPrivate->ProcessorInfo[Index].Location.Core,
--
2.9.3.windows.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [[POC2] 2/2] UefiCpuPkg/LocalApicLib: Add EFIAPI for GetProcessorLocationByApicId()
2016-11-01 2:56 [[POC2] 0/2] UefiCpuPkg/LocalApicLib: Rename GetProcessorLocation() Jeff Fan
2016-11-01 2:56 ` [[POC2] 1/2] " Jeff Fan
@ 2016-11-01 2:57 ` Jeff Fan
2016-11-01 3:07 ` [[POC2] 0/2] UefiCpuPkg/LocalApicLib: Rename GetProcessorLocation() Kinney, Michael D
2 siblings, 0 replies; 5+ messages in thread
From: Jeff Fan @ 2016-11-01 2:57 UTC (permalink / raw)
To: edk2-devel; +Cc: Leo Duran, Michael Kinney, Feng Tian
We need to add EFIAPI for all interface service including library API.
Contributed-under: TianoCore Contribution Agreement 1.0
Cc: Leo Duran <leo.duran@amd.com>
Cc: Michael Kinney <Michael.d.kinney@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
---
UefiCpuPkg/Include/Library/LocalApicLib.h | 1 +
UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c | 1 +
UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c | 1 +
3 files changed, 3 insertions(+)
diff --git a/UefiCpuPkg/Include/Library/LocalApicLib.h b/UefiCpuPkg/Include/Library/LocalApicLib.h
index a1611f1..fc980bc 100644
--- a/UefiCpuPkg/Include/Library/LocalApicLib.h
+++ b/UefiCpuPkg/Include/Library/LocalApicLib.h
@@ -424,6 +424,7 @@ GetApicMsiValue (
@param[out] Thread Returns the processor thread ID.
**/
VOID
+EFIAPI
GetProcessorLocationByApicId (
IN UINT32 InitialApicId,
OUT UINT32 *Package OPTIONAL,
diff --git a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c b/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c
index 8384913..4064049 100644
--- a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c
+++ b/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c
@@ -955,6 +955,7 @@ GetApicMsiValue (
@param[out] Thread Returns the processor thread ID.
**/
VOID
+EFIAPI
GetProcessorLocationByApicId (
IN UINT32 InitialApicId,
OUT UINT32 *Package OPTIONAL,
diff --git a/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c b/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c
index 1e3c039..9720d26 100644
--- a/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c
+++ b/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c
@@ -1050,6 +1050,7 @@ GetApicMsiValue (
@param[out] Thread Returns the processor thread ID.
**/
VOID
+EFIAPI
GetProcessorLocationByApicId (
IN UINT32 InitialApicId,
OUT UINT32 *Package OPTIONAL,
--
2.9.3.windows.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [[POC2] 0/2] UefiCpuPkg/LocalApicLib: Rename GetProcessorLocation()
2016-11-01 2:56 [[POC2] 0/2] UefiCpuPkg/LocalApicLib: Rename GetProcessorLocation() Jeff Fan
2016-11-01 2:56 ` [[POC2] 1/2] " Jeff Fan
2016-11-01 2:57 ` [[POC2] 2/2] UefiCpuPkg/LocalApicLib: Add EFIAPI for GetProcessorLocationByApicId() Jeff Fan
@ 2016-11-01 3:07 ` Kinney, Michael D
2016-11-01 14:56 ` Duran, Leo
2 siblings, 1 reply; 5+ messages in thread
From: Kinney, Michael D @ 2016-11-01 3:07 UTC (permalink / raw)
To: Fan, Jeff, edk2-devel@lists.01.org, Kinney, Michael D, Leo Duran
Series
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Mike
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jeff Fan
> Sent: Monday, October 31, 2016 7:57 PM
> To: edk2-devel@lists.01.org
> Subject: [edk2] [[POC2] 0/2] UefiCpuPkg/LocalApicLib: Rename GetProcessorLocation()
>
> This patch is new API renaming and EFIAPI adding, building pass is enough.
>
> Jeff Fan (2):
> UefiCpuPkg/LocalApicLib: Rename GetProcessorLocation()
> UefiCpuPkg/LocalApicLib: Add EFIAPI for GetProcessorLocationByApicId()
>
> UefiCpuPkg/Include/Library/LocalApicLib.h | 3 ++-
> UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c | 3 ++-
> UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c | 3 ++-
> UefiCpuPkg/Library/MpInitLib/MpLib.c | 2 +-
> UefiCpuPkg/PiSmmCpuDxeSmm/CpuService.c | 2 +-
> 5 files changed, 8 insertions(+), 5 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] 5+ messages in thread
* Re: [[POC2] 0/2] UefiCpuPkg/LocalApicLib: Rename GetProcessorLocation()
2016-11-01 3:07 ` [[POC2] 0/2] UefiCpuPkg/LocalApicLib: Rename GetProcessorLocation() Kinney, Michael D
@ 2016-11-01 14:56 ` Duran, Leo
0 siblings, 0 replies; 5+ messages in thread
From: Duran, Leo @ 2016-11-01 14:56 UTC (permalink / raw)
To: 'Kinney, Michael D', Fan, Jeff, edk2-devel@lists.01.org
Makes sense. Thanks Jeff.
> -----Original Message-----
> From: Kinney, Michael D [mailto:michael.d.kinney@intel.com]
> Sent: Monday, October 31, 2016 10:08 PM
> To: Fan, Jeff <jeff.fan@intel.com>; edk2-devel@lists.01.org; Kinney, Michael
> D <michael.d.kinney@intel.com>; Duran, Leo <leo.duran@amd.com>
> Subject: RE: [edk2] [[POC2] 0/2] UefiCpuPkg/LocalApicLib: Rename
> GetProcessorLocation()
>
> Series
>
> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
>
> Mike
>
> > -----Original Message-----
> > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Jeff Fan
> > Sent: Monday, October 31, 2016 7:57 PM
> > To: edk2-devel@lists.01.org
> > Subject: [edk2] [[POC2] 0/2] UefiCpuPkg/LocalApicLib: Rename
> GetProcessorLocation()
> >
> > This patch is new API renaming and EFIAPI adding, building pass is enough.
> >
> > Jeff Fan (2):
> > UefiCpuPkg/LocalApicLib: Rename GetProcessorLocation()
> > UefiCpuPkg/LocalApicLib: Add EFIAPI for GetProcessorLocationByApicId()
> >
> > UefiCpuPkg/Include/Library/LocalApicLib.h | 3 ++-
> > UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c | 3 ++-
> > UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c | 3 ++-
> > UefiCpuPkg/Library/MpInitLib/MpLib.c | 2 +-
> > UefiCpuPkg/PiSmmCpuDxeSmm/CpuService.c | 2 +-
> > 5 files changed, 8 insertions(+), 5 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] 5+ messages in thread