From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.81]) by mx.groups.io with SMTP id smtpd.web10.726.1583221018878459959 for ; Mon, 02 Mar 2020 23:36:59 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JNZtsoEs; spf=pass (domain: redhat.com, ip: 207.211.31.81, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583221017; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VAc6LIelFLOrZofWLTyYl91do3O9Yn5mqmmYkNI+Zak=; b=JNZtsoEsime3bWb1XV3zHuHT7tE4bLE0m63sa3dCIjaU8xtBpd3RxlnTEp7yo9AsGFafMz HnGkexTJIozPbzokrjIufkFLCQdHz7+kz0fx3HXrAqR7rMT2+LRm/ONhWJIP9a+u6l3HEa QqpcQZKa1/HNa7qFv1FBi+hrXw/ETco= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-269-sOOfNtz_PkOjMml3sR5Ucw-1; Tue, 03 Mar 2020 02:36:53 -0500 X-MC-Unique: sOOfNtz_PkOjMml3sR5Ucw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 23F56801E72; Tue, 3 Mar 2020 07:36:52 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-117-34.ams2.redhat.com [10.36.117.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7E1D35DA2C; Tue, 3 Mar 2020 07:36:51 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH 04/13] OvmfPkg: provide a generic implementation of QemuLoadImageLib From: "Laszlo Ersek" To: devel@edk2.groups.io, ard.biesheuvel@linaro.org Reply-To: devel@edk2.groups.io, lersek@redhat.com References: <20200302072936.29221-1-ard.biesheuvel@linaro.org> <20200302072936.29221-5-ard.biesheuvel@linaro.org> <0be0b190-c32b-66b7-1dcb-ecd2105406f5@redhat.com> Message-ID: <9aa0ad71-4b56-5e3f-35ce-ba841d13e79c@redhat.com> Date: Tue, 3 Mar 2020 08:36:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <0be0b190-c32b-66b7-1dcb-ecd2105406f5@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 03/02/20 18:12, Laszlo Ersek wrote: > On 03/02/20 08:29, Ard Biesheuvel wrote: >> Implement QemuLoadImageLib, and make it load the image provided by the >> QEMU_EFI_LOADER_FS_MEDIA_GUID/kernel device path that we implemented >> in a preceding patch in a separate DXE driver, using only the standard >> LoadImage and StartImage boot services. >> >> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2566 >> Signed-off-by: Ard Biesheuvel >> --- >> OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c | 253 ++++++++++++++++++++ >> OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.inf | 39 +++ >> 2 files changed, 292 insertions(+) >> >> diff --git a/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c b/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c >> new file mode 100644 >> index 000000000000..c48c7a88dd91 >> --- /dev/null >> +++ b/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c >> @@ -0,0 +1,253 @@ >> +/** @file >> + Generic implementation of QemuLoadImageLib library class interface. >> + >> + Copyright (c) 2020, ARM Ltd. All rights reserved.
>> + >> + SPDX-License-Identifier: BSD-2-Clause-Patent >> +**/ >> + >> +#include >> + >> +#include >> +#include >> +#include >> +#include >> +#include > > (1) I think it would be nicer if, in this patch, we didn't access fw_cfg > at all. The filesystem already exposes "cmdline", we could use that. > > ... Except, I can see you are removing that in patch #7... OK, I guess. > >> +#include >> +#include >> +#include (10) Sorry, just noticed, from comparing the x86 instance: please include the lib class header here. Thanks Laszlo