2019-03-20 20:04:45 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2019 Nordic Semiconductor ASA
|
|
|
|
* Copyright (c) 2019 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Copied from linker.ld */
|
|
|
|
|
2024-08-13 18:09:07 +08:00
|
|
|
#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_nocache_ram), okay)
|
|
|
|
#define NOCACHE_REGION LINKER_DT_NODE_REGION_NAME_TOKEN(DT_CHOSEN(zephyr_nocache_ram))
|
|
|
|
#else
|
|
|
|
#define NOCACHE_REGION RAMABLE_REGION
|
|
|
|
#endif
|
|
|
|
|
2019-03-20 20:04:45 +08:00
|
|
|
/* Non-cached region of RAM */
|
2019-06-19 16:53:47 +08:00
|
|
|
SECTION_DATA_PROLOGUE(_NOCACHE_SECTION_NAME,(NOLOAD),)
|
2019-03-20 20:04:45 +08:00
|
|
|
{
|
2021-10-15 17:21:32 +08:00
|
|
|
#if defined(CONFIG_MMU)
|
|
|
|
MMU_ALIGN;
|
|
|
|
#else
|
2019-03-20 20:04:45 +08:00
|
|
|
MPU_ALIGN(_nocache_ram_size);
|
2021-10-15 17:21:32 +08:00
|
|
|
#endif
|
2019-03-20 20:04:45 +08:00
|
|
|
_nocache_ram_start = .;
|
|
|
|
*(.nocache)
|
|
|
|
*(".nocache.*")
|
2022-08-23 00:05:04 +08:00
|
|
|
|
|
|
|
#include <snippets-nocache-section.ld>
|
|
|
|
|
2021-10-15 17:21:32 +08:00
|
|
|
#if defined(CONFIG_MMU)
|
|
|
|
MMU_ALIGN;
|
|
|
|
#else
|
2019-03-20 20:04:45 +08:00
|
|
|
MPU_ALIGN(_nocache_ram_size);
|
2021-10-15 17:21:32 +08:00
|
|
|
#endif
|
2019-03-20 20:04:45 +08:00
|
|
|
_nocache_ram_end = .;
|
2024-08-13 18:09:07 +08:00
|
|
|
} GROUP_DATA_LINK_IN(NOCACHE_REGION, NOCACHE_REGION)
|
2019-03-20 20:04:45 +08:00
|
|
|
_nocache_ram_size = _nocache_ram_end - _nocache_ram_start;
|