From 6f6166369567a3df7274629a7c15b9c5b6bd0e3e Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Fri, 22 Jan 2021 07:37:46 -0500 Subject: [PATCH] Revert "arch: add KERNEL_VM_OFFSET" This reverts commit fd2434edbdd5cd097861f612aa68de0c760d92d7. Signed-off-by: Anas Nashif --- arch/Kconfig | 20 -------------------- arch/x86/include/x86_mmu.h | 5 ++--- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index 5d099b993c9..81918352ea6 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -577,26 +577,6 @@ config KERNEL_RAM_SIZE address space, and that these RAM mappings are all within the virtual region [KERNEL_VM_BASE..KERNEL_VM_BASE + KERNEL_RAM_SIZE). -config KERNEL_VM_OFFSET - hex "Kernel offset within address space" - default 0 - help - Offset that the kernel image begins within its address space, - if this is not the same offset from the beginning of RAM. - - Some care may need to be taken in selecting this value. In certain - build-time cases, or when a physical address cannot be looked up - in page tables, the equation: - - virt = phys + ((KERNEL_VM_BASE + KERNEL_VM_OFFSET) - - SRAM_BASE_ADDRESS) - - Will be used to convert between physical and virtual addresses for - memory that is mapped at boot. - - This uncommon and is only necessary if the beginning of VM and - physical memory have dissimilar alignment. - config KERNEL_VM_SIZE hex "Size of kernel address space in bytes" default 0xC0000000 diff --git a/arch/x86/include/x86_mmu.h b/arch/x86/include/x86_mmu.h index 52084858ec8..c4c80753838 100644 --- a/arch/x86/include/x86_mmu.h +++ b/arch/x86/include/x86_mmu.h @@ -81,10 +81,9 @@ * walking and creating page tables. */ #ifdef CONFIG_MMU -#define Z_X86_VIRT_OFFSET ((CONFIG_KERNEL_VM_BASE + CONFIG_KERNEL_VM_OFFSET) - \ - CONFIG_SRAM_BASE_ADDRESS) +#define Z_X86_VIRT_OFFSET (CONFIG_KERNEL_VM_BASE - CONFIG_SRAM_BASE_ADDRESS) #else -#define Z_X86_VIRT_OFFSET 0 +#define Z_X86_VIRT_OFFSET 0 #endif /* ASM code */