From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web08.3687.1614844218849474391 for ; Wed, 03 Mar 2021 23:50:19 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=mTO4iHqM; spf=pass (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=0697d265da=abner.chang@hpe.com) Received: from pps.filterd (m0150245.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 1247hUKI006277; Thu, 4 Mar 2021 07:50:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pps0720; bh=NsBlZJJT7iTX9leDVhvWw4+4vZ9UkGwE8pldBUAd4EM=; b=mTO4iHqMf/Z2b8Z5EtUH2yfyRk+TOlQJSWdW3wgIQSuFINtgm2+zQljXAJSddS1SKrHQ x0higBcIpYDYEPVAVSEZAWyx9f7og1KWYzZuf6QkgWCVwcPEurQlPKWuHlvmXdJpyh/N dbP2Y48NXuV4zH9srbxpF0pU4c9kPGG1VJRyqBpoMSjC/pxq6sOeoI+uAuTrB8g12gob 3G4V2YpLvckPsO2wmv8DA3JqkcNXex+NnPGqeLfMLtBDNiXmSYSGt1a3svKoq2sXYDum X1ObXIF1KvgKRfO5bX81VSIP0pVqW2gyaBgU4JZtMIxT367TAbFzg0UvqExdwikFYxGZ zA== Received: from g2t2354.austin.hpe.com (g2t2354.austin.hpe.com [15.233.44.27]) by mx0b-002e3701.pphosted.com with ESMTP id 372u08g72k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 04 Mar 2021 07:50:05 +0000 Received: from G2W6310.americas.hpqcorp.net (g2w6310.austin.hp.com [16.197.64.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g2t2354.austin.hpe.com (Postfix) with ESMTPS id E2CB0A8; Thu, 4 Mar 2021 07:50:04 +0000 (UTC) Received: from G1W8108.americas.hpqcorp.net (2002:10c1:483c::10c1:483c) by G2W6310.americas.hpqcorp.net (2002:10c5:4034::10c5:4034) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 4 Mar 2021 07:50:04 +0000 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (15.241.52.10) by G1W8108.americas.hpqcorp.net (16.193.72.60) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Thu, 4 Mar 2021 07:50:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c6iry/HFPo3AaaAvtSQRdG3QJvgkywOSeJ1iUubZxUoEsY6chCNNSQNNfyEvaLqZF4ryCsyzAXjedQIpmtpf2znHQ8+ytj0Fu0r72NDltZrLeO6WqbCYcB/cspKrKyLuV0ouB9oxlGjviCYOU72tzQBCSEdhoY0wXrKaralWkm1zyZVKzVHbXAOpDXAwykrhPbybzfsbOnYem52w6/m2EDW3JfAqQ/VB99DWy0IqesInD+/B0O1gWhVc69r5HQ2dEEHP1+eo+uTGrYIS050uIf95s5avaPltxbgbun3/lAVhfW2UGixOw2AY1QrBCtAhX90mPKM8XtKeb/nTjysxvQ== 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:X-MS-Exchange-SenderADCheck; bh=HbCmJp21xvCex5KWTzoPoEdNZMjMmg+1Qv4od0IdXcw=; b=fde2qiIe2yWnp8l0ckQvs5nolVh0ZQ8uohvtR+pn5xoTX3isGUG9T4vkZKuXrJC3YD7n5qIJpbgCh2w+Vqx1upGkBtvpyxnKoohzvtaaOvtcLpOpF0x3GLB0AV3viPZDIgMCYBZ6/IdrYRr0GOaoVU3obcczJtRE2qXVTSsqILsYW95MhwvRkWRvStClgh3gnOg5eUa+KakfNcMfrKgL4Qu20fEJqq1EraKYbn6OgJqEbr7xPh8wCRxKgjI6QulHpFJcV+W6SijIINzdMSFAk348neQKHSeqsMgEXrXYonqdGpe/pKxuwFWSBC8GHA5ed7kQEI46D9QCRE4agX1/tQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hpe.com; dmarc=pass action=none header.from=hpe.com; dkim=pass header.d=hpe.com; arc=none Received: from CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7508::16) by CS1PR8401MB0904.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7511::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.20; Thu, 4 Mar 2021 07:50:02 +0000 Received: from CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM ([fe80::adb6:a875:93ca:b54a]) by CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM ([fe80::adb6:a875:93ca:b54a%12]) with mapi id 15.20.3890.030; Thu, 4 Mar 2021 07:50:02 +0000 From: "Abner Chang" To: "Schaefer, Daniel" , "devel@edk2.groups.io" CC: G Edhaya Chandran , Barton Gao , Samer El-Haj-Mahmoud , Eric Jin , Arvin Chen , "Leif Lindholm" , Heinrich Schuchardt Subject: Re: [edk2-test PATCHv3 2/5] SctPkg: Adapt Aarch64 sources for Riscv64 Thread-Topic: [edk2-test PATCHv3 2/5] SctPkg: Adapt Aarch64 sources for Riscv64 Thread-Index: AQHXEKV/6fnq/AtxBE+g4BK3oeTbUKpzdKNw Date: Thu, 4 Mar 2021 07:50:02 +0000 Message-ID: References: <20210304032116.24357-1-daniel.schaefer@hpe.com> <20210304032116.24357-3-daniel.schaefer@hpe.com> In-Reply-To: <20210304032116.24357-3-daniel.schaefer@hpe.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: hpe.com; dkim=none (message not signed) header.d=none;hpe.com; dmarc=none action=none header.from=hpe.com; x-originating-ip: [16.242.247.131] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 07937a1f-2e94-41a8-1825-08d8dee21e50 x-ms-traffictypediagnostic: CS1PR8401MB0904: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: UHYNh63t0Ot9wzexBzc3/oWZQZLw7jDJAEidAwmM4NlnbGicGb7mSw7TWoXsa3eLRODOa8/n0QOqizd1yfYhXR1EDe4WdwVjy2/8EzaGqm/wON4TCXGDUnyd3HzxHLBK9edd4BQz4ylO2hJEc0O0tYbKcBd+HZU/hnBhzBSZTalK0jB33sthzm4QfwKjLSXyy893Lr7KZeCim92CNyzY1vFp4tsdICmJJK3En02u/GUZCjrjIWUa3c/m21RqRj9MIi/bI8hIzHfMhSeiYq54MI0EOH8LbQ2HR6AvvlyahdsYFMdzerF3soKkT/lHnznC5LhAV86agm2IcfVFpz2FFaan7CX1+kVfb85Gl7d8zlQlh2exfls6TiqLGIc+iyASWgfja/CJMum2yZy5RSEDUHghfEdXlCqtOiZzipqyoCECPzuhzeNN9S4a8mKma47UVVVt0EkHGmfyw1qDOOIvOuRhj8S7KMMZxSBNY7Vo1rTJ1R02BQo9pVM/Z+mu4DgwRrR+v8KCv3A8dVpgP9zm3GXn7bjYGpDheYEORs2K5mkX31nS/zXew3zN94ccCsFG/wGWVuPFWOWnZGXDFatEbLJmd/s6EWmM+gwoGTIZ4AQ= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(136003)(376002)(366004)(396003)(346002)(39860400002)(30864003)(5660300002)(33656002)(9686003)(66476007)(53546011)(6506007)(71200400001)(478600001)(19627235002)(8936002)(83380400001)(7696005)(966005)(2906002)(8676002)(26005)(64756008)(66446008)(186003)(316002)(54906003)(52536014)(4326008)(66946007)(76116006)(55016002)(110136005)(86362001)(66556008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?VGGU0Qydtmq6GJmi9FhcVnB4Cuy4A6+EbEgKy5EzY6lagG6ry/M2QbNscBbJ?= =?us-ascii?Q?q8vSdm9g9M+xf+pKKmXRZu+5dcquCEEVfYyyvmE8rtedT0mZmB9mqZMmfhl1?= =?us-ascii?Q?WvQ5fGafUxTcKQI0gkvzVkn7edSpo29aEM9O2P+s6KKGwoGGBWTGyrg32pL4?= =?us-ascii?Q?IZresK8xLdX8KAn/hDraavmB+Jk5LhRNfrG3AL9tNGCrKvVJZDjI7/Woh0Mi?= =?us-ascii?Q?Bsd3dflCTuqUheXEwi+h2fmuTE9f086E46hEL6qaZPXMHsdA3dLhtp6dKTh/?= =?us-ascii?Q?gXGQJR/k3ZWY00HG0mmTGRhCFBuIuyl8+UoaMjCNcWZ9hhiqIJj2//cHQ3l9?= =?us-ascii?Q?SoQC7i+dcT+45rMv/4Wxp3Q1bztgGj0XlyqtcuOH+DvVh1miqNefMTxjSpA3?= =?us-ascii?Q?vW+T3KG3k2NdX9X5iMLuK+NHtKymYYZtTpkh5u6/coJxBiqd7M585G6nof0T?= =?us-ascii?Q?M/5cKCPMkrJgfjdRG1W7iwu4Vy28EPU3YjRUGAxzhWR3QZaLk0h6ixP2JuD2?= =?us-ascii?Q?FEjXaT63NzeHlrLfMUVBpmQRNSt6p6vI6Jn8oYvluPvxPdwRiH9Cate0NfS3?= =?us-ascii?Q?4JvUhr/qwysiZql0yIJEYv9K64HD5eKiSS3v53pAcT4yRrC1qplUznHoGMJn?= =?us-ascii?Q?ZS2D3s0IEgPjsbTcYYMutW1j+02ct8ggUiI4azmi2AERKJHgAHd3z/9dAZ6Q?= =?us-ascii?Q?4jljin0NFiEr1hbzvrWzDr4boZCTdVQokX2iZjFcLIJ6qzzC4fFHTy0VB9+Y?= =?us-ascii?Q?mrQFCa+ifKqcwXcxoLA1N3GyNW080UE1pFcAKS4fgzqqMQtuEB/n4Ga+cwHQ?= =?us-ascii?Q?BcyXG5egti4uWrFJpPAONn3wyuvfCZN+88e+f2++/4y0bkVIf0ieDA2uYI9T?= =?us-ascii?Q?4YpHEuozvGPK82JP2iUFQcE6WarBIz1gXQWWiGqsDFVeTfLQ985tCSDx9gEU?= =?us-ascii?Q?H9hh7oRaS8kjQx1QlAcPvYOytU2DjUhwzbEm0gzsK0y5VbRdGdzrQnMIMClc?= =?us-ascii?Q?8zZCvpTqbXk05u6sXEFvO39CiLE/oRdojrFRK+HfS4+6jVrMHKk/xqKxZTYx?= =?us-ascii?Q?2iBFk5HThckL6aibiyvK0cIZUpiDpp6wlW9qozOFmIFjpBf1lHV3aCNQU9gi?= =?us-ascii?Q?dvgzOwchkrJgNiQjwtAXz+YsHVOIgZU0/tJ3P5r2lEEDChJjMuvQi5jBNT9c?= =?us-ascii?Q?87HQFIMLmy2KbUzkLiZMsD2n97Dkus3r4siKYzL6IOXKvVOpdNvVyDue1g9J?= =?us-ascii?Q?HHVm/XVevkfHD2OAajAZhli4lYDrVGmBB7xYAVqjObkVELrTs1bgyJoHnm6d?= =?us-ascii?Q?d/W6iax2md+k5AqEhVE5aHwu?= X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 07937a1f-2e94-41a8-1825-08d8dee21e50 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Mar 2021 07:50:02.4236 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ooDzlEdNdByMExFCMXfimrVpnqlCn5PORxKAr1auBe4pZ2xEPqfwvLaP+w9wzjhP18hFgquTZJr1mgoGjNCOHA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR8401MB0904 X-OriginatorOrg: hpe.com X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369,18.0.761 definitions=2021-03-04_02:2021-03-03,2021-03-04 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 suspectscore=0 bulkscore=0 spamscore=0 mlxscore=0 malwarescore=0 clxscore=1015 phishscore=0 lowpriorityscore=0 mlxlogscore=999 adultscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2103040032 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Abner Chang > -----Original Message----- > From: Schaefer, Daniel > Sent: Thursday, March 4, 2021 11:21 AM > To: devel@edk2.groups.io > Cc: G Edhaya Chandran ; Barton Gao > ; Samer El-Haj-Mahmoud Mahmoud@arm.com>; Eric Jin ; Arvin Chen > ; Leif Lindholm ; Heinrich > Schuchardt ; Chang, Abner (HPS SW/FW Technologist) > > Subject: [edk2-test PATCHv3 2/5] SctPkg: Adapt Aarch64 sources for Riscv64 >=20 > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3042 >=20 > Cc: G Edhaya Chandran > Cc: Barton Gao > Cc: Samer El-Haj-Mahmoud > Cc: Eric Jin > Cc: Arvin Chen > Cc: Leif Lindholm > Cc: Heinrich Schuchardt > Cc: Abner Chang > Signed-off-by: Daniel Schaefer > --- > uefi-sct/SctPkg/Library/SctLib/Riscv64/SctLibPlat.h > | 3 +- > uefi-sct/SctPkg/SCRT/SCRTApp/Riscv64/GoVirtual.S > | 9 ++-- > uefi-sct/SctPkg/SCRT/SCRTApp/Riscv64/VirtualMemory.c > | 16 +++---- > uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Debug.c > | 22 +++------ > uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Io.c > | 7 +-- > uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Io.h > | 48 -------------------- > uefi- > sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv64 > /DebugSupportBBTestExceptionCallbackFunction.c | 12 ++--- > uefi- > sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv64 > /PlatformIsa.c | 4 +- > uefi- > sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/Riscv64/EntsLib > Plat.h | 3 +- > 9 files changed, 32 insertions(+), 92 deletions(-) >=20 > diff --git a/uefi-sct/SctPkg/Library/SctLib/Riscv64/SctLibPlat.h b/uefi- > sct/SctPkg/Library/SctLib/Riscv64/SctLibPlat.h > index ee7c656b..69e7f904 100644 > --- a/uefi-sct/SctPkg/Library/SctLib/Riscv64/SctLibPlat.h > +++ b/uefi-sct/SctPkg/Library/SctLib/Riscv64/SctLibPlat.h > @@ -2,6 +2,7 @@ > Copyright 2006 - 2012 Unified EFI, Inc.
Copyright (c) 2011 - 20= 12, ARM > Ltd. All rights reserved.
+ Copyright (c) 2021, Hewlett Packard Enter= prise > Development LP. All rights reserved.
This program and the > accompanying materials are licensed and made available under the terms > and conditions of the BSD License@@ -20,7 +21,7 @@ Module Name: > Abstract: - AArch64 specific defines+ RISCV64 specific defines --*/ = diff --git > a/uefi-sct/SctPkg/SCRT/SCRTApp/Riscv64/GoVirtual.S b/uefi- > sct/SctPkg/SCRT/SCRTApp/Riscv64/GoVirtual.S > index d223b36b..ae33da18 100644 > --- a/uefi-sct/SctPkg/SCRT/SCRTApp/Riscv64/GoVirtual.S > +++ b/uefi-sct/SctPkg/SCRT/SCRTApp/Riscv64/GoVirtual.S > @@ -2,6 +2,7 @@ > # # Copyright 2010 - 2012 Unified EFI, Inc.
# Copyright (c) 2012, = ARM > Ltd. All rights reserved.
+# Copyright (c) 2021, Hewlett Packard > Enterprise Development LP.
# # This program and the accompanying > materials # are licensed and made available under the terms and conditio= ns > of the BSD License@@ -23,8 +24,6 @@ #--*/ #start of the code section .te= xt- > /* FIXME: Should alignment be different on Aarch64? */-.align 3 .global > JumpToTestFunc .type JumpToTestFunc, %function@@ -37,8 +36,8 @@ > # ) # JumpToTestFunc:- mov x2, x0- mov x0, x1+ mv x2, x0+ > mv x0, x1 // Jump to Virtual function- blr x2+ jalr x2diff --git > a/uefi-sct/SctPkg/SCRT/SCRTApp/Riscv64/VirtualMemory.c b/uefi- > sct/SctPkg/SCRT/SCRTApp/Riscv64/VirtualMemory.c > index 397b3514..00b59594 100644 > --- a/uefi-sct/SctPkg/SCRT/SCRTApp/Riscv64/VirtualMemory.c > +++ b/uefi-sct/SctPkg/SCRT/SCRTApp/Riscv64/VirtualMemory.c > @@ -2,6 +2,7 @@ > Copyright 2006 - 2012 Unified EFI, Inc.
Copyright (c) 2012, ARM= Ltd. All > rights reserved.
+ Copyright (c) 2021, Hewlett Packard Enterprise > Development LP. All rights reserved.
This program and the > accompanying materials are licensed and made available under the terms > and conditions of the BSD License@@ -22,9 +23,6 @@ Module Name: > #include "SCRTApp.h" -#define VIRT_TO_PHYS_OFFSET (0x80000000) > //2G--BOOLEAN HighAddress =3D FALSE; UINTN PageTable =3D 0; = @@ - > 49,11 +47,10 @@ Returns: > --*/ {- /*Note: It is presumed that on ARM v5, V6 and V7 architectures- > * the MMU is configured and enabled in PEI phase. As VirtualFunc- > * is already mapped to virtual memory, don't have to do anything > here.+ /* Note: It is presumed that on RISCV architectures the MMU is > configured and+ * enabled in PEI phase. As VirtualFunc is already mappe= d to > virtual memory,+ * don't have to do anything here. */- /* FIXME: Is = it > the same on ARM v8? */ } @@ -174,9 +171,8 @@ Returns: > --*/ { //- // Note: It is assumed that the MMU and page tables are > configured on ARM platforms- // based on ARM v5 v6 and v7 architecture.+ > // Note: It is assumed that the MMU and page tables are configured on RIS= C- > V+ // platforms. //- /* FIXME: Is it the same on ARM v8? */ > JumpToTestFunc(VirtualFunc, HandOffAddr); }diff --git a/uefi- > sct/SctPkg/SCRT/SCRTDriver/Riscv64/Debug.c b/uefi- > sct/SctPkg/SCRT/SCRTDriver/Riscv64/Debug.c > index 6161d596..2991935a 100644 > --- a/uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Debug.c > +++ b/uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Debug.c > @@ -1,7 +1,8 @@ > /** @file Copyright 2006 - 2012 Unified EFI, Inc.
- Copyright (c)= 2011 - > 2012 ARM Ltd. All rights reserved.
+ Copyright (c) 2011 - 2012 ARM= Ltd. > All rights reserved.
+ Copyright (c) 2021 Hewlett Packard Enterprise > Development LP. All rights reserved.
This program and the > accompanying materials are licensed and made available under the terms > and conditions of the BSD License@@ -24,7 +25,6 @@ Module Name: > #include "SCRTDriver.h" UINTN mHandOffPtr =3D 0= ;- > EFI_PHYSICAL_ADDRESS mIoPortSpaceAddress =3D 0; EFI_STATUS@@ -42,18 > +42,10 @@ ConsumeHandOff ( > HandOffPtr =3D (RUNTIME_HANDOFF*)mHandOffPtr; *ConfigData =3D > HandOffPtr->ConfigureInfo; - if (!HandOffPtr->DebuggerInfo.MmioFlag){- > //- // If debug port is I/O mapped, fix IoBase Address.- //- > FixAddress(&HandOffPtr->DebuggerInfo.IoBase);- mIoPortSpaceAddress > =3D HandOffPtr->DebuggerInfo.IoBase;- } else {- //- // If debug= port is > MMIO, fix MmioBase Address.- //- FixAddress(&HandOffPtr- > >DebuggerInfo.MmioBase);- }+ //+ // Fix MmioBase Address.+ //+ > FixAddress(&HandOffPtr->DebuggerInfo.MmioBase); return > EFI_SUCCESS; }@@ -65,7 +57,7 @@ Send2UART ( > ) { //- // TODO: On ARM platforms use platform specific functions t= o+ // > TODO: On RISC-V platforms use platform specific functions to // write t= he > data to UART. // return EFI_SUCCESS;diff --git a/uefi- > sct/SctPkg/SCRT/SCRTDriver/Riscv64/Io.c b/uefi- > sct/SctPkg/SCRT/SCRTDriver/Riscv64/Io.c > index b925e151..255cb9a6 100644 > --- a/uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Io.c > +++ b/uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Io.c > @@ -2,6 +2,7 @@ > Copyright 2006 - 2012 Unified EFI, Inc.
Copyright (c) 2011 - 20= 12 ARM > Ltd. All rights reserved.
+ (C) Copyright 2021 Hewlett Packard > Enterprise Development LP
This program and the accompanying > materials are licensed and made available under the terms and condition= s of > the BSD License@@ -21,7 +22,7 @@ Module Name: > --*/ -#include "Io.h"+#include "SCRTDriver.h" EFI_STATUS EFIAPI@@ - > 119,11 +120,11 @@ FixAddress ( > ) { //- //Note: On ARM platforms don't have to do > this as all the functions are virtually mapped.+ //Note: On RISC-V > platforms don't have to do this as all the functions are virtually mapped. > // } -// Quick port to ARM+// Quick port to RISC-V. It doesn't > have traditional I/O-Port 80h POST Codes VOID Port80 (diff --git a/uefi- > sct/SctPkg/SCRT/SCRTDriver/Riscv64/Io.h b/uefi- > sct/SctPkg/SCRT/SCRTDriver/Riscv64/Io.h > deleted file mode 100644 > index 1e78b3e4..00000000 > --- a/uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Io.h > +++ /dev/null > @@ -1,48 +0,0 @@ > -/** @file-- Copyright 2006 - 2012 Unified EFI, Inc.
- Copyright (c)= 2011 - > 2012 ARM Ltd. All rights reserved.
-- This program and the > accompanying materials- are licensed and made available under the terms > and conditions of the BSD License- which accompanies this distribution. = The > full text of the license may be found at - > http://opensource.org/licenses/bsd-license.php- - THE PROGRAM IS > DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,- WITHOUT > WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR > IMPLIED.- -**/--/*++--Module Name:-- Debug.h----*/--#ifndef > _IA32_IO_ACCESS_H-#define _IA32_IO_ACCESS_H--#include > "SCRTDriver.h"--#define IA32_MAX_IO_ADDRESS 0xFFFF--#define IA32API- > --typedef union {- UINT8 VOLATILE *buf;- UINT8 VOLATILE *ui8;- UIN= T16 > VOLATILE *ui16;- UINT32 VOLATILE *ui32;- UINT64 VOLATILE *ui64;- > UINTN VOLATILE ui;-} PTR;--// This address is assuming a pure PC > architecture. Not required?-#define VIRT_TO_PHYS_OFFSET > (0x80000000) //2G----#endifdiff --git a/uefi- > sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv64 > /DebugSupportBBTestExceptionCallbackFunction.c b/uefi- > sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv64 > /DebugSupportBBTestExceptionCallbackFunction.c > index c27c0c0c..c6e72806 100644 > --- a/uefi- > sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv64 > /DebugSupportBBTestExceptionCallbackFunction.c > +++ b/uefi- > sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTe > +++ st/Riscv64/DebugSupportBBTestExceptionCallbackFunction.c > @@ -2,6 +2,7 @@ > Copyright 2006 - 2016 Unified EFI, Inc.
Copyright (c) 2011 - 20= 16, ARM > Ltd. All rights reserved.
+ Copyright (c) 2021, Hewlett Packard Enter= prise > Development LP. All rights reserved.
This program and the > accompanying materials are licensed and made available under the terms > and conditions of the BSD License@@ -37,7 +38,7 @@ SoftwareBreak ( > void ) {- // Not ported to ARM yet+ // Not ported to RISC-V yet = ASSERT > (FALSE); } @@ -99,9 +100,7 @@ > BBTestRegisterExceptionCallbackFunctionManualTest ( > // Invoke RegisterExceptionCallback() to install an interrupt handler > function. // InvokedExceptionCallback =3D FALSE;- // FIXME: Is it no= rmal that > we use EXCEPT_IA32_BREAKPOINT here?- // Shouldn't we define proper > constants for ARM exceptions in DebugSupportProtocol.h file?- Status =3D > DebugSupport->RegisterExceptionCallback (DebugSupport, 0, > ExceptionCallback, EXCEPT_IA32_BREAKPOINT);+ Status =3D DebugSupport- > >RegisterExceptionCallback (DebugSupport, 0, ExceptionCallback, > EXCEPT_RISCV_BREAKPOINT); if ((Status =3D=3D EFI_SUCCESS) || (Status = =3D=3D > EFI_ALREADY_STARTED)) { AssertionType =3D > EFI_TEST_ASSERTION_PASSED;@@ -205,7 +204,7 @@ > BBTestRegisterExceptionCallbackFunctionManualTest ( > // Assertion Point 3.4.2.3 // Invoke RegisterExceptionCallback() to = install > another interrupt handler function. //- Status =3D DebugSupport- > >RegisterExceptionCallback (DebugSupport, 0, ExceptionCallback1, > EXCEPT_IA32_BREAKPOINT);+ Status =3D DebugSupport- > >RegisterExceptionCallback (DebugSupport, 0, ExceptionCallback1, > EXCEPT_RISCV_BREAKPOINT); if (Status !=3D EFI_ALREADY_STARTED) > { AssertionType =3D EFI_TEST_ASSERTION_FAILED;@@ -228,7 +227,7 @@ > BBTestRegisterExceptionCallbackFunctionManualTest ( > // Assertion Point 3.4.2.4 // Invoke RegisterExceptionCallback() to = unstall > the interrupt handler function. //- Status =3D DebugSupport- > >RegisterExceptionCallback (DebugSupport, 0, NULL, > EXCEPT_IA32_BREAKPOINT);+ Status =3D DebugSupport- > >RegisterExceptionCallback (DebugSupport, 0, NULL, > EXCEPT_RISCV_BREAKPOINT); if (EFI_ERROR(Status)) { AssertionType = =3D > EFI_TEST_ASSERTION_FAILED;@@ -273,4 +272,3 @@ > BBTestRegisterExceptionCallbackFunctionManualTest ( > return EFI_SUCCESS; }-diff --git a/uefi- > sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv64 > /PlatformIsa.c b/uefi- > sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv64 > /PlatformIsa.c > index 8334f601..8b23d91b 100644 > --- a/uefi- > sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv64 > /PlatformIsa.c > +++ b/uefi- > sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTe > +++ st/Riscv64/PlatformIsa.c > @@ -2,6 +2,7 @@ > Copyright 2006 - 2012 Unified EFI, Inc.
Copyright (c) 2011 - 20= 12, ARM > Ltd. All rights reserved.
+ Copyright (c) 2021, Hewlett Packard Enter= prise > Development LP. All rights reserved.
This program and the > accompanying materials are licensed and made available under the terms > and conditions of the BSD License@@ -26,5 +27,4 @@ Abstract: > #include "DebugSupportBBTestMain.h" - > EFI_INSTRUCTION_SET_ARCHITECTURE PlatformIsa =3D IsaAArch64;- > +EFI_INSTRUCTION_SET_ARCHITECTURE PlatformIsa =3D IsaRiscv64;diff --git > a/uefi- > sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/Riscv64/EntsLib > Plat.h b/uefi- > sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/Riscv64/EntsLib > Plat.h > index ff781aee..144f812a 100644 > --- a/uefi- > sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/Riscv64/EntsLib > Plat.h > +++ b/uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/Riscv > +++ 64/EntsLibPlat.h > @@ -2,6 +2,7 @@ > Copyright 2006 - 2012 Unified EFI, Inc.
Copyright (c) 2010 - 20= 12, ARM > Ltd. All rights reserved.
+ Copyright (c) 2021 Hewlett Packard Enterp= rise > Development LP. All rights reserved.
This program and the > accompanying materials are licensed and made available under the terms > and conditions of the BSD License@@ -20,7 +21,7 @@ Module Name: > Abstract: - AArch64 specific defines+ RISCV64 specific defines --*/ = -- > 2.30.0