From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E81A0A00C3; Tue, 18 Jan 2022 09:48:38 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6EED4426EE; Tue, 18 Jan 2022 09:48:38 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 053B140141 for ; Mon, 17 Jan 2022 12:22:47 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 20HA5IJc031804; Mon, 17 Jan 2022 03:22:44 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0220; bh=aHwPEyhV5F/S2IAl1qj+Icjt0YlFGfPfKreBz2UBbhk=; b=UnJPK01qiXTjyadBsF+6lyUsYeqBk+SkSEQwIwlQpWN7YbionV1TDdzZMV7yktbp5Mwi zzzyeovuryQuzhGRMQFmxUIZD4TcVO/MIE4FHwLY9vqna421mcgYXhZ1Bsvra54UIeDl bVgZOw1mKA7TDAS6XSV3v0rFjaIWaAEZ0qGcST07ftgD8FkEtFkRoDp6rImw5Aeh9vLW agosnsTW4XEI7VR17MgzpfG2428P10zol5+ZEaFOe2zyftAPN7OWZJyzkKZGOCAXzWLX R4ri7Il3fGqa+0TBq40+C/KO2o/YcPJ6t393juathqBhR0TJx7kJtJH+fbwbL/TcsyW6 Vw== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3dn6d306q6-5 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 17 Jan 2022 03:22:43 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 17 Jan 2022 03:22:31 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 17 Jan 2022 03:22:31 -0800 Received: from ml-host-33.caveonetworks.com (unknown [10.110.143.233]) by maili.marvell.com (Postfix) with ESMTP id B494C3F7058; Mon, 17 Jan 2022 03:22:31 -0800 (PST) From: Srikanth Yalavarthi To: Ray Kinsella CC: , , , "Srikanth Yalavarthi" Subject: [PATCH 1/1] eal: add internal function to get base address Date: Mon, 17 Jan 2022 03:22:27 -0800 Message-ID: <20220117112228.32572-1-syalavarthi@marvell.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-GUID: 7XcXMDRvmF3iZIUcHA0pgH2GU74G-tM_ X-Proofpoint-ORIG-GUID: 7XcXMDRvmF3iZIUcHA0pgH2GU74G-tM_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-17_04,2022-01-14_01,2021-12-02_01 X-Mailman-Approved-At: Tue, 18 Jan 2022 09:48:37 +0100 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Added an internal helper to get OS-specific EAL mappping base addreess This helper can be used by the drivers to map host address range with offload devices and would be need for device specific operations like firmware load Change-Id: Ief572468c291c1721699ba7af2bd4fa8054644a0 Signed-off-by: Srikanth Yalavarthi --- lib/eal/common/eal_common_config.c | 7 +++++++ lib/eal/include/rte_eal.h | 9 +++++++++ lib/eal/version.map | 1 + 3 files changed, 17 insertions(+) diff --git a/lib/eal/common/eal_common_config.c b/lib/eal/common/eal_common_config.c index 1c4c4dd585..cec4991d96 100644 --- a/lib/eal/common/eal_common_config.c +++ b/lib/eal/common/eal_common_config.c @@ -87,3 +87,10 @@ rte_eal_has_pci(void) { return !internal_config.no_pci; } + +/* Get the EAL base address */ +uint64_t +rte_eal_get_baseaddr(void) +{ + return eal_get_baseaddr(); +} diff --git a/lib/eal/include/rte_eal.h b/lib/eal/include/rte_eal.h index 5a34a6acd9..29298c3c83 100644 --- a/lib/eal/include/rte_eal.h +++ b/lib/eal/include/rte_eal.h @@ -475,6 +475,15 @@ rte_eal_mbuf_user_pool_ops(void); const char * rte_eal_get_runtime_dir(void); +/** + * Get the OS-specific EAL base address. + * + * @return + * The base address. + */ +__rte_internal +uint64_t rte_eal_get_baseaddr(void); + #ifdef __cplusplus } #endif diff --git a/lib/eal/version.map b/lib/eal/version.map index ab28c22791..b53eeb30d7 100644 --- a/lib/eal/version.map +++ b/lib/eal/version.map @@ -425,6 +425,7 @@ EXPERIMENTAL { INTERNAL { global: + rte_eal_get_baseaddr; rte_firmware_read; rte_intr_allow_others; rte_intr_cap_multiple; -- 2.17.1