From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 D08B08046B for ; Mon, 20 Mar 2017 19:23:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490062985; x=1521598985; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=6TW/cKDliDTz5NkOOWq86/ail+Yya/yG5HkgnB4Uw6w=; b=a5PUcNiU+n6kN1p8dZGV46uZss+cHN+Lta9VkPkV4KwjpxnIjDmUxlvB 8n4t0m5XxnEglahc2F/gBGhEb7Ehzg==; Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Mar 2017 19:23:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,197,1486454400"; d="scan'208";a="238504200" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga004.fm.intel.com with ESMTP; 20 Mar 2017 19:23:05 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 20 Mar 2017 19:23:05 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 20 Mar 2017 19:23:05 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX104.ccr.corp.intel.com ([10.239.4.70]) with mapi id 14.03.0248.002; Tue, 21 Mar 2017 10:23:03 +0800 From: "Gao, Liming" To: Ard Biesheuvel , Michael Zimmermann CC: "edk2-devel@lists.01.org" , Laszlo Ersek , Leif Lindholm Thread-Topic: [edk2] visibility pf PcdSet Thread-Index: AQHSoZQB9Er5dJXqCUCDp03JmfN7+KGdg8YAgAELwbA= Date: Tue, 21 Mar 2017 02:23:02 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14D6F2EE7@shsmsx102.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: visibility pf PcdSet 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, 21 Mar 2017 02:23:06 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Yes. Feature, FixedAtBuild and PatchableInModule PCD are module level; Dyan= mic and DynamicEx are platform level.=20 If you have case to share the data between the different modules, you can c= onfigure PCD as Dynamic PCD.=20 Ard: do you meet with the issue on SetPcd() with dynamic PCD? =20 Thanks >-----Original Message----- >From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ard >Biesheuvel >Sent: Tuesday, March 21, 2017 2:20 AM >To: Michael Zimmermann >Cc: edk2-devel@lists.01.org ; Gao, Liming >; Laszlo Ersek ; Leif Lindholm > >Subject: Re: [edk2] visibility pf PcdSet > >On 20 March 2017 at 16:06, Michael Zimmermann > wrote: >> Do I understand correctly, that a PcdSet on a 'PcdsPatchableInModule' >> is only visible to the current module?(SEC, driver, application, ...) > >Yes. > >> Because I've tested this and a PcdSet on >> gArmTokenSpaceGuid.PcdSystemMemoryBase inisde PrePi is not visible >> inside a DXE_DRIVER - which means that for everyone else the value is >> still 0x0. >> > >Indeed. The relocatable PrePi needs a patchable PCD because it assigns >the value really early, in assembly code. But PrePi is a bit peculiar >as well, and I am pretty use SetPcd() on dynamic PCDs would not work >there either. > >> If this is the case and I don't have some platform bug, then there is >> probably a bug in ArmVirtPkg's HighMemDxe where this Pcd is used in a >> DXE_DRIVER: >> >https://github.com/tianocore/edk2/blob/76874be3d411bf8daac051718e20932 >e0bf97d70/ArmVirtPkg/HighMemDxe/HighMemDxe.c#L70 >> It doesn't cause anything bad but it would show 'Failed to add System >> RAM @ START - END (Access Denied)' after calling AddMemorySpace for >> memory which has already been registered. >> > >Ah yes, well spotted. To be honest, PrePi is a bit of a hack, and I >actually recommend against it for new ports. However, for a self >relocating image (which I think you need for your application), PrePi >is really the only way to go. > >So the best way to pass information from PrePi to DXE is using HOBs. >Actually, it might be best for you to clone HighmemDxe if you need it, >and use a HOB instead. >_______________________________________________ >edk2-devel mailing list >edk2-devel@lists.01.org >https://lists.01.org/mailman/listinfo/edk2-devel