From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.groups.io with SMTP id smtpd.web08.11629.1631108270320862721 for ; Wed, 08 Sep 2021 06:37:50 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OagNN3fV; spf=pass (domain: redhat.com, ip: 216.205.24.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631108269; 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: in-reply-to:in-reply-to:references:references; bh=F0WgFpdE/4CtogpQybA1fHMpLJ0eFwch9WcWjaBFMY8=; b=OagNN3fVqUDX+QVwDWKgm7b48UkXNRzMxrV1Ta037PQXmVv3xh61YqcqygtMy944DhoXlV WDcY8tnsjkk/nWRVG5mALWoyk4exOO0LtjfGZIZFE38IbSM/x5RbMP1ICMW4mbj3fw+icS MTPY6thcs1eWyxTL7RHmqzpj+vyAwy8= 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-357-3n64n5FyNhOBbmbfOPGjfw-1; Wed, 08 Sep 2021 09:37:48 -0400 X-MC-Unique: 3n64n5FyNhOBbmbfOPGjfw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0B94080D6BD; Wed, 8 Sep 2021 13:37:08 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.91]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 25B11100164A; Wed, 8 Sep 2021 13:37:07 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 759AF18003AA; Wed, 8 Sep 2021 15:37:05 +0200 (CEST) Date: Wed, 8 Sep 2021 15:37:05 +0200 From: "Gerd Hoffmann" To: "Chang, Abner (HPS SW/FW Technologist)" Cc: Leif Lindholm , "Yao, Jiewen" , "devel@edk2.groups.io" , gaoliming , 'Ard Biesheuvel' , "Kinney, Michael D" , "Ni, Ray" , "Schaefer, Daniel" , 'Sunil V L' , 'Ard Biesheuvel' Subject: Re: [edk2-devel] [RFC] RISC-V QEMU virtual package Message-ID: <20210908133705.kc4unk3nizradc4j@sirius.home.kraxel.org> References: <005f01d7a2bb$6d8e5ef0$48ab1cd0$@byosoft.com.cn> <20210907172229.geh4zcz7pvxoyyj6@leviathan> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, > > Are you expecting to need different functionality from the ArmVirtPkg > > one? If not, you could move that one to > > OvmfPkg/Library/QemuFwCfgCommonLib > > or something. > The interfaces provided by ARM QemuFwLib seems works fine with RISC-V > OVMF, however the build fail with the recent change of adding "#if > defined(MDE_CPU_AARCH64)". How does that fail to build? The #ifdef looks like a performance optimization, doing 64bit mmio access on 64bit platforms to reduce the number of traps. Even without fixing that up for RISCV64 so it gets the same treatment everything should work fine, just a little slower than it could. > I prefer to have RISC-V instance because I > am not sure if any fw_cfg interface changes would be made on RISC-V > QEMU. The fw_cfg interface should not diverge. ia32/x64 works a bit different because there is a separate io address space on that architecture and fw_cfg uses that for historical reasons. All platforms using the mmio variant of the fw_cfg interface should work alike though. take care, Gerd