nvethernetrm: Convert OSI core as a static library

Issue:
OSI core needs to be converted as
a static library for the HVRTOS server.

Fix:
Convert OSI core as a static library.

Bug 3691486

Change-Id: Ie1f7fc0c3a722cb7ddab24da8488904ead80ecc4
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2794675
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Mohan Thadikamalla
2022-10-19 13:21:17 +05:30
committed by Bhadram Varka
parent 9dea491138
commit ae9837f68e
7 changed files with 9 additions and 148 deletions

View File

@@ -24,17 +24,12 @@
# #
############################################################################### ###############################################################################
ifdef NV_INTERFACE_FLAG_SHARED_LIBRARY_SECTION ifdef NV_INTERFACE_FLAG_STATIC_LIBRARY_SECTION
NV_INTERFACE_NAME := nvethernetrm NV_COMPONENT_NAME := nvethernetrm
ifeq ($(NV_BUILD_CONFIGURATION_IS_SAFETY),0) NV_INTERFACE_COMPONENT_DIR := .
NV_INTERFACE_EXPORTS := lib$(NV_INTERFACE_NAME)_debug
else
NV_INTERFACE_EXPORTS := lib$(NV_INTERFACE_NAME)
endif
NV_INTERFACE_PUBLIC_INCLUDES := \ NV_INTERFACE_PUBLIC_INCLUDES := \
./include ./include
endif endif
# Local Variables: # Local Variables:
# indent-tabs-mode: t # indent-tabs-mode: t
# tab-width: 8 # tab-width: 8

View File

@@ -1,43 +0,0 @@
# Copyright (c) 2020-2022 NVIDIA CORPORATION. All Rights Reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
include $(PDK_TOP)/drive-t186ref-qnx/make/nvdefs.mk
TARGETS = libnvethernetrm.so
CFLAGS += -g -Wall $(NV_PLATFORM_OPT) $(NV_PLATFORM_CFLAGS)
CPPFLAGS = $(NV_PLATFORM_SDK_INC) $(NV_PLATFORM_CPPFLAGS) -I../../../include -I../dma -I../common/include
CPPFLAGS += -DNV_IS_SAFETY=$(NV_PLATFORM_SAFETY)
LDFLAGS := \
$(NV_PLATFORM_SDK_LIB) \
$(NV_PLATFORM_LDFLAGS)
LDFLAGS += -shared
OBJS := eqos_core.o
OBJS += eqos_mmc.o
OBJS += osi_core.o
OBJS += vlan_filter.o
OBJS += frp.o
OBJS += mgbe_core.o
OBJS += xpcs.o
OBJS += mgbe_mmc.o
OBJS += osi_hal.o
OBJS += ivc_core.o
OBJS += ./../common/osi_common.o
OBJS += ./../common/eqos_common.o
OBJS += ./../common/mgbe_common.o
OBJS += core_common.o
CFLAGS += -D_FILE_OFFSET_BITS=64
$(TARGETS): $(OBJS)
$(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
$(STRIP) --strip-unneeded -R .comment -R .GCC.command.line $@
clean clobber:
rm -rf $(OBJS) $(TARGETS)

View File

@@ -22,7 +22,7 @@
# #
############################################################################### ###############################################################################
ifdef NV_COMPONENT_FLAG_SHARED_LIBRARY_SECTION ifdef NV_COMPONENT_FLAG_STATIC_LIBRARY_SECTION
include $(NV_BUILD_START_COMPONENT) include $(NV_BUILD_START_COMPONENT)
NV_COMPONENT_STRICT_WARNINGS_qnx_64 := 1 NV_COMPONENT_STRICT_WARNINGS_qnx_64 := 1
@@ -68,7 +68,7 @@ NV_COMPONENT_INCLUDES := \
$(NV_SOURCE)/nvethernetrm/include \ $(NV_SOURCE)/nvethernetrm/include \
$(NV_SOURCE)/nvethernetrm/osi/common/include $(NV_SOURCE)/nvethernetrm/osi/common/include
include $(NV_BUILD_SHARED_LIBRARY) include $(NV_BUILD_STATIC_LIBRARY)
endif endif
# Local Variables: # Local Variables:

View File

@@ -35,7 +35,7 @@ static void core_dump_struct(struct osi_core_priv_data *osi_core,
nveu8_t *ptr, nveu8_t *ptr,
unsigned long size) unsigned long size)
{ {
nveu32_t i = 0, rem, j; nveu32_t i = 0, rem, j = 0;
unsigned long temp; unsigned long temp;
if (ptr == OSI_NULL) { if (ptr == OSI_NULL) {

View File

@@ -1,44 +0,0 @@
################################### tell Emacs this is a -*- makefile-gmake -*-
#
# Copyright (c) 2019-2022, NVIDIA CORPORATION. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
# libnvethernetrm interface export
#
###############################################################################
osi_init_core_ops
osi_write_phy_reg
osi_read_phy_reg
osi_hw_core_init
osi_hw_core_deinit
osi_get_core
osi_handle_ioctl
osi_macsec_en
osi_macsec_deinit
osi_macsec_isr
osi_macsec_init
osi_macsec_cipher_config
osi_macsec_config
osi_init_macsec_ops
osi_macsec_read_mmc
osi_macsec_config_lut
osi_macsec_get_sc_lut_key_index
# Enable below if MACSEC_KEY_PROGRAM is enabled
#osi_macsec_kt_config

View File

@@ -1,47 +0,0 @@
################################### tell Emacs this is a -*- makefile-gmake -*-
#
# Copyright (c) 2019-2022, NVIDIA CORPORATION. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
# libnvethernetrm interface export
#
###############################################################################
osi_init_core_ops
osi_write_phy_reg
osi_read_phy_reg
osi_hw_core_init
osi_hw_core_deinit
osi_get_core
osi_handle_ioctl
osi_macsec_en
osi_macsec_deinit
osi_macsec_isr
osi_macsec_init
osi_macsec_cipher_config
osi_macsec_config
osi_init_macsec_ops
osi_macsec_loopback
osi_macsec_read_mmc
osi_macsec_dbg_events_config
osi_macsec_config_dbg_buf
osi_macsec_config_lut
osi_macsec_get_sc_lut_key_index
# Enable below if MACSEC_KEY_PROGRAM is enabled
#osi_macsec_kt_config

View File

@@ -35,7 +35,7 @@ static void dump_struct(struct osi_dma_priv_data *osi_dma,
unsigned char *ptr, unsigned char *ptr,
unsigned long size) unsigned long size)
{ {
nveu32_t i = 0, rem, j; nveu32_t i = 0, rem, j = 0;
unsigned long temp; unsigned long temp;
if (ptr == OSI_NULL) { if (ptr == OSI_NULL) {
@@ -205,9 +205,9 @@ static void tx_desc_dump(struct osi_dma_priv_data *osi_dma, unsigned int f_idx,
int cnt; int cnt;
if (f_idx > l_idx) { if (f_idx > l_idx) {
cnt = l_idx + osi_dma->tx_ring_sz - f_idx; cnt = (int)(l_idx + osi_dma->tx_ring_sz - f_idx);
} else { } else {
cnt = l_idx - f_idx; cnt = (int)(l_idx - f_idx);
} }
for (i = f_idx; cnt >= 0; cnt--) { for (i = f_idx; cnt >= 0; cnt--) {