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 E5221941611 for ; Thu, 22 Feb 2024 09:12:01 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=rthbsj3cijbKLXE+TiPA9c26/ie4YDVV/1Wgw5yWK9A=; 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=1708593120; v=1; b=rf9Fi0dqPy3TjXhTtb88GF/itDDbjqXaz0nwq2C6t3rmS5B3OUqIvBNKD+NQLjbBSBmRWW5o 1PEYhmrcpM8SfZ5We9RMXmk9vRGKNOZtKm75dZTLGHKfn+yCVd6HW0d47AuolnE5eqZSupacwcS zK8W8GCvNrRkBjuqr5lavKog= X-Received: by 127.0.0.2 with SMTP id fo6OYY7687511xEgStTiwuCV; Thu, 22 Feb 2024 01:12:00 -0800 X-Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.51]) by mx.groups.io with SMTP id smtpd.web11.9037.1708593119948224568 for ; Thu, 22 Feb 2024 01:12:00 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Tr040vXIcSqARcw0XB4L4PUBSNCyS6davTouNwF0jwAvWfl5VznD4Tio8cuhQQ6kFmpwtTx6oM7PRPdcObAoczDSpeP87CMOaJnvQtadaAzwJvl7w2qzNzG40i0j171W8UUm1y0bIUi1fJ2gcSeDAY4w64CVNAEl6kpJXKazc4D0olwvRWumH/wON8XR044dVhqBEy3Xx8O5Rd324Rg3fBMiDqemBlDL22rodKvtV3PIMnKRxXUzOUT3cQ9v2A2ENjm087TTMDP3K+sZuEKeL0fJmt5U509aD6jE4hxolAxcbVzjHdf9cIwR+5mPVFzL8CTPVXEX8fuM3w9VnEoz8A== 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=aDbry91xw/6h6L6mYQzZ4BSBurYW3y+ElY39QoX+HRI=; b=XuFMIlle0f/EeUr50Rg1EQDYEKL4P5eI/GV4PjkAimxBwa7f62CbGIPHoS8fY3dekCwEhy8ma6FrMUkLDicsUaXc6kOjVraMSoU0CzEM/2CtvH2vTqBADeYX+f8jPONUdGWaQBf7qaZQS8r9IAvJ3wmz+0OJNB+58RHsf4oEdjuTQRTlPyw9KAuCbhVBcx4mTPMriU7KKVdN3aOdZAPMi4DDhGwTNT6i+cSsz3rrgvmw+Sk09p0i5LmP+kQnqdZWsnm/lfohxcpOwtmKgd+FreenkgJqFtINQDRYfFHX8pl9hHXBhH5nFC88P2DgHUGA2DmiaMCEcHbc1ummmIhDow== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) 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 DS7PR03CA0347.namprd03.prod.outlook.com (2603:10b6:8:55::6) by CH2PR12MB4873.namprd12.prod.outlook.com (2603:10b6:610:63::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.19; Thu, 22 Feb 2024 09:11:57 +0000 X-Received: from DS1PEPF00017094.namprd03.prod.outlook.com (2603:10b6:8:55:cafe::91) by DS7PR03CA0347.outlook.office365.com (2603:10b6:8:55::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.42 via Frontend Transport; Thu, 22 Feb 2024 09:11:57 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) 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.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C X-Received: from mail.nvidia.com (216.228.118.233) by DS1PEPF00017094.mail.protection.outlook.com (10.167.17.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.25 via Frontend Transport; Thu, 22 Feb 2024 09:11:56 +0000 X-Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Thu, 22 Feb 2024 01:11:56 -0800 X-Received: from drhqmail201.nvidia.com (10.126.190.180) 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; Thu, 22 Feb 2024 01:11:55 -0800 X-Received: from NV-CL38DL3.nvidia.com (10.127.8.14) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server id 15.2.1258.12 via Frontend Transport; Thu, 22 Feb 2024 01:11:54 -0800 From: "Nickle Wang via groups.io" To: CC: Abner Chang , Igor Kulchytskyy , "Nick Ramirez" Subject: [edk2-devel] [PATCH v2 6/6] RedfishPkg/RedfishCrtLib: fix unresolved external symbol issue Date: Thu, 22 Feb 2024 17:11:54 +0800 Message-ID: <20240222091154.852-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: DS1PEPF00017094:EE_|CH2PR12MB4873:EE_ X-MS-Office365-Filtering-Correlation-Id: 24ef96dd-8cf9-4d95-d757-08dc338651c4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: Eye55hqsrAvgEXaHhLgQRPJqzTGLI0qOw/6Zz/4UmDjSDi7fnp+NQdPH2SvKmZeyiLFbhd/TbmxheoK+sHalPZKQQODbkYRK/Sw5IOU1J2aDF5mN84CmB5V012UzrkOF9scL/252VLm8TIrZJtH0GtbqNr9jD+Ybmw+pE1Yn4JYbTDl6t59YF56+f1EfPo/DWVXo9sVTdTytT3fp4caT+rEdMttsDX67EzrpcW4TCvgaq7TtbwKcqZvrXCtGXpwDVl5fLAEBerp8eJZHSOsCpMCFU7n7/88N28tyqBibDg8DqpXhALwKkA7FKMyx4lPrZ4DTK0lwFpG1BcXthxBsTxe4MtVzo1ND2pW+T0ukYrUKx58TSFOVK7FbkZ7YSQeKzpsc+7seZmwHQQ1JTLVYkdAWdvIGsn8TUFza5J0yZGec45lzGUBN9YV+8ivt7GD0Fby+LYEvDQjx150CoofHGg5FMbfLN+rLJGXDalIJtb9QgULUC48TFHHAJks7xd4RgRYohYRr3NIZjG5LmgjuPk/TYPc3wmVllZJmA1O2KmeFfMLHVTtsJm/+SEEstsbBeK2JqnNx88VWH8xC2IKMQU9CN+79TzuJv1E8/K2dqwmRkvHYj8KLYsvDUyZlJrb5+Bk4sivgBTI59Z32Gtp93YpDRI9IFv491Ym88MZ2yiM= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Feb 2024 09:11:56.8850 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 24ef96dd-8cf9-4d95-d757-08dc338651c4 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.233];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF00017094.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4873 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: lcb2atyCSULgJ3sHpvZYhfefx7686176AA= 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=rf9Fi0dq; 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..e49f00eaf5 --- /dev/null +++ b/RedfishPkg/PrivateLibrary/RedfishCrtLib/Ia32/MathFtol.c @@ -0,0 +1,37 @@ +/** @file This file is copied from CryptoPkg/Library/IntrinsicLib/Ia32/Mat= hFtol.c + 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 (#115778): https://edk2.groups.io/g/devel/message/115778 Mute This Topic: https://groups.io/mt/104505407/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-