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 317FCA00C3; Mon, 17 Jan 2022 14:30:33 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E464D411CE; Mon, 17 Jan 2022 14:30:32 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 9FF9440141 for ; Mon, 17 Jan 2022 14:30:31 +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 20H9A3lM014895; Mon, 17 Jan 2022 05:30:28 -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=MkSCuKgpLQgV1zA7Je6XZ4BEDMirvmO6jBHDJw7UtgA=; b=XLEmE180mngJMOBAhaXHitojqmhK8TiYQVGSyp1BPYqAUNqP4f/H77YXYN+J4ZTN5e0P bYmG3T/X+uUlb1ljOUhYL0bxIY0nM3cS8BjnqUfQjIgCH+ilSCAmnsbjRszlRH+qi06K cj379D03kPtE/uUUqsy8XYKMhErKl1WLx/o6TSrB5YFOQrLVw1uaCUbXiuO1tQKmHMlZ woYoCbPfh7D1Vaqci+fbhAVOUZmKX/SnCV9/KvjOvT3OgR0md8wH5ckijPzc3siwNnjj hUKkpra5PdVb615CRef1VyNZEkx/hmdossuQ2C5x8CoawpH+WkhXSC0vBAY3W2t+oIv6 kw== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3dn5gg8msc-7 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 17 Jan 2022 05:30:28 -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:30:27 -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:30:27 -0800 Received: from ml-host-33.caveonetworks.com (unknown [10.110.143.233]) by maili.marvell.com (Postfix) with ESMTP id 17D9A5B6937; Mon, 17 Jan 2022 05:30:27 -0800 (PST) From: Srikanth Yalavarthi To: Ray Kinsella CC: , , , "Srikanth Yalavarthi" Subject: [PATCH v2 1/1] eal: add internal function to get base address Date: Mon, 17 Jan 2022 05:30:23 -0800 Message-ID: <20220117133023.12768-1-syalavarthi@marvell.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-ORIG-GUID: JLGMqtBGYPiShlE-zHEqDC-872gprdli X-Proofpoint-GUID: JLGMqtBGYPiShlE-zHEqDC-872gprdli 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 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 Signed-off-by: Srikanth Yalavarthi --- v2: * Dropped Change-Id 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