From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.198087.1673966761178466142 for ; Tue, 17 Jan 2023 06:46:01 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Kc5MDQif; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673966760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Sc8VeztLqmdOrsOXAEgoY5iDOUqH5/0otflpzHPEjjU=; b=Kc5MDQifkN0TCraIKmsVEAGubnsUSe2O7PMU2cdn9tT5eamiaOd2rb9p3fO5tAUtS3k0Sg FVwFEY2GNB1asWdrLwbAqb78JhZ29OsxGB9hb2KpLXNs3KnCWGCUNM3n8Vag0M0ZHI/NBB vYA8brK2nrV/OZm7XcdeYlgh+pLdp+E= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-475-JCNA6ZN9Oc6mbEOoubi0Xw-1; Tue, 17 Jan 2023 09:45:49 -0500 X-MC-Unique: JCNA6ZN9Oc6mbEOoubi0Xw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B74D81C0513E; Tue, 17 Jan 2023 14:45:37 +0000 (UTC) Received: from [10.39.194.135] (unknown [10.39.194.135]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7C06240C6EC4; Tue, 17 Jan 2023 14:45:36 +0000 (UTC) Message-ID: <9d689f25-da1e-6a09-c403-7c1bb217c065@redhat.com> Date: Tue, 17 Jan 2023 15:45:35 +0100 MIME-Version: 1.0 Subject: Re: [PATCH v4 2/5] OvmfPkg/PlatformInitLib: Add PlatformGetLowMemoryCB To: Gerd Hoffmann , devel@edk2.groups.io Cc: Jiewen Yao , Oliver Steffen , Ard Biesheuvel , Pawel Polawski , Jordan Justen References: <20230117121629.2149112-1-kraxel@redhat.com> <20230117121629.2149112-3-kraxel@redhat.com> From: "Laszlo Ersek" In-Reply-To: <20230117121629.2149112-3-kraxel@redhat.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 1/17/23 13:16, Gerd Hoffmann wrote: > Add PlatformGetLowMemoryCB() callback function for use with > PlatformScanE820(). It stores the low memory size in > PlatformInfoHob->LowMemory. This replaces calls to > PlatformScanOrAdd64BitE820Ram() with non-NULL LowMemory. > > Write any actions done (setting LowMemory) to the firmware log > with INFO loglevel. > > Also change PlatformGetSystemMemorySizeBelow4gb() to likewise set > PlatformInfoHob->LowMemory instead of returning the value. Update > all Callers to the new convention. > > Signed-off-by: Gerd Hoffmann > --- > OvmfPkg/Include/Library/PlatformInitLib.h | 3 +- > OvmfPkg/Library/PeilessStartupLib/Hob.c | 3 +- > .../PeilessStartupLib/PeilessStartup.c | 7 +- > OvmfPkg/Library/PlatformInitLib/MemDetect.c | 69 +++++++++++++------ > OvmfPkg/Library/PlatformInitLib/Platform.c | 7 +- > OvmfPkg/PlatformPei/MemDetect.c | 3 +- > 6 files changed, 59 insertions(+), 33 deletions(-) Reviewed-by: Laszlo Ersek