From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web10.1905.1614828122218198367 for ; Wed, 03 Mar 2021 19:22:02 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=bHcV0JsN; spf=pass (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=06976aa159=daniel.schaefer@hpe.com) Received: from pps.filterd (m0134425.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 1243Hea1012295; Thu, 4 Mar 2021 03:21:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : content-transfer-encoding : mime-version; s=pps0720; bh=MhQtyFNXudFqkG9OXIO5b7W8jDiV84QD05e8vnxlrxg=; b=bHcV0JsN6R8R3Yw03J+CBzexLga8LrUsZ36Jbv0sH6rJo4usvG+4Ixm7Z/dBUvnLS46A maG/unIlc8NiAgB58ln0BaWOn8NBfyaLaS770frFfFRRlmAHNXcqB7oGEAIc7puP+Z78 /mNWM1oxzGVooDYcKUpChC5R5U3H4Yt8MHG++DsbjswAqIYi71vkSdl9hA5AdmGvLrUc Ebd2EhwExev2fCIcfBBip6gOkD+yJH+pePnZSsW8MasbgF/nrK5qpdxnf50AL96730me ax2+/wtbP0vDvwSgdW7n5ZQDeE8BMd4dyuPGljYFc+9t5Nkoklp2Mfgq89Dxpgu0NmTo uA== Received: from g4t3425.houston.hpe.com (g4t3425.houston.hpe.com [15.241.140.78]) by mx0b-002e3701.pphosted.com with ESMTP id 371n4xgere-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 04 Mar 2021 03:21:50 +0000 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 g4t3425.houston.hpe.com (Postfix) with ESMTPS id 0E6059D; Thu, 4 Mar 2021 03:21:48 +0000 (UTC) Received: from G9W8453.americas.hpqcorp.net (2002:10d8:a0d3::10d8:a0d3) by G1W8107.americas.hpqcorp.net (2002:10c1:483b::10c1:483b) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 4 Mar 2021 03:21:48 +0000 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (15.241.52.11) by G9W8453.americas.hpqcorp.net (16.216.160.211) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Thu, 4 Mar 2021 03:21:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ixQsDMFnIanET8doUGWRWSkMYWCl1Yi4VIlsFrNKo7ZhujHGXy+6JiOeRJWiAOConpBUuTbYhRKgxP86Qo3P6u0SluDfVmKf7p1+ycTda0fUjDECrz9QmJ4GHbbiPxDEjC47Sl8T9dlpwXYj72ODAFJ53ESLecq6iA2OZsl7lvGC/W22vW/0+2QJtbgeOWw7f1H0gJt3i0Q0lIMAYK9PDvvPkVKXbB7TOb4fCbASycnc3kCcHB8Vv8Xun+pnoOASiHBYogNeL9i0t1RwZIBGRy+Ukmf4J5LvFX8jRpkwPLS91B/FsWbDfgBhsx3j472TRD4JduLWTIkoqHgFtP8ekQ== 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=npI0WqaJYnGIvoPIkRULnZUfgg6Mk3w7SorvgbCh3GFxOXJhGmKcLJaz2t5xjAdYAktOiXlB8rfVB7OwX1ATq1XLEy0NEnq+WJnr6kGnvs+Q9Nl4BQr3IuTW+KGFi8FzJh8vm5eyggjhk6AkFTnTiaNMZRQ6cXDvTaDtboUnlmyiSibDBpcB+PJcu8SgKaPbYO1OtKJc+a7kJcw+J9qnxYbSp1xEhjZhM7aMqsaFpvv8/A6MOGwgI2XzGmtOKvQDXpOCFxYerfiR4UCfliK9a6CoG4aaqNbq5RIw++M/Wq38fzeAu7r8jJUJY7Z9jCDve5t5MQegroArMDuDIFI70g== 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 Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=hpe.com; Received: from DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760d::23) by DF4PR8401MB0506.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7606::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17; Thu, 4 Mar 2021 03:21:46 +0000 Received: from DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM ([fe80::ad2c:ff74:846c:5318]) by DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM ([fe80::ad2c:ff74:846c:5318%7]) with mapi id 15.20.3912.017; Thu, 4 Mar 2021 03:21:46 +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-test PATCHv3 3/5] SctPkg: Add RISCV64 build support Date: Thu, 4 Mar 2021 11:21:14 +0800 Message-ID: <20210304032116.24357-4-daniel.schaefer@hpe.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210304032116.24357-1-daniel.schaefer@hpe.com> References: <20210304032116.24357-1-daniel.schaefer@hpe.com> X-Originating-IP: [15.211.146.34] X-ClientProxiedBy: SG2PR06CA0172.apcprd06.prod.outlook.com (2603:1096:1:1e::26) To DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760d::23) X-MS-Exchange-MessageSentRepresentingType: 1 Received: from x360-nix.wireless.hpe.com (15.211.146.34) by SG2PR06CA0172.apcprd06.prod.outlook.com (2603:1096:1:1e::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17 via Frontend Transport; Thu, 4 Mar 2021 03:21:43 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 25bc0467-9dea-4f6f-c02b-08d8debca434 X-MS-TrafficTypeDiagnostic: DF4PR8401MB0506: 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: BCL:0; X-Microsoft-Antispam-Message-Info: n6NGCw4J8IG38KEcDMBVRLKzg8lPO7IwmIyGcEKeIhZX2J5ECNe/0IM+BwuHSmnOsfngD4PFXXbaepmCs5+uqTGiaRZVJlXKNBIsrhWzpXLohuEPI3XzzMAvkPrln4C6buCXR35mV2r0EegLGMv3l1AdWfeepQth4mBmRYR8Tfu/oSWWAJ7kTNEXOal74qnQ1yGoy1lW6xEfoGCfOT/KVfTiP+Bt3tMHkPj17mBRphUPlonLzXF3JpBWsxFOMoY+ytrMurjR7/swQwCisOxPeH78P074x2nHjXEjLD7OHngHwl4Z5BDSwUEmOmngczcJyESKwGFr11zl94Y6PJrGOv5bFmOr2eV5eErIxzvcli7JN+gfbnuxlisCv0GYN152BeEhL4ffaGcZi87xXA99ynVdnD7A7KcRgUfQaRWC7P4fWxkB2Hmpuq1B4XQxTonggNUsYthAysoJOFO76b7xBlEvND3WXYNyGVuusDnsfFrtPuiHY0iP8RGtyWHaOqK9gzFdbivDav0K/FLiE+kUq1eonHO/Ac4eU7mFM1xFE1iH/A5Ujb5AJ/XtaSaXp4kPUdz8Yxen2IBsUDx+JL6Kzk26zelXy+sUwuA6VDfK6A4= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(136003)(366004)(346002)(396003)(376002)(39860400002)(316002)(5660300002)(26005)(186003)(83380400001)(1076003)(86362001)(30864003)(66946007)(2616005)(6916009)(8936002)(6666004)(956004)(2906002)(44832011)(36756003)(16526019)(66556008)(66476007)(4326008)(19627235002)(8676002)(7696005)(478600001)(52116002)(6486002)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?yeqfYsPRuxPhKj7vYJvenxMb/vNm76R1FeKnLMRSrFlrhq5pL7zjVxZPMyE+?= =?us-ascii?Q?NucDxQU9Ol9rwPZCWmWWj1IWcHdfKd0vYlC+tAYbQFyGzf631hodSH7VuFiv?= =?us-ascii?Q?dVM+ca1wRvBGC7c2mNUh9GBQe+MQJ63xq+j4IHNsnD9fhSxYVeTr0cIgYlcp?= =?us-ascii?Q?UWX8D3RuDCTykJYA/+hzZfGhHwLU60tFl3IoR/cJrMMpYEYY06FqbSOxJy5I?= =?us-ascii?Q?5r24E/TYhXMaVMmMl+2KwGPdmqGDJ/E0A1FpuFdh4VbADU6kjSZlb/vlpMLd?= =?us-ascii?Q?mU5Vi7YBrST8H5kHhSlPwSJZpcNLtqkOukH4FLlUIW7KswoOPu4M31fL1GKF?= =?us-ascii?Q?7tRMzRGFQELHIOAONBJwBYTaeoeS+oPYv2uUkuVqX/iJFt/nz0iFOlgCJ0tt?= =?us-ascii?Q?TAy+i/LkXJv4xfhgASNlT9i3U8gP43WBb2raBiGIlGOm/SSs5+ydd5nR2IYe?= =?us-ascii?Q?WOPljudai8as4bEJd8vnC6+ktjedJsPvljN837r5k8ePYXLqRAugDsla8OBT?= =?us-ascii?Q?0+Cnw6aj9EpAUsgQcTzEXUhr/SEYva05IQYyX4Bdh15Prk4wmL6MxqoBNmXQ?= =?us-ascii?Q?s5mV4+TPBsAM5bWJQgwr16ap/0+x5X1DMXa0z3A/pRr6r2vEKEsw4R/qOPCN?= =?us-ascii?Q?qY6mRWkGrP0l5opfs7WoT60CtruPltMU6vQYKdnkXKTcAoNeisqnGXfWZJ1E?= =?us-ascii?Q?nq+U+98sDNZS+oiChBNWWU3UgiGkuaNMS6JoIqL4pLPsAXJq5cbQhhid6zZt?= =?us-ascii?Q?IYojMvVj3U0SYSdGQcv0uVgXwNS0oM26x7ClzoxA+LrAGJ/Rln8CldnoGVEo?= =?us-ascii?Q?PkvEJh5y3YVOVRVpI+U5u2gB8Vfl164/yeOQCZzgg6AnqSz/6XJpwMAe7KZi?= =?us-ascii?Q?kd8CSig7Pc8Pww2A48q3LF6L9a7RB5Qiw/vEHNW/epQonH1BgvX0xsTuuGJR?= =?us-ascii?Q?pHDH5JzNpPPeQ9B5mOtbw0UqIwDiVls2S7TvdaTkJqCGRAvV2fkcr8kNO2oa?= =?us-ascii?Q?yTIVF/hJcVE06B/z4KEjsnsgqOoj98h7VBjWo5FD/kcCFXbZLjH0xx+c6CrQ?= =?us-ascii?Q?m1zeYAyDjykpLNXIYa2FDvdOb0Sd8a2HPGWKcvha08fH4Y+/zpPAhwRIS5jb?= =?us-ascii?Q?s+8hfZ1spnUynio6Ds+WYhOC4+b3fq7H2Hv6DnCEgCZOWRewbn70Ng93wc/d?= =?us-ascii?Q?zbT/nkRDcsQF0DeQnGtcZ7AyIclrfUb9sydawE/Xymyi3cfYrADLFbWz/Y06?= =?us-ascii?Q?j1SSies3V9PNXNXgV0VDB2A6XAuCRRS7XqYfPoE+KHcdQW+mlsPJsewpwehx?= =?us-ascii?Q?ZP8P4ST574OBuCgaWjQ+s5mJ?= X-MS-Exchange-CrossTenant-Network-Message-Id: 25bc0467-9dea-4f6f-c02b-08d8debca434 X-MS-Exchange-CrossTenant-AuthSource: DF4PR8401MB0444.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2021 03:21:46.7171 (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: 0uHoq1q62j/5zwIBQhPO7cjpk3YUdqpjeo+JTrVrM7Q9Hp+Ax2MdfwAPSsvWOUVB9TI6S7+MJj9WRki25zLzCQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR8401MB0506 X-OriginatorOrg: hpe.com X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369,18.0.761 definitions=2021-03-04_01:2021-03-03,2021-03-04 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 clxscore=1015 priorityscore=1501 impostorscore=0 mlxscore=0 lowpriorityscore=0 adultscore=0 mlxlogscore=999 malwarescore=0 phishscore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2103040012 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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/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.
=0D Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
=0D Portions copyright (c) 2014, ARM Ltd. All rights reserved.
=0D + (C) Copyright 2021 Hewlett Packard Enterprise Development LP
=0D =0D This program and the accompanying materials=0D are licensed and made available under the terms and conditions of the BS= D License=0D @@ -32,6 +33,9 @@ #elif defined(EFIAARCH64)=0D #define INSTALL_SCT_PLATFORM_SHORT_NAME L"aarch64"=0D #define INSTALL_SCT_PLATFORM_NAME L"AARCH64"=0D +#elif defined(EFIRISCV64)=0D + #define INSTALL_SCT_PLATFORM_SHORT_NAME L"riscv64"=0D + #define INSTALL_SCT_PLATFORM_NAME L"RISCV64"=0D #else=0D #error "Architecture not supported"=0D #endif=0D 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.
=0D # Copyright (c) 2013 - 2014, ARM Ltd. All rights reserved.
=0D # Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.
= =0D +# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
=0D #=0D # This program and the accompanying materials=0D # are licensed and made available under the terms and conditions of the B= SD License=0D @@ -62,6 +63,11 @@ Aarch64/initplat.c=0D Math.c=0D =0D +[sources.RISCV64]=0D + Riscv64/SctLibPlat.h=0D + Riscv64/initplat.c=0D + Math.c=0D +=0D [sources.ia32]=0D ia32/SctLibPlat.h=0D ia32/initplat.c=0D 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 @@ #=0D # Copyright 2006 - 2016 Unified EFI, Inc.
=0D # Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
= =0D +# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
=0D #=0D # This program and the accompanying materials=0D # are licensed and made available under the terms and conditions of the B= SD License=0D @@ -39,6 +40,10 @@ Aarch64/GoVirtual.asm | RVCT=0D Aarch64/GoVirtual.S | GCC=0D =0D +[sources.RISCV64]=0D + Riscv64/VirtualMemory.c=0D + Riscv64/GoVirtual.S | GCC=0D +=0D [sources.ia32]=0D ia32/VirtualMemory.c=0D ia32/GoVirtual.asm | MSFT=0D 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 @@ #=0D # Copyright 2006 - 2016 Unified EFI, Inc.
=0D # Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
= =0D +# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
=0D #=0D # This program and the accompanying materials=0D # are licensed and made available under the terms and conditions of the B= SD License=0D @@ -69,6 +70,11 @@ Aarch64/Dump.c=0D Aarch64/Debug.c=0D =0D +[sources.RISCV64]=0D + Riscv64/Io.c=0D + Riscv64/Dump.c=0D + Riscv64/Debug.c=0D +=0D [sources.common]=0D Guid.h=0D Guid.c=0D 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.
=0D # Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.
= =0D # Copyright (c) 2019, ARM Ltd. All rights reserved.
=0D +# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
=0D #=0D # This program and the accompanying materials=0D # are licensed and made available under the terms and conditions of the B= SD License=0D @@ -67,6 +68,11 @@ Aarch64/DebugSupportBBTestExceptionCallbackFunction.c=0D Aarch64/DebugSupportBBTestCacheFunction.c=0D =0D +[sources.RISCV64]=0D + Riscv64/PlatformIsa.c=0D + Riscv64/DebugSupportBBTestExceptionCallbackFunction.c=0D + Riscv64/DebugSupportBBTestCacheFunction.c=0D +=0D [Packages]=0D SctPkg/SctPkg.dec=0D SctPkg/UEFI/UEFI.dec=0D 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 @@ #=0D # Copyright 2006 - 2016 Unified EFI, Inc.
=0D # Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
= =0D +# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
=0D #=0D # This program and the accompanying materials=0D # are licensed and made available under the terms and conditions of the B= SD License=0D @@ -55,6 +56,9 @@ #[sources.Aarch64]=0D # IPF/TimerInterrupt.c=0D =0D +#[sources.Riscv64]=0D +# IPF/TimerInterrupt.c=0D +=0D [Packages]=0D MdePkg/MdePkg.dec=0D SctPkg/SctPkg.dec=0D 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 @@ #=0D # Copyright 2006 - 2012 Unified EFI, Inc.
=0D # Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.
= =0D +# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
=0D #=0D # This program and the accompanying materials=0D # are licensed and made available under the terms and conditions of the B= SD License=0D @@ -55,6 +56,9 @@ [sources.Aarch64]=0D Aarch64/TimerInterrupt.c=0D =0D +[sources.RISCV64]=0D + Riscv64/TimerInterrupt.c=0D +=0D [Packages]=0D MdePkg/MdePkg.dec=0D SctPkg/SctPkg.dec=0D 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.
=0D # Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.
= =0D # Copyright (c) 2019, ARM Ltd. All rights reserved.
=0D +# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
=0D #=0D # This program and the accompanying materials=0D # are licensed and made available under the terms and conditions of the B= SD License=0D @@ -66,6 +67,10 @@ Aarch64/EntsLibPlat.h=0D Aarch64/InitPlat.c=0D =0D +[sources.RISCV64]=0D + Riscv64/EntsLibPlat.h=0D + Riscv64/InitPlat.c=0D +=0D [Packages]=0D MdePkg/MdePkg.dec=0D SctPkg/SctPkg.dec=0D 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 @@ #=0D # Copyright 2006 - 2010 Unified EFI, Inc.
=0D # Copyright (c) 2010 Intel Corporation. All rights reserved.
=0D +# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
=0D #=0D # This program and the accompanying materials=0D # are licensed and made available under the terms and conditions of the B= SD License=0D @@ -31,6 +32,9 @@ ifndef ARCH ifneq (,$(findstring arm,$(uname_m)))=0D ARCH=3DARM=0D endif=0D + ifneq (,$(findstring riscv64,$(uname_m)))=0D + ARCH=3DRISCV64=0D + endif=0D ifndef ARCH=0D $(info Could not detected ARCH from uname results)=0D $(error ARCH is not defined!)=0D 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.
=0D # Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
= =0D # Copyright (c) 2019,Microchip Technology Inc.
=0D +# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
=0D #=0D # This program and the accompanying materials=0D # are licensed and made available under the terms and conditions of the B= SD License=0D @@ -42,7 +43,7 @@ PLATFORM_VERSION =3D 0.1=0D DSC_SPECIFICATION =3D 0x00010005=0D OUTPUT_DIRECTORY =3D Build/IhvSct=0D - SUPPORTED_ARCHITECTURES =3D IA32|X64|ARM|AARCH64=0D + SUPPORTED_ARCHITECTURES =3D IA32|X64|ARM|AARCH64|RISCV64=0D BUILD_TARGETS =3D DEBUG|RELEASE=0D SKUID_IDENTIFIER =3D DEFAULT=0D =0D @@ -109,6 +110,12 @@ *_*_AARCH64_PP_FLAGS =3D -D EFIAARCH64 $(GCC_VER_MACRO)=0D RVCT:*_*_AARCH64_DLINK_FLAGS =3D --muldefweak=0D =0D + *_*_RISCV64_CC_FLAGS =3D -D EFIRISCV64 $(GCC_VER_MACRO)=0D + 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=0D + *_*_RISCV64_VFRPP_FLAGS =3D -D EFIRISCV64 $(GCC_VER_MACRO)=0D + *_*_RISCV64_APP_FLAGS =3D -D EFIRISCV64 $(GCC_VER_MACRO)=0D + *_*_RISCV64_PP_FLAGS =3D -D EFIRISCV64 $(GCC_VER_MACRO)=0D +=0D DEBUG_*_*_CC_FLAGS =3D -DEFI_DEBUG=0D RELEASE_*_*_CC_FLAGS =3D -DMDEPKG_NDEBUG=0D =0D @@ -124,6 +131,9 @@ [Libraries.AARCH64]=0D ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf=0D =0D +[Libraries.RISCV64]=0D + ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf=0D +=0D [Libraries.IA32,Libraries.X64]=0D =0D [LibraryClasses.common]=0D @@ -146,6 +156,9 @@ [LibraryClasses.AARCH64]=0D NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf=0D =0D +[LibraryClasses.RISCV64]=0D + NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf=0D +=0D [LibraryClasses.IA32]=0D =0D ##########################################################################= #####=0D @@ -228,4 +241,4 @@ SctPkg/TestInfrastructure/SCT/Framework/Sct.inf =0D [Components.IA32, Components.X64]=0D SctPkg/TestCase/UEFI/IHV/Protocol/PlatformDriverOverride/BlackBoxTest/IhvP= latformDriverOverrideBBTest.inf=0D -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 @@ =0D Copyright 2006 - 2016 Unified EFI, Inc.
=0D Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
= =0D + (C) Copyright 2021 Hewlett Packard Enterprise Development LP
=0D =0D This program and the accompanying materials=0D are licensed and made available under the terms and conditions of the BS= D License=0D @@ -607,6 +608,60 @@ typedef struct { UINT64 FAR; // Fault Address Register=0D } EFI_SYSTEM_CONTEXT_AARCH64;=0D =0D +///=0D +/// RISC-V processor exception types.=0D +///=0D +#define EXCEPT_RISCV_INST_MISALIGNED 0=0D +#define EXCEPT_RISCV_INST_ACCESS_FAULT 1=0D +#define EXCEPT_RISCV_ILLEGAL_INST 2=0D +#define EXCEPT_RISCV_BREAKPOINT 3=0D +#define EXCEPT_RISCV_LOAD_ADDRESS_MISALIGNED 4=0D +#define EXCEPT_RISCV_LOAD_ACCESS_FAULT 5=0D +#define EXCEPT_RISCV_STORE_AMO_ADDRESS_MISALIGNED 6=0D +#define EXCEPT_RISCV_STORE_AMO_ACCESS_FAULT 7=0D +#define EXCEPT_RISCV_ENV_CALL_FROM_UMODE 8=0D +#define EXCEPT_RISCV_ENV_CALL_FROM_SMODE 9=0D +#define EXCEPT_RISCV_ENV_CALL_FROM_HMODE 10=0D +#define EXCEPT_RISCV_ENV_CALL_FROM_MMODE 11=0D +=0D +#define EXCEPT_RISCV_SOFTWARE_INT 0x0=0D +#define EXCEPT_RISCV_TIMER_INT 0x1=0D +=0D +typedef struct {=0D + UINT64 X0;=0D + UINT64 X1;=0D + UINT64 X2;=0D + UINT64 X3;=0D + UINT64 X4;=0D + UINT64 X5;=0D + UINT64 X6;=0D + UINT64 X7;=0D + UINT64 X8;=0D + UINT64 X9;=0D + UINT64 X10;=0D + UINT64 X11;=0D + UINT64 X12;=0D + UINT64 X13;=0D + UINT64 X14;=0D + UINT64 X15;=0D + UINT64 X16;=0D + UINT64 X17;=0D + UINT64 X18;=0D + UINT64 X19;=0D + UINT64 X20;=0D + UINT64 X21;=0D + UINT64 X22;=0D + UINT64 X23;=0D + UINT64 X24;=0D + UINT64 X25;=0D + UINT64 X26;=0D + UINT64 X27;=0D + UINT64 X28;=0D + UINT64 X29;=0D + UINT64 X30;=0D + UINT64 X31;=0D +} EFI_SYSTEM_CONTEXT_RISCV64;=0D +=0D //=0D // Universal EFI_SYSTEM_CONTEXT definition=0D //=0D @@ -618,6 +673,7 @@ union { EFI_SYSTEM_CONTEXT_IPF *SystemContextIpf;=0D EFI_SYSTEM_CONTEXT_ARM *SystemContextArm;=0D EFI_SYSTEM_CONTEXT_AARCH64 *SystemContextAArch64;=0D + EFI_SYSTEM_CONTEXT_RISCV64 *SystemContextRiscV64;=0D } EFI_SYSTEM_CONTEXT;=0D =0D //=0D @@ -645,6 +701,8 @@ VOID #define IMAGE_FILE_MACHINE_EBC 0x0EBC=0D #define IMAGE_FILE_MACHINE_ARMTHUMB_MIXED 0x01c2=0D #define IMAGE_FILE_MACHINE_ARM64 0xAA64=0D +#define IMAGE_FILE_MACHINE_RISCV64 0x5064=0D +=0D =0D typedef=0D enum {=0D @@ -653,7 +711,8 @@ enum { IsaIpf =3D IMAGE_FILE_MACHINE_IA64,=0D IsaEbc =3D IMAGE_FILE_MACHINE_EBC,=0D IsaArm =3D IMAGE_FILE_MACHINE_ARMTHUMB_MIXED, ///< 0x01c2=0D - IsaAArch64 =3D IMAGE_FILE_MACHINE_ARM64 ///< 0xAA64=0D + IsaAArch64 =3D IMAGE_FILE_MACHINE_ARM64, ///< 0xAA64=0D + IsaRiscv64 =3D IMAGE_FILE_MACHINE_RISCV64 ///< 0x5064=0D } EFI_INSTRUCTION_SET_ARCHITECTURE;=0D =0D typedef struct _EFI_DEBUG_SUPPORT_PROTOCOL EFI_DEBUG_SUPPORT_PROTOCOL;;=0D 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 @@ #=0D # Copyright 2006 - 2017 Unified EFI, Inc.
=0D # Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
= =0D -# (C) Copyright 2017 Hewlett Packard Enterprise Development LP
=0D +# (C) Copyright 2017 - 2021 Hewlett Packard Enterprise Development LP
= =0D #=0D # This program and the accompanying materials=0D # are licensed and made available under the terms and conditions of the B= SD License=0D @@ -42,7 +42,7 @@ PLATFORM_VERSION =3D 0.1=0D DSC_SPECIFICATION =3D 0x00010005=0D OUTPUT_DIRECTORY =3D Build/UefiSct=0D - SUPPORTED_ARCHITECTURES =3D IA32|X64|ARM|AARCH64=0D + SUPPORTED_ARCHITECTURES =3D IA32|X64|ARM|AARCH64|RISCV64=0D BUILD_TARGETS =3D DEBUG|RELEASE=0D SKUID_IDENTIFIER =3D DEFAULT=0D =0D @@ -112,6 +112,12 @@ *_*_AARCH64_PP_FLAGS =3D -D EFIAARCH64 $(GCC_VER_MACRO)=0D RVCT:*_*_AARCH64_DLINK_FLAGS =3D --muldefweak=0D =0D + *_*_RISCV64_CC_FLAGS =3D -D EFIRISCV64 $(GCC_VER_MACRO)=0D + 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=0D + *_*_RISCV64_VFRPP_FLAGS =3D -D EFIRISCV64 $(GCC_VER_MACRO)=0D + *_*_RISCV64_APP_FLAGS =3D -D EFIRISCV64 $(GCC_VER_MACRO)=0D + *_*_RISCV64_PP_FLAGS =3D -D EFIRISCV64 $(GCC_VER_MACRO)=0D +=0D DEBUG_*_*_CC_FLAGS =3D -DEFI_DEBUG=0D RELEASE_*_*_CC_FLAGS =3D -DMDEPKG_NDEBUG=0D =0D @@ -129,6 +135,9 @@ [Libraries.AARCH64]=0D ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf=0D =0D +[Libraries.RISCV64]=0D + ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf=0D +=0D [LibraryClasses.common]=0D UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiA= pplicationEntryPoint.inf=0D UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntry= Point.inf=0D @@ -157,6 +166,9 @@ [LibraryClasses.AARCH64]=0D NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf=0D =0D +[LibraryClasses.RISCV64]=0D + NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf=0D +=0D ##########################################################################= #####=0D #=0D # These are the components that will be built by the master makefile=0D @@ -483,4 +495,4 @@ SctPkg/TestCase/RIVL/Protocol/Http/Http/HttpENTSTest.inf SctPkg/TestCase/RIVL/Protocol/Http/HttpServiceBinding/HttpServiceBindingEN= TSTest.inf=0D =0D [Components.IA32, Components.X64]=0D -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