From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.120]) by mx.groups.io with SMTP id smtpd.web10.10537.1582733949717426219 for ; Wed, 26 Feb 2020 08:19:10 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BP0re+Nj; spf=pass (domain: redhat.com, ip: 205.139.110.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582733948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HG/U/zvCudva4Z0NdpeIbnXlvrGw0DEB2V9QkvYEDkk=; b=BP0re+Njq6WQ/MAwqSvB4Ih8/n4hcLqBADjKJ2D4efptnOnkY/ujWItFRGMz03NGxo9Lv0 Kmq1DDpHqvrCpFmcTfdgBqVYobrU1NZOEtF4NRaYE3mqeWeJRURY0hvALUfobN8boBKHC4 GU9pML9t2K8CMR/VGmNLUqGJSkYR7nk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-310-uCfSM8kBO-GQOURssHX70w-1; Wed, 26 Feb 2020 11:19:05 -0500 X-MC-Unique: uCfSM8kBO-GQOURssHX70w-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1C3D7185737E; Wed, 26 Feb 2020 16:19:04 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-185.ams2.redhat.com [10.36.116.185]) by smtp.corp.redhat.com (Postfix) with ESMTP id DD46C5DA76; Wed, 26 Feb 2020 16:19:02 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH 1/2] UefiCpuPkg: LocalApicLib: Export StandardSignatureIsAuthenticAMD function To: "Duran, Leo" , "devel@edk2.groups.io" , "eric.dong@intel.com" Cc: "Ni, Ray" References: <1582659566-9893-1-git-send-email-leo.duran@amd.com> <1582659566-9893-2-git-send-email-leo.duran@amd.com> <7748cd85-7255-6319-e1a4-c6d12260b4b0@redhat.com> From: "Laszlo Ersek" Message-ID: Date: Wed, 26 Feb 2020 17:19:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 02/26/20 16:03, Duran, Leo wrote: > > >> -----Original Message----- >> From: Laszlo Ersek [mailto:lersek@redhat.com] >> Sent: Wednesday, February 26, 2020 5:13 AM >> To: devel@edk2.groups.io; eric.dong@intel.com; Duran, Leo >> >> Cc: Ni, Ray >> 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. makes sense, thanks. Laszlo