From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: michael.d.kinney@intel.com) Received: from mga02.intel.com (mga02.intel.com []) by groups.io with SMTP; Wed, 10 Jul 2019 12:05:23 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jul 2019 12:05:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,475,1557212400"; d="scan'208";a="171008229" Received: from mdkinney-mobl2.amr.corp.intel.com ([10.241.98.74]) by orsmga006.jf.intel.com with ESMTP; 10 Jul 2019 12:05:21 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Zailiang Sun , Yi Qian , Gary Lin Subject: [edk2-platforms Patch 25/28] Vlv2DeviceRefCodePlg/AcpiTablesPCAT: Fix ASL error Date: Wed, 10 Jul 2019 12:05:13 -0700 Message-Id: <20190710190516.6012-26-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190710190516.6012-1-michael.d.kinney@intel.com> References: <20190710190516.6012-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Remove use of a method to read a register from a BAR and instead access the register directly. Resolves the following error from the latest iasl compiler. Or(ShiftLeft(Derefof(Index(CDCT, \_SB.PCI0.GFX0.MCHK.DCFE)), 21),PARM, PARM) Error 6163 - Object is created temporarily in another method and cannot be accessed ^ (\_SB.PCI0.GFX0.MCHK.DCFE) Cc: Zailiang Sun Cc: Yi Qian Cc: Gary Lin Signed-off-by: Michael D Kinney --- .../AcpiTablesPCAT/IgdOGBDA.ASL | 14 ++++++++++++-- .../AcpiTablesPCAT/IgdOpRn.ASL | 18 +----------------- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/Silicon/Intel/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/IgdOGBDA.ASL b/Silicon/Intel/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/IgdOGBDA.ASL index 4482db6906..379fca7379 100644 --- a/Silicon/Intel/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/IgdOGBDA.ASL +++ b/Silicon/Intel/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/IgdOGBDA.ASL @@ -1,6 +1,6 @@ /*++ -Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved +Copyright (c) 1999 - 2019, Intel Corporation. All rights reserved SPDX-License-Identifier: BSD-2-Clause-Patent @@ -125,7 +125,17 @@ Method (GBDA, 0, Serialized) // Report the graphics frequency based on DISPLAY_CLOCK_FREQUENCY_ENCODING [MMADR+0x20C8] - Or(ShiftLeft(Derefof(Index(CDCT, \_SB.PCI0.GFX0.MCHK.DCFE)), 21),PARM, PARM) + If (LNotEqual (MADR, 0xFFFFFFFF)) + { + OperationRegion(IGMM,SystemMemory,MADR,0x3000) + Field(IGMM,AnyAcc, NoLock, Preserve) + { + Offset(0X20C8), + , 4, + DCFE, 4, // DISPLAY_CLOCK_FREQUENCY_ENCODING + } + Or(ShiftLeft(Derefof(Index(CDCT, DCFE)), 21),PARM, PARM) + } Store(1, GESF) // Set the modified settings flag Return(SUCC) diff --git a/Silicon/Intel/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/IgdOpRn.ASL b/Silicon/Intel/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/IgdOpRn.ASL index 8575fbfe6c..386ad3e65e 100644 --- a/Silicon/Intel/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/IgdOpRn.ASL +++ b/Silicon/Intel/Vlv2DeviceRefCodePkg/AcpiTablesPCAT/IgdOpRn.ASL @@ -1,6 +1,6 @@ /*++ -Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved +Copyright (c) 1999 - 2019, Intel Corporation. All rights reserved SPDX-License-Identifier: BSD-2-Clause-Patent @@ -70,22 +70,6 @@ Field(IGDP, AnyAcc, NoLock, Preserve) ASLS, 32, // Reg 0xFC, Address of the IGD OpRegion } -Method (MCHK, 0, Serialized) -{ - - If (LNotEqual (MADR, 0xFFFFFFFF)) - { - OperationRegion(IGMM,SystemMemory,MADR,0x3000) - Field(IGMM,AnyAcc, NoLock, Preserve) - { - Offset(0X20C8), - , 4, - DCFE, 4, // DISPLAY_CLOCK_FREQUENCY_ENCODING - } - } -} - - // Define an OperationRegion to cover the IGD OpRegion layout. OperationRegion(IGDM, SystemMemory, ASLB, 0x2000) -- 2.21.0.windows.1