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.web11.1190.1590771996903811033 for ; Fri, 29 May 2020 10:06:36 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=041837a23b=daniel.schaefer@hpe.com) Received: from pps.filterd (m0134421.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 04TH6VUM027270; Fri, 29 May 2020 17:06:36 GMT Received: from g9t5009.houston.hpe.com (g9t5009.houston.hpe.com [15.241.48.73]) by mx0b-002e3701.pphosted.com with ESMTP id 319x3g2mpe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 29 May 2020 17:06:36 +0000 Received: from G4W9121.americas.hpqcorp.net (g4w9121.houston.hp.com [16.210.21.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g9t5009.houston.hpe.com (Postfix) with ESMTPS id 9CA5F55; Fri, 29 May 2020 17:06:35 +0000 (UTC) Received: from G4W9119.americas.hpqcorp.net (2002:10d2:14d6::10d2:14d6) by G4W9121.americas.hpqcorp.net (2002:10d2:1510::10d2:1510) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 29 May 2020 17:06:35 +0000 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (15.241.52.10) by G4W9119.americas.hpqcorp.net (16.210.20.214) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Fri, 29 May 2020 17:06:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b0/ueGOXfVT7VsWI6uSflu7iFJCeTX7/LQ1GhQfo0M9SLnfkWl97q5OPPkE0LOcl4cm3A3xdbSvqzhO7CwbF4XtrGx/m6ccycosZ6VBeoTlJMfv5F4+6I6rQ10f7EHtSSdQKKDGDpx5dkTMZ+a6SS54Jm9yYDpkPm3YDxWZZpIwHsqiBpj/k9h5jBgGFyXl0fzuS5ZH6h+AsP1kwsgA5d9OnpsbX06ah02yvCqNrJ5cqXvoYEuhEAylNiP6WqaZf7htUgGEUW9zvXWFnIaqwJRr31dGizcPNrB7KOfTdRcrvijLKGpYOdtK1ScxORtHLKXZ6Y8+gTnAtE5e1ZtLn+w== 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=llMyImlVMFEEvogr+YHSKuksmq9VRnrLldz6Ney1CUA=; b=e0qXi9N8Lni9UewOFgrJNmPbQLwKvkKclS+Xa67odjvOHVKO6XlvabmppHpZvqNvIqtbhEtjiDCXS7MSuzTXsRHadBm+p757R5xC18n/FKOUvL3gTMH1wokH6OFTwp7lwzQSaFr9O8PHoGD7ladxY4vu78m93DJ1KgHWyLMJCofFE+BdharzMxA99tdBDTdTGNRfNzifiBEEPavTfd5dt9YimjaqKWZol4gun5VITiL0rPBt8coHXJQ6UYZQW7otl5S2lE6P/WpBDf57K4fUrRyOBN70ce+xvB+uAgf+aWRlq5XP9mB4FqODByo9OEJKeJgOVJefVd8Zc5SP1VuunQ== 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 DF4PR8401MB0474.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7607::10) by DF4PR8401MB0441.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7607::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Fri, 29 May 2020 17:06:33 +0000 Received: from DF4PR8401MB0474.NAMPRD84.PROD.OUTLOOK.COM ([fe80::c4c5:a5a7:6deb:da30]) by DF4PR8401MB0474.NAMPRD84.PROD.OUTLOOK.COM ([fe80::c4c5:a5a7:6deb:da30%9]) with mapi id 15.20.3021.030; Fri, 29 May 2020 17:06:33 +0000 From: "Daniel Schaefer" To: CC: Leif Lindholm , Gilbert Chen , Abner Chang , Michael D Kinney Subject: [PATCH v3 0/3] New RISC-V Patches Date: Fri, 29 May 2020 19:06:19 +0200 Message-ID: <20200529170622.32610-1-daniel.schaefer@hpe.com> X-Mailer: git-send-email 2.26.1 X-ClientProxiedBy: AM0PR10CA0057.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:150::37) To DF4PR8401MB0474.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7607::10) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from x360-nix.fritz.box (93.215.216.32) by AM0PR10CA0057.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:150::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.17 via Frontend Transport; Fri, 29 May 2020 17:06:32 +0000 X-Mailer: git-send-email 2.26.1 X-Originating-IP: [93.215.216.32] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 6f40ea33-14c8-4aa6-7a1f-08d803f2a378 X-MS-TrafficTypeDiagnostic: DF4PR8401MB0441: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-Forefront-PRVS: 04180B6720 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4ElPlWg1EuwE0VhnoIqbHGnce3PvDSZjX7VnH11QA4+hvlFBLkQ/MzR6pxrR6wyZMz76wLQ5cVwA3mkYY4ZGRXgfzAefvpUI55WSaQMzUNa7jCuwsR4pSdAJVuMXici5yGJKz81VFsG5qRmq5/yXkozlXUL3KThjdb8UeCoyUcSh1+dnZh8MqhfdRha8Rya86S3o1KStZhpdL6/SzP25cspiKgoyTGNJoTKbBdiTiwM/qKF2cWqfEF7rjo0stqessOSILyyI+A7NpJ5juUi1RxG5CfFq8yG4quqj0GZi0cZu8HmHZnfT4O0VWJPnPd6/wUazjac93b1kP36Mt7z7ig== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DF4PR8401MB0474.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFTY:;SFS:(346002)(136003)(39860400002)(376002)(396003)(366004)(52116002)(186003)(16526019)(316002)(54906003)(6916009)(478600001)(5660300002)(2906002)(956004)(2616005)(6486002)(44832011)(8936002)(6666004)(1076003)(36756003)(4326008)(6512007)(86362001)(6506007)(8676002)(26005)(66556008)(66476007)(66946007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: rNtFqnwvW5Kh7ussMBU6Zu++k3fOtVQZQJ60MFq/oMip4Rh2sKvP15Ti9RwxI0g752iJCiuQzTw0DvCUt8FsypojvLw2ejCGDfdveihfQWROKYJvCBmMMfYP4xMjaxFx7qjXq3aZle/5m8XOma432grNl3NC23jfmGinyAi7DJ3X6wZcoMqeKVz0IwlahKkpcpeZUFtApDlFdsRw5FsHKan70GApc09TDo/e81QrRJuvh0eBWuDPT/j2EkXnRDHk8LXOd1Kz/tjJxXFrfgjruL39D6YcDJfKo4aUxRXVAeZNq9PS9EmcueBDimOfvOrH+5TqOl9xT6grASC3MEShnE8ZtIR0yZNut2TNbPfYdggJgfC79wWTNUpIwXSbrOiaHOQXGNfcSCnge78ODTTySgbebPj9/YMQ/hSNc41/hSi17HFcFiOkRgsS2NlSQQMQn+QDYLeOwde5VBh3rINAD5fSRUN42CTU0AyoIhOh5DhHV6tqmbfWXtOyKqH5H4Q9 X-MS-Exchange-CrossTenant-Network-Message-Id: 6f40ea33-14c8-4aa6-7a1f-08d803f2a378 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2020 17:06:33.5804 (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: tUsSpxwhUnIZCr6Pw4XPgnozv2cIh2xLkL3A3M4KZ2QlqzJGsgwqMARBJVoCXy5bHkKXhl1SwA9OKVUw2q9r5g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR8401MB0441 X-OriginatorOrg: hpe.com X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216,18.0.687 definitions=2020-05-29_08:2020-05-28,2020-05-29 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 cotscore=-2147483648 mlxscore=0 adultscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 spamscore=0 lowpriorityscore=0 phishscore=0 priorityscore=1501 clxscore=1015 impostorscore=0 suspectscore=4 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2005290130 Content-Transfer-Encoding: 8bit Content-Type: text/plain Hi Leif, here's the new patchset addressing your latest comments. The only thing that's not included is a deduplication of the SMBIOS code. I expect that will require quite some thinking - I'm not yet sure how to do it. I sent an answer to your reviews of the last comments, saying what I changed. Quick summary here: - Some changes, like the errors codes were split between two commits. This is squashed now. - Add typedefs for sbi structs to conform to EDK2 style - Change some variables and functions to EDK2 camel case naming - Change the last remaining `unsigned long` to UINTN - Turn SbiCall{1,2,3,4,5,6} into vararg function - Move the SbiCall function to the .c file - Mark a0 as input/output in ecall inline asm - Changed function names to readable longer names The real changes are really only in 3/3 but I included the others as well for completeness. Have a nice weekend! - Daniel Cc: Leif Lindholm Cc: Gilbert Chen Cc: Abner Chang Cc: Daniel Schaefer Cc: Michael D Kinney Daniel Schaefer (3): ProcessorPkg/RiscVOpensbLib: Add opensbi submodule ProcessorPkg/Library: Add RiscVOpensbiLib ProcessorPkg/Library: Add RiscVEdk2SbiLib Silicon/RISC-V/ProcessorPkg/Library/RiscVEdk2SbiLib/RiscVEdk2SbiLib.inf | 28 + Silicon/RISC-V/ProcessorPkg/Library/RiscVOpensbiLib/RiscVOpensbiLib.inf | 52 ++ Silicon/RISC-V/ProcessorPkg/Include/IndustryStandard/RiscVOpensbi.h | 81 ++ Silicon/RISC-V/ProcessorPkg/Include/Library/RiscVEdk2SbiLib.h | 563 +++++++++++++ Silicon/RISC-V/ProcessorPkg/Include/OpensbiTypes.h | 75 ++ Silicon/RISC-V/ProcessorPkg/Library/RiscVEdk2SbiLib/RiscVEdk2SbiLib.c | 860 ++++++++++++++++++++ .gitmodules | 3 + Readme.md | 36 + Silicon/RISC-V/ProcessorPkg/Library/RiscVOpensbiLib/opensbi | 1 + 9 files changed, 1699 insertions(+) create mode 100644 Silicon/RISC-V/ProcessorPkg/Library/RiscVEdk2SbiLib/RiscVEdk2SbiLib.inf create mode 100644 Silicon/RISC-V/ProcessorPkg/Library/RiscVOpensbiLib/RiscVOpensbiLib.inf create mode 100644 Silicon/RISC-V/ProcessorPkg/Include/IndustryStandard/RiscVOpensbi.h create mode 100644 Silicon/RISC-V/ProcessorPkg/Include/Library/RiscVEdk2SbiLib.h create mode 100644 Silicon/RISC-V/ProcessorPkg/Include/OpensbiTypes.h create mode 100644 Silicon/RISC-V/ProcessorPkg/Library/RiscVEdk2SbiLib/RiscVEdk2SbiLib.c create mode 100644 .gitmodules create mode 160000 Silicon/RISC-V/ProcessorPkg/Library/RiscVOpensbiLib/opensbi -- 2.26.1