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 1C085A00C3; Mon, 17 Jan 2022 14:39:08 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D5051411DB; Mon, 17 Jan 2022 14:39:07 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 934A140141 for ; Mon, 17 Jan 2022 14:39:05 +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 20H9A345014919; Mon, 17 Jan 2022 05:39:02 -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=AGPrA2JN/DWw8kmugOu9YSjPIuWPU97gTj6yvKB18Ns=; b=D18Qzih2vcS2cnblX7EVMFbJmhHlnjRIXxSEwYRmZziyFByqAqPt/cfGL9VrVb4d3YsT RceXHjzw0qOvTl03GaHjPHhujdv/3sGHIorTMDoGKcfVeSZ7OGS1vpMUEOu5CmS07asT Pl189qlM2r8PzQ9arHvqAikY6MRflD4a4AZBGXrB/EKHrhkF+Q516DkG1zHO8M0jsmtr vVYOOdWBFjVAGStn8NWdVw2BR8v2Q+BI7pIuYLbE5pp606SzPhVdVhqsHaqJuCwYcsSS /CTeQO/Q/Zd5iPgFmUndwL+xQegRrMlgI5dsrJPqpqccoePmIjASAZyvylZX/XMea/+G IQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3dn5gg8nkd-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 17 Jan 2022 05:39:02 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 17 Jan 2022 05:38:59 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 17 Jan 2022 05:38:59 -0800 Received: from ml-host-33.caveonetworks.com (unknown [10.110.143.233]) by maili.marvell.com (Postfix) with ESMTP id ABE635B6921; Mon, 17 Jan 2022 05:38:59 -0800 (PST) From: Srikanth Yalavarthi To: Ray Kinsella CC: , , , "Srikanth Yalavarthi" Subject: [PATCH v3 1/1] eal: add internal function to get base address Date: Mon, 17 Jan 2022 05:38:57 -0800 Message-ID: <20220117133857.19698-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: VnglcxSoTBQbg5A9AD_LXnRG7dGG87WV X-Proofpoint-GUID: VnglcxSoTBQbg5A9AD_LXnRG7dGG87WV 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 Change-Id: I19eec79e46066e3b08896d84ce3f3cb15a59c124 --- 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