Commit Graph

85 Commits

Author SHA1 Message Date
Travis Geiselbrecht
1a761abb83 [arch][arm] Add support for float/nofloat compile options
Was already added to arm64, but arch/arm hadn't picked up this feature
yet. Uncovered a few places here or there that wasn't marking code as
float/no-float, but this fixes a problem where newer compilers are
starting to sneak in vector code because they can.

Issue #406
2024-05-14 00:57:19 -07:00
Aaron Odell
431e409c78 [arch][arm-m] Add Cortex M55 support
Add the Cortex M55 as a supported target.
2023-04-23 17:37:18 -07:00
Travis Geiselbrecht
7102838b49 [arch] have each arch define ARCH_HAS_MMU
This lets some code decide whether or not there's any mmu
present to use. Also kernel VM will complain if it isn't set
as an extra safety.
2021-03-30 02:48:59 -07:00
Travis Geiselbrecht
e231864e12 [arch][arm-m] disable -mthumb-interwork for cortex-m targets
If the cpu is always in thumb mode there's really no reason to pass
this switch and it can and does foul up libgcc selection.

Possible it can be removed entirely since the build system doesn't
really support anything prior to armv7 or armv6 where thumb interwork
became implicit. Unclear if it'll cause linking issues to not have it
set, however.
2021-02-06 17:32:13 -08:00
Michael Bishop
71687b4cbf [arch][arm] fix booting when in HYP mode 2020-10-10 00:58:38 -07:00
Travis Geiselbrecht
6e0762fb53 [arch][arm] remove some old dead code for pre armv6 compiles
Haven't built for a pre-armv6 or v6 + thumb machine in a long time and
the effort needed to maintain that is not really worth it. Officially
remove the old support code.
2020-05-16 15:07:55 -07:00
Travis Geiselbrecht
d0f1944038 [arch] define the atomic routines in arch-neutral headers and use builtins
Generally move most arches over to using the builtin atomics except for
the few that still require a little bit of work.
2020-05-16 14:29:21 -07:00
Venkatesh Srinivas
128890f8a8 [platform][tms570-launchpad] Skeleton of port to TI LaunchXL2-TMS57012
* Adds target tms570-launchpad, for TI TMS570 Launchpad Dev Kit
(https://www.ti.com/store/ti/en/p/product/?p=LAUNCHXL2-TMS57012)

* Adds CPU definitions for Cortex R4F (BE) CPU, implementing
  ARMv7-R ISA. Does not yet add definitions for ARMv7 arch entry
  functions.

* Board does not yet build - platform.c/uart.c are empty, no GIC
  entry points provided.
2019-11-18 15:36:28 -08:00
Travis Geiselbrecht
39d02cf01f [build][arch][arm] squelch additional LIBGCC and compile flags echoing
Already printed elsewhere, quiet down the build a bit.
2019-03-23 09:57:19 -07:00
Travis Geiselbrecht
a53ce0c42c [arch][arm] move -Mreg-names-raw behind an arch specific flag 2019-02-17 20:27:54 -08:00
Travis Geiselbrecht
5d43aa25eb [arch][rules] create ARCH_LDFLAGS and clean up all the arch rules files to consistently use ARCH_* vars 2018-11-30 22:00:45 -08:00
Travis Geiselbrecht
8550876169 [arch][arm] try to appropriately use __FPU_PRESENT and __FPU_USED
__FPU_PRESENT is set by platform specific cmsis headers
__FPU_USED is set in the cmsis header if __FPU_PRESENT is 1 and the compiler has been
invoked with code to use the fpu.
2016-03-28 22:19:23 -07:00
Travis Geiselbrecht
8c506eba61 [arch][arm] fix up the cortex-m fpu code to build again on all three combinations of arch/fpu
cortex-m0 with no fpu and limited instructions
cortex-m3+ with no fpu
cortex-m4/m7 with fpu

Untested if this still works.
2016-03-28 19:57:17 -07:00
Travis Geiselbrecht
f92aad2622 [merge] merge master into the cortex-m fpu working branch 2016-03-28 19:09:40 -07:00
Travis Geiselbrecht
171d14c751 [arch][arm] move CMSIS into external/ 2016-02-20 11:31:51 -08:00
nqbit
dd8dd061b8 [arch][arm] changes to support cortex-m0plus architecture 2016-01-18 11:07:31 -08:00
Eric Holland
3d7e1f4968 [arch][arm] changes to support cortex-m0 architecture 2016-01-17 17:35:06 -08:00
Travis Geiselbrecht
b822b1f64f [arch][arm] fix the stack usage script to take pre-c++ unmangled dissassembly
The unmangled dissassembly was fouling up the symbol matcher regular expression.
Easier to just process manged symbols and unmangle it later.
2015-11-13 13:20:13 -08:00
Travis Geiselbrecht
420c557c6e WIP fpu bits 2015-11-09 16:30:16 -08:00
Travis Geiselbrecht
121d0b603b [arch] tighten up linker scripts to make sure the section sentinels cover just what they need 2015-11-06 19:32:51 -08:00
Travis Geiselbrecht
35ebee0e40 [merge] branch 'heapswitch'
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.
2015-10-20 16:53:00 -07:00
Travis Geiselbrecht
88d0001cdc [arch][arm] add lk.elf.stack to the generated list so it gets removed in the clean target 2015-10-19 19:47:29 -07:00
Travis Geiselbrecht
e58d0759ec [arch][multiple] finally solve the linker-script-not-updated problem
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.
2015-10-19 19:43:31 -07:00
Travis Geiselbrecht
3b2d7a268b [make] remove the need for a module to manually add $(LOCAL_DIR)/include to the global include path
Pretty much every module in the system was already doing it, so do it
automatically.
2015-10-19 19:07:16 -07:00
Travis Geiselbrecht
7c09e82033 [make] make sure MEMBASE and MEMSIZE are always set exactly once 2015-10-15 17:22:16 -07:00
Travis Geiselbrecht
4bade47a7e [platform][armemu] add support for a fake armemu cpu
For the moment fix it as a armv7-a cpu with no mmu and no thumb.
2015-08-31 22:02:57 -07:00
Travis Geiselbrecht
4a5f8667bd [arch][arm] allow building with the KERNEL_VM and ARM_WITH_MMU turned off 2015-08-31 22:02:57 -07:00
Travis Geiselbrecht
b1024ec276 [arch][arm-m] add cache flush routines for cortex-m cpus that support it 2015-08-21 11:33:05 -07:00
Travis Geiselbrecht
88c923d88f [arch][arm-m] add support for m7 cache, add memory barrier in systick driver
The memory barrier is needed to order the reading of the val register to ensure
it is read properly on M7 cores.
2015-07-10 00:50:05 -07:00
Travis Geiselbrecht
d8ee04f2bf [arch][arm] initial support for cortex-m7 2015-07-08 02:24:59 -07:00
Travis Geiselbrecht
96ba54f187 [merge] merge back from smp branch 2015-05-28 12:52:41 -07:00
John Grossman
5f804f25fc [lk][arch] Add spin_cycles
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>
2015-05-19 16:28:07 -07:00
Arve Hjønnevåg
2c9c5959e7 Merge branch 'master' of https://github.com/travisg/lk into smp
Change-Id: Iecb11d57b6f089234c0826932bdb229588939750
2015-05-18 16:49:37 -07:00
Arve Hjønnevåg
8f0d310616 [arch][arm/arm64] Support systems with mutiple clusters
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
2015-05-13 20:20:39 -07:00
Travis Geiselbrecht
79e69c75e1 [arch][arm] implement a few arm DCC accessor routines
DCC is a 32bit read/write fifo for communication with a jtag
based host.

Change-Id: Ied343562f51949731f33b9ac2281632d22eab03c
2015-04-27 16:29:45 -07:00
Travis Geiselbrecht
646006acec [arch][arm] add fpu support to cortex-a7 make file 2015-04-18 14:25:26 -07:00
Travis Geiselbrecht
8eb710ec4f [arch][arm] remove dcc.S from the build
Was accidentally deleted in previous change, but was unused anyway,
2015-04-07 12:38:24 -07:00
Michael Ryleev
953dfdf72e [arch][arm][arm][mmu] Implement arch_mmu_pick_spot routine
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
2015-03-19 18:01:13 -07:00
Michael Ryleev
d5e602de06 [arch][arm] Add an option to compile without vfp support for cortex-a15
If ARM_WITHOUT_VFP_NEON is set to 'true' compile without VFP or NEON support.

Change-Id: Iff8abfe1a89f7b50a11528aa0af7ee6a115cd8dd
2015-03-19 18:01:10 -07:00
Michael Ryleev
75066f7050 [arch][arm] Cumulative support for building binaries with multiple toolchains
Change-Id: I5559eb41ecaa631d09e9ddaa952281002ee58306
2015-03-19 18:01:10 -07:00
Arve Hjønnevåg
3d5a0da377 [arm] Cortex-A15 support
Change-Id: Icb8779e485e876080dd76961e88a618afa722171
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2015-03-19 18:01:09 -07:00
Arve Hjønnevåg
a45b5e15bc [arch][arm] Allow custom SMP_MAX_CPUS values.
Change-Id: I8485fe8fbabd09c3f1e664d5b8a06f630371b346
2015-03-11 19:57:16 -07:00
Travis Geiselbrecht
bd4e7a9b7d [arch][arm] add support for cortex-a7 SMP
-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
2015-03-10 16:43:55 -07:00
Travis Geiselbrecht
e2f65c93cf [arch][arm-m] fix arm-m after SMP changes 2015-03-10 16:43:55 -07:00
Travis Geiselbrecht
a6f4e6ff15 [arch][arm] add ARM SMP support
-Also adds support to the following ARM-related drivers:
    dev/cache/pl310
    dev/interrupt/arm_gic
    dev/timer/arm_cortex_a9
2015-03-10 16:43:55 -07:00
Travis Geiselbrecht
17b1d8772c [arch][arm] turn on linker GC for big arm by default 2014-10-23 13:22:34 -07:00
Travis Geiselbrecht
cb41b90187 [vm] allow config space to set kernel address space size, ARM sets to top 3GB 2014-07-24 15:26:34 -07:00
Travis Geiselbrecht
503f30f685 Merge remote-tracking branch 'github/vm'
Conflicts:
	platform/vexpress-a9/include/platform/vexpress-a9.h
	platform/zynq/rules.mk
2014-07-24 01:29:43 -07:00
Travis Geiselbrecht
4d011b03b1 [arch][arm] fix floating point test code on thumb2 only devices 2014-07-14 17:33:07 -07:00
Travis Geiselbrecht
986d1590cb [kernel][vm] first stab at a virtual memory manager
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.
2014-07-11 18:06:37 -07:00