[edk2-devel] [PATCH 1/2] UefiCpuPkg: LocalApicLib: Export StandardSignatureIsAuthenticAMD function

Duran, Leo leo.duran at amd.com
Wed Feb 26 15:03:16 UTC 2020



> -----Original Message-----
> From: Laszlo Ersek [mailto:lersek at redhat.com]
> Sent: Wednesday, February 26, 2020 5:13 AM
> To: devel at edk2.groups.io; eric.dong at intel.com; Duran, Leo
> <leo.duran at amd.com>
> Cc: Ni, Ray <ray.ni at intel.com>
> Subject: Re: [edk2-devel] [PATCH 1/2] UefiCpuPkg: LocalApicLib: Export
> StandardSignatureIsAuthenticAMD function
> 
> On 02/26/20 06:05, Dong, Eric wrote:
> > Hi Leo,
> >
> > Yes, I means you also change the cod position in the c file, so in the patch
> file, it seems like it has other changes.
> > My recommendation is to refine the patch to not change the code postion.
> 
> Indeed I noticed that too. I figured this change -- moving the code around,
> beyond purely making it public -- was intentional. I assumed the new position
> of the function within the source code made more sense to Leo.
[Duran, Leo] You're exactly right, Laszlo, let me explain:

The function was moved down because the top spots are reserved for internal functions, according to this comment in the source::
//
// Library internal functions
//

In this case, there were two internal (local) functions at the top of the file:
BOOLEAN
StandardSignatureIsAuthenticAMD (
  VOID
  )
{
}

BOOLEAN
LocalApicBaseAddressMsrSupported (
  VOID
  )
{
}

So I moved them like this:
BOOLEAN
LocalApicBaseAddressMsrSupported (
  VOID
  )
{
}

BOOLEAN
EFIAPI
StandardSignatureIsAuthenticAMD (
  VOID
  )
{
}

Other functions that follow are external functions, using the EFIAPI prefix.
Leo.

> 
> I agree the code movement should be explained at least in the commit
> message.
> 
> Thanks
> Laszlo


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#54901): https://edk2.groups.io/g/devel/message/54901
Mute This Topic: https://groups.io/mt/71541518/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list