From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail04.groups.io (mail04.groups.io [45.79.224.9]) by spool.mail.gandi.net (Postfix) with ESMTPS id 5401C94139C for ; Tue, 16 Apr 2024 10:30:27 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=4ib1L74Hg/HsgOLV4sCPrTtl6lHlr1F/Ku8r4D4lUvI=; c=relaxed/simple; d=groups.io; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Disposition; s=20240206; t=1713263425; v=1; b=Hd7O0SPnhbY+YAtAMIi2ldzlyFoPc3WUpjpLMdRyS9gwDoQ+j/fvNGJqapMoNEZUmqFf5RrA yIDHX+J/ldj2tMgqYbcCm+ik/5CXRXi9EZCSpany3frGT1jICW2ZQRqp5AnZhXMQg/0q/2xvCac 7SiwjA6VzuEIMqYfwFcpVm9ocglZxV5fIuohoQXbk9PHYPmbIPx/YgoBfdj9RFJGFp1+NkxbYL2 n2pHeAss+O2kakYsD2UlqG1g50F05ooajDPVK+F071HqS/VWjAzcP/ELduUkTWXgDt9alVirjnu F8goSYxBs1OQsjEtNNxkxOLOjP6YFSsC506PRTTlA5OYQ== X-Received: by 127.0.0.2 with SMTP id 02zLYY7687511xz7qJW2x1eX; Tue, 16 Apr 2024 03:30:25 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web11.16787.1713263425164760004 for ; Tue, 16 Apr 2024 03:30:25 -0700 X-Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-147-C9FnOjl3O5qv0smpvj75rA-1; Tue, 16 Apr 2024 06:30:20 -0400 X-MC-Unique: C9FnOjl3O5qv0smpvj75rA-1 X-Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 44C553C0F18A; Tue, 16 Apr 2024 10:30:20 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.169]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 014CF492BC7; Tue, 16 Apr 2024 10:30:20 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id F2B1718009E6; Tue, 16 Apr 2024 12:30:14 +0200 (CEST) Date: Tue, 16 Apr 2024 12:30:14 +0200 From: "Gerd Hoffmann" To: "Wu, Jiaxin" Cc: "thomas.lendacky@amd.com" , "devel@edk2.groups.io" , "Ni, Ray" , "Zeng, Star" , Ard Biesheuvel , "Yao, Jiewen" , "Kumar, Rahul R" Subject: Re: [edk2-devel] [PATCH v1 03/13] UefiCpuPkg/SmmRelocationLib: Add library instance for OVMF Message-ID: <2kd4qwvgbbn4mhlagidemtwfr3uzdgokrf5t3ttsileexkgenf@lmcby5lxm7xs> References: <20240410135724.15344-1-jiaxin.wu@intel.com> <20240410135724.15344-4-jiaxin.wu@intel.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Tue, 16 Apr 2024 03:30:25 -0700 Resent-From: kraxel@redhat.com Reply-To: devel@edk2.groups.io,kraxel@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: gMk85oXWzOcjEP6xMZQ5tjS3x7686176AA= Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=Hd7O0SPn; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.9 as permitted sender) smtp.mailfrom=bounce@groups.io Hi, > > > 2) Existing SmBase configuration is different between the AMD & OVMF. > > > OVMF: > > > AmdCpuState->x64.SMBASE = (UINT32)mSmBaseForAllCpus[CpuIndex]; > > > > > > AMD: > > > if ((CpuSaveState->x86.SMMRevId & 0xFFFF) == 0) { > > > CpuSaveState->x86.SMBASE = (UINT32)mSmBaseForAllCpus[CpuIndex]; > > > } else { > > > CpuSaveState->x64.SMBASE = (UINT32)mSmBaseForAllCpus[CpuIndex]; > > > } > I don't the background why AMD and OVMF has such difference. Maybe OVFM doesn't not support the MSR "EFER_ADDRESS". It surely does, it's a rather essential MSR for x64 CPUs. > > The SmBase configuration for OVMF looks suspicious to me. I'm wondering > > whenever the OVMF code actually works in Ia32 builds ... Tested OvmfPkg/OvmfPkgIa32.dsc with SMM_REQUIRE == TRUE (master branch). Doesn't boot. The difference above (where the OVMF code does not consider the 32bit case) could very well explain why 32bit support is broken. Switching to the AMD code might actually fix that. Is the SmmRelocationLib approach supposed to work with mixed mode firmware where PEI is running in ia32 mode and dxe/smm is running in x64 mode (i.e. OvmfPkg/OvmfPkgIa32X64.dsc)? take care, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117877): https://edk2.groups.io/g/devel/message/117877 Mute This Topic: https://groups.io/mt/105441992/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-