net: Introduce new NETWORK_RAM_SECTIONS() macro for common-ram.ld

This NETWORK_RAM_SECTIONS() macro can now be overridden (in board
specific linker.ld file) when one needs to force explicit placement
of network interface' related elements.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
This commit is contained in:
Lukasz Majewski 2021-03-30 12:25:26 +02:00 committed by Anas Nashif
commit f302be3e92

View file

@ -1,5 +1,14 @@
/* SPDX-License-Identifier: Apache-2.0 */
#if defined(CONFIG_NETWORKING)
#ifndef NETWORK_RAM_SECTIONS
#define NETWORK_RAM_SECTIONS \
Z_ITERABLE_SECTION_RAM(net_if, 4) \
Z_ITERABLE_SECTION_RAM(net_if_dev, 4) \
Z_ITERABLE_SECTION_RAM(net_l2, 4)
#endif
#endif /* NETWORKING */
#if defined(CONFIG_GEN_SW_ISR_TABLE) && defined(CONFIG_DYNAMIC_INTERRUPTS)
SECTION_DATA_PROLOGUE(sw_isr_table,,)
{
@ -82,9 +91,7 @@
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
#if defined(CONFIG_NETWORKING)
Z_ITERABLE_SECTION_RAM(net_if, 4)
Z_ITERABLE_SECTION_RAM(net_if_dev, 4)
Z_ITERABLE_SECTION_RAM(net_l2, 4)
NETWORK_RAM_SECTIONS
#endif /* NETWORKING */
#if defined(CONFIG_UART_MUX)