From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.120]) by mx.groups.io with SMTP id smtpd.web12.653.1582678495870685204 for ; Tue, 25 Feb 2020 16:54:56 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QSsHngmZ; spf=pass (domain: redhat.com, ip: 207.211.31.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582678495; 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=ZHOs0knxwxe7ViGrBFSojH7mtYXIvyto0tRaFXj8GsU=; b=QSsHngmZvsoaTMbaT3o7tOr4Jp8TLBwGjgqvujJONEG5qBZ4yr6MHs9PjxW1Kgl058/EeE ewJp/kANzT0mnhxUqmPuVlpdmYW5pNHi6kIHS9NOGiF/kJklTWTkN1LeQ8ZUkAmfj0YiKq gKygR6V5lRMnYM0BSaQzWxqokFMkvLQ= 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-189-fWptIIrjPy6nFbBv5RD0Cg-1; Tue, 25 Feb 2020 19:54:50 -0500 X-MC-Unique: fWptIIrjPy6nFbBv5RD0Cg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AB55F800D54; Wed, 26 Feb 2020 00:54:49 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-117-104.ams2.redhat.com [10.36.117.104]) by smtp.corp.redhat.com (Postfix) with ESMTP id A6C99100164D; Wed, 26 Feb 2020 00:54:48 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH 0/2] UefiCpuPkg/Library: Fix bug in MpInitLib To: devel@edk2.groups.io, leo.duran@amd.com References: <1582659566-9893-1-git-send-email-leo.duran@amd.com> Cc: Eric Dong , Ray Ni From: "Laszlo Ersek" Message-ID: Date: Wed, 26 Feb 2020 01:54:47 +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: <1582659566-9893-1-git-send-email-leo.duran@amd.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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 Hi Leo, On 02/25/20 20:39, Leo Duran wrote: > This patch set fixes an issue introduced recently in MpInitLib, where we read > a PlatformId MSR that is not implemented on AMD processors. > > The proposed solution is to export the StandardSignatureIsAuthenticAMD function > from LocalApicLib, so that it may be used by MpInitLib or any other module that > consumes LocalApicLib. > > Alternatively, we considered creating a new library, but opted against it as > that would incur quite a bit of churning across modules that consume MpInitLib. > > BTW, reading the PlatformId MSR was already being done by MicrocodeDetect(), > but it never affected AMD-based platforms as the flow never gets that far, since > the Detect routine bails out early when it finds the size of the patch is zero. > > > Leo Duran (2): > UefiCpuPkg: LocalApicLib: Export StandardSignatureIsAuthenticAMD > function > UefiCpuPkg: MpInitLib: Exclude code no pertinent to AMD processors. > > UefiCpuPkg/Include/Library/LocalApicLib.h | 15 +++++++ > UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c | 47 +++++++++++----------- > .../BaseXApicX2ApicLib/BaseXApicX2ApicLib.c | 47 +++++++++++----------- > UefiCpuPkg/Library/MpInitLib/Microcode.c | 17 +++++++- > UefiCpuPkg/Library/MpInitLib/MpLib.c | 11 ++++- > 5 files changed, 87 insertions(+), 50 deletions(-) > from my perspective I'm OK with this approach: Acked-by: Laszlo Ersek but Ray and Eric have the final word on this, of course. Thanks Laszlo