This allows for individual modules to extend the main linker script,
primarily to add their own sections to interate over.
Remove the main shared_* linker scripts.
This picks up the major work of allowing multiple heap implementations
and enable dlmalloc as an alternate heap to the simple existing one
(now called 'miniheap').
Also added a novm page allocator for memory management on systems too small
or missing an mmu to have a vm. Not much more than a simple bitmap allocator
that the heap pulls from. Allows for other heaps and/or users of physical
memory to coexist and span multiple banks of memory.
If a make variable was modified in a way that would cause the linker
script to need to be regenerated on arches that use generated linker
scripts, make sure we get a fresh copy.
Reuse the same generate-then-replace logic that goes into config.h
files.
Flatten a level by moving malloc/free/new and friends into lib/heap.
Punch realloc and a few others directly through into the underlying
heap implementation. Remove heap_alloc and heap_free entirely.
If the fpu/simd registers on this cpu were last used by the current
thread and the current thread last used the fpu/simd register on the
current cpu, then the load can be skipped.
We still always save the state, to avoid a situation where a cpu wants
to run a thread where the fpu/simd register state for that thread is
only available in the registers of another cpu.
Change-Id: I062aa0792180b9ec08a5dd95b5f4f6ba165167e1
If ARCH_arm_TOOLCHAIN_PREFIX was set then by default the makefile would
not set FOUNDTOOL and error out on build claiming no toolchain was found.
This change simply adds a check for gcc in the case that
ARCH_arm_TOOLCHAIN_PREFIX exists.
Kernel code and rodata sections are now read-only.
Sections and mappings other than kernel code section are
privileged-execute-never.
All mappings are user-execute-never.
Code assumes kernel text section is at start of ram, followed by
rodata then data/bss/free-memory.
Change-Id: I96e27f9a8844594da5e9d033759b90e47adb667f
Update header file to define missing access permission flags for
privileged read-only with unprivileged read-only or unprivileged
no-access.
Also mark P_RW_U_RO masks as obsolete as they are not compatible
with using AP0 as an access flag.
Change-Id: I51504481514ce5344f96f77fcc2cde28c99f825f
When query small page we should check MMU_MEMORY_L1_PAGETABLE_NON_SECURE
bit in order to determine if we have non-secure memory.
Change-Id: I59e633b986a50c44e417d17b59bb9cd7eeb20612
Allows executing an instruction with a custom fault recovery handler.
Can be used with Load/Store Unprivileged to safely access user-space
memory.
Change-Id: Ic617ece7bf5c2440c257b462af8983dde42e5408
The exception handling code now uses the svc stack pointer, so set the
stack pointer for other modes to 0 to reduce the chance of stack
corruption.
Change-Id: Ic69a9dc15ba9291cbb23ff264112e35126266767
Save state on current svc stack pointer instead of using a separate
pointer into the same stack. Also allocate space for and save lr
(it was already restored).
Change-Id: I235448c8bc3ced877e2ce5b34c3f3519266f32a7
Allows executing an instruction with a custom fault recovery handler.
Can be used with Load/Store Unprivileged to safely access user-space
memory.
Change-Id: If5390de06182e4d0409b30a8e6a1b93b7acc77b6
Use the reserved cortex-m vectors 8 and 9 for a magic cookie and
pointer to a debugger info structure. This structure contains
pointers to the threadlist, the current thread pointer, and
offsets to important members of the thread structure. With
this information, an attached debugger can walk the threadlist
and obtain state, name, registers, etc for each thread.
Use global define WITH_DEBUGGER_INFO to enable this.