From nobody Mon Feb 9 01:20:22 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+71531+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+71531+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 1612885479918592.5139802967564; Tue, 9 Feb 2021 07:44:39 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id CzgHYY1788612xucCeeVrxke; Tue, 09 Feb 2021 07:44:39 -0800 X-Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web10.12316.1612885477242701741 for ; Tue, 09 Feb 2021 07:44:37 -0800 X-Received: from pps.filterd (m0134422.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 119Fd0pv009801; Tue, 9 Feb 2021 15:44:30 GMT X-Received: from g4t3426.houston.hpe.com (g4t3426.houston.hpe.com [15.241.140.75]) by mx0b-002e3701.pphosted.com with ESMTP id 36kvrhga3g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 09 Feb 2021 15:44:29 +0000 X-Received: from G1W8108.americas.hpqcorp.net (g1w8108.austin.hp.com [16.193.72.60]) (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 3421060; Tue, 9 Feb 2021 15:44:29 +0000 (UTC) X-Received: from G9W8456.americas.hpqcorp.net (2002:10d8:a15f::10d8:a15f) by G1W8108.americas.hpqcorp.net (2002:10c1:483c::10c1:483c) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 9 Feb 2021 15:44:23 +0000 X-Received: from NAM10-DM6-obe.outbound.protection.outlook.com (15.241.52.13) by G9W8456.americas.hpqcorp.net (16.216.161.95) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Tue, 9 Feb 2021 15:44:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W8VqukD2M657gwi0NswJtXiFter8STeN3y3nEy1C3NQyF/r/L3BvQOKDkXDwf44q6uMeDqUc4R163ekaCHqvYjvEN7AnHMmhF3g3j1OM7DwJgxMzcuiG6y+QnnL7sOp8i2LF8VrPYl8VycKvfslkrmsD19nAy02ONIxqa3Kj/N/sb62cTS7eugPHiN1MPCsOlQA49y1mgY7tg71D2AF/t6BC+w8LHWPNr6AcdsZ0o/S12zPAI2qYmgRlvFtrtUx3MehypUoHuBXh9e0rwlkTnCox05KtUGneBoWsOM+DogXpbG5LXJq4ceTM+PlfqS8vVsFBvbRMpC641Lo5HcSzKA== 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=MhQtyFNXudFqkG9OXIO5b7W8jDiV84QD05e8vnxlrxg=; b=b/flo0StWIxoTMN4L/0aYOfEqFuef4DpQKOqubE6PNvP/rpoZOk6dNGJnvb8YVK5iYiY8TZ5CN3aRU/5rcHmQrL9vs9rP+E81UwVkxFzc2sddPqpejl2qAlodxRnG1RylS/yoyjEdUAMeICWsfCqx7sE3P5GxZ7OPr+t3+/ZaW9V4ENCVNQf+BvpiFU84BxtvYMU4Iuctzv/F14GI2w48NqUj8mwmhhemMh6cxw9bZuIPwmn/7nq+8uggpLxkWLxe6qupXA5F1xwTtOr/IVk4Kegos/MXj5l8I2jLlFbs/HIo8SzNFXcL2+fbi9VKIhighos5jj90YcF9G1VuCz1tA== 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:20 +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:20 +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 3/5] SctPkg: Add RISCV64 build support Date: Tue, 9 Feb 2021 23:43:52 +0800 Message-ID: <20210209154354.30234-4-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:17 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: fb9277f7-893b-417c-976c-08d8cd119090 X-MS-TrafficTypeDiagnostic: DF4PR8401MB0508: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: /+6xHbIHRlrNE4HHBojk2nybcWsaCQDX9dh7SMDeuCT3+WNgUl5zYWQyNJq0+h4G6ToFzHDjcLbgWGkG996Oox2ob1VaID3UdZJflpuDW2RVahtDipQ318EPrfA8yWr1Wc5SuJC3NI1vwm89p/kuSZvz45RI6WpmpNKbhUVroCi56blcEbb36iZvPn7Zm8LOOUJk6NYpxDvwGmoeNN8SZzUNve3PBprzjZF8yRymcwPWDNSReZoR+tye1UnaHtUAqDmC5890qIAC4t7rHKhjioyfQ2SYDabTx0dCnZQHPgyHvubeH9JmgZifZ7f42luy09qJEnHowr726N5J7S/oAMEBGS061PhLNwMlkUjWhmnUNcByjXOyfiMMjglVwhSkg4yRVTJ6ttaFJBnuDDDHE8N3oPDZJP+x/je6ik6pVz3ESpriyUO7pZlDwcOWevlUB3qHSHwFMHxOsHofWJGivIkLMsp/NLN+HOpkRYCi5w2sNJFxcD003V2ArzuFCJPf8qEopKfCZtzvX9F5CZZ3q3KZG0jIFYi0fvcyWEQgY1SsDZaZUA1Pl+o48TTkWcaSdcFFw4SOGfcfAg3hTqbZYw2/O20UG/bKTvC1xrpd5Rc= X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?gCawSDE2moQjGBVkaeSKxpaIjTdPeDCFZZTq82UIOTrmbVcfxVGFEc9lR9Zh?= =?us-ascii?Q?7K7Ljh5Ca/C4Y+v2pP1iN3TR1r9kIsdrO1m4OYO9PwIHqg0odSw4xPfSMDG4?= =?us-ascii?Q?uNkjlJYkIpo6xFKqxvYyIheOMqZv8MFnuH8/xk9gxQAv9YjBay2AG9yv27UW?= =?us-ascii?Q?39NKq5x33IpMXwpOcOukShbl+6ZkY9/CfjI0ZQaNIyLPzAwrVWYT8SQQ0Q2R?= =?us-ascii?Q?GAa9TcO04nEErr+5WyjZXTX+YPx0i9rWmSrHaeUO49FRb6Nru+f4z21VmgcT?= =?us-ascii?Q?BM1UP1T/9zOMnrfEMncCoS+CNhY4e4++JYXYN4szYieIYl6ff7UkH9AjlkWx?= =?us-ascii?Q?ZCX4BfeyDFK5w+2pWn0LiUqbBbb7hlCSzxojWwODVA18Z42YHr4tKDSfAKxA?= =?us-ascii?Q?s1kqvbC/+mB6clZal4X8sDXmmU/MhSCHbuEgDvY4yL0jU1mbHOTt4O35CYKK?= =?us-ascii?Q?CQy7RCdSoMPV7PU+TB8ZESr0xE/9Bf1H2cc6JN6hdEfaH2R/f8OIUmY8gHHQ?= =?us-ascii?Q?eYeAOcZdE5W+cVwuCyLecLavfhfIxPe4kb3qbXeV23rwx93bXZJaNBg7wR9I?= =?us-ascii?Q?yYbnxxl5lPkAQaGIfL47enNVRkHBAYXc4IamhJWSDmPqEAA5PVallTvfVTZd?= =?us-ascii?Q?9kfKmO39d0J5aiTlSUuVehJhyrC6ewq9r64iHB9GR21ZYLOEJ1z060dgHgd7?= =?us-ascii?Q?aKjpujBqJ1q2pTrNN8J5xkkw3iVYNzLrlF2jS7cRFV/9SO2uj6S33xLSkzkF?= =?us-ascii?Q?ZjYUbmV0KD1NUioqVbJEbEN1IP+avIyKyWFg2yvLgoW3B0JzqUQIU49qLj5f?= =?us-ascii?Q?KMcijVTPhtyV1eYuTik0zXhhG9U6mARjXcxDS/06zeguzEj6ht7GcHkBFKSg?= =?us-ascii?Q?R44ynZQDQJEoDJcHgxPdjQz1k7yaMYKc5GvcSjgNLOCQRpQCGOuk+SHH3dFJ?= =?us-ascii?Q?saiUdJUZdi2oz41iTbYuzePL1YNXHB9rlWKICAts6GMncSZPxBcg7IZvuqTc?= =?us-ascii?Q?bdzN4snH+TcUHCbvbgyFFEuolmWVu2gMDV+SX1cgemwZzh8yprpvUIPppoHD?= =?us-ascii?Q?CAKDoDiXmC4lXQua3E+oIEC3C5ZPm2GNOhOcTlLBr6mou0wO5O9xLwstqwQ7?= =?us-ascii?Q?5W+NBU+sZcU6pY5LMqItz5a5IlmgUFM8D/R7a7mZYRmRjlep60N7QMXBrUOJ?= =?us-ascii?Q?J34wfE0hZBtCKc6BTmGI4zNEVzthQY25xMbivAtgC3XfQl59uqdE7xHy7u5r?= =?us-ascii?Q?DmFO6E1x9JeHkYdM6afWX212avEtzxeqIJja+hjdbUzA/s5R9qaN7h8Fvw7B?= =?us-ascii?Q?2hTzTx0EKhMTE7j7/ldZumuW?= X-MS-Exchange-CrossTenant-Network-Message-Id: fb9277f7-893b-417c-976c-08d8cd119090 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:19.9257 (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: Krtue8LaQ1J2CBmOWCBwEgN8ChkvMdy97+5+kbYZ8GUwuEAHet5UI8UYTfHaGgO9X2Ld07Hqjhg2F+ZZcr01xA== 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: o736fPYse6XTSY2f3xQxTR41x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1612885479; bh=s4jgqMP7Ztcj6MT6hDmh0T1oXel9QBfHh7r9QL51X5Q=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=uyBTY1LxQXPEUXJkBGiCnVGg5Vk+w8FXAmBR3aMRvmVXq3zSGM8XZBdgpjcpOl1DfRp UNYLvX0pj5k3cheMuG5MvZJVANh8sek2iWmXtF+I4LB0HMYxCx03jFvUEgB2HNMJqlBt9 lsqIEYb6QwffJJWZb21Fb9mCazgWedARwqs= 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/Application/InstallSct/InstallSctDef.h = | 4 ++ uefi-sct/SctPkg/Library/SctLib/SctLib.inf = | 6 ++ uefi-sct/SctPkg/SCRT/SCRTApp/SCRTApp.inf = | 5 ++ uefi-sct/SctPkg/SCRT/SCRTDriver/SCRTDriver.inf = | 6 ++ uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Debug= SupportBBTest.inf | 6 ++ uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/Usb2Hc/BlackBoxTest/Usb2HcTest.= inf | 4 ++ uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UsbHc/BlackBoxTest/UsbHcTest.in= f | 4 ++ uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/EntsLib.inf = | 5 ++ uefi-sct/SctPkg/Tools/Source/GenBin/GNUmakefile = | 4 ++ uefi-sct/SctPkg/UEFI/IHV_SCT.dsc = | 17 +++++- uefi-sct/SctPkg/UEFI/Protocol/DebugSupport.h = | 61 +++++++++++++++++++- uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc = | 18 +++++- uefi-sct/SctPkg/build.sh = | 11 +++- 13 files changed, 144 insertions(+), 7 deletions(-) diff --git a/uefi-sct/SctPkg/Application/InstallSct/InstallSctDef.h b/uefi-= sct/SctPkg/Application/InstallSct/InstallSctDef.h index a7815580..02f0283e 100644 --- a/uefi-sct/SctPkg/Application/InstallSct/InstallSctDef.h +++ b/uefi-sct/SctPkg/Application/InstallSct/InstallSctDef.h @@ -3,6 +3,7 @@ Copyright 2006 - 2017 Unified EFI, Inc.
Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
Portions copyright (c) 2014, ARM Ltd. All rights reserved.
+ (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 @@ -32,6 +33,9 @@ #elif defined(EFIAARCH64) #define INSTALL_SCT_PLATFORM_SHORT_NAME L"aarch64" #define INSTALL_SCT_PLATFORM_NAME L"AARCH64" +#elif defined(EFIRISCV64) + #define INSTALL_SCT_PLATFORM_SHORT_NAME L"riscv64" + #define INSTALL_SCT_PLATFORM_NAME L"RISCV64" #else #error "Architecture not supported" #endif diff --git a/uefi-sct/SctPkg/Library/SctLib/SctLib.inf b/uefi-sct/SctPkg/Li= brary/SctLib/SctLib.inf index 23cb77fb..7527b203 100644 --- a/uefi-sct/SctPkg/Library/SctLib/SctLib.inf +++ b/uefi-sct/SctPkg/Library/SctLib/SctLib.inf @@ -3,6 +3,7 @@ # Copyright 2006 - 2016 Unified EFI, Inc.
# Copyright (c) 2013 - 2014, ARM Ltd. All rights reserved.
# Copyright (c) 2014 - 2019, Intel Corporation. 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 B= SD License @@ -62,6 +63,11 @@ Aarch64/initplat.c Math.c =20 +[sources.RISCV64] + Riscv64/SctLibPlat.h + Riscv64/initplat.c + Math.c + [sources.ia32] ia32/SctLibPlat.h ia32/initplat.c diff --git a/uefi-sct/SctPkg/SCRT/SCRTApp/SCRTApp.inf b/uefi-sct/SctPkg/SCR= T/SCRTApp/SCRTApp.inf index 7aca6e30..8104a4ef 100644 --- a/uefi-sct/SctPkg/SCRT/SCRTApp/SCRTApp.inf +++ b/uefi-sct/SctPkg/SCRT/SCRTApp/SCRTApp.inf @@ -2,6 +2,7 @@ # # Copyright 2006 - 2016 Unified EFI, Inc.
# Copyright (c) 2010 - 2016, Intel Corporation. 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 B= SD License @@ -39,6 +40,10 @@ Aarch64/GoVirtual.asm | RVCT Aarch64/GoVirtual.S | GCC =20 +[sources.RISCV64] + Riscv64/VirtualMemory.c + Riscv64/GoVirtual.S | GCC + [sources.ia32] ia32/VirtualMemory.c ia32/GoVirtual.asm | MSFT diff --git a/uefi-sct/SctPkg/SCRT/SCRTDriver/SCRTDriver.inf b/uefi-sct/SctP= kg/SCRT/SCRTDriver/SCRTDriver.inf index ad0eb0f8..a3ef454e 100644 --- a/uefi-sct/SctPkg/SCRT/SCRTDriver/SCRTDriver.inf +++ b/uefi-sct/SctPkg/SCRT/SCRTDriver/SCRTDriver.inf @@ -2,6 +2,7 @@ # # Copyright 2006 - 2016 Unified EFI, Inc.
# Copyright (c) 2010 - 2016, Intel Corporation. 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 B= SD License @@ -69,6 +70,11 @@ Aarch64/Dump.c Aarch64/Debug.c =20 +[sources.RISCV64] + Riscv64/Io.c + Riscv64/Dump.c + Riscv64/Debug.c + [sources.common] Guid.h Guid.c diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackB= oxTest/DebugSupportBBTest.inf b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/= DebugSupport/BlackBoxTest/DebugSupportBBTest.inf index 799f86fd..03bf7ccf 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/= DebugSupportBBTest.inf +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/= DebugSupportBBTest.inf @@ -3,6 +3,7 @@ # Copyright 2006 - 2012 Unified EFI, Inc.
# Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.
# Copyright (c) 2019, 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 B= SD License @@ -67,6 +68,11 @@ Aarch64/DebugSupportBBTestExceptionCallbackFunction.c Aarch64/DebugSupportBBTestCacheFunction.c =20 +[sources.RISCV64] + Riscv64/PlatformIsa.c + Riscv64/DebugSupportBBTestExceptionCallbackFunction.c + Riscv64/DebugSupportBBTestCacheFunction.c + [Packages] SctPkg/SctPkg.dec SctPkg/UEFI/UEFI.dec diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/Usb2Hc/BlackBoxTest= /Usb2HcTest.inf b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/Usb2Hc/BlackBo= xTest/Usb2HcTest.inf index e8118739..95ae593e 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/Usb2Hc/BlackBoxTest/Usb2Hc= Test.inf +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/Usb2Hc/BlackBoxTest/Usb2Hc= Test.inf @@ -2,6 +2,7 @@ # # Copyright 2006 - 2016 Unified EFI, Inc.
# Copyright (c) 2010 - 2016, Intel Corporation. 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 B= SD License @@ -55,6 +56,9 @@ #[sources.Aarch64] # IPF/TimerInterrupt.c =20 +#[sources.Riscv64] +# IPF/TimerInterrupt.c + [Packages] MdePkg/MdePkg.dec SctPkg/SctPkg.dec diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UsbHc/BlackBoxTest/= UsbHcTest.inf b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UsbHc/BlackBoxTe= st/UsbHcTest.inf index efc438c1..d3bcd5ce 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UsbHc/BlackBoxTest/UsbHcTe= st.inf +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UsbHc/BlackBoxTest/UsbHcTe= st.inf @@ -2,6 +2,7 @@ # # Copyright 2006 - 2012 Unified EFI, Inc.
# Copyright (c) 2010 - 2012, Intel Corporation. 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 B= SD License @@ -55,6 +56,9 @@ [sources.Aarch64] Aarch64/TimerInterrupt.c =20 +[sources.RISCV64] + Riscv64/TimerInterrupt.c + [Packages] MdePkg/MdePkg.dec SctPkg/SctPkg.dec diff --git a/uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/E= ntsLib.inf b/uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/E= ntsLib.inf index 23f12d1a..b60e90b2 100644 --- a/uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/EntsLib.= inf +++ b/uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/EntsLib.= inf @@ -3,6 +3,7 @@ # Copyright 2006 - 2012 Unified EFI, Inc.
# Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.
# Copyright (c) 2019, 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 B= SD License @@ -66,6 +67,10 @@ Aarch64/EntsLibPlat.h Aarch64/InitPlat.c =20 +[sources.RISCV64] + Riscv64/EntsLibPlat.h + Riscv64/InitPlat.c + [Packages] MdePkg/MdePkg.dec SctPkg/SctPkg.dec diff --git a/uefi-sct/SctPkg/Tools/Source/GenBin/GNUmakefile b/uefi-sct/Sct= Pkg/Tools/Source/GenBin/GNUmakefile index c235f313..c492d441 100644 --- a/uefi-sct/SctPkg/Tools/Source/GenBin/GNUmakefile +++ b/uefi-sct/SctPkg/Tools/Source/GenBin/GNUmakefile @@ -1,6 +1,7 @@ # # Copyright 2006 - 2010 Unified EFI, Inc.
# Copyright (c) 2010 Intel Corporation. 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 B= SD License @@ -31,6 +32,9 @@ ifndef ARCH ifneq (,$(findstring arm,$(uname_m))) ARCH=3DARM endif + ifneq (,$(findstring riscv64,$(uname_m))) + ARCH=3DRISCV64 + endif ifndef ARCH $(info Could not detected ARCH from uname results) $(error ARCH is not defined!) diff --git a/uefi-sct/SctPkg/UEFI/IHV_SCT.dsc b/uefi-sct/SctPkg/UEFI/IHV_SC= T.dsc index f9e86264..94bb5c36 100644 --- a/uefi-sct/SctPkg/UEFI/IHV_SCT.dsc +++ b/uefi-sct/SctPkg/UEFI/IHV_SCT.dsc @@ -3,6 +3,7 @@ # Copyright 2006 - 2016 Unified EFI, Inc.
# Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
# Copyright (c) 2019,Microchip Technology Inc.
+# (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 B= SD License @@ -42,7 +43,7 @@ PLATFORM_VERSION =3D 0.1 DSC_SPECIFICATION =3D 0x00010005 OUTPUT_DIRECTORY =3D Build/IhvSct - SUPPORTED_ARCHITECTURES =3D IA32|X64|ARM|AARCH64 + SUPPORTED_ARCHITECTURES =3D IA32|X64|ARM|AARCH64|RISCV64 BUILD_TARGETS =3D DEBUG|RELEASE SKUID_IDENTIFIER =3D DEFAULT =20 @@ -109,6 +110,12 @@ *_*_AARCH64_PP_FLAGS =3D -D EFIAARCH64 $(GCC_VER_MACRO) RVCT:*_*_AARCH64_DLINK_FLAGS =3D --muldefweak =20 + *_*_RISCV64_CC_FLAGS =3D -D EFIRISCV64 $(GCC_VER_MACRO) + GCC:*_*_RISCV64_CC_FLAGS =3D -D EFIRISCV64 $(GCC_VER_MACRO) -ffreestand= ing -nostdinc -nostdlib -Wno-error=3Dunused-function -Wno-error=3Dunused-bu= t-set-variable -Wno-error + *_*_RISCV64_VFRPP_FLAGS =3D -D EFIRISCV64 $(GCC_VER_MACRO) + *_*_RISCV64_APP_FLAGS =3D -D EFIRISCV64 $(GCC_VER_MACRO) + *_*_RISCV64_PP_FLAGS =3D -D EFIRISCV64 $(GCC_VER_MACRO) + DEBUG_*_*_CC_FLAGS =3D -DEFI_DEBUG RELEASE_*_*_CC_FLAGS =3D -DMDEPKG_NDEBUG =20 @@ -124,6 +131,9 @@ [Libraries.AARCH64] ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf =20 +[Libraries.RISCV64] + ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + [Libraries.IA32,Libraries.X64] =20 [LibraryClasses.common] @@ -146,6 +156,9 @@ [LibraryClasses.AARCH64] NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf =20 +[LibraryClasses.RISCV64] + NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + [LibraryClasses.IA32] =20 ##########################################################################= ##### @@ -228,4 +241,4 @@ SctPkg/TestInfrastructure/SCT/Framework/Sct.inf =20 [Components.IA32, Components.X64] SctPkg/TestCase/UEFI/IHV/Protocol/PlatformDriverOverride/BlackBoxTest/IhvP= latformDriverOverrideBBTest.inf -SctPkg/TestCase/UEFI/IHV/Protocol/PlatformToDriverConfiguration/BlackBoxTe= st/IhvPlatformToDriverConfigurationBBTest.inf \ No newline at end of file +SctPkg/TestCase/UEFI/IHV/Protocol/PlatformToDriverConfiguration/BlackBoxTe= st/IhvPlatformToDriverConfigurationBBTest.inf diff --git a/uefi-sct/SctPkg/UEFI/Protocol/DebugSupport.h b/uefi-sct/SctPkg= /UEFI/Protocol/DebugSupport.h index 7fba87ae..1963d619 100644 --- a/uefi-sct/SctPkg/UEFI/Protocol/DebugSupport.h +++ b/uefi-sct/SctPkg/UEFI/Protocol/DebugSupport.h @@ -2,6 +2,7 @@ =20 Copyright 2006 - 2016 Unified EFI, Inc.
Copyright (c) 2010 - 2016, Intel Corporation. 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 @@ -607,6 +608,60 @@ typedef struct { UINT64 FAR; // Fault Address Register } EFI_SYSTEM_CONTEXT_AARCH64; =20 +/// +/// RISC-V processor exception types. +/// +#define EXCEPT_RISCV_INST_MISALIGNED 0 +#define EXCEPT_RISCV_INST_ACCESS_FAULT 1 +#define EXCEPT_RISCV_ILLEGAL_INST 2 +#define EXCEPT_RISCV_BREAKPOINT 3 +#define EXCEPT_RISCV_LOAD_ADDRESS_MISALIGNED 4 +#define EXCEPT_RISCV_LOAD_ACCESS_FAULT 5 +#define EXCEPT_RISCV_STORE_AMO_ADDRESS_MISALIGNED 6 +#define EXCEPT_RISCV_STORE_AMO_ACCESS_FAULT 7 +#define EXCEPT_RISCV_ENV_CALL_FROM_UMODE 8 +#define EXCEPT_RISCV_ENV_CALL_FROM_SMODE 9 +#define EXCEPT_RISCV_ENV_CALL_FROM_HMODE 10 +#define EXCEPT_RISCV_ENV_CALL_FROM_MMODE 11 + +#define EXCEPT_RISCV_SOFTWARE_INT 0x0 +#define EXCEPT_RISCV_TIMER_INT 0x1 + +typedef struct { + UINT64 X0; + UINT64 X1; + UINT64 X2; + UINT64 X3; + UINT64 X4; + UINT64 X5; + UINT64 X6; + UINT64 X7; + UINT64 X8; + UINT64 X9; + UINT64 X10; + UINT64 X11; + UINT64 X12; + UINT64 X13; + UINT64 X14; + UINT64 X15; + UINT64 X16; + UINT64 X17; + UINT64 X18; + UINT64 X19; + UINT64 X20; + UINT64 X21; + UINT64 X22; + UINT64 X23; + UINT64 X24; + UINT64 X25; + UINT64 X26; + UINT64 X27; + UINT64 X28; + UINT64 X29; + UINT64 X30; + UINT64 X31; +} EFI_SYSTEM_CONTEXT_RISCV64; + // // Universal EFI_SYSTEM_CONTEXT definition // @@ -618,6 +673,7 @@ union { EFI_SYSTEM_CONTEXT_IPF *SystemContextIpf; EFI_SYSTEM_CONTEXT_ARM *SystemContextArm; EFI_SYSTEM_CONTEXT_AARCH64 *SystemContextAArch64; + EFI_SYSTEM_CONTEXT_RISCV64 *SystemContextRiscV64; } EFI_SYSTEM_CONTEXT; =20 // @@ -645,6 +701,8 @@ VOID #define IMAGE_FILE_MACHINE_EBC 0x0EBC #define IMAGE_FILE_MACHINE_ARMTHUMB_MIXED 0x01c2 #define IMAGE_FILE_MACHINE_ARM64 0xAA64 +#define IMAGE_FILE_MACHINE_RISCV64 0x5064 + =20 typedef enum { @@ -653,7 +711,8 @@ enum { IsaIpf =3D IMAGE_FILE_MACHINE_IA64, IsaEbc =3D IMAGE_FILE_MACHINE_EBC, IsaArm =3D IMAGE_FILE_MACHINE_ARMTHUMB_MIXED, ///< 0x01c2 - IsaAArch64 =3D IMAGE_FILE_MACHINE_ARM64 ///< 0xAA64 + IsaAArch64 =3D IMAGE_FILE_MACHINE_ARM64, ///< 0xAA64 + IsaRiscv64 =3D IMAGE_FILE_MACHINE_RISCV64 ///< 0x5064 } EFI_INSTRUCTION_SET_ARCHITECTURE; =20 typedef struct _EFI_DEBUG_SUPPORT_PROTOCOL EFI_DEBUG_SUPPORT_PROTOCOL;; diff --git a/uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc b/uefi-sct/SctPkg/UEFI/UEFI_= SCT.dsc index 2e97687b..e13e40e4 100644 --- a/uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc +++ b/uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc @@ -2,7 +2,7 @@ # # Copyright 2006 - 2017 Unified EFI, Inc.
# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
-# (C) Copyright 2017 Hewlett Packard Enterprise Development LP
+# (C) Copyright 2017 - 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 @@ -42,7 +42,7 @@ PLATFORM_VERSION =3D 0.1 DSC_SPECIFICATION =3D 0x00010005 OUTPUT_DIRECTORY =3D Build/UefiSct - SUPPORTED_ARCHITECTURES =3D IA32|X64|ARM|AARCH64 + SUPPORTED_ARCHITECTURES =3D IA32|X64|ARM|AARCH64|RISCV64 BUILD_TARGETS =3D DEBUG|RELEASE SKUID_IDENTIFIER =3D DEFAULT =20 @@ -112,6 +112,12 @@ *_*_AARCH64_PP_FLAGS =3D -D EFIAARCH64 $(GCC_VER_MACRO) RVCT:*_*_AARCH64_DLINK_FLAGS =3D --muldefweak =20 + *_*_RISCV64_CC_FLAGS =3D -D EFIRISCV64 $(GCC_VER_MACRO) + GCC:*_*_RISCV64_CC_FLAGS =3D -D EFIRISCV64 $(GCC_VER_MACRO) -ffreest= anding -nostdinc -nostdlib -Wno-error=3Dunused-function -Wno-error=3Dunused= -but-set-variable -Wno-error + *_*_RISCV64_VFRPP_FLAGS =3D -D EFIRISCV64 $(GCC_VER_MACRO) + *_*_RISCV64_APP_FLAGS =3D -D EFIRISCV64 $(GCC_VER_MACRO) + *_*_RISCV64_PP_FLAGS =3D -D EFIRISCV64 $(GCC_VER_MACRO) + DEBUG_*_*_CC_FLAGS =3D -DEFI_DEBUG RELEASE_*_*_CC_FLAGS =3D -DMDEPKG_NDEBUG =20 @@ -129,6 +135,9 @@ [Libraries.AARCH64] ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf =20 +[Libraries.RISCV64] + ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + [LibraryClasses.common] UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiA= pplicationEntryPoint.inf UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntry= Point.inf @@ -157,6 +166,9 @@ [LibraryClasses.AARCH64] NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf =20 +[LibraryClasses.RISCV64] + NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + ##########################################################################= ##### # # These are the components that will be built by the master makefile @@ -483,4 +495,4 @@ SctPkg/TestCase/RIVL/Protocol/Http/Http/HttpENTSTest.inf SctPkg/TestCase/RIVL/Protocol/Http/HttpServiceBinding/HttpServiceBindingEN= TSTest.inf =20 [Components.IA32, Components.X64] -SctPkg/TestCase/UEFI/EFI/Generic/ExeMode/BlackBoxTest/ExeModeBBTest.inf \ No newline at end of file +SctPkg/TestCase/UEFI/EFI/Generic/ExeMode/BlackBoxTest/ExeModeBBTest.inf diff --git a/uefi-sct/SctPkg/build.sh b/uefi-sct/SctPkg/build.sh index 37667711..f7c5e4bd 100755 --- a/uefi-sct/SctPkg/build.sh +++ b/uefi-sct/SctPkg/build.sh @@ -2,6 +2,7 @@ # # Copyright 2006 - 2015 Unified EFI, Inc.
# Copyright (c) 2011 - 2020, 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 B= SD License @@ -22,6 +23,8 @@ function get_build_arch BUILD_ARCH=3DARM;; aarch64*) BUILD_ARCH=3DAARCH64;; + riscv64*) + BUILD_ARCH=3DRISCV64;; *) BUILD_ARCH=3Dother;; esac @@ -47,6 +50,12 @@ function set_cross_compile else TEMP_CROSS_COMPILE=3Darm-linux-gnueabihf- fi + elif [ "$SCT_TARGET_ARCH" =3D=3D "RISCV64" ]; then + if [ X"$CROSS_COMPILE_64" !=3D X"" ]; then + TEMP_CROSS_COMPILE=3D"$CROSS_COMPILE_64" + else + TEMP_CROSS_COMPILE=3Driscv64-unknown-elf- + fi else echo "Unsupported target architecture '$SCT_TARGET_ARCH'!" >&2 fi @@ -110,7 +119,7 @@ PrintUsage() { #Print Help # echo "Usage:" - echo " $0 \ + echo " $0 \ \ [build type (RELEASE OR DEBUG, DEFAULT: DEBUG)]" } --=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 (#71531): https://edk2.groups.io/g/devel/message/71531 Mute This Topic: https://groups.io/mt/80507447/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-