From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 646D521D046BF for ; Mon, 18 Sep 2017 23:07:15 -0700 (PDT) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Sep 2017 23:10:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,416,1500966000"; d="scan'208";a="150779155" Received: from jwang36-mobl2.ccr.corp.intel.com ([10.239.192.46]) by orsmga005.jf.intel.com with ESMTP; 18 Sep 2017 23:10:17 -0700 From: Jian J Wang To: edk2-devel@lists.01.org Cc: Jiewen Yao , Eric Dong , Star Zeng , Laszlo Ersek , Michael Kinney Date: Tue, 19 Sep 2017 14:10:11 +0800 Message-Id: <20170919061013.15976-1-jian.j.wang@intel.com> X-Mailer: git-send-email 2.14.1.windows.1 In-Reply-To: References: Subject: [PATCH 0/2] Fixe out-of-sync issue between GCD and CPU driver 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: , X-List-Received-Date: Tue, 19 Sep 2017 06:07:15 -0000 There're two issues here actually. >>From GCD perspective, its SetMemorySpaceAttributes() method doesn't accept page related attributes. That means users cannot use it to change page attributes, and have to turn to CPU arch protocol to do it, which is not be allowed by PI spec. >>From CpuDxe driver perspective, it doesn't update GCD memory attributes from current page table setup during its initialization. So the memory attributes in GCD might not reflect all memory attributes in real world. Cc: Jiewen Yao Cc: Eric Dong Cc: Star Zeng Cc: Laszlo Ersek Cc: Michael Kinney Suggested-by: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang Jian J Wang (2): UefiCpuPkg/CpuDxe: Fix out-of-sync issue in CpuDxe MdeModulePkg/Core: Fix out-of-sync issue in GCD MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 45 ++++++++++-------- UefiCpuPkg/CpuDxe/CpuDxe.c | 5 ++ UefiCpuPkg/CpuDxe/CpuDxe.h | 9 ++++ UefiCpuPkg/CpuDxe/CpuPageTable.c | 99 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 140 insertions(+), 18 deletions(-) -- 2.14.1.windows.1