-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arm64 kernelmode #277
Arm64 kernelmode #277
Commits on Sep 5, 2024
-
arm64_sync_exc: Use temporaries x9/x10 instead of x0/x1
Why? Because this allows optimizing the user system call path in such a way that the parameter registers don't have to be read from the saved integer register context when the system call is executed.
Configuration menu - View commit details
-
Copy full SHA for f54ddc7 - Browse repository at this point
Copy the full SHA f54ddc7View commit details -
arm64/barriers.h: Generalize barrier macros
Make it possible to define arguments for barriers
Configuration menu - View commit details
-
Copy full SHA for 9f6c2f9 - Browse repository at this point
Copy the full SHA 9f6c2f9View commit details -
arm64: Initial implementation of CONFIG_BUILD_KERNEL
This is the initial version for kernel mode build on the arm64 platform. It works much in the same way as the risc-v implementation so any highlights can be read from there. Features that have been tested working: - Creating address environments - Loading init (nsh) from elf file - Booting to nsh - Starting other processes from nsh - ostest runs to completion Features that are not tested / do not work: - SHM / shared memory support - Kernel memory mapping (MM_KMAP) - fork/vfork An example qemu target is provided as a separate patch: tools/configure.sh qemu-armv8a:knsh
Configuration menu - View commit details
-
Copy full SHA for 097f8b2 - Browse repository at this point
Copy the full SHA 097f8b2View commit details -
arm64/qemu: Add knsh target for armv8a qemu board
This adds a qemu test target for testing kernel mode with arm64
Configuration menu - View commit details
-
Copy full SHA for ea57681 - Browse repository at this point
Copy the full SHA ea57681View commit details -
imx9_usdhc.c: Fix build error when CONFIG_ARM64_DCACHE_DISABLE=y
priv->rxbuffer does not exist when CONFIG_ARM64_DCACHE_DISABLE=y so references to it will create a build error -> flag / remove accesses to it.
Configuration menu - View commit details
-
Copy full SHA for f41582a - Browse repository at this point
Copy the full SHA f41582aView commit details -
Configuration menu - View commit details
-
Copy full SHA for b129c9c - Browse repository at this point
Copy the full SHA b129c9cView commit details -
arm64_checkstack.c: Fix traversing of user stack when ARCH_ADDRENV=Y
Need to instantiate the correct address environment when reading from user stack, otherwise the result is very likely a crash
Configuration menu - View commit details
-
Copy full SHA for 495453a - Browse repository at this point
Copy the full SHA 495453aView commit details -
arch/arm64: Move ELF_64BIT selection to arch/Kconfig
Unify the elf file format for the whole arm64 architecture
Configuration menu - View commit details
-
Copy full SHA for 7d75861 - Browse repository at this point
Copy the full SHA 7d75861View commit details -
arch/arm64: make sure regs_context is aligned to 16
Signed-off-by: Xu Xingliang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a2fcbe1 - Browse repository at this point
Copy the full SHA a2fcbe1View commit details -
arch/arm64: add DSB ISB where necessary
Signed-off-by: Xu Xingliang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7c5ca60 - Browse repository at this point
Copy the full SHA 7c5ca60View commit details -
arm64_mmu: Add data synchronization barrier after page tables are wri…
…tten The page tables must be committed to system memory before we can proceed enabling the MMU. ISB() is not enough to do this.
Configuration menu - View commit details
-
Copy full SHA for 2d7bb51 - Browse repository at this point
Copy the full SHA 2d7bb51View commit details -
[REVERTME] arm64_addrenc.c: Add more heap, if TLS_ALIGNED is set
The TLS alignment requires more room in the stack, which means more _initial_ heap is required to accomodate the stack. Why 2x TLS_MAXSTACK ? No idea. This is a temporary fix, like the +1 page extra above.
Configuration menu - View commit details
-
Copy full SHA for 5b6c5fc - Browse repository at this point
Copy the full SHA 5b6c5fcView commit details
Commits on Sep 11, 2024
-
arm64_vector_table.S: Remove unnecessary instruction
The expression "sub x0, x0, #8 * XCPTCONTEXT_GP_REGS" is void, as the next instruction overwrites x0 anyway.
Configuration menu - View commit details
-
Copy full SHA for ddff6a6 - Browse repository at this point
Copy the full SHA ddff6a6View commit details -
arm64_addrenv.c: Flush kernel page table copy to user mappings
Make sure the user L1 page is updated to system memory when the kernel mappings are copied. Also, flush the I-cache when switching address environments.
Configuration menu - View commit details
-
Copy full SHA for e8145dd - Browse repository at this point
Copy the full SHA e8145ddView commit details -
arm64_mmu: Do not set accessed-flag for table descriptors
The 12:0 bits in table descriptors are RES0 and AF is the 10th bit, so it is not valid to set it in this case. Fix this by moving AF to the common MMU_MT_NORMAL_FLAGS field
Configuration menu - View commit details
-
Copy full SHA for 0f74990 - Browse repository at this point
Copy the full SHA 0f74990View commit details -
arm64_mmu: Fix TLBI instruction format
The vaddr field in TLBI means: Bits[55:12] of the virtual address to match. This basically means the page offset of the virtual address, so the input vaddr must be shifted to the page offset. Reference TLBI VALE1IS register description from ARMv8-A reference manual.
Configuration menu - View commit details
-
Copy full SHA for cc148b0 - Browse repository at this point
Copy the full SHA cc148b0View commit details -
arm64_mmu.c: Fix kernel L1 page table size
The kernel L1 page table must be at least 1 page
Configuration menu - View commit details
-
Copy full SHA for 8df8ed3 - Browse repository at this point
Copy the full SHA 8df8ed3View commit details -
arm64_mmu.h: Change ordering of access flags for user data
This makes it more readable, no functional changes
Configuration menu - View commit details
-
Copy full SHA for 79a8c60 - Browse repository at this point
Copy the full SHA 79a8c60View commit details -
arm64_addrenv_pgmap.c: Revoke user execution access to kernel mmap'd …
…pages Otherwise, user can run code from there
Configuration menu - View commit details
-
Copy full SHA for 77f0337 - Browse repository at this point
Copy the full SHA 77f0337View commit details -
arm64_syscall.c: Don't need to set register context during syscall
The register context is not needed, the original idea was to provide the user stack pointer for signal handler delivery, but the user stack can be obtained via sp_el0 so the context registers are not needed. SP0 is not stored upon exception entry anyways, so this code is just completely redundant and wrong.
Configuration menu - View commit details
-
Copy full SHA for 914004a - Browse repository at this point
Copy the full SHA 914004aView commit details -
arm64/crt0.c: Fix stack alignment when executing signal trampoline
The stack alignment requirement is 16-bytes, not 8-bytes.
Configuration menu - View commit details
-
Copy full SHA for 46a11c7 - Browse repository at this point
Copy the full SHA 46a11c7View commit details -
arm64/irq: Add mask for DAIF and SPSR DAIF bits
Use them for critical section handling, removes a bit of copy&pasted code behind CONFIG_ARM64_DECODEFIQ flag
Configuration menu - View commit details
-
Copy full SHA for 648c25d - Browse repository at this point
Copy the full SHA 648c25dView commit details -
arm64/syscall: (Re-)enable interrupts only if they were previously en…
…abled Don't change the CPU state unexpectedly
Configuration menu - View commit details
-
Copy full SHA for a6b43e6 - Browse repository at this point
Copy the full SHA a6b43e6View commit details -
arm64/task/pthread_start: Fix rare issue with context register location
There is a tiny possibility that when a process is started a trap is taken which causes a context switch. This moves the kernel stack unexpectedly and the task start logic no longer works. Fix this by recording the initial context location, and use that to trampoline into the user process with interrupts disabled. This ensures the context stays intact AND the kernel stack is fully unwound before the user process starts.
Configuration menu - View commit details
-
Copy full SHA for 33c1cdb - Browse repository at this point
Copy the full SHA 33c1cdbView commit details