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 B6BABA00C3; Mon, 17 Jan 2022 14:42:48 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 72845411DF; Mon, 17 Jan 2022 14:42:48 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 7220840141 for ; Mon, 17 Jan 2022 14:42:47 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 20H9A9lc015052; Mon, 17 Jan 2022 05:42:43 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=Yz/B5fky1mVSa7C0HNGmR9KAM6/P55tr2SoQZUzaIko=; b=RBGf9QvmgmxaRWssdUyBmHqLH/wqJVtAfbDmCbn0wyK06PuQBiMFUceAV5pUi9VMyn4+ YsLHCcjftKMLwYx9PYJO2FKZg39yORKxpdS5TsDEBmT+QL6yN8UgINQTBBcLSNdPPBdI imgVsWIvO3OoYszLUaJF7oqFwYVh6PFzkMSjz8itW9GZlqHvwjSPBX40Iz6JD+Fc9LNE /Etepl1HHBDqAT4EvHVR2k6vbIlLPWn4Aw4GMcsNcfuPOhLFk7OlS6FkG15O3mRE8vfu AqlUVStI+76cDQ102CZXha5zYt4w4c/7u04Zas5MaQhPzQmOXfLylkSumu77KD0vUnyz pA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3dn5gg8ny3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 17 Jan 2022 05:42:43 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 17 Jan 2022 05:42:41 -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 05:42:41 -0800 Received: from ml-host-33.caveonetworks.com (unknown [10.110.143.233]) by maili.marvell.com (Postfix) with ESMTP id 74D0E5B6921; Mon, 17 Jan 2022 05:42:41 -0800 (PST) From: Srikanth Yalavarthi To: Ray Kinsella CC: , , , "Srikanth Yalavarthi" Subject: [PATCH v4 1/1] eal: add internal function to get base address Date: Mon, 17 Jan 2022 05:42:39 -0800 Message-ID: <20220117134239.1773-1-syalavarthi@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220117112228.32572-1-syalavarthi@marvell.com> References: <20220117112228.32572-1-syalavarthi@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-ORIG-GUID: 4de71BHhd6otN6NtD6epJ1py0OnBy6_Z X-Proofpoint-GUID: 4de71BHhd6otN6NtD6epJ1py0OnBy6_Z 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_05,2022-01-14_01,2021-12-02_01 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 mapping base address 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 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