From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 9EE6E9412DD for ; Tue, 20 Feb 2024 06:42:07 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=TijiN0lMSy3XM9J/QWYyUgVBq3gUqrLZQUWXakpSOpk=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Received-SPF:From:To:CC:Subject:Date:Message-ID:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1708411326; v=1; b=YhurLC4gk7AXBDFUsjxZZYyQjxcpwTfLw29FrVu7pXR4U1Xi9uLFhSXUmM1rGaFqEwi+CMv/ WQFsM/+bflzWqhBnNjptX9H9kB+7mzPHc6lxeA7hGsoMAK0EQFMtciH7jQ1OxHxqB31hM8v6gfq 44LLhp2nQ970jXi9eolEXzc8= X-Received: by 127.0.0.2 with SMTP id 6HNfYY7687511xCz1TQqviX2; Mon, 19 Feb 2024 22:42:06 -0800 X-Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.107.236.41]) by mx.groups.io with SMTP id smtpd.web10.8092.1708411325627525433 for ; Mon, 19 Feb 2024 22:42:05 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C2QKCoIfZg1ubKddJpOWeZdWc02WEdu0ZjpJ/5l9Eh7Wow7NF52M+VOG1RZ+IybqORme1SV1y2f+AMVU9AMxg8ILHbd1ep3Em7Oh4EgIqjKIcbCjGo17+cDlQNBKkPxAEtx1DL4nDZniObLinNsVB/M4rt3UqY2iKFCLfvTrZvH7z7CtgQm8NjwuRg0qoAYYNv/MHj2eZ54ZguvlSkVUfL0zO91nH5qNZ29rMsgPbgzrJ4qmWUYJEnRM0EYG/snVzhWLcapuZn18sCk1BYPEd7tAvVdLY6ovj748V6EKAZoq4iRNTpWKiZbU+Jr2w0XAZ5wK+Ui1Vn4HT+d9TXxSDQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rgwsCyPq4q1QJKaI5be61NAtA4UrPKFtOVMHIQKggmE=; b=WXEjl2Ahq72W45J8aEEHomPpsdzSTL30HepOENY1AaeGdGe38Z+c3PocmDLIdQzSNTvjH5ZHiQtEbo8ZAJBC/86WKu+FVmiGZI7Bz3RfPQmXtGGyZ5tPiJT8yEfJB/3samW7i3htfPU+BwYPzHMmuRIkEI8jb3JuFIorY7SjDwUR62kWpzixCUyY2hNnKg8VBDMO/cR6LL0RukW/MPS5umHnOQ8SLsVxBgTqJ384BfkGUibLBKVzqV4iotCCsPeoJzWGm0+fWMieCbCEqTMz6s5bqn0uCbiujXHo06rn3sFNieeg/lNFHLiN/sN/+pUFrf5DEc51/qD/iEf1+jq7LQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) X-Received: from SN6PR08CA0017.namprd08.prod.outlook.com (2603:10b6:805:66::30) by CH3PR12MB9394.namprd12.prod.outlook.com (2603:10b6:610:1cf::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.19; Tue, 20 Feb 2024 06:42:02 +0000 X-Received: from SN1PEPF000252A3.namprd05.prod.outlook.com (2603:10b6:805:66:cafe::cf) by SN6PR08CA0017.outlook.office365.com (2603:10b6:805:66::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.39 via Frontend Transport; Tue, 20 Feb 2024 06:42:02 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C X-Received: from mail.nvidia.com (216.228.118.232) by SN1PEPF000252A3.mail.protection.outlook.com (10.167.242.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.25 via Frontend Transport; Tue, 20 Feb 2024 06:42:02 +0000 X-Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 19 Feb 2024 22:41:54 -0800 X-Received: from drhqmail202.nvidia.com (10.126.190.181) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Mon, 19 Feb 2024 22:41:54 -0800 X-Received: from NV-CL38DL3.nvidia.com (10.127.8.13) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server id 15.2.1258.12 via Frontend Transport; Mon, 19 Feb 2024 22:41:53 -0800 From: "Nickle Wang via groups.io" To: CC: Abner Chang , Igor Kulchytskyy , "Nick Ramirez" Subject: [edk2-devel] [PATCH 6/6] RedfishPkg/RedfishCrtLib: fix unresolved external symbol issue Date: Tue, 20 Feb 2024 14:41:53 +0800 Message-ID: <20240220064153.28651-1-nicklew@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF000252A3:EE_|CH3PR12MB9394:EE_ X-MS-Office365-Filtering-Correlation-Id: b59e3ac5-4047-4702-2549-08dc31df0bba X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: JTza1YyJfRkzl8zlv9aEtmpWmb8oxrJUfA8o8kuDPYkfeQvHuaaWV6yqQdOAd/+axxoLmiB+4bR5Jsxazc8oaiBvLlfu5+OqspBX/oBfRcOCQXqaj0h+y0JgCU/MedlJhN/M91dfv0rMQBdKsyszS7De304I7R1gbLFAFru8monyfooMznCVftH/rdmmlswc2a2m9GXEMzurdlYctA58sKVR0WC1qTMOqkXzd6qiwW6WXKGVFz8VimcDjMefzgDKv14EPkk+FEVyYa1mwpKK6mx62fGSb4TiTeZZLujil1iZ2YBpEdh8yYcSVpon+dSMCIb5Yia0pzSDgiKyy9E3NZnitxc86oT9h861yFDkcK5GizOLZg0YuZQHgnD9kLPotDW1MgY3pnnaJq0JWUE4hrUfVkbDlkuaUWenyY3APt/ciA/GHmDvuBYZNTzKe7vGC+fxyImUgbSoFtBbS/CYsZ199yW+mUVnrAnHLdnIgwqPl6zPaywJFgFcDV6m/4NPvqOvtn/WVaVzCD57jaq31H36IjhHrzQXdXvARi0upDEIW57TgAbzd2UuQTo9Xb8dTEV+goDcGFuGIceyYJ4Skjkqj9CiAVQ8YmZxKF9g8jjBYHLPUKnfNqpygFcimdGiE8VYTHs3qBBGZ2lDinpJGF7Otk/1fUA9STfINhZ6NOM= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Feb 2024 06:42:02.2578 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b59e3ac5-4047-4702-2549-08dc31df0bba X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.232];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF000252A3.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB9394 Precedence: Bulk List-Subscribe: List-Help: 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,nicklew@nvidia.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: l2AT13FV1hMMJ8WOfLZgc62Ex7686176AA= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=YhurLC4g; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io -Fix below compiler error reported in edk2 CI. ERROR - Linker #2001 from JsonLib.lib(load.obj) : unresolved external symbol __ftol2 -The file MathFtol.c is copied from IntrinsicLib in CryptoPkg. -Add MathFtol.c to EccCheck IgnoreFiles. Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy Cc: Nick Ramirez --- .../RedfishCrtLib/RedfishCrtLib.inf | 7 +++- .../RedfishCrtLib/Ia32/MathFtol.c | 37 +++++++++++++++++++ RedfishPkg/RedfishPkg.ci.yaml | 2 + 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 RedfishPkg/PrivateLibrary/RedfishCrtLib/Ia32/MathFtol.c diff --git a/RedfishPkg/PrivateLibrary/RedfishCrtLib/RedfishCrtLib.inf b/Re= dfishPkg/PrivateLibrary/RedfishCrtLib/RedfishCrtLib.inf index 6ff5dba75c..3a5e309d1a 100644 --- a/RedfishPkg/PrivateLibrary/RedfishCrtLib/RedfishCrtLib.inf +++ b/RedfishPkg/PrivateLibrary/RedfishCrtLib/RedfishCrtLib.inf @@ -3,6 +3,7 @@ # # Copyright (c) 2019, Intel Corporation. All rights reserved.
# (C) Copyright 2020 Hewlett Packard Enterprise Development LP
+# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved= . # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -23,6 +24,9 @@ [Sources] RedfishCrtLib.c =20 +[Sources.IA32] + Ia32/MathFtol.c | MSFT + [LibraryClasses] BaseLib SortLib @@ -35,4 +39,5 @@ MdeModulePkg/MdeModulePkg.dec RedfishPkg/RedfishPkg.dec =20 - +[BuildOptions] + MSFT:*_*_IA32_CC_FLAGS =3D /GL- diff --git a/RedfishPkg/PrivateLibrary/RedfishCrtLib/Ia32/MathFtol.c b/Redf= ishPkg/PrivateLibrary/RedfishCrtLib/Ia32/MathFtol.c new file mode 100644 index 0000000000..adfe249b1d --- /dev/null +++ b/RedfishPkg/PrivateLibrary/RedfishCrtLib/Ia32/MathFtol.c @@ -0,0 +1,37 @@ +/** @file + 64-bit Math Worker Function. + The 32-bit versions of C compiler generate calls to library routines + to handle 64-bit math. These functions use non-standard calling conventi= ons. + +Copyright (c) 2019, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +/* + * Floating point to integer conversion. + */ +__declspec(naked) void +_ftol2 ( + void + ) +{ + _asm { + fistp qword ptr [esp-8] + mov edx, [esp-4] + mov eax, [esp-8] + ret + } +} + +__declspec(naked) void +_ftol2_sse ( + void + ) +{ + _asm { + fistp dword ptr [esp-4] + mov eax,[esp-4] + ret + } +} diff --git a/RedfishPkg/RedfishPkg.ci.yaml b/RedfishPkg/RedfishPkg.ci.yaml index 69b6bf39f5..b95e8bfdc7 100644 --- a/RedfishPkg/RedfishPkg.ci.yaml +++ b/RedfishPkg/RedfishPkg.ci.yaml @@ -2,6 +2,7 @@ # CI configuration for NetworkPkg # # (C) Copyright 2021 Hewlett Packard Enterprise Development LP
+# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved= . # SPDX-License-Identifier: BSD-2-Clause-Patent ## { @@ -38,6 +39,7 @@ "PrivateInclude/Crt/string.h", "PrivateInclude/Crt/time.h", "PrivateLibrary/RedfishCrtLib/RedfishCrtLib.c", + "PrivateLibrary/RedfishCrtLib/Ia32/MathFtol.c", "Include/Library/RedfishCrtLib.h", ## ## For jansson library open source --=20 2.34.1 -=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 (#115631): https://edk2.groups.io/g/devel/message/115631 Mute This Topic: https://groups.io/mt/104463409/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-