From nobody Sat Dec 28 12:08:36 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1494398987027372.28134867016524; Tue, 9 May 2017 23:49:47 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id F420F21959D3E; Tue, 9 May 2017 23:49:45 -0700 (PDT) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CEA7A21A1349E for ; Tue, 9 May 2017 23:49:44 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP; 09 May 2017 23:49:44 -0700 Received: from jfan12-desk.ccr.corp.intel.com ([10.239.158.57]) by FMSMGA003.fm.intel.com with ESMTP; 09 May 2017 23:49:39 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,318,1491289200"; d="scan'208";a="855060288" From: Jeff Fan To: edk2-devel@lists.01.org Date: Wed, 10 May 2017 14:49:31 +0800 Message-Id: <20170510064932.5932-2-jeff.fan@intel.com> X-Mailer: git-send-email 2.9.3.windows.2 In-Reply-To: <20170510064932.5932-1-jeff.fan@intel.com> References: <20170510064932.5932-1-jeff.fan@intel.com> Subject: [edk2] [PATCH 1/2] UefiCpuPkg/SmmCpuFeaturesLib: Fix Ia32/SmiEntry.asm build issue X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jiewen Yao , Eric Dong MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Jiewen Yao Cc: Eric Dong Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan Reviewed-by: Eric Dong --- UefiCpuPkg/Library/SmmCpuFeaturesLib/Ia32/SmiEntry.asm | 6 +++--- .../Library/SmmCpuFeaturesLib/Ia32/SmiException.asm | 15 ++++++++++-= ---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/UefiCpuPkg/Library/SmmCpuFeaturesLib/Ia32/SmiEntry.asm b/UefiC= puPkg/Library/SmmCpuFeaturesLib/Ia32/SmiEntry.asm index 94888d5..91dc1eb 100644 --- a/UefiCpuPkg/Library/SmmCpuFeaturesLib/Ia32/SmiEntry.asm +++ b/UefiCpuPkg/Library/SmmCpuFeaturesLib/Ia32/SmiEntry.asm @@ -1,5 +1,5 @@ ;-------------------------------------------------------------------------= ----- ; -; Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.
+; Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
; This program and the accompanying materials ; are licensed and made available under the terms and conditions of the BS= D License ; which accompanies this distribution. The full text of the license may b= e found at @@ -201,7 +201,7 @@ CommonHandler: call eax add esp, 4 =20 - mov eax, gStmXdSupported + mov eax, offset gStmXdSupported mov al, [eax] cmp al, 0 jz @f @@ -221,7 +221,7 @@ _StmSmiHandler: ; Check XD disable bit ; xor esi, esi - mov eax, gStmXdSupported + mov eax, offset gStmXdSupported mov al, [eax] cmp al, 0 jz @StmXdDone diff --git a/UefiCpuPkg/Library/SmmCpuFeaturesLib/Ia32/SmiException.asm b/U= efiCpuPkg/Library/SmmCpuFeaturesLib/Ia32/SmiException.asm index 7c04ad9..d0ae147 100644 --- a/UefiCpuPkg/Library/SmmCpuFeaturesLib/Ia32/SmiException.asm +++ b/UefiCpuPkg/Library/SmmCpuFeaturesLib/Ia32/SmiException.asm @@ -1,5 +1,5 @@ ;-------------------------------------------------------------------------= ----- ; -; Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.
+; Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
; This program and the accompanying materials ; are licensed and made available under the terms and conditions of the BS= D License ; which accompanies this distribution. The full text of the license may b= e found at @@ -26,11 +26,16 @@ EXTERNDEF gcStmPsd:BYTE EXTERNDEF SmmStmExceptionHandler:PROC EXTERNDEF SmmStmSetup:PROC EXTERNDEF SmmStmTeardown:PROC +EXTERNDEF gStmXdSupported:BYTE =20 CODE_SEL =3D 08h DATA_SEL =3D 20h TSS_SEL =3D 40h =20 +MSR_IA32_MISC_ENABLE EQU 1A0h +MSR_EFER EQU 0c0000080h +MSR_EFER_XD EQU 0800h + .data =20 gcStmPsd LABEL BYTE @@ -88,7 +93,7 @@ _OnStmSetup PROC ; Check XD disable bit ; xor esi, esi - mov eax, gStmXdSupported + mov eax, offset gStmXdSupported mov al, [eax] cmp al, 0 jz @StmXdDone1 @@ -109,7 +114,7 @@ _OnStmSetup PROC =20 call SmmStmSetup =20 - mov eax, gStmXdSupported + mov eax, offset gStmXdSupported mov al, [eax] cmp al, 0 jz @f @@ -130,7 +135,7 @@ _OnStmTeardown PROC ; Check XD disable bit ; xor esi, esi - mov eax, gStmXdSupported + mov eax, offset gStmXdSupported mov al, [eax] cmp al, 0 jz @StmXdDone2 @@ -151,7 +156,7 @@ _OnStmTeardown PROC =20 call SmmStmTeardown =20 - mov eax, gStmXdSupported + mov eax, offset gStmXdSupported mov al, [eax] cmp al, 0 jz @f --=20 2.9.3.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sat Dec 28 12:08:36 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1494398995310319.8509932851656; Tue, 9 May 2017 23:49:55 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 3671B21959D42; Tue, 9 May 2017 23:49:54 -0700 (PDT) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A1BCA21A1349E for ; Tue, 9 May 2017 23:49:52 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP; 09 May 2017 23:49:51 -0700 Received: from jfan12-desk.ccr.corp.intel.com ([10.239.158.57]) by FMSMGA003.fm.intel.com with ESMTP; 09 May 2017 23:49:44 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,318,1491289200"; d="scan'208";a="855060299" From: Jeff Fan To: edk2-devel@lists.01.org Date: Wed, 10 May 2017 14:49:32 +0800 Message-Id: <20170510064932.5932-3-jeff.fan@intel.com> X-Mailer: git-send-email 2.9.3.windows.2 In-Reply-To: <20170510064932.5932-1-jeff.fan@intel.com> References: <20170510064932.5932-1-jeff.fan@intel.com> Subject: [edk2] [PATCH 2/2] UefiCpuPkg/SmmCpuFeaturesLib: Correct print level X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jiewen Yao , Eric Dong MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Jiewen Yao Cc: Eric Dong Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan Reviewed-by: Eric Dong --- UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmStm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmStm.c b/UefiCpuPkg/Lib= rary/SmmCpuFeaturesLib/SmmStm.c index 03937dc..45015b8 100644 --- a/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmStm.c +++ b/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmStm.c @@ -326,8 +326,8 @@ SmmCpuFeaturesInstallSmiHandler ( Psd->SmmSmiHandlerRsp =3D (UINTN)SmiStack + StackSize - sizeof(UINTN); Psd->SmmCr3 =3D Cr3; =20 - DEBUG((DEBUG_ERROR, "CpuSmmStmExceptionStackSize - %x\n", PcdGet32(PcdCp= uSmmStmExceptionStackSize))); - DEBUG((DEBUG_ERROR, "Pages - %x\n", EFI_SIZE_TO_PAGES(PcdGet32(PcdCpuSmm= StmExceptionStackSize)))); + DEBUG((DEBUG_INFO, "CpuSmmStmExceptionStackSize - %x\n", PcdGet32(PcdCpu= SmmStmExceptionStackSize))); + DEBUG((DEBUG_INFO, "Pages - %x\n", EFI_SIZE_TO_PAGES(PcdGet32(PcdCpuSmmS= tmExceptionStackSize)))); Psd->StmProtectionExceptionHandler.SpeRsp =3D (UINT64)(UINTN)AllocatePag= es (EFI_SIZE_TO_PAGES (PcdGet32 (PcdCpuSmmStmExceptionStackSize))); Psd->StmProtectionExceptionHandler.SpeRsp +=3D EFI_PAGES_TO_SIZE (EFI_SI= ZE_TO_PAGES (PcdGet32 (PcdCpuSmmStmExceptionStackSize))); =20 @@ -735,7 +735,7 @@ ValidateResource ( Resource =3D ResourceList; =20 for (Index =3D 0; Index < Count; Index++) { - DEBUG ((DEBUG_ERROR, "ValidateResource (%d) - RscType(%x)\n", Index, R= esource->Header.RscType)); + DEBUG ((DEBUG_INFO, "ValidateResource (%d) - RscType(%x)\n", Index, Re= source->Header.RscType)); // // Validate resource. // @@ -782,7 +782,7 @@ ValidateResource ( break; =20 case PCI_CFG_RANGE: - DEBUG ((DEBUG_ERROR, "ValidateResource - PCI (0x%02x, 0x%08x, 0x%0= 2x, 0x%02x)\n", Resource->PciCfg.OriginatingBusNumber, Resource->PciCfg.Las= tNodeIndex, Resource->PciCfg.PciDevicePath[0].PciDevice, Resource->PciCfg.P= ciDevicePath[0].PciFunction)); + DEBUG ((DEBUG_INFO, "ValidateResource - PCI (0x%02x, 0x%08x, 0x%02= x, 0x%02x)\n", Resource->PciCfg.OriginatingBusNumber, Resource->PciCfg.Last= NodeIndex, Resource->PciCfg.PciDevicePath[0].PciDevice, Resource->PciCfg.Pc= iDevicePath[0].PciFunction)); if (Resource->Header.Length !=3D sizeof (STM_RSC_PCI_CFG_DESC) + (= sizeof(STM_PCI_DEVICE_PATH_NODE) * Resource->PciCfg.LastNodeIndex)) { return FALSE; } --=20 2.9.3.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel