From: Laszlo Ersek <lersek@redhat.com>
To: "Zeng, Star" <star.zeng@intel.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: "Bi, Dandan" <dandan.bi@intel.com>, Andrew Fish <afish@apple.com>,
"Kinney, Michael D" <michael.d.kinney@intel.com>,
Leif Lindholm <leif.lindholm@linaro.org>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
"Gao, Liming" <liming.gao@intel.com>,
Matt Sealey <neko@bakuhatsu.net>
Subject: Re: [PATCH v2 3/8] MdeModulePkg/DxeCorePerformanceLib:Track FPDT record in DXE phase
Date: Tue, 22 May 2018 12:00:10 +0200 [thread overview]
Message-ID: <7e5f817f-d2b9-1359-974c-ace751cd2984@redhat.com> (raw)
In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103BAEE2BC@shsmsx102.ccr.corp.intel.com>
Hi Star,
On 05/22/18 11:38, Zeng, Star wrote:
> It comes to an old question: how to know PEI is 32bit/64bit? But not DXE is 32bit/64bit.
we've discussed this question in the past (as you remember :) ) and
people suggested both HOBs and PCDs to expose the "PEI phase max
address" to DXE. All of those ideas were rejected -- I'm unsure why, to
this day --, but assuming people who opposed those ideas are going to
oppose them again, I think Ard's idea is good, about introducing
dedicated MemoryAllocationLib interfaces, for PEI-targeted memory
allocation.
Once drivers adopt these new interfaces, platforms can at least fork the
MemoryAllocationLib instance(s) they need, and customize the PEI phase
max address one way or another.
Thanks,
Laszlo
> -----Original Message-----
> From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org]
> Sent: Tuesday, May 22, 2018 5:03 PM
> To: Zeng, Star <star.zeng@intel.com>
> Cc: Bi, Dandan <dandan.bi@intel.com>; Laszlo Ersek <lersek@redhat.com>; Andrew Fish <afish@apple.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Leif Lindholm <leif.lindholm@linaro.org>; edk2-devel@lists.01.org; Gao, Liming <liming.gao@intel.com>; Matt Sealey <neko@bakuhatsu.net>
> Subject: Re: [edk2] [PATCH v2 3/8] MdeModulePkg/DxeCorePerformanceLib:Track FPDT record in DXE phase
>
> pd On 22 May 2018 at 10:58, Zeng, Star <star.zeng@intel.com> wrote:
>> How about the code to try allocating <4G memory, then try allocating any memory if failed to allocate <4G memory?
>>
>> For example, the code snippet in SmbiosDxe.c.
>>
>> PhysicalAddress = 0xffffffff;
>> Status = gBS->AllocatePages (
>> AllocateMaxAddress,
>> EfiRuntimeServicesData,
>> EFI_SIZE_TO_PAGES (sizeof (SMBIOS_TABLE_ENTRY_POINT)),
>> &PhysicalAddress
>> );
>> if (EFI_ERROR (Status)) {
>> DEBUG ((EFI_D_ERROR, "SmbiosCreateTable () could not allocate EntryPointStructure < 4GB\n"));
>> Status = gBS->AllocatePages (
>> AllocateAnyPages,
>> EfiRuntimeServicesData,
>> EFI_SIZE_TO_PAGES (sizeof (SMBIOS_TABLE_ENTRY_POINT)),
>> &PhysicalAddress
>> );
>> if (EFI_ERROR (Status)) {
>> return EFI_OUT_OF_RESOURCES;
>> }
>> }
>>
>
> Yes, that should do the trick.
>
> But perhaps we should add something like
>
> AllocatePeiAccessiblePages()
>
> to MemoryAllocationLib, which just uses AllocateMaxAddress or
> AllocateAnyPages depending on whether MDE_CPU_X64 is #defined.
>
next prev parent reply other threads:[~2018-05-22 10:00 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-30 13:53 [PATCH v2 0/8] Update EDKII Performance infrastructure based on ACPI FPDT table Dandan Bi
2018-01-30 13:53 ` [PATCH v2 1/8] MdeModulePkg:Add definitions for new Performance infrastructure Dandan Bi
2018-01-31 2:07 ` Zeng, Star
2018-01-30 13:53 ` [PATCH v2 2/8] MdeModulePkg/PeiPerformance:Updated to track FPDT record in PEI phase Dandan Bi
2018-01-30 13:53 ` [PATCH v2 3/8] MdeModulePkg/DxeCorePerformanceLib:Track FPDT record in DXE phase Dandan Bi
2018-05-01 16:26 ` Ard Biesheuvel
2018-05-22 0:33 ` Bi, Dandan
2018-05-22 8:51 ` Ard Biesheuvel
2018-05-22 8:58 ` Zeng, Star
2018-05-22 9:02 ` Ard Biesheuvel
2018-05-22 9:38 ` Zeng, Star
2018-05-22 10:00 ` Laszlo Ersek [this message]
2018-05-22 10:38 ` Zeng, Star
2018-05-22 10:43 ` Ard Biesheuvel
2018-05-22 10:00 ` Ard Biesheuvel
2018-01-30 13:53 ` [PATCH v2 4/8] MdeModulePkg/SmmCorePerformanceLib:Track FPDT record in SMM phase Dandan Bi
2018-01-30 13:53 ` [PATCH v2 5/8] MdeModulePkg/FirmwarePerformancePei:Add FPDT records for S3 phase Dandan Bi
2018-01-30 13:53 ` [PATCH v2 6/8] MdeModulePkg/FirmwarePerfDxe:Enhance for new pref infrastructure Dandan Bi
2018-01-30 13:53 ` [PATCH v2 7/8] MdeModulePkg/FirmwarePerfSmm:Enhance " Dandan Bi
2018-01-30 13:53 ` [PATCH v2 8/8] ShellPkg/Dp: Updated to dump perf log based on FPDT table Dandan Bi
2020-04-28 7:45 ` [edk2-devel] [PATCH v2 0/8] Update EDKII Performance infrastructure based on ACPI " boonewang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7e5f817f-d2b9-1359-974c-ace751cd2984@redhat.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox