From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c0b::244; helo=mail-it0-x244.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it0-x244.google.com (mail-it0-x244.google.com [IPv6:2607:f8b0:4001:c0b::244]) (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 E6025207E4DEC for ; Tue, 29 May 2018 09:19:52 -0700 (PDT) Received: by mail-it0-x244.google.com with SMTP id q72-v6so19326156itc.0 for ; Tue, 29 May 2018 09:19:52 -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=eWiAsAJL7EciTK7Ff3TqwPYQIKCTE65CrEerjSe495o=; b=Y8Z0JZRnNSKZyT/PhFFqCo0pMZ/6JbsfDg/uwHDHAnIVO1L9KjO70el5jfyFTjynB4 o6M9f9XZ1dunFPP8hxrNNI62DNTvWmMi9H2vIfCFx1wiMrcTd20px1IZBfwlaER9K4ik zcWlhNK59NwKR4ki9hHHDEESKdRlJ/dZjBZaU= 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=eWiAsAJL7EciTK7Ff3TqwPYQIKCTE65CrEerjSe495o=; b=I4UQd7xV1NMcJbUIysKJq5YlVz3qLxe8QCM9GSduSurQeATWgjm2uLBdZRq8NR2ckL 1RQamKAIgUU1JR6nbda2c5wOxzXio4hcrjxDj9/if+XEoCDqzC49Ubi0QUFqqMwi9aSl i7nA0JcKdoZrfKyWAFPbbXblcaglWVwFPDwqOyb6NI5n92HRYEb4H86MWSZx3BI1E5Cu OCOO0MCi734JveMk7mqnvOgejW4+0avVtajJq5uuBPwQYpnBcD5PF0HY/G3PxkmcomjL fY69BR77ueIxTPW4K8GXK01yQN67ax9ZVqdeNYeMdNGYwlOh7bLRJDZkGufDjC4Tb2tD GP1g== X-Gm-Message-State: ALKqPwfrgx8PCLE8RIXRcekU1HSFoM6AzhIXoDgVXChsFp84GNSez+Q8 5wpBOeT2oVl+U5S4GhB6+YL8Fk+n2GESzBm6CujJNA== X-Google-Smtp-Source: ADUXVKIDV/zhKXCNHsXlAGH13PCrnPdFQkR9u3FL6IQL0iIZipqvmHlIgfp0yGugq/zn5EzxmgxnvO4LdXnxx8vi8v4= X-Received: by 2002:a24:5390:: with SMTP id n138-v6mr14553495itb.42.1527610792223; Tue, 29 May 2018 09:19:52 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:bb86:0:0:0:0:0 with HTTP; Tue, 29 May 2018 09:19:51 -0700 (PDT) In-Reply-To: References: <20180528144024.10809-1-ard.biesheuvel@linaro.org> <20180528144024.10809-4-ard.biesheuvel@linaro.org> <0C09AFA07DD0434D9E2A0C6AEB0483103BB47F36@shsmsx102.ccr.corp.intel.com> <74D8A39837DF1E4DA445A8C0B3885C503AC1685D@shsmsx102.ccr.corp.intel.com> <74D8A39837DF1E4DA445A8C0B3885C503AC1688F@shsmsx102.ccr.corp.intel.com> From: Ard Biesheuvel Date: Tue, 29 May 2018 18:19:51 +0200 Message-ID: To: "Kinney, Michael D" Cc: "Yao, Jiewen" , "Zeng, Star" , "edk2-devel@lists.01.org" Subject: Re: [PATCH v3 3/5] MdePkg/DxeServicesLib: introduce AllocatePeiAccessiblePages routine X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 May 2018 16:19:53 -0000 Content-Type: text/plain; charset="UTF-8" On 29 May 2018 at 18:09, Kinney, Michael D wrote: > Jiewen, > > I see what you mean. It is not the submitting of > capsules you are referring to. It is the processing > if capsules in the PEI phase that depends on some > things being setup in DXE phase and DXE phase needs > to know if PEI is in IA32 mode. > > So I agree that the commit message could add capsule > processing to the list of features that can use this > new service. > > The logic in that file is using PcdDxeIplSwitchToLongMode. > That PCD is TRUE when PEI is IA32 and DXE is X64. But it > is ignored when PEI and DXE are both X64 and could be > TRUE or FALSE. Is there a logic issue here with using that > PCD when PEI and DXE are both X64? > Hi all, The reason I disregarded this particular case in my series is that this code is already specific to X64. However, given the discussion you are having, I guess the logic of looking at EfiFreeMemoryTop [at runtime] combined with the various [build time] PCD values could help to refine this case as well.