Revert "kernel: add page frame management"

This reverts commit 2ca5fb7e06.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2021-01-22 07:37:41 -05:00
commit 8e84eaf73e
6 changed files with 99 additions and 579 deletions

View file

@ -9,16 +9,14 @@
#define ROMABLE_REGION RAM
#define RAMABLE_REGION RAM
#define MMU_PAGE_ALIGN . = ALIGN(CONFIG_MMU_PAGE_SIZE);
/* Used to align areas with separate memory permission characteristics
* so that the page permissions can be set in the MMU. Without this,
* the kernel is just one blob with the same RWX permissions on all RAM
*/
#ifdef CONFIG_SRAM_REGION_PERMISSIONS
#define MMU_PAGE_ALIGN_PERM MMU_PAGE_ALIGN
#define MMU_PAGE_ALIGN . = ALIGN(CONFIG_MMU_PAGE_SIZE);
#else
#define MMU_PAGE_ALIGN_PERM
#define MMU_PAGE_ALIGN
#endif
ENTRY(CONFIG_KERNEL_ENTRY)
@ -36,12 +34,12 @@ SECTIONS
_locore_start = .;
*(.locore)
*(.locore.*)
MMU_PAGE_ALIGN_PERM
MMU_PAGE_ALIGN
_locore_end = .;
_lorodata_start = .;
*(.lorodata)
MMU_PAGE_ALIGN_PERM
MMU_PAGE_ALIGN
_lodata_start = .;
*(.lodata)
@ -56,7 +54,7 @@ SECTIONS
* On x86-64 the IDT is in rodata and doesn't need to be in the
* trampoline page.
*/
MMU_PAGE_ALIGN_PERM
MMU_PAGE_ALIGN
z_shared_kernel_page_start = .;
#endif /* CONFIG_X86_KPTI */
@ -65,7 +63,7 @@ SECTIONS
#ifdef CONFIG_X86_KPTI
*(.trampolines)
MMU_PAGE_ALIGN_PERM
MMU_PAGE_ALIGN
z_shared_kernel_page_end = .;
ASSERT(z_shared_kernel_page_end - z_shared_kernel_page_start == 4096,
@ -95,7 +93,7 @@ SECTIONS
#include <linker/kobject-text.ld>
MMU_PAGE_ALIGN_PERM
MMU_PAGE_ALIGN
} GROUP_LINK_IN(ROMABLE_REGION)
_image_text_end = .;
@ -125,15 +123,15 @@ SECTIONS
#include <linker/cplusplus-rom.ld>
MMU_PAGE_ALIGN_PERM
MMU_PAGE_ALIGN
_image_rodata_end = .;
_image_rodata_size = _image_rodata_end - _image_rodata_start;
_image_rom_end = .;
#ifdef CONFIG_USERSPACE
/* APP SHARED MEMORY REGION */
#define SMEM_PARTITION_ALIGN(size) MMU_PAGE_ALIGN_PERM
#define APP_SHARED_ALIGN MMU_PAGE_ALIGN_PERM
#define SMEM_PARTITION_ALIGN(size) MMU_PAGE_ALIGN
#define APP_SHARED_ALIGN MMU_PAGE_ALIGN
#include <app_smem.ld>
@ -150,7 +148,7 @@ SECTIONS
SECTION_PROLOGUE(_BSS_SECTION_NAME, (NOLOAD), ALIGN(16))
{
MMU_PAGE_ALIGN_PERM
MMU_PAGE_ALIGN
#ifndef CONFIG_USERSPACE
_image_ram_start = .;
#endif
@ -182,7 +180,7 @@ SECTIONS
/* Must be last in RAM */
#include <linker/kobject.ld>
MMU_PAGE_ALIGN
. = ALIGN(CONFIG_MMU_PAGE_SIZE);
_image_ram_end = .;
z_mapped_end = .;
_end = .;