From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x22c.google.com (mail-it0-x22c.google.com [IPv6:2607:f8b0:4001:c0b::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 92AB0803EE for ; Tue, 21 Mar 2017 00:09:14 -0700 (PDT) Received: by mail-it0-x22c.google.com with SMTP id 190so4344282itm.0 for ; Tue, 21 Mar 2017 00:09:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Sz3dVTxxmdJdyefHAmA6yVmOMVRfjwisE9eAEApFdWs=; b=FBDGoJ9TRABYvvmpPGVshIuCs1viirHX6bFe3IB/QwkPEXiYDd7w7QOHObbYolDHUL CT95E1S4G+fQqBe4/H+xMflv10DvlcYmQtx4wkAbw4L096pg/TCJIJzAx2BYk9oZfajY CT+fKcGa/YHqqRdKAb+wH2jpz0i7+ldIF8MTo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Sz3dVTxxmdJdyefHAmA6yVmOMVRfjwisE9eAEApFdWs=; b=mJcvh9/d0NIseDw19WCWbyBzaprZEhqOENitxazg1FcsMDtT9v+vF/GP0UbA4P0ecf MQTGzXRC+mFHTKNZDe39DPbNd8f7u3wtPQ88ZCy7U9r1qaPoJEt2Jox6us1LT3AJjOKu lh1P7yqnMzZNUWHys3bNSFFD3oZrzouGAnxXRYK2eHK4BAaz+aOse2sG98FoGKzWwFsr J5SXT/95YBl6R5ajdQ9zXNHulSW+X1w3pV2bB6qPnmgHvbLwgFYHsA0hA18wuagyxU1h aVNXpvqEeyeggifNIGBwxkC2Grdi903KZwEmL0dM2QCiBdI2dmvcTX3VEzfUV/SabnWE IAAg== X-Gm-Message-State: AFeK/H3h4CuO5UNEndLnuxIlcSF50OjeXB+bs5vZ1UqVtrfzpv6hIJc999L+J9u5fy56T5LMwSHTsQP0+FKJVYr5 X-Received: by 10.36.23.74 with SMTP id 71mr1207995ith.37.1490080153764; Tue, 21 Mar 2017 00:09:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.10.27 with HTTP; Tue, 21 Mar 2017 00:09:13 -0700 (PDT) In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14D6F2EE7@shsmsx102.ccr.corp.intel.com> References: <4A89E2EF3DFEDB4C8BFDE51014F606A14D6F2EE7@shsmsx102.ccr.corp.intel.com> From: Ard Biesheuvel Date: Tue, 21 Mar 2017 07:09:13 +0000 Message-ID: To: "Gao, Liming" Cc: Michael Zimmermann , "edk2-devel@lists.01.org" , Laszlo Ersek , Leif Lindholm 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 07:09:14 -0000 Content-Type: text/plain; charset=UTF-8 On 21 March 2017 at 02:23, Gao, Liming wrote: > Yes. Feature, FixedAtBuild and PatchableInModule PCD are module level; Dyanmic and DynamicEx are platform level. > If you have case to share the data between the different modules, you can configure PCD as Dynamic PCD. > > Ard: do you meet with the issue on SetPcd() with dynamic PCD? > No. MIchael reported that DXE level drivers don't see the value written to a patchable PCD by a SEC module, but as you confirmed, this is expected behavior. Thanks, Ard. >>-----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