From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web11.198256.1673966896504236328 for ; Tue, 17 Jan 2023 06:48:16 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uaV5Pw8A; spf=pass (domain: kernel.org, ip: 139.178.84.217, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 795FB61482 for ; Tue, 17 Jan 2023 14:48:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DFF03C433F2 for ; Tue, 17 Jan 2023 14:48:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673966894; bh=jtfVTyjejaOCAu8W2AOaLXAASUZUz4Picgg+hRHMBGo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=uaV5Pw8AaNjqSz24ndghMuHMfiRXSVenBJQJcEEzBUwLZEPv5mh3VaYUC4MXbNIjh e6kJ0d5Sb1J65OWoMm1tIxdlfNsJ1aiAkoNvE2UiKOHY2NOjsPA4BW7R8woiOlj412 k4cuSK7ZJLNXAYa/a4TZVAh1TeqPTQGbhhtC2Ai7gSUyCQu+WLWPeHa4kH05k7OCYi GUDjHiP0pHKzAx3HieDPvsNmQMP9gbFyR4BK+Aexme9XL41754P6frUKVtCzpMvAou lUhZkyp2aoLJYjN27bJWKq7Od0bKD7KEqh4zDqZ+QZ/EhbgNhzUS6lO/V3I4vnRG1P /wJhksVjDZS6A== Received: by mail-lf1-f48.google.com with SMTP id cf42so47449898lfb.1 for ; Tue, 17 Jan 2023 06:48:14 -0800 (PST) X-Gm-Message-State: AFqh2kp0iJhCJ+dSbBdlH2D+6oXa30LhBjmjbvB7lQsTHdMOwr0tLgn5 76IUleLODPpImlhxNYn+DZWwsrUe6Ntyd0TuGjI= X-Google-Smtp-Source: AMrXdXsKzF2ymuWoTHNtuSJenLHUkV9yHWlIkyl8pvygydCdz2zHtA5IUxgjFrdSey1MSW3K7cOze8YzqZg49qzsOwM= X-Received: by 2002:a05:6512:118a:b0:4cc:9d69:4703 with SMTP id g10-20020a056512118a00b004cc9d694703mr325973lfr.110.1673966892896; Tue, 17 Jan 2023 06:48:12 -0800 (PST) MIME-Version: 1.0 References: <20230117121629.2149112-1-kraxel@redhat.com> <20230117121629.2149112-2-kraxel@redhat.com> In-Reply-To: From: "Ard Biesheuvel" Date: Tue, 17 Jan 2023 15:48:01 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [PATCH v4 1/5] OvmfPkg/PlatformInitLib: Add PlatformScanE820 and GetFirstNonAddressCB To: devel@edk2.groups.io, lersek@redhat.com Cc: Gerd Hoffmann , Jiewen Yao , Oliver Steffen , Ard Biesheuvel , Pawel Polawski , Jordan Justen Content-Type: text/plain; charset="UTF-8" On Tue, 17 Jan 2023 at 15:47, Laszlo Ersek wrote: > > 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. > I can fix that up at merge time Thanks,