2019-09-11 03:18:47 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2019 Intel Corporation
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2022-05-06 16:49:15 +08:00
|
|
|
#include <zephyr/kernel.h>
|
2019-09-11 03:18:47 +08:00
|
|
|
#include <string.h>
|
2022-05-06 16:49:15 +08:00
|
|
|
#include <zephyr/arch/x86/memmap.h>
|
|
|
|
#include <zephyr/linker/linker-defs.h>
|
2019-09-11 03:18:47 +08:00
|
|
|
#include <kernel_arch_data.h>
|
|
|
|
|
|
|
|
struct x86_memmap_exclusion x86_memmap_exclusions[] = {
|
2019-10-25 03:57:57 +08:00
|
|
|
#ifdef CONFIG_X86_64
|
2019-09-29 02:30:22 +08:00
|
|
|
{ "locore", _locore_start, _locore_end },
|
|
|
|
#endif
|
2020-09-23 07:41:11 +08:00
|
|
|
#ifdef CONFIG_XIP
|
2021-08-10 00:16:51 +08:00
|
|
|
{ "rom", __rom_region_start, __rom_region_end },
|
2020-09-23 07:41:11 +08:00
|
|
|
#endif
|
2019-09-11 03:18:47 +08:00
|
|
|
{ "ram", _image_ram_start, _image_ram_end },
|
|
|
|
#ifdef CONFIG_USERSPACE
|
|
|
|
{ "app_smem", _app_smem_start, _app_smem_end },
|
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_COVERAGE_GCOV
|
|
|
|
{ "gcov", __gcov_bss_start, __gcov_bss_end },
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
|
|
|
int x86_nr_memmap_exclusions = sizeof(x86_memmap_exclusions) /
|
|
|
|
sizeof(struct x86_memmap_exclusion);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The default map symbols are weak so that an application
|
|
|
|
* can override with a hardcoded manual map if desired.
|
|
|
|
*/
|
|
|
|
|
|
|
|
__weak enum x86_memmap_source x86_memmap_source = X86_MEMMAP_SOURCE_DEFAULT;
|
|
|
|
|
|
|
|
__weak struct x86_memmap_entry x86_memmap[CONFIG_X86_MEMMAP_ENTRIES] = {
|
|
|
|
{
|
2020-04-28 23:22:19 +08:00
|
|
|
DT_REG_ADDR(DT_CHOSEN(zephyr_sram)),
|
|
|
|
DT_REG_SIZE(DT_CHOSEN(zephyr_sram)),
|
2019-09-11 03:18:47 +08:00
|
|
|
X86_MEMMAP_ENTRY_RAM
|
|
|
|
}
|
|
|
|
};
|