From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web10.12316.1612885477242701741 for ; Tue, 09 Feb 2021 07:44:37 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=gpE/ne9p; spf=pass (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=0674d93a3b=daniel.schaefer@hpe.com) 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 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=gpE/ne9pqPzJR0yYV0whTEyRk+jnSrDkV2ZDpmsGRUvQ1JdIc6+b/xq4oCz2wksAmWa0 +pxDKSQ2WbilWjy1EwgnZbt9hu1zhJeiB6yABs8Gy+aKbgLKA/EiFiC/Dvdd41+uSSCi kMmy+/EoVzvJ8MLkrGGQx5WAlGWIjKBct3/7igpVNi06bGvBeJ1BMQdOgrKYCX0RX1aq bBpymZPG3QCUaT6VSBPZL1PbBB5UUwOIUIdqwOfA5S5qzN6Bf5GCid566XyFu2OWPAcT wM7HiEIh7v3UALrVCN2r8b34oJJ95mR71O3I9E+taKB2FH1T5rIJXKfYBqzRtvRow9LZ Vw== 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 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) 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 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 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 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 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-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> X-Mailer: git-send-email 2.30.0 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 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: BCL:0; X-Microsoft-Antispam-Message-Info: /+6xHbIHRlrNE4HHBojk2nybcWsaCQDX9dh7SMDeuCT3+WNgUl5zYWQyNJq0+h4G6ToFzHDjcLbgWGkG996Oox2ob1VaID3UdZJflpuDW2RVahtDipQ318EPrfA8yWr1Wc5SuJC3NI1vwm89p/kuSZvz45RI6WpmpNKbhUVroCi56blcEbb36iZvPn7Zm8LOOUJk6NYpxDvwGmoeNN8SZzUNve3PBprzjZF8yRymcwPWDNSReZoR+tye1UnaHtUAqDmC5890qIAC4t7rHKhjioyfQ2SYDabTx0dCnZQHPgyHvubeH9JmgZifZ7f42luy09qJEnHowr726N5J7S/oAMEBGS061PhLNwMlkUjWhmnUNcByjXOyfiMMjglVwhSkg4yRVTJ6ttaFJBnuDDDHE8N3oPDZJP+x/je6ik6pVz3ESpriyUO7pZlDwcOWevlUB3qHSHwFMHxOsHofWJGivIkLMsp/NLN+HOpkRYCi5w2sNJFxcD003V2ArzuFCJPf8qEopKfCZtzvX9F5CZZ3q3KZG0jIFYi0fvcyWEQgY1SsDZaZUA1Pl+o48TTkWcaSdcFFw4SOGfcfAg3hTqbZYw2/O20UG/bKTvC1xrpd5Rc= 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:(396003)(136003)(366004)(346002)(376002)(39860400002)(6512007)(1076003)(66556008)(26005)(6506007)(66946007)(8936002)(30864003)(86362001)(16526019)(2906002)(4326008)(5660300002)(66476007)(8676002)(19627235002)(478600001)(6666004)(6916009)(44832011)(6486002)(186003)(2616005)(316002)(54906003)(52116002)(956004)(36756003)(83380400001);DIR:OUT;SFP:1102; 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 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369,18.0.737 definitions=2021-02-09_03:2021-02-09,2021-02-09 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 spamscore=0 lowpriorityscore=0 suspectscore=0 bulkscore=0 priorityscore=1501 phishscore=0 malwarescore=0 mlxlogscore=999 clxscore=1015 adultscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102090081 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