On 10/18/21 1:01 AM, Gerd Hoffmann wrote:
>   Hi,
>
>> The MEMFD range is outside of the firmware image map,  MEMFD begins with
>> 0x800000 [1] and in my boots I don't see it reserved in e820.
> Ah, ok.
>
>> Here is the snippet.
>>
>> [ ... ]
>> [    0.000000] BIOS-e820: [mem 0x0000000000800000-0x0000000000807fff] ACPI 
>> NVS
>> [    0.000000] BIOS-e820: [mem 0x0000000000808000-0x000000000080afff] usable
>> [    0.000000] BIOS-e820: [mem 0x000000000080b000-0x000000000080bfff] ACPI 
>> NVS
>> [    0.000000] BIOS-e820: [mem 0x000000000080c000-0x000000000080ffff] usable
>> [    0.000000] BIOS-e820: [mem 0x0000000000810000-0x00000000008fffff] ACPI 
>> NVS
>> [ ... ]
> Hmm.  Confused.  memfd size is 0xD00000, so should the block from 800000
> to 8cffff be reserved?  Why does it end at 8fffff instead?

There is no strong reason for block all of the MEMFD. What I see in the
current code is some selective pages gets marked reserved or other
memory type. As system boots some pages may get released as a system RAM.


> The first hole is this:
>
>     0x008000|0x001000
>     
> gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecGhcbPageTableBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecGhcbPageTableSize
>     0x009000|0x002000
>     
> gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecGhcbBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecGhcbSize
>
> The second hole is this (git master) ...
>
>     0x00C000|0x001000
>     
> gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecGhcbBackupBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecGhcbBackupSize
>
> And IIRC the cpuid + secrets pages are added there.
>
> So, yes, they must be reserved indeed.  What about the other pages?
> Shouldn't they be reserved too?  Or will they not be used any more
> at runtime?

As I indicated above, the other part of the code (such MemDetect.c)
makes the pages reserved as system boot. Some page can be may not be
used at all during the runtime and thus gets released.

thanks




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#82357): https://edk2.groups.io/g/devel/message/82357
Mute This Topic: https://groups.io/mt/86292921/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to