On August 30, 2022 3:44 PM, Ni Ray wrote: > > On August 30, 2022 3:12 PM, Ni Ray wrote: > > > > > > I saw the justification of this is to support different size of > > > Linux kernel images. > > > But that's after TD DXE driver. > > > For code running before TD DXE driver, the memory needs is > > > predicable, right? > > That's right. The memory before loading linux kernel is predicable. > > To support different size of linux kernel, there are hot discussions > > in EDK2/QEMU/LinuxKernel communities. There is a summary of the > > discussion in this link https://edk2.groups.io/g/devel/message/92332 > > > > I am also nervous to change in the fundamental memory allocation > > service (MdeModulePkg/Core/Dxe/Mem). > > Another option is that in current stage we accept memories under 4G > > and so that we can drop this patch (Pool and page functions accept > > memory when OOM occurs). > > > > What's your thoughts? > > Do you mean: > Accepting 4G memory in ResetVector and accepting more memory in TD DXE > driver through MP protocol? The unaccepted-memory-region is described in TdHob which is passed by QEMU. It includes the start address and size of the unaccepted-memory-region. Accepting memories under 4G is to accept the memories which start-address and size is under 4G. If an unaccept-memory-region is cross 4G, then it is split into 2 parts. We accept the lower part and leave the higher part as unaccepted.
> > Does that need more time in ResetVector? TDVF accepts memories in SEC phase to make sure there are enough memories for PEI/DXE. Of course it costs more time to accept more memories. > Is memory range to be accepted by ResetVector in a different meta data > record than the memory ranges to be accepted by TD DXE driver? The unaccept-memory-region information is recorded first in TdHob (which is passed from QEMU). Before jumping to DXE phase the accepted and unaccepted memory region information are recorded in the HOBs which are transferred to DXE. In DXE these information will be recorded in mGcdMemorySpaceMap which will be used by the EdkiiMemoryAcceptProtocol. Thanks Min -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#92966): https://edk2.groups.io/g/devel/message/92966 Mute This Topic: https://groups.io/mt/93285612/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-