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.
Add an architecture specific function which spins for a specific
number of CPU cycles. Currently implemented for ARM-M only.
Change-Id: Idbf2a83186cf5ffa239d644dc732fe3d419431c1
Signed-off-by: John Grossman <johngro@google.com>
Set SMP_CPU_CLUSTER_SHIFT to the number of bits needed within
each cluster.
All clusters except the last one, need to have the name number
of cpus to avoid gaps.
Also, add a SMP_CPU_ID_BITS variable and limit this to 8 bits
on the bcm2835 platform instead of ignoring cluster ids by default
on arm.
Change-Id: I1d0be1d9c99d5b85368ce71623e6e7d14fefd604
This implementation handles ARCH_MMU_FLAG_NS attribute only.
Enable pick spot support if support for non-secure memory
is required (WITH_NS_MAPPING make variable is set to true).
Change-Id: I8f575f36ba729dc148c6320a4e0bbb4c6eec14a4
-add hooks for weirdo bcm2836 interrupt controller
-remove the relaxed thread and mpidr register accessors (may be able to relax them again)
-deal with (or not) cpus with non zero cluster ids
Add kernel/vm code to handle memory management in large page-aligned
regions of virtual space. This is composed via a pmm (physical
memory manager) and vmm (virtual memory manager) and the architecturally
specific code to manage the mmu.
Add ARMv7 paging code.
-Have arch set the default optimization level. Most will use
O2, but arm-m sets to Os.
-Make the link time garbage collection be optional. Only set
for arm-m.
Add generic support for running systick in monotonic mode and providing
current_time() routines.
Platforms may choose not to use this, thus it is moved into an optional
module.
To be more consistent, rename make variable INCLUDES to GLOBAL_INCLUDES.
Also remove the need to put -I in front of each field, the make system
will do that for you.
To fix your module makefiles:
-Change INCLUDES -> GLOBAL_INCLUDES
-Remove -I prefix
Add rules for finding arm-linux-gnueabi toolchain and set no stack
protection.
When compiled under this toolchain, we get the following linking errors
in the final stage:
undefined reference to `__stack_chk_guard'
undefined reference to `__stack_chk_fail'
undefined reference to `__stack_chk_guard'
Stack protection is default on this toolchain but we don't need it.
Just a simple app that looks at push and add sp, #num lines to guess
the size of the function. Only tested against thumb2 code.
Generates build-*/lk.stack