1/* SPDX-License-Identifier: Apache-2.0 */ 2 3#if defined(CONFIG_NETWORKING) 4#ifndef NETWORK_RAM_SECTIONS 5#define NETWORK_RAM_SECTIONS \ 6 ITERABLE_SECTION_RAM(net_if, 4) \ 7 ITERABLE_SECTION_RAM(net_if_dev, 4) \ 8 ITERABLE_SECTION_RAM(net_l2, 4) \ 9 ITERABLE_SECTION_RAM(eth_bridge, 4) 10#endif 11#endif /* NETWORKING */ 12 13#if defined(CONFIG_GEN_SW_ISR_TABLE) && defined(CONFIG_DYNAMIC_INTERRUPTS) 14 SECTION_DATA_PROLOGUE(sw_isr_table,,) 15 { 16 /* 17 * Some arch requires an entry to be aligned to arch 18 * specific boundary for using double word load 19 * instruction. See include/sw_isr_table.h. 20 */ 21 . = ALIGN(CONFIG_ARCH_SW_ISR_TABLE_ALIGN); 22 *(_SW_ISR_TABLE_SECTION_SYMS) 23 } GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION) 24#endif 25 26 SECTION_DATA_PROLOGUE(device_states,,) 27 { 28 /* Device states used by the device objects. */ 29 __device_states_start = .; 30 KEEP(*(".z_devstate")); 31 KEEP(*(".z_devstate.*")); 32 __device_states_end = .; 33 } GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION) 34 35#if CONFIG_PM_DEVICE 36 SECTION_DATA_PROLOGUE(pm_device_slots, (NOLOAD),) 37 { 38 __pm_device_slots_start = .; 39 KEEP(*(".z_pm_device_slots")); 40 __pm_device_slots_end = .; 41 } GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION) 42#endif 43 44 SECTION_DATA_PROLOGUE(initshell,,) 45 { 46 /* link in shell initialization objects for all modules that 47 * use shell and their shell commands are automatically 48 * initialized by the kernel. 49 */ 50 __shell_module_start = .; 51 KEEP(*(".shell_module_*")); 52 __shell_module_end = .; 53 __shell_cmd_start = .; 54 KEEP(*(".shell_cmd_*")); 55 __shell_cmd_end = .; 56 } GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION) 57 58 SECTION_DATA_PROLOGUE(log_dynamic_sections,,) 59 { 60 __log_dynamic_start = .; 61 KEEP(*(SORT(.log_dynamic_*))); 62 __log_dynamic_end = .; 63 } GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION) 64 65 ITERABLE_SECTION_RAM(_static_thread_data, 4) 66 67#ifdef CONFIG_USERSPACE 68 /* All kernel objects within are assumed to be either completely 69 * initialized at build time, or initialized automatically at runtime 70 * via iteration before the POST_KERNEL phase. 71 * 72 * These two symbols only used by gen_kobject_list.py 73 */ 74 75 _static_kernel_objects_begin = .; 76#endif /* CONFIG_USERSPACE */ 77 78 ITERABLE_SECTION_RAM_GC_ALLOWED(k_timer, 4) 79 ITERABLE_SECTION_RAM_GC_ALLOWED(k_mem_slab, 4) 80 ITERABLE_SECTION_RAM_GC_ALLOWED(k_mem_pool, 4) 81 ITERABLE_SECTION_RAM_GC_ALLOWED(k_heap, 4) 82 ITERABLE_SECTION_RAM_GC_ALLOWED(k_mutex, 4) 83 ITERABLE_SECTION_RAM_GC_ALLOWED(k_stack, 4) 84 ITERABLE_SECTION_RAM_GC_ALLOWED(k_msgq, 4) 85 ITERABLE_SECTION_RAM_GC_ALLOWED(k_mbox, 4) 86 ITERABLE_SECTION_RAM_GC_ALLOWED(k_pipe, 4) 87 ITERABLE_SECTION_RAM_GC_ALLOWED(k_sem, 4) 88 ITERABLE_SECTION_RAM_GC_ALLOWED(k_queue, 4) 89 ITERABLE_SECTION_RAM_GC_ALLOWED(k_condvar, 4) 90 91 SECTION_DATA_PROLOGUE(_net_buf_pool_area,,SUBALIGN(4)) 92 { 93 _net_buf_pool_list = .; 94 KEEP(*(SORT_BY_NAME("._net_buf_pool.static.*"))) 95 } GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION) 96 97#if defined(CONFIG_NETWORKING) 98 NETWORK_RAM_SECTIONS 99#endif /* NETWORKING */ 100 101#if defined(CONFIG_UART_MUX) 102 SECTION_DATA_PROLOGUE(uart_mux,,SUBALIGN(4)) 103 { 104 __uart_mux_start = .; 105 *(".uart_mux.*") 106 KEEP(*(SORT_BY_NAME(".uart_mux.*"))) 107 __uart_mux_end = .; 108 } GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION) 109#endif 110 111#if defined(CONFIG_USB_DEVICE_STACK) 112 SECTION_DATA_PROLOGUE(usb_descriptor,,SUBALIGN(1)) 113 { 114 __usb_descriptor_start = .; 115 *(".usb.descriptor") 116 KEEP(*(SORT_BY_NAME(".usb.descriptor*"))) 117 __usb_descriptor_end = .; 118 } GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION) 119 120 SECTION_DATA_PROLOGUE(usb_data,,SUBALIGN(1)) 121 { 122 __usb_data_start = .; 123 *(".usb.data") 124 KEEP(*(SORT_BY_NAME(".usb.data*"))) 125 __usb_data_end = .; 126 } GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION) 127#endif /* CONFIG_USB_DEVICE_STACK */ 128 129#if defined(CONFIG_USB_DEVICE_BOS) 130 SECTION_DATA_PROLOGUE(usb_bos_desc,,SUBALIGN(1)) 131 { 132 __usb_bos_desc_start = .; 133 *(".usb.bos_desc") 134 KEEP(*(SORT_BY_NAME(".usb.bos_desc*"))) 135 __usb_bos_desc_end = .; 136 } GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION) 137#endif /* CONFIG_USB_DEVICE_BOS */ 138 139#ifdef CONFIG_USERSPACE 140 _static_kernel_objects_end = .; 141#endif 142