[edk2-devel] [PATCH v4 1/5] OvmfPkg/PlatformInitLib: Add PlatformScanE820 and GetFirstNonAddressCB
Laszlo Ersek
lersek at redhat.com
Tue Jan 17 14:46:53 UTC 2023
On 1/17/23 13:16, Gerd Hoffmann wrote:
> +/**
> + Store first address not used by e820 RAM entries in
> + PlatformInfoHob->FirstNonAddress
> +**/
> +VOID
> +PlatformGetFirstNonAddressCB (
> + IN EFI_E820_ENTRY64 *E820Entry,
> + IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob
> + )
> +{
> + UINT64 Candidate;
> +
> + if (E820Entry->Type != EfiAcpiAddressRangeMemory) {
> + return;
> + }
> +
> + Candidate = E820Entry->BaseAddr + E820Entry->Length;
> + if (PlatformInfoHob->FirstNonAddress < Candidate) {
> + DEBUG ((DEBUG_INFO, "%a: FirstNonAddress=0x%Lx\n", __FUNCTION__, Candidate));
> + PlatformInfoHob->FirstNonAddress = Candidate;
> + }
> +}
This could have been made STATIC (like the other three callbacks), but
it's not important.
Laszlo
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#98700): https://edk2.groups.io/g/devel/message/98700
Mute This Topic: https://groups.io/mt/96328404/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list