From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web11.6230.1614221258728237687 for ; Wed, 24 Feb 2021 18:47:38 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=ee/6KMf2; spf=pass (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=0690489a7f=abner.chang@hpe.com) Received: from pps.filterd (m0148663.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 11P2hcMI016623; Thu, 25 Feb 2021 02:47:28 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=f6OUyrVnZucTH3K4EEEd1w9rIZP3I1wPExXfoqSzZcI=; b=ee/6KMf2Z5ZMB7HO7ICbdGknnA8ldoDJdHvdYBeQc+9W8ETvNPpniqltTV4Tmuajacc7 qLrw9jih5i3WVMg3u4FRtkUyP7k7/84FNWo1H8tbnGBznZP//a7livyfmcKbLCdR75Le 0jhF2+bFtOSyx+xG/1wa7ZTuPu3tuzj3WzUMrynd++eOs9LjeYk8ivmlHeGK04EIfbjL 7vSajLWiswi6vQ7lkaNsGAIvBpzz8zBjTnBwPFMmEx5D6LCzWWmNW7SYyqpOIPC2A8eK bKztTJ4dilGykp6cdNguNFyi6H+CeJfaelYxolIBHmtfdT3OPsS20EYQzM2ANDk+ov4R NQ== Received: from g9t5008.houston.hpe.com (g9t5008.houston.hpe.com [15.241.48.72]) by mx0a-002e3701.pphosted.com with ESMTP id 36vyumyq2w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Feb 2021 02:47:27 +0000 Received: from G9W8455.americas.hpqcorp.net (exchangepmrr1.us.hpecorp.net [16.216.161.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g9t5008.houston.hpe.com (Postfix) with ESMTPS id A69BA64; Thu, 25 Feb 2021 02:47:26 +0000 (UTC) Received: from G9W8455.americas.hpqcorp.net (2002:10d8:a15e::10d8:a15e) by G9W8455.americas.hpqcorp.net (2002:10d8:a15e::10d8:a15e) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 25 Feb 2021 02:47:26 +0000 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (15.241.52.10) by G9W8455.americas.hpqcorp.net (16.216.161.94) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Thu, 25 Feb 2021 02:47:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DFp2DW8pmFHvExGYypGlExDNXNtu3kpe4f+R56dKjan/QneG2WoZifj1Y9NOZ3foSFckiE75MRO1Pkm95oXP/rW99+BEdZn1FrwEFrgTtmc6K+CPAjiPAPa4c20JEFuOMTCuDtDGW2H6TTFd9wKDgSiCjdE9LiFnsxabfv2qdXDHDoQy7fAv9A7mv5uPriY4dO8z9tSAUwdEFMS6fPm5aP8Vn6sQ9aN2YQ5kgG7g3z+xgnsSl1uEbu/gVfjqP79FSEDZ+Ur4UbVuLPhx9/aNRm1ELQVOK1PZczvrHfowC4U4GSmAa3KfADBGVze3ROesN8NT02/I6l4T4VqBCn+WiA== 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=+35N2uOWbneDRbnjrY9MSvvDuliaXFldpYm6XeCMUbE=; b=O6vRG99B3TVS2cPE30vR0ZHLuld5V20iINDqo1FZWM9hveJzy61wQpUOdIK84i1R8Fj7bgkYCBl24phu7e9xzWZPPAz4WklVycVxHfKmIb1O61TqLnFM1IlrYuH++ys7CiNChKoHbejIU/UwWvx2slsgjLDl8zk77S2CUk317g5qItc14QCnjYif2I6Mn3y/jQXM/RY7RPshSL8IZY4+EZrefVfWCaJc8n2zhhv6cWOO+9YbimLiGrvOs7tcPZNNCtGHXjCBgq3OIUnDh+UsLTd9L/3B35ry7swM0P8gCVeVFzi9AYuz8/GmZIbooFscVW/CqvyJU940ZTyXIO+Ruw== 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 (10.169.13.16) by CS1PR8401MB1189.NAMPRD84.PROD.OUTLOOK.COM (10.169.97.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19; Thu, 25 Feb 2021 02:47:24 +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.020; Thu, 25 Feb 2021 02:47:24 +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 PATCHv2 2/5] SctPkg: Adapt Aarch64 sources for Riscv64 Thread-Topic: [edk2-test PATCHv2 2/5] SctPkg: Adapt Aarch64 sources for Riscv64 Thread-Index: AQHW/vpsFTmhO/wBLE+KxoNp2iZ8RqpoQsxw Date: Thu, 25 Feb 2021 02:47:24 +0000 Message-ID: References: <20210209154354.30234-1-daniel.schaefer@hpe.com> <20210209154354.30234-3-daniel.schaefer@hpe.com> In-Reply-To: <20210209154354.30234-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: 46232907-a349-4e2c-ecc0-08d8d937ae73 x-ms-traffictypediagnostic: CS1PR8401MB1189: 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: gGxB9bj0sysxJFXLNo2TR/hWlsbz4QrKFUOJbSXy1GWlnvObM/KS2dShML2nXTA2wn6Uh6iMrtWHD1AE23h7mEGlQVAwbwP476gwat+OBTAsXgdbPZSldT2e5Fu1Bah9zmT5YoNngGtH+Oqm9zBiOWxEseaKSw76ozumNcU+pM7d4BDdPxSQCDJO0AguP9vbvNNjxmiet1esmVE03+zP0QLjBXY8I9eEEBQMhFzCqGLfQEfsarmzMb4uLE0IieBUv6UfRT69vhc7kJebcxOVxzZTTRSlMHFnB3j2Y3HvXYttapWBV4wJa2WTFbnEJumgFb6tvapjvfX6ogtZjjCpb5f1pLulcpijJ3eFe3ociaQaVsBjNbUlPuALROTE5vA2QSsl5j2taR6jFPiWPdJyNSze/jQ3xIq1FwydlWexnPUNhpU2UGbre/EpepI8mXOmPIhCA417YyBXg17fxJj8Os53arPQJ0etRCNu5IOhPURuu5a3w8RyssqzHbpAeHnvKswBdzXhN4IIAvgoxoLqf5Fj0NYBxmlaOcTBP8ytcMoXgGIqADVYUSdfkBs1+FycDQGhkXaeyevUgHfUZKtUqbX9TP/9OwE0I7GM9MkgNCs= 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:(396003)(39860400002)(346002)(136003)(376002)(366004)(186003)(83380400001)(4326008)(53546011)(86362001)(110136005)(966005)(478600001)(54906003)(71200400001)(30864003)(316002)(6506007)(9686003)(8676002)(76116006)(66556008)(19627235002)(33656002)(8936002)(26005)(55016002)(64756008)(66446008)(7696005)(66946007)(52536014)(5660300002)(2906002)(66476007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?qImsn3u5gw5BJFUDEkggCAE63hKDhh91QPhEZviJgMDR3SCpbYqiOCpYgOdZ?= =?us-ascii?Q?mUUiSS+tGfmF+PmYqOGdpfELS/LKMtVBIViXaWfVjiRg+y0uaH57vm7Afee3?= =?us-ascii?Q?IqaaRANhk/ulSFpYgBrfAwvUw3bSAPZubQbS0GnveLXbA1DRNsRK0zeIbrsV?= =?us-ascii?Q?tnKFcSb8ORwRVF+YmdyjONCBIuSpd71PGeH6Jw9/94dt9hMj8jkTsopS9qUR?= =?us-ascii?Q?e7jm7W39PoXWMfRUGLqv95Mw3XuAfqYOv3WF/0q7riFLLRLDE3jjbknDFMWk?= =?us-ascii?Q?812Hg3/vNRsPzLmDHXGk1Ua9SUqcL65BlFCy+1+YoIhMRN2vVjn2PreT2pTP?= =?us-ascii?Q?QFJD8GwWmmKYYGZTclt9ZCT6mY5N4uT320R3WlDilfm9ttYhMVrwmld1GkKN?= =?us-ascii?Q?FO/6QSfexovWG15Rwg8iNk0NlwS6GUcLmpDQ8fEX7eG2VHh4eMrXOSbtuxWW?= =?us-ascii?Q?Pu5ovlexqBeM1+061nhLa7zyVf783C02IOhZQ2c4N++S40G2rXBR0iXGWsYE?= =?us-ascii?Q?jy4bRdno4N5M+KVZ6DfIMgReFBkWwlZWgLWq9MQmA78Ou7Qm8vrfIA/olXZG?= =?us-ascii?Q?3JyOS12ioyW4hRnLgWH4fXFj3nq4yxNOjUwyauAv9yv9UvBp87xYeQwpP7cW?= =?us-ascii?Q?pVrWAbMOtmb9syawX2Bhfu/EOjtGhpvn2ZhSiLFjY1xWxGBxOQLGXeay3wW1?= =?us-ascii?Q?3jt/WfIN00yvjdhmfKmOlAAt57FOPShDj85jo+tQzgDVdus+miOsUVXVnlOT?= =?us-ascii?Q?B+Q9K7gxF4e00OJV2uMkd7R6IJZjncd+V7SX4j/YaVYjLVtEWvehkf6Y+Zr1?= =?us-ascii?Q?9GcP1Jp3sJvmG4GVJqs0fwPnuwPaPsjtkoOPEyUQUfsphvfdHX/2F0D4UZ2g?= =?us-ascii?Q?ATT7+yQN40tpXGRcqRzGWR76v8paxsniHNosUmlcWy3ploK11PsEfuz3v2OX?= =?us-ascii?Q?gFrqHN6BtuLYV93i2UjKie/UaIrHo0RWYEW7K9b4BJ5txjo8tm5meJRIVI/L?= =?us-ascii?Q?QnMqAK0aWKMzuK1QFQeBOKj/4D4Nb37e5i+J9JsoLUUUohy376FyMrbnUWgF?= =?us-ascii?Q?zVFeMftuUHRXWPqgwEqVtnDP1eFsIdkJAlFXItws7GQYD8dYZCFoaeuwPQWR?= =?us-ascii?Q?RyvMd6gx5I7pSPq3Q2o1T4mfEzkWX2I08DkFH5ilSP/oOHg57pWMxln5FDJW?= =?us-ascii?Q?LFqLQ0c1oVQrOmzJpM1wIFxL20YUMJRUnduIFk9nN0EvtmglbedOOj/qz1b7?= =?us-ascii?Q?rHf0c7EwRRkE8LO26yMlRItxCWhgDhjtequU8uNgpM/WfazTDlTrjTHMyu8R?= =?us-ascii?Q?smENz/9xP/bCDZM4KXy4bl6D?= X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 46232907-a349-4e2c-ecc0-08d8d937ae73 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Feb 2021 02:47:24.4827 (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: FqZdwbXzrX+BatBXu/9raVWQy2pI+y94QqQLUQV44xAUDuOOL0ewqltTjVFqQsDXmrLY00Mhs8PhlYnRIZd/oQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR8401MB1189 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-02-24_13:2021-02-24,2021-02-24 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 impostorscore=0 malwarescore=0 phishscore=0 clxscore=1015 lowpriorityscore=0 spamscore=0 bulkscore=0 suspectscore=0 priorityscore=1501 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102250021 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Schaefer, Daniel > Sent: Tuesday, February 9, 2021 11:44 PM > 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 PATCHv2 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 | 2 +- > 9 files changed, 31 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..7f7835e4 100644 > --- a/uefi- > sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/Riscv64/EntsLib > Plat.h =20 HPE copyright missed. Reviewed-by: Abner Chang > +++ b/uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/Riscv > +++ 64/EntsLibPlat.h > @@ -20,7 +20,7 @@ Module Name: > Abstract: - AArch64 specific defines+ RISCV64 specific defines --*/ = -- > 2.30.0