From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (EUR04-HE1-obe.outbound.protection.outlook.com [40.107.7.51]) by mx.groups.io with SMTP id smtpd.web08.3716.1617107174282447228 for ; Tue, 30 Mar 2021 05:26:14 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=gpoeGWkC; spf=pass (domain: arm.com, ip: 40.107.7.51, mailfrom: sunny.wang@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=okhlfwaVSIwwBOjSrjtOLAs8vedS1uPDJaIFU/n4+IU=; b=gpoeGWkCYjbNmH+6NF7XrqPmMpSPqi8MLlhFft3UvgEuHjKDqo5cDS/W+vaGPpb4ynaQdEKp6+bBZup6zJqIWDW0kA4dDMQMJIkU38cR9sXW7vsQ4KM47G74gwi7I218XMBVmxVwvnxWQ7viMRiX3phQZ1M9GbTeXmiIGiiUHfc= Received: from AM6PR04CA0012.eurprd04.prod.outlook.com (2603:10a6:20b:92::25) by VI1PR08MB3950.eurprd08.prod.outlook.com (2603:10a6:803:dd::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.29; Tue, 30 Mar 2021 12:26:10 +0000 Received: from VE1EUR03FT056.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:92:cafe::77) by AM6PR04CA0012.outlook.office365.com (2603:10a6:20b:92::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.24 via Frontend Transport; Tue, 30 Mar 2021 12:26:10 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) 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.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT056.mail.protection.outlook.com (10.152.19.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.25 via Frontend Transport; Tue, 30 Mar 2021 12:26:09 +0000 Received: ("Tessian outbound 31ead7df1201:v89"); Tue, 30 Mar 2021 12:26:09 +0000 X-CR-MTA-TID: 64aa7808 Received: from 23ed549d7fa5.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 3DBF8CDB-3F01-4618-B70B-BC3F57472EC7.1; Tue, 30 Mar 2021 12:25:59 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 23ed549d7fa5.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 30 Mar 2021 12:25:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fq2tK5l/ypwHPTHYHiqhRM2hW6P7v0DxgAJqCMz85UkmG2f0mWA7zXtK92Jq79peyHEo6Ve/d7BfioGxF4l2sQYbujJxoml0JIzmPIdZsLS+SUY+jUTpR+ND1n7uJ4QC7omR495jotypUCbydni/drFWP4ScUW7gAaPhYe1v3uJSnOTn89V9K4J3wJCEy8oKkdcg+VnXmUZhjYgkkj/ND1Z5u7hdJniZt0tpHSFF+w5G80lcsOOSknEqgBwK0H1N6gmXbaWaFB2DJUACDhjAA9RJJkBhrBZycqArQxF/2he+xKUNKMFAR8uvQOL3sQAIfn1wwfP1B3ZKi3/MjGnJUg== 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=okhlfwaVSIwwBOjSrjtOLAs8vedS1uPDJaIFU/n4+IU=; b=PYxOEp86y1Mz377Fl6s2lO6vKFN+SLgJC5PcO9p2IFtMFx0em7sa18Jt5+FySDEXVsSiaswP8opRAZLrriGTFDx3zIG6G4gdtyJ9fT3c560PAw4okBFVsPbIpXr7luK3hE3k8L4xvn5dqlNRA4ns5wKhPRvRCQh0WknCk+TuGsWFGxX3UQ3FScEXF5fb91yte7QUQLA8gCP5ihM9xfv65o30OtbDR2VcJLDmzx5ytT4umclwNpkvXmydJE7/TfHq+RafZ4PAWqNGQTg2J/vNtUPRncMwi5xQf/G021P4Tne59OMt2LXBOpISOR8xCbuC1H9blhsOj8/Yp4mphFkYhA== 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=okhlfwaVSIwwBOjSrjtOLAs8vedS1uPDJaIFU/n4+IU=; b=gpoeGWkCYjbNmH+6NF7XrqPmMpSPqi8MLlhFft3UvgEuHjKDqo5cDS/W+vaGPpb4ynaQdEKp6+bBZup6zJqIWDW0kA4dDMQMJIkU38cR9sXW7vsQ4KM47G74gwi7I218XMBVmxVwvnxWQ7viMRiX3phQZ1M9GbTeXmiIGiiUHfc= Received: from DB8PR08MB3993.eurprd08.prod.outlook.com (2603:10a6:10:ad::26) by DB9PR08MB6763.eurprd08.prod.outlook.com (2603:10a6:10:2af::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.25; Tue, 30 Mar 2021 12:25:58 +0000 Received: from DB8PR08MB3993.eurprd08.prod.outlook.com ([fe80::89f9:4e97:546d:2b97]) by DB8PR08MB3993.eurprd08.prod.outlook.com ([fe80::89f9:4e97:546d:2b97%6]) with mapi id 15.20.3977.033; Tue, 30 Mar 2021 12:25:58 +0000 From: "Sunny Wang" 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 , "Chang, Abner (HPS SW/FW Technologist)" , Sunny Wang 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+g4BK3oeTbUKqWgXNg Date: Tue, 30 Mar 2021 12:25:58 +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: x-ts-tracking-id: BBED084653DA0440A5B68D6A9F7F6916.0 x-checkrecipientchecked: true Authentication-Results-Original: hpe.com; dkim=none (message not signed) header.d=none;hpe.com; dmarc=none action=none header.from=arm.com; x-originating-ip: [61.231.198.221] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 933ec9bd-182c-4328-b3de-08d8f377000d x-ms-traffictypediagnostic: DB9PR08MB6763:|VI1PR08MB3950: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:9508;OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: jCc0I4bnawsAhu453Qw7h3EyzeG8kRuJNK+Dn+m0OCIpO2vyGI5fI6sISdUkudxxVUagYXAVuMKm6pRQPm95HJjYW7hBIWv84ZcWaw+pF/CS9fEDucVtVD4tbDbmWPyQYLblXx5c8U6ZgLKImoPXszIRKsgx6b6iS9yFyvJgUm1KpeGnKcMKGMi4dsNBPWE482vKLpFkCgLjWxwZjnCT9BK7+5szfRkt81pSuoMgCxYvH/3b/dlx9OGZdphV9Pp7W3KRVd0f27U2YNl/SPkJigHBLhBZSJj6Xds6UfvwQZwHkfwd3zXTZS7ItQFDDlxtaIXYvMGEjVPBRr97M5fzrexmBTjntcJjJR0xvY9EPd1wbF0wBB8kxJ7bme2cDlUNSI1KR/6wk3SiRGqE8IO+UCv3vzbEzaF+vEIiAMMpjGKWgJUZ5UPzMBMlOpOsGfbRSOwWlHzhiR+bZq1/sSCMYGg97MpblotzrhhdC4ypYVSz/YervFJ0YOU6nUguEiGjsY67TLkZw2ITmJ7uqoK36RZFjAnJYi4ZviQgNVeTaen2bgcm5HZicRRETsdUYQVWBe8JMSeO1rhsJyP9z5/vvoTYhJQqQteWgMHz9GRhC5d0YLazgW93b0AHTCjb4pWjC3iiu4twGFLQFISHAufqZAjzM+1RN2Lissq4vReWRFlNWE761QfkNeM/0rPXmz3O6oSV406PKgAdT9aICEfZUjZHFab+55Vf09Vnl92aaq8= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB8PR08MB3993.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(39860400002)(366004)(346002)(376002)(136003)(8936002)(83380400001)(86362001)(4326008)(7696005)(38100700001)(966005)(71200400001)(6506007)(53546011)(316002)(478600001)(186003)(15188155005)(2906002)(26005)(8676002)(296002)(52536014)(66446008)(64756008)(16799955002)(5660300002)(110136005)(66946007)(55016002)(66476007)(66556008)(76116006)(9686003)(19627235002)(54906003)(30864003)(33656002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?ybhbN6MiIyzpdQyj/K/GEmePWZngdeC52HqwR2XKu/utPgABXZE+KvgE2NaB?= =?us-ascii?Q?Fb0rS0Vf8/ai/ULdKlC+U3yV7s7ax/waV8cZ2UmPSFvovfck9b22nV+xA6An?= =?us-ascii?Q?Q2sPGEZa5s2hvZky9rSzmf4PiXsyFq6bfbxdcEDCOI23lXnjCp6SU+3A3Q7j?= =?us-ascii?Q?BORo/gVZ/mfbPAIlKwWu7ehr1/XKkcyKVAHRzPnQw+DdxgOHiJmAd5ovhoeZ?= =?us-ascii?Q?svJxzTx2xYh79as1WpFMudLw6ahGCbBTciFeHl7/Wra/qiBxV9EvEpXzOoB1?= =?us-ascii?Q?FrAV/ek42Rke3E6YH2MWAoXMiwdYsae0ojO6+mqXn2Sz9ZGOeG9hWkm9Zi7d?= =?us-ascii?Q?7FOh7upmLidRrHuoVeuI2zW7l3Kg0S2zj6FEurXG+tj77/t2zZPa6/NK18Yh?= =?us-ascii?Q?JiJk3dAiak7TuNgox0oIUnHHfZWDhSBW9+1pJp5+DGvmjugmDCzVFwbT93gO?= =?us-ascii?Q?lrdt4IZWuoxhD10QiUht2FNnOamqwYhxRbgK3FGDrK0UKMFe03/OZZ7QOhHK?= =?us-ascii?Q?/+bCEw953wwswIFFHnIhUvtArZip8RGgwRY00ojTUnuLTaTtkmSdg9sRP5XR?= =?us-ascii?Q?O47D3ABtKxw9nqH+rqI/nypSVMgW2we3LMBRi97xmH1XTzrEM+5crXok09KM?= =?us-ascii?Q?7j1jmDp/g6L8qrCktz6HXCAujziWxtDYG1O/skBaFlpnO4enl6/l1PNJ8lbK?= =?us-ascii?Q?gced+WyO4vemwXoJsKuEyMvyKZI6d/lfbY0tIVY79C5VWgRDAEBDavx4JBci?= =?us-ascii?Q?i3KlZc944RA4nbOI46Qg+7kKUzC6AKuXYhVKA4+dygrtNNkmIsM/FBkGTL+x?= =?us-ascii?Q?uD5SjQo4KITdGVeY+cVpvyVWmV6iZe7Rhh0O7nD+nrmxI6JCZytO9txvn/L1?= =?us-ascii?Q?WSoUJ5AnZoePFv6imCe9/AD3u2tJ1aNlfC3070BWz2sqK3B3+y4zPXOTVPl7?= =?us-ascii?Q?NkgtPXCQoBwJnhsYrmQeA7qhua3hjXr7yJTGtP59YiXSYumLbwDkBIN5rEU7?= =?us-ascii?Q?f93LQNdW7uTXXKfd1qlYKzmZo+oeJF8vUk4KZX+kma2Hf6FY4I1b9t97T4zZ?= =?us-ascii?Q?IS1/M8s68H1yeROAWurvgkmSkM3pV0qG10CWKKyTpgsdQGS+p0MJgvyNZZrH?= =?us-ascii?Q?oXi2JAKdkz4ziTb/m90+ekDqsGj58T0Gi5zSPWcx0aR4s/Lh2UgOKILzUTUq?= =?us-ascii?Q?tPl6NcWD4qUe5GLT7XcRvKq3orjbAi3sTYcI7ZsdrAdf+Xg+EpOyE55gL8v/?= =?us-ascii?Q?gBXzpRG3oDduGFZ0yRMc7FDUQKY+UUOIsJOKB4hNnowS/WOzv376E4x2Edk5?= =?us-ascii?Q?f3Ygs6ljaVcdHuVEHLjoH1jZ?= MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6763 Original-Authentication-Results: hpe.com; dkim=none (message not signed) header.d=none;hpe.com; dmarc=none action=none header.from=arm.com; Return-Path: Sunny.Wang@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT056.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 7b563f55-f7b2-4745-6198-08d8f376f932 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7Dxk8F5N+d+Ez4IcBLpqrOkxpg6cYuIaCOfs/vfR+etTUSIq6wGCIhKWUkv23lMt6bS0Ed9hGie39XSXsXOc95249p8VfZR/I7GcfaoHK8hO8qiIUJn3/MHAZQ0d4YH4FfdDy2O7xXIthEW5oWrVHTkkmMt7FqZWJ30fSXorzI2utdWZRi64h5LvFxoP/fWH9ffcnrh/F0qJOSTJHjzlUtPPHp4fi8/JG8Ted4DR3N6dh6ZJ5u3/jvu2+C2Eqnn3TE8ew8QqwdsBV4Th5XnEToKe4K37dLSyHr4gWy/y4ZDqGVGF3rKYa/oTDYDwJMhPlB7E4LCgly2UWPAc5Nu14d3c4xO9sF51nWF1xFNdBfHlJVTJVesc0LC9/E0AYbYe75QUxIWTT54lIeVyRiJVvQp4xcj1kOaujB+uxPSR3sJqDL1/Ny3J917C9RdkbEzPlHI5yrydNguOWNiZ6xCi7/3f7AAhvMw0zC/RWtZS3DAlJEzRrkrDjCOGJNY1cWn8Ey9GMWyzyQbbgyO+2p2SVsW7GaBDEcqt0ilN5/DhSXKM/ioVQKYZeLqea+bdCtv0DBa9sHKi9ReEKQPtOSy5PkvA5FiWz81odEwu4P4P1gsWlY7AfezX7KYBvT+MDtLM5rYAczHLYUcMTG6eba0BLBfdavx8dWaQeNfYXI7nMroD+hKTHzF3L4hJs76/X4DA8INW7Ncy1zGmbYvo7VD66WOExl7CPn6JX9HapOBXgRTRwlhj7lwPtW9TRdmPZ7dw2UZEx4XPvi1y1rSc6XwoXA== X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(346002)(136003)(39860400002)(376002)(396003)(46966006)(36840700001)(6506007)(30864003)(82310400003)(356005)(336012)(19627235002)(5660300002)(4326008)(110136005)(186003)(316002)(36860700001)(82740400003)(81166007)(52536014)(86362001)(7696005)(9686003)(966005)(2906002)(53546011)(47076005)(70586007)(83380400001)(8676002)(70206006)(15188155005)(55016002)(478600001)(8936002)(33656002)(26005)(54906003)(16799955002)(2690400003);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2021 12:26:09.8749 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 933ec9bd-182c-4328-b3de-08d8f377000d X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT056.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3950 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Looks good to me. Same comment as patch 1/5. This only affects RISCV. Therefore, as long as y= ou build and run SCT on the RISCV platform, this change should be fine. Reviewed-by: Sunny Wang -----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 ; 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 REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3042 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/Riscv= 64/DebugSupportBBTestExceptionCallbackFunction.c | 12 ++--- uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv= 64/PlatformIsa.c | 4 +- uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/Riscv64/EntsL= ibPlat.h | 3 +- 9 files changed, 32 insertions(+), 92 deletions(-) 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 - 2012, ARM Ltd. All rights reserved.
+ Copyright (c) 2021, Hewlett Packard Enterprise Development LP. All right= s reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D 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/Sc= tPkg/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 conditions of the B= SD License @@ -23,8 +24,6 @@ #--*/ #start of the code section .text -/* 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 x2 diff --git a/uefi-sct/SctPkg/SCRT/SCRTApp/Riscv64/VirtualMemory.c b/uefi-sc= t/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 right= s reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D 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 h= ere. + /* Note: It is presumed that on RISCV architectures the MMU is configure= d and + * enabled in PEI phase. As VirtualFunc is already mapped to virtual mem= ory, + * 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 AR= M platforms - // based on ARM v5 v6 and v7 architecture. + // Note: It is assumed that the MMU and page tables are configured on RI= SC-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/Sct= Pkg/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 BS= D 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 to + // TODO: On RISC-V platforms use platform specific functions to // write the 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 - 2012 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 conditions of the BS= D 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 f= unctions are virtually mapped. + //Note: On RISC-V platforms don't have to do this as all th= e functions are virtually mapped. // } -// Quick port to ARM +// Quick port to RISC-V. It doesn't have traditional I/O-Port 80h POST Cod= es 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 BS= D License - which accompanies this distribution. The full text of the license may b= e 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 IMP= LIED. - -**/ - -/*++ - -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; - UINT16 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 - - - -#endif diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackB= oxTest/Riscv64/DebugSupportBBTestExceptionCallbackFunction.c b/uefi-sct/Sct= Pkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv64/DebugSuppo= rtBBTestExceptionCallbackFunction.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/BlackBoxTest/= Riscv64/DebugSupportBBTestExceptionCallbackFunction.c @@ -2,6 +2,7 @@ Copyright 2006 - 2016 Unified EFI, Inc.
Copyright (c) 2011 - 2016, ARM Ltd. All rights reserved.
+ Copyright (c) 2021, Hewlett Packard Enterprise Development LP. All right= s reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D 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 fu= nction. // InvokedExceptionCallback =3D FALSE; - // FIXME: Is it normal that we use EXCEPT_IA32_BREAKPOINT here? - // Shouldn't we define proper constants for ARM exceptions in DebugSuppo= rtProtocol.h file? - Status =3D DebugSupport->RegisterExceptionCallback (DebugSupport, 0, Exc= eptionCallback, EXCEPT_IA32_BREAKPOINT); + Status =3D DebugSupport->RegisterExceptionCallback (DebugSupport, 0, Exc= eptionCallback, 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 handl= er function. // - Status =3D DebugSupport->RegisterExceptionCallback (DebugSupport, 0, Exc= eptionCallback1, EXCEPT_IA32_BREAKPOINT); + Status =3D DebugSupport->RegisterExceptionCallback (DebugSupport, 0, Exc= eptionCallback1, 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 f= unction. // - Status =3D DebugSupport->RegisterExceptionCallback (DebugSupport, 0, NUL= L, EXCEPT_IA32_BREAKPOINT); + Status =3D DebugSupport->RegisterExceptionCallback (DebugSupport, 0, NUL= L, 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/BlackB= oxTest/Riscv64/PlatformIsa.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/D= ebugSupport/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/BlackBoxTest/= Riscv64/PlatformIsa.c @@ -2,6 +2,7 @@ Copyright 2006 - 2012 Unified EFI, Inc.
Copyright (c) 2011 - 2012, ARM Ltd. All rights reserved.
+ Copyright (c) 2021, Hewlett Packard Enterprise Development LP. All right= s reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D 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/R= iscv64/EntsLibPlat.h b/uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENT= S/EasLib/Riscv64/EntsLibPlat.h index ff781aee..144f812a 100644 --- a/uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/Riscv64/= EntsLibPlat.h +++ b/uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/Riscv64/= EntsLibPlat.h @@ -2,6 +2,7 @@ Copyright 2006 - 2012 Unified EFI, Inc.
Copyright (c) 2010 - 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 BS= D License @@ -20,7 +21,7 @@ Module Name: Abstract: - AArch64 specific defines + RISCV64 specific defines --*/ -- 2.30.0 IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you.