From nobody Mon Feb 9 00:19:38 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+71527+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+71527+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=hpe.com Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1612885470896641.8354957632448; Tue, 9 Feb 2021 07:44:30 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id VgEtYY1788612x4xStb5ApHO; Tue, 09 Feb 2021 07:44:30 -0800 X-Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web12.12200.1612885466965344570 for ; Tue, 09 Feb 2021 07:44:27 -0800 X-Received: from pps.filterd (m0134420.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 119FdIK2032708; Tue, 9 Feb 2021 15:44:19 GMT X-Received: from g4t3426.houston.hpe.com (g4t3426.houston.hpe.com [15.241.140.75]) by mx0b-002e3701.pphosted.com with ESMTP id 36k6wt2hx5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 09 Feb 2021 15:44:19 +0000 X-Received: from G1W8107.americas.hpqcorp.net (g1w8107.austin.hp.com [16.193.72.59]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g4t3426.houston.hpe.com (Postfix) with ESMTPS id 9878459; Tue, 9 Feb 2021 15:44:18 +0000 (UTC) X-Received: from G4W9120.americas.hpqcorp.net (2002:10d2:150f::10d2:150f) by G1W8107.americas.hpqcorp.net (2002:10c1:483b::10c1:483b) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 9 Feb 2021 15:44:18 +0000 X-Received: from NAM10-DM6-obe.outbound.protection.outlook.com (15.241.52.13) by G4W9120.americas.hpqcorp.net (16.210.21.15) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Tue, 9 Feb 2021 15:44:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fVS0V7hta1QGHAlV6mMpm8g+C3WqcXE9qUz83B0yqPBpFy1ld/9oZtWZLJqLT0o6NSf3n48QZGtzqZDoQ0lxvlIZE8KKFSbnEJ2NfCkSWNooQKp/Jlc7JYre4iVM6b+8EqTWJButpeGabiYVY7hUnt6TV8SG9yoMpIElx5bl8Gsyya5QSiZaMQcHuygoU3XHxGbbaEaoZl22B93fOErIg84/EYY/h9QSvCgIEJZQpMXI7hE+S1RgLFhlAtJVRC8bAMLzM15pifdSqC2gJ5jjLP35fZ5Kl+4gKuKH55rHbFOo9nhbNqycK/SIni6gqT2CVQUKCjfcAP0DItabQ6wg4Q== 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=6OlcG+U99k6cTKErFqHZOJ9nRiTzGuLpNTXqOILUtiQ=; b=NLUJKGsEQETJIgypYKgSiaTC1TMvflYhhtDwxMvbd7PAU4gb/aAKspg6R60MmiJjpUvG2NmWchz7S8VOAvkDNAIhNWygp6ju+aJfz6xgkltTfF3Zpj38uvDjS7kBFHQwzPjWPDp+/0kwCsRDkKOixnvHGcpywCo8+DRIZeHHjCzUrE94C70yngvEnm6pqTSRyVYD1QxNYo5C3WQ1AT2Rnw7gwCvjOEPJmhHmR8srRDzFIhPnO/5FjBxhacsHSA8NR7KodrMIaa8WehR+ziBc18e6dQ2ZzmdwCd0FUP377mgMg2d3mpPowYpk3210a8zUFxwixHTOpH5hsiTYhPvQiQ== 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 X-Received: from DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760d::23) by DF4PR8401MB0508.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760b::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.20; Tue, 9 Feb 2021 15:44:16 +0000 X-Received: from DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM ([fe80::45f0:20e7:1e33:e2a0]) by DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM ([fe80::45f0:20e7:1e33:e2a0%9]) with mapi id 15.20.3825.030; Tue, 9 Feb 2021 15:44:16 +0000 From: "Daniel Schaefer" To: CC: G Edhaya Chandran , Barton Gao , Samer El-Haj-Mahmoud , Eric Jin , Arvin Chen , Leif Lindholm , Heinrich Schuchardt , Abner Chang Subject: [edk2-devel] [edk2-test PATCHv2 2/5] SctPkg: Adapt Aarch64 sources for Riscv64 Date: Tue, 9 Feb 2021 23:43:51 +0800 Message-ID: <20210209154354.30234-3-daniel.schaefer@hpe.com> In-Reply-To: <20210209154354.30234-1-daniel.schaefer@hpe.com> References: <20210209154354.30234-1-daniel.schaefer@hpe.com> X-Originating-IP: [123.193.51.23] X-ClientProxiedBy: HK0PR03CA0116.apcprd03.prod.outlook.com (2603:1096:203:b0::32) To DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760d::23) X-MS-Exchange-MessageSentRepresentingType: 1 X-Received: from x360-nix.hitronhub.home (123.193.51.23) by HK0PR03CA0116.apcprd03.prod.outlook.com (2603:1096:203:b0::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.23 via Frontend Transport; Tue, 9 Feb 2021 15:44:14 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 51ea6aad-fa9a-4a33-539c-08d8cd118e9c X-MS-TrafficTypeDiagnostic: DF4PR8401MB0508: 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-Message-Info: JP+yd77Z4LBOlcqpTw8XblledNgFnCCvwVbXQH9NQI+kjdpJg29W2s7R6FwXVle1Xamyys5xxLE0bal6PjYgGws6THu9LRJXQm+iOH7bevzwpCPCrud6qibCvFVQWE9YuxwaLmwmTKpcM1sn43sTxUpljCHVgmtVbcR9qAL2Nbwk+jCkS8ti1799b7Qv3xB5Me/5OKntG4qBiNft7mt6KbonVHq3+3QCTew3l0i23fCuo11h3xZj4TIrJT7Nzih04MKlCGOx/tzS+ZwUniC0w9AfU+B2S77HmxlGbfkoNZy3K4NCPqL04gPYtC1gKVNyWtf2gFfKCIUu/2O+I9slwQgz+bd64fNCwmSTKEaL76PUVKUhk0CK9bclwcvIDbaFyirqsakT/gy1PB0VC+OyAJ5Vo+czHagv3ng4OkakOBON6rvfPD1c0HqPqfcUWBXp/uhM4/rt5gUcZLDwc/7U210KRFQ8BFXG+/dj8B1PIuUiQwIPz0wAcUUXDEsROVCpdx0Nmaq3BcSNmC9Mx9noPYmTfznxBQqh+UzbZT9gCynpMVfTdMuWfxtlzCt4/+ppZI2beOc6PGkNVdoPGvOfgHFYsfnsT2f8Hi0OMsAr0ks= X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?kacvWCfbbWBpXtEVw66f/M+WFtBG7PkEW41W+u4gi/5p4XEdxI0N7uJQWUz/?= =?us-ascii?Q?pR93cmJ8dFOldeebH1xgKB9TbVOmaldJb23G17e3LudSZ1HZshD6MwsLYfIx?= =?us-ascii?Q?sqpnlZBWCcKJNY8+HjuP+ai5zhf8530m7l3RouFcY66pS7CUoeA9gm+HRFdF?= =?us-ascii?Q?e3NzWMdmWWXehHnWQuYSMzHMzE8hY+9uuvgFlzgHUsz0KmKjdAW4sL6S31bc?= =?us-ascii?Q?Z9Z1cLR0cR0JslL7v6vTSx/kCjAT4ShHzPsoK4Dj2JD97BqEMVS3TD8u/bws?= =?us-ascii?Q?8EgIPXQ0lc35+/sn5gVQmFF96g3mEKAOKl1epMcW2xuJ71GT4MdMNR0wfsjJ?= =?us-ascii?Q?FKCqTgfOq4VsSr3Ir3iGVAlP7iAx7e9rQMz5QJ5EWmBNNIfk+tKEI6O2Wl9M?= =?us-ascii?Q?4QdMHSOfIlaV7e8q/DLZDK7IdEdbOM6HuWRnh/qCHXIblDMMnPY7wVLlSwTi?= =?us-ascii?Q?MJJOJd5JCtQtSm0SY85nGa8BfFZGuMTO4Nu+T/HwBu+vhkLHWcLHrjMo1SXQ?= =?us-ascii?Q?ayevBYkNWDZlREUZSRhHb4BI/ILHYeCwv0yWjjZmupWARpDf99NTi4vKh5Ui?= =?us-ascii?Q?ODhES/QG3tPm8skgzca6eHFOHneJBQiJznva1ybIXbdDRu9rQYjco164RH1i?= =?us-ascii?Q?O+7xJu6LEJ2u1zqTCgWIcL0QNRBtwj1wmJgdD6HG7NEQWwkm2VfEBtoyCS5u?= =?us-ascii?Q?u05rHRTgtJ5TgTQ4kOzWpnXVGP7BYCXpPPZtK7Dcq1h3Fth8BOUVeDOs4/0I?= =?us-ascii?Q?at0eGZYG2VizXUDMOd5RKm2gxqCs5/kLD/EpTqesdrJyYJ9HS4hrBOaXwxBy?= =?us-ascii?Q?0miqa3C8887UFoWfbMVplx2tsXi7lZpOL64Yy4plrFq5fqzpoxfd92nYg6LQ?= =?us-ascii?Q?vMrqhOPbYgdGXI+ZEsd2PJjNUI0WpV50fkKle8CGb8QNN5KAtEn3ViGYU3aC?= =?us-ascii?Q?vjIFWcF+lhLCGJcNh9fa4FFB8wHm1k2iGBuiqEEj8S6tbjSqKgNZ7pn72Gt9?= =?us-ascii?Q?TiTPyOqWYzwdqrNDdiWn2pkrSSnE1KcfwL6/nt8AjjGKkWDk5AYSy9+i5jUz?= =?us-ascii?Q?TbSFb6AVAABTqmgDs5Sfb46sxr4r46BTfNlPsVJgIBsxAKBbgzlMKFVaUHIv?= =?us-ascii?Q?MbXHti2lOXOvk/lavCHih7eBAehpGFFDa17M9JY9m4wqjasaERkH0GhwTy7g?= =?us-ascii?Q?QHAZ4lh8kC0Ag7OAxRREd97scR7Sx+icVSoN15fZxELDtwx6YzPMnInuUwzY?= =?us-ascii?Q?0PfTXuLZF+Y422XPOct0vN33LK/9DYSUfcs76B9eLB5tYGgLpCK26j+oces7?= =?us-ascii?Q?WVUq05eSILtFW8X78d3lJwVW?= X-MS-Exchange-CrossTenant-Network-Message-Id: 51ea6aad-fa9a-4a33-539c-08d8cd118e9c X-MS-Exchange-CrossTenant-AuthSource: DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2021 15:44:16.7601 (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: CCXqyiaiSzuVZT2R3RuVBe8GeIJNtLD15iIflFJucLUgM7v8LpwmPb3Ibtd0dxum5jc3hg40qDV3/EneGAQxdg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR8401MB0508 X-OriginatorOrg: hpe.com X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,daniel.schaefer@hpe.com X-Gm-Message-State: HubaEEjZ28pV8h2zcLI9tnIOx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1612885470; bh=ECNrE/hoP3sbxeUwnz7meXoVK2zUFFh+Xq8/aRHaUOA=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=Ael7d+6Sm3UPP8gnDUOq41RZl5x9hBx07DG3WMxLuZrjH0xQYvs59jcy4BqxIVqh748 CXYEg2Cbzrpn67fqXmbeuQe1fczpEx/bKCiMMh03YPhHofppYotVa6pBikF7NaM/umlis XJQp8BzjFRydHx4l5Kj1XX6h00NdLUc8x+4= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Abner Chang --- 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 | 2 +- 9 files changed, 31 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 @@ =20 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.
=20 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: =20 Abstract: =20 - AArch64 specific defines + RISCV64 specific defines =20 --*/ =20 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 =20 .global JumpToTestFunc .type JumpToTestFunc, %function @@ -37,8 +36,8 @@ # ) # JumpToTestFunc: - mov x2, x0 - mov x0, x1 + mv x2, x0 + mv x0, x1 =20 // 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 @@ =20 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.
=20 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: =20 #include "SCRTApp.h" =20 -#define VIRT_TO_PHYS_OFFSET (0x80000000) //2G - -BOOLEAN HighAddress =3D FALSE; UINTN PageTable =3D 0; =20 =20 @@ -49,11 +47,10 @@ Returns: =20 --*/ { - /*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 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? */ } =20 =20 @@ -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 =20 Copyright 2006 - 2012 Unified EFI, Inc.
- Copyright (c) 2011 - 2012 ARM Ltd. All rights reserved.
=20 + Copyright (c) 2011 - 2012 ARM Ltd. All rights reserved.
+ Copyright (c) 2021 Hewlett Packard Enterprise Development LP. All rights= reserved.
=20 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" =20 UINTN mHandOffPtr =3D 0; -EFI_PHYSICAL_ADDRESS mIoPortSpaceAddress =3D 0; =20 =20 EFI_STATUS @@ -42,18 +42,10 @@ ConsumeHandOff ( HandOffPtr =3D (RUNTIME_HANDOFF*)mHandOffPtr; *ConfigData =3D HandOffPtr->ConfigureInfo; =20 - 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); =20 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 @@ =20 Copyright 2006 - 2012 Unified EFI, Inc.
Copyright (c) 2011 - 2012 ARM Ltd. All rights reserved.
=20 + (C) Copyright 2021 Hewlett Packard Enterprise Development LP
=20 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: =20 --*/ =20 -#include "Io.h" +#include "SCRTDriver.h" =20 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 a= re virtually mapped. // } =20 -// Quick port to ARM +// Quick port to RISC-V. It doesn't have traditional I/O-Port 80h POST Cod= es =20 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.
=20 - - 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=20 - http://opensource.org/licenses/bsd-license.php -=20 - 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. -=20 -**/ - -/*++ - -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 @@ =20 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.
=20 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); } =20 @@ -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); =20 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); =20 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); =20 if (EFI_ERROR(Status)) { AssertionType =3D EFI_TEST_ASSERTION_FAILED; @@ -273,4 +272,3 @@ BBTestRegisterExceptionCallbackFunctionManualTest ( =20 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 @@ =20 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.
=20 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: =20 #include "DebugSupportBBTestMain.h" =20 -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..7f7835e4 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 @@ -20,7 +20,7 @@ Module Name: =20 Abstract: =20 - AArch64 specific defines + RISCV64 specific defines =20 --*/ =20 --=20 2.30.0 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#71527): https://edk2.groups.io/g/devel/message/71527 Mute This Topic: https://groups.io/mt/80507438/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-