From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR03-AM5-obe.outbound.protection.outlook.com (EUR03-AM5-obe.outbound.protection.outlook.com [40.107.3.68]) by mx.groups.io with SMTP id smtpd.web11.6654.1632908729847970268 for ; Wed, 29 Sep 2021 02:45:30 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=TyJ9xkSJ; spf=pass (domain: arm.com, ip: 40.107.3.68, mailfrom: sami.mujawar@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5GBicCCCszx3/URvKEhNDA/NmVq7xQO4xUiKsN2Hnxc=; b=TyJ9xkSJawpBZH2SnJx04qXha8c0oreOJKpBAn4I8XH2E0m1I4SmVb8k54PFs5cXdB5HYdfqMOIOTpFEtOppEZv4PUViaoVKhCRYDOJ7sZutY1vtJF1XsICHwXhhMWtmQCPOaEUIcHKRDPcV3uO5hNR/gacAQfKS9iHjwoG/HKA= Received: from AM0PR01CA0155.eurprd01.prod.exchangelabs.com (2603:10a6:208:aa::24) by AS8PR08MB5909.eurprd08.prod.outlook.com (2603:10a6:20b:297::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.13; Wed, 29 Sep 2021 09:45:21 +0000 Received: from VE1EUR03FT009.eop-EUR03.prod.protection.outlook.com (2603:10a6:208:aa:cafe::e5) by AM0PR01CA0155.outlook.office365.com (2603:10a6:208:aa::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.14 via Frontend Transport; Wed, 29 Sep 2021 09:45:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.33.187.114) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.33.187.114 as permitted sender) receiver=protection.outlook.com; client-ip=63.33.187.114; helo=64aa7808-outbound-2.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-2.mta.getcheckrecipient.com (63.33.187.114) by VE1EUR03FT009.mail.protection.outlook.com (10.152.18.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.14 via Frontend Transport; Wed, 29 Sep 2021 09:45:20 +0000 Received: ("Tessian outbound 0e48c0de19a3:v103"); Wed, 29 Sep 2021 09:45:18 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: b5d3eb1dee934513 X-CR-MTA-TID: 64aa7808 Received: from 5d4765ec1493.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 616C7E64-A38E-4435-8A90-E6CB407D03B7.1; Wed, 29 Sep 2021 09:45:05 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 5d4765ec1493.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 29 Sep 2021 09:45:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BJ8jM1U4U6gX2QMjw90ye+JmP3eF2dfivugboqKV1cgpk13l/QWRguPvjUVsr2XJXke4geFQryP2NjKXlucfNVB9CeUkaLNO43XJBYK74EpRnTt0SIdbERLDS/DUnN6mOZSNxQs4Lf5662QqLujIVoIG/6skmPX0ArB3pxv//DP+R4RttdJpRXxNy2XmQ37pDka1CcbQyDUWFPViW8jLHhtjPd/TuBLe6tTCO+9afTBsfeyXqdArJmjk1vsgtCJUKIaVcjAEEYPSX84NbrpqNyxnZ4IKG/Ihe1OhYu5kl6EqwVGRTVXDc0DXnWX0m2A4t/N1s4xHmnp+RYyOd1gxlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=5GBicCCCszx3/URvKEhNDA/NmVq7xQO4xUiKsN2Hnxc=; b=G86G7+94aXMIMMJCTvodjy1/blYUn6Gvnno+d5vg38Uc0YDMbWN0c7Cfqkm2n6AeBVB9tvmHFJJktJ2ROm33sGXEt+tbTbxXQ1MB/GQN8bVWxu1W6oFuYKe7CLri1L7SVCsZN77FGTeNnaDZfmoQYlByb5kcCqrB4wjkmSrQ0dsmqmo/8WHmThpt9555Nzbjjw4SQwjG4/3RGo0l7uw/ED/hgJ70UUF/P3tA3n7hpnTcGCboTohwvVEfNM8rdjHP4M+eAY0jZnyrk3qR27dfpZZNcw6+qs169BVDmowasrvlpImJUgSj89UiZS6x0BZp6HkwSWOhylsZ0FX/flhUgw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5GBicCCCszx3/URvKEhNDA/NmVq7xQO4xUiKsN2Hnxc=; b=TyJ9xkSJawpBZH2SnJx04qXha8c0oreOJKpBAn4I8XH2E0m1I4SmVb8k54PFs5cXdB5HYdfqMOIOTpFEtOppEZv4PUViaoVKhCRYDOJ7sZutY1vtJF1XsICHwXhhMWtmQCPOaEUIcHKRDPcV3uO5hNR/gacAQfKS9iHjwoG/HKA= Authentication-Results-Original: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by AS8PR08MB6551.eurprd08.prod.outlook.com (2603:10a6:20b:319::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13; Wed, 29 Sep 2021 09:45:03 +0000 Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::c8a5:672a:9ff2:e554]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::c8a5:672a:9ff2:e554%6]) with mapi id 15.20.4544.022; Wed, 29 Sep 2021 09:45:03 +0000 Subject: Re: [PATCH V2 6/9] ArmVirtPkg/QemuFwCfgLib: Relocate QemuFwCfgLib to OvmfPkg To: Abner Chang , devel@edk2.groups.io Cc: Ard Biesheuvel , Leif Lindholm , Jiewen Yao , Jordan Justen , Gerd Hoffmann , Daniel Schaefer , Sunil V L , nd References: <20210928083107.7418-1-abner.chang@hpe.com> <20210928083107.7418-7-abner.chang@hpe.com> From: "Sami Mujawar" Message-ID: <9d3a69ee-ae14-71c3-1495-2ff2c5ce0933@arm.com> Date: Wed, 29 Sep 2021 10:45:04 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 In-Reply-To: <20210928083107.7418-7-abner.chang@hpe.com> X-ClientProxiedBy: LO4P123CA0005.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:150::10) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 Received: from [10.1.196.43] (217.140.106.52) by LO4P123CA0005.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:150::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.14 via Frontend Transport; Wed, 29 Sep 2021 09:45:03 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 093e1a3d-6b52-4919-4a48-08d9832dda46 X-MS-TrafficTypeDiagnostic: AS8PR08MB6551:|AS8PR08MB5909: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:7219;OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 7G4Cc5V1xbFRNNmwxqBcxAonb+wcNb03MwlFvuaVmkUNZocct3fNvoiO/qYC/09YN0Gmb8yach/CGvCyA2ltqP8i4OcAl50BcTN7Mej1+87pqJ8etev3rAoTBK5Yn+3UIOws7yWNlZbFldH9mf8yMdHH/URgI4t4+whlKJVUHPzavIHAtKu7OJQknTCw07ePhSivoH6vo6SYlq4SjNSk5cYxdZkJiYlQ4Q6TQGee7JJqU/iLSigrVrW90jB/oK8s9YC1/h3FgmNUMpqR7VVjUsVBkGPtCfVSQ8ZdOv0bhiMdxeon5HUtb3Vnv8c8CveJ3Ljhn16rIFuUp+PJX3VXg2VNV7AcKK2kwQM6NdcIDfPnmhgwQzfTqy/M/+kGqV5hPAC14J+yvefYiodhcXMHQRlBqvO4RkeUUuif5m70CKPZLlMTrISS+FN/qr82SShgyv/nJZrrhPz0LnVZ/PbDj5qaR3jsbNc0yJuqyWpH+/26Px9Oc6vQefXjrFyeDfja3rI0q6FCyDr7v0i8G4Phe+2Qn0ZI/dwRZL624QFMiQ8bORR+PzXiPqyAduFuCiW1VK0GXxUmcWzY5U2uWacdve//gCmI0H13LUJ3igLk/bVFHl21uel/J0rQR/eD/khr1+IZkLD0BblpUPwPC36dUJyFiIpzm3x3tZdH3L1mdaodAmtL1mU2ydU9YkDYMgvIPr+uITqOuihgQjp9xBh/dgaUGhK7Y/I6I5G7XhY9krcu+XiO7EqJYkfVGCH9UFLOyNpFt4QDQy3hWAMf/TxhBbOfviNUgE5VhDLOi77gT2Y= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR08MB6806.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(6029001)(4636009)(366004)(8936002)(86362001)(38100700002)(4326008)(83380400001)(31696002)(44832011)(2906002)(38350700002)(36756003)(8676002)(508600001)(186003)(316002)(6486002)(66556008)(54906003)(66946007)(66476007)(31686004)(52116002)(26005)(53546011)(2616005)(956004)(16576012)(5660300002)(156123004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-Forked: True X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6551 Original-Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT009.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 42c4f85d-00cc-4d45-1580-08d9832dcfe9 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: czrS+4LC4F6YSe8MrnMn5Qz8+0irk8VIjq8S0NLquYTc/WLTdD6RJRadu/26zSNDufHDfn+8TMgBVG5LcC6RU+9w8aD42H/HI5s9Ec48rPvV/2G1YXsWHBPvzjlTvI3crIUqkLRYEJXLcYpA8vOYcFET6GIzYwpBsklPc2ZnP9Gm+tagobZn21JNQ2+OE1PGJl7D0S6J/wGoc7NgtSEKuEUFB5gqn+mkChiYaVdNAcnTgnq7NE93j+3ozDrW1j2/cq8y5GQgYAsWp5uVVpv9Q514ii635042ya4ETVbrJiK8Q9bmpMwwY7DijI5cSDhveUHoBDY/H5Tm6p1ejP6skLpkKmBodmjftGuKav5lCMIM9l/Aw0hipXjWMoqBHpnYTzPFBFOVK/TJBbiacDUZrukfaImTm1pdiwqyJs6dQHB/rVWtvg2/gj4QEZfJdkK2U27V2qo3tysTwE9VnWqqwGMGy4qa78daq6FFOFy3hSswYWF5y+cunhTVdyZzwJ536QG6ZAVAQy+ifnPzXh3Ty4woDvHz9TP2D/pDeioUbgO3UHb0Mh0WrSE565EiO/g2+zQqpth4/R/iz+TheWh1HO2jKbVxRWYVCjOlK2Qc/b2KuI/zr36Ixu/HAPIq2GEuwjDdY0Rn0qtttUSxVQZQ1FQ5DOgZBmp6bX35mHd336V7XwjsmpH59U2Qm+pPSk5+UKGYlJPPwwg1yfy+c8fFrnWy72CERb08wIOLRcPp1oRs4TvaSEs7iO7QpzoTe2X6JFc0xPMyw1mol6gHcOlJvA== X-Forefront-Antispam-Report: CIP:63.33.187.114;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-2.mta.getcheckrecipient.com;PTR:ec2-63-33-187-114.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(6029001)(4636009)(46966006)(36840700001)(4326008)(8936002)(70206006)(2616005)(2906002)(956004)(31696002)(36756003)(82310400003)(186003)(53546011)(5660300002)(336012)(6486002)(70586007)(86362001)(8676002)(83380400001)(16576012)(31686004)(26005)(47076005)(44832011)(81166007)(54906003)(356005)(508600001)(316002)(36860700001)(156123004)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Sep 2021 09:45:20.7013 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 093e1a3d-6b52-4919-4a48-08d9832dda46 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.33.187.114];Helo=[64aa7808-outbound-2.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT009.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB5909 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Hi Abner, Thank you for this patch. I have a minor suggestion marked inline as [SAMI]. Regards, Sami Mujawar On 28/09/2021 09:31 AM, Abner Chang wrote: > Relocate QemuFwCfgLib to OvmfPkg/Library/QemuFwCfgLib and rename > it to QemuFwCfgLibMMIO, this library is leverage by both ARM and > RISC-V archs. > > Signed-off-by: Abner Chang > Cc: Ard Biesheuvel > Cc: Leif Lindholm > Cc: Sami Mujawar > Cc: Jiewen Yao > Cc: Jordan Justen > Cc: Gerd Hoffmann > Cc: Daniel Schaefer > Cc: Sunil V L > --- > ArmVirtPkg/ArmVirtQemu.dsc | 2 +- > ArmVirtPkg/ArmVirtQemuKernel.dsc | 2 +- > .../Library/QemuFwCfgLib/QemuFwCfgLibMMIO.inf | 5 ++--- > .../Library/QemuFwCfgLib/QemuFwCfgLibMMIO.c | 7 ++++--- > 4 files changed, 8 insertions(+), 8 deletions(-) > rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf => OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMMIO.inf (87%) > rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c => OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMMIO.c (93%) [SAMI] Is it possible to rename QemuFwCfgLibMMIO.[c|inf] to QemuFwCfgMmioLib.[c|inf], please? This would then follow a pattern similar to OvmfPkg\Library\XenIoMmioLib\XenIoMmioLib.[c|inf]. > > diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc > index 07f9699c79..6c949fd559 100644 > --- a/ArmVirtPkg/ArmVirtQemu.dsc > +++ b/ArmVirtPkg/ArmVirtQemu.dsc > @@ -59,7 +59,7 @@ > # Virtio Support > VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf > VirtioMmioDeviceLib|OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf > - QemuFwCfgLib|ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf > + QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMMIO.inf > QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/BaseQemuFwCfgS3LibNull.inf > QemuFwCfgSimpleParserLib|OvmfPkg/Library/QemuFwCfgSimpleParserLib/QemuFwCfgSimpleParserLib.inf > QemuLoadImageLib|OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.inf > diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc > index cf7a2b4463..64035a948d 100644 > --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc > +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc > @@ -57,7 +57,7 @@ > # Virtio Support > VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf > VirtioMmioDeviceLib|OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf > - QemuFwCfgLib|ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf > + QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMMIO.inf > QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/BaseQemuFwCfgS3LibNull.inf > QemuFwCfgSimpleParserLib|OvmfPkg/Library/QemuFwCfgSimpleParserLib/QemuFwCfgSimpleParserLib.inf > QemuLoadImageLib|OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.inf > diff --git a/ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMMIO.inf > similarity index 87% > rename from ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf > rename to OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMMIO.inf > index f3cc827907..8101fac03f 100644 > --- a/ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf > +++ b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMMIO.inf > @@ -23,17 +23,16 @@ > # The following information is for reference only and not required by the build > # tools. > # > -# VALID_ARCHITECTURES = ARM AARCH64 > +# VALID_ARCHITECTURES = ARM AARCH64 RISCV64 > # > > [Sources] > - QemuFwCfgLib.c > + QemuFwCfgLibMMIO.c > > [Packages] > MdePkg/MdePkg.dec > OvmfPkg/OvmfPkg.dec > EmbeddedPkg/EmbeddedPkg.dec > - ArmVirtPkg/ArmVirtPkg.dec > > [LibraryClasses] > BaseLib > diff --git a/ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMMIO.c > similarity index 93% > rename from ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c > rename to OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMMIO.c > index e2ac4108d1..b953f2eb6c 100644 > --- a/ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c > +++ b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMMIO.c > @@ -4,6 +4,7 @@ > > Copyright (C) 2013 - 2014, Red Hat, Inc. > Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.
> + (C) Copyright 2021 Hewlett Packard Enterprise Development LP
> > SPDX-License-Identifier: BSD-2-Clause-Patent > **/ > @@ -239,7 +240,7 @@ MmioReadBytes ( > UINT8 *Ptr; > UINT8 *End; > > -#ifdef MDE_CPU_AARCH64 > +#if defined(MDE_CPU_AARCH64) || defined(MDE_CPU_RISCV64) > Left = Size & 7; > #else > Left = Size & 3; > @@ -249,7 +250,7 @@ MmioReadBytes ( > Ptr = Buffer; > End = Ptr + Size; > > -#ifdef MDE_CPU_AARCH64 > +#if defined(MDE_CPU_AARCH64) || defined(MDE_CPU_RISCV64) > while (Ptr < End) { > *(UINT64 *)Ptr = MmioRead64 (mFwCfgDataAddress); > Ptr += 8; > @@ -322,7 +323,7 @@ DmaTransferBytes ( > // > // This will fire off the transfer. > // > -#ifdef MDE_CPU_AARCH64 > +#if defined(MDE_CPU_AARCH64) || defined(MDE_CPU_RISCV64) > MmioWrite64 (mFwCfgDmaAddress, SwapBytes64 ((UINT64)&Access)); > #else > MmioWrite32 ((UINT32)(mFwCfgDmaAddress + 4), SwapBytes32 ((UINT32)&Access));