On September 7, 2022 1:42 PM, Gerd Hoffmann wrote: > Hi, > > > + // > > + // This memory region is split into 2 parts. The left part is > > accepted. > > + // > > + PhysicalEnd = MaxAcceptedMemoryAddress; > > + ResourceLength = PhysicalEnd - PhysicalStart; > > Same comment here. Can't happen when all memory below 4G is accepted, > and I think MaxAcceptedMemoryAddress is not needed either. > It may happen. For example, a TD VM is created with 2G memory, then the MaxAcceptedMemoryAddress is 0x80000000. If it is created with 1G memory, MaxAcceptedMemoryAddress is 0x40000000. This information can be retrieved by walking thru the TD-Hob and read the largest address of the unaccept-mem-region under 4G. But I think it's easier to record the value in MaxAcceptedMemoryAddress. And it can be used when not all memory below 4G is accepted.
Thanks Min -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#93469): https://edk2.groups.io/g/devel/message/93469 Mute This Topic: https://groups.io/mt/93474520/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-