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.web10.9459.1592988837362559484 for ; Wed, 24 Jun 2020 01:53:57 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=c4ptRN6Q; 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=1592988836; 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=IB/7K/2DB4MW5bWuakdCazhFLMgCVH5hqLs8c0s63+A=; b=c4ptRN6QpqhIP0dKD6AlxeG6Pm14z8F908KkLBBn+ea3Wg7WAH/u1qSvlO6CWRbidjJxSB tTfOSQR5i2T5sgc/EqM9Xx1CH0bPf4iKni6mAgBcqevKwsgLeJLDrRTkcNEIH1mf485dxe lfdNNySCOOuT9JhwfwM9zi0YiBgJucw= 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-497-IlDGPn4iOHabF3_IW6-Jrg-1; Wed, 24 Jun 2020 04:53:51 -0400 X-MC-Unique: IlDGPn4iOHabF3_IW6-Jrg-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 F1C461005513; Wed, 24 Jun 2020 08:53:49 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6EF6510013D9; Wed, 24 Jun 2020 08:53:48 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v6 0/4] AMD processor MSR_IA32_MISC_ENABLE To: "Kirkendall, Garrett" , "devel@edk2.groups.io" Cc: Eric Dong , Ray Ni , Hao A Wu , "Jiang, Guomin" References: <20200622131825.1352-1-Garrett.Kirkendall@amd.com> From: "Laszlo Ersek" Message-ID: Date: Wed, 24 Jun 2020 10:53:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: 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=utf-8 Content-Transfer-Encoding: 8bit On 06/24/20 03:04, Kirkendall, Garrett wrote: > [AMD Public Use] > > Is there anything else needed from me for this patch at this time? I think we still have an open question here: https://edk2.groups.io/g/devel/message/61583 To clarify: I'm not suggesting that we should fix that issue. I'm saying that we should *understand* Guomin's report enough so we can decide *whether* this series needs a further update, or not. If there is no feedback (clarification) from Guomin in a few days, I think Eric or Ray (the UefiCpuPkg maintainers) should merge v6 -- for example, on Friday. Thanks, Laszlo > > GARRETT KIRKENDALL > SMTS Firmware Engineer | CTE > 7171 Southwest Parkway, Austin, TX 78735 USA > AMD   facebook  |  amd.com > > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Kirkendall, Garrett via groups.io > Sent: Monday, June 22, 2020 8:18 AM > To: devel@edk2.groups.io > Cc: Eric Dong ; Ray Ni ; Laszlo Ersek ; Hao A Wu > Subject: [edk2-devel] [PATCH v6 0/4] AMD processor MSR_IA32_MISC_ENABLE > > [CAUTION: External Email] > > AMD processor does not support MSR_IA32_MISC_ENABLE register. Accessing this register on AMD causes an unhandled exception in SmmEntry.nasm and a subsequent failure to boot since this is too early in SMM path for the exception handler to be loaded. > > 1. Prepare PcAtChipsetPkg/PcAtChipsetPkg.dsc to move StandardSignatureIsAuthenticAMD into UefiCpuLib LibraryClass BaseUefiCpuLib in UefiCpuPkg. > > 2. To distinguish between AMD and other processors, refactor StandardSignatureIsAuthenticAMD into BaseUefiCpuLib. So there is only one copy in the source. > > 3. Skip manipulation of MSR_IA32_MISC_ENABLE register if running on an AMD processor. > > Tested on AMD X64 hardware. > OvmfIa32 and OvmfIa32X64 on Intel hardware. > > v1: Move StandardSignatureIsAuthenticAMD. Handle MSR_IA32_MISC_ENABLE > v2: Incorporate Laszlo's feedback > v3: Typo, not sent > v4: Patch in to add UefiCpuLib to PcAtChipsetPkg.dsc > v5: Patch in to add UefiCpuLib to SourceLevelDebugPkg.dsc > v6: Hopefully reformat patch when sending???? > > Garrett Kirkendall (4): > PcAtChipsetPkg: PcAtChipsetPkg.dsc add UefiCpuLib LibraryClass > SourceLevelDebugPkg: SourceLevelDebugPkg.dsc add UefiCpuLib > LibraryClass > UefiCpuPkg: Move StandardSignatureIsAuthenticAMD to BaseUefiCpuLib > UefiCpuPkg: PiSmmCpuDxeSmm skip MSR_IA32_MISC_ENABLE manipulation on > AMD > > PcAtChipsetPkg/PcAtChipsetPkg.dsc | 2 ++ > SourceLevelDebugPkg/SourceLevelDebugPkg.dsc | 2 ++ > UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf | 7 ++++ > UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf | 2 ++ > UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf | 2 ++ > UefiCpuPkg/Include/Library/UefiCpuLib.h | 14 ++++++++ > UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfileInternal.h | 3 ++ > UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.c | 38 ++++++++++++++++++++ > UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c | 25 ++----------- > UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c | 25 ++----------- > UefiCpuPkg/Library/MpInitLib/MpLib.c | 23 ------------ > UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c | 9 ++++- > UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.nasm | 19 ++++++++-- > UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.nasm | 20 +++++++++-- > 14 files changed, 117 insertions(+), 74 deletions(-) create mode 100644 UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.c > > Changes at: > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgkirkendall-amd%2Fedk2%2Ftree%2Fsmmentry_nasm_skip_msr_xd_bit_on_amd_v6&data=02%7C01%7Cgarrett.kirkendall%40amd.com%7C5b2918ff7a2345a5ce7f08d816af8e23%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637284290553548804&sdata=F9ktro2rmOouJYui4jqTFK25TK6l1HBl317RW41QDM4%3D&reserved=0 > > Pull Request: > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fpull%2F716&data=02%7C01%7Cgarrett.kirkendall%40amd.com%7C5b2918ff7a2345a5ce7f08d816af8e23%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637284290553548804&sdata=FcHQc%2BzJHMAJfSWc9z%2FZ4Bxh5Ur4EnM%2BaIurKJ0iNYU%3D&reserved=0 > > Cc: Eric Dong > Cc: Ray Ni > Cc: Laszlo Ersek > Cc: Hao A Wu > Signed-off-by: Garrett Kirkendall > > -- > 2.27.0 > > > >