120 Commits

Author SHA1 Message Date
Travis Geiselbrecht
4ab14424bd [cppcheck] clean up a few suggestions from cppcheck 2015-11-24 15:08:38 -08:00
Carlos Pizano
614eaf166a [kernel][ports] Add basic ports functionality
Missing mostly more tests, specifically group tests.

BUG=none
R=travisg@google.com

Review URL: https://codereview.chromium.org/1437453002 .
2015-11-20 14:43:27 -08:00
Travis Geiselbrecht
09acdf8afe WIP arm-m fpu 2015-11-11 18:07:07 -08:00
Travis Geiselbrecht
6475660350 WIP checkpoint 2015-11-11 13:22:07 -08:00
Travis Geiselbrecht
420c557c6e WIP fpu bits 2015-11-09 16:30:16 -08:00
Zhu, Bing
b6647f5bef [arch][x86][fpu]Change naming convention for FPU flag
To align with lk/arm flag naming convention, FPU flag
ENABLE_FPU is changed to X86_WITH_FPU

Signed-off-by: Zhu, Bing <bing.zhu@intel.com>
2015-11-09 22:14:11 +08:00
Travis Geiselbrecht
2c52edce0b [app][tests] set ENABLE_FPU in arch/x86 targets, enable floating point tests 2015-10-27 13:19:07 -07: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
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
38f20ec0a1 [lib][console] add pointer type arg, switch some users to it.
Patch courtesy Erik Corry
2015-10-19 12:49:20 -07:00
Gurjant Kalsi
dc079d7327 [console][uart][shell] Created a crash-time shell and a polling based UART driver to use on panic. 2015-10-12 16:38:51 -07:00
Travis Geiselbrecht
7c62a4923f [app][tests] run float_tests on arm64 as well 2015-09-20 12:13:07 -07:00
Travis Geiselbrecht
69b092666b [app][tests] fix a warning and reformat a little 2015-09-10 12:11:34 -07:00
Carlos Pizano
14317c67b5 [app][tests] Make chache_tests take an optional address parameter.
Also reduce the last test from 16MB to 8MB, so it does not bomb on
some boards.
2015-09-08 18:24:48 -07:00
Travis Geiselbrecht
dd0045a5c8 [app][tests] allow mem_test to take a base pointer 2015-08-17 11:59:28 -07:00
Travis Geiselbrecht
440a1d50fe [app][tests][cache_test] fix the order of an error printf 2015-07-10 00:52:17 -07:00
Travis Geiselbrecht
781405aa87 [app][tests] add realtime arg to the spinner command
Change-Id: I07feb8c66de06fc99730b6795b0442dd9dd7b982
2015-05-29 15:27:58 -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
Travis Geiselbrecht
ab3e0c147a [app][tests] add a instruction multi issue test, clean up formatting 2015-04-18 14:51:53 -07:00
Travis Geiselbrecht
bf033f3bdf [app][tests] fix float_tests to not fail on bad memory access 2015-04-06 10:46:00 -07:00
Travis Geiselbrecht
9e06ed48f1 [app][tests] fix warning in mem_test 2015-04-03 20:39:40 -07:00
Travis Geiselbrecht
13f3a13f7d [app][tests] a few tweaks to some tests
-Add more interesting names to fibo threads
-Iterate a lot more on some of the thread tests (for faster cpus)
-Add spinner command that lets you add threads that spin forever
2015-03-10 16:43:55 -07:00
Travis Geiselbrecht
8fb2c54304 [kernel] remove critical_section, move everything to spinlocks 2015-03-10 16:43:54 -07:00
Travis Geiselbrecht
bf1d680063 [app][benchmark] slight cleanup 2015-03-10 16:42:53 -07:00
Travis Geiselbrecht
53e3d98e4d [app][tests] add quick spinlock test 2015-03-10 16:42:53 -07:00
Travis Geiselbrecht
2035d88315 [app][tests] add some test cases for thread_detach/thread_join behavior 2015-03-10 16:37:08 -07:00
Shreyas Nagaraj
2ff04720f7 [arch][x86-64] MMU fixes - arch_mmu_query, page walking, kernel ld script 2014-12-11 19:22:37 -08:00
Shreyas Nagaraj
e2a45c32b7 [arch][x86_64] more x86-64 MMU changes 2014-12-11 19:22:37 -08:00
Travis Geiselbrecht
29a3eb393e [libm] add ARM VFP versions of sqrt() routines
-VFP has a vsqrt instruction. Use it.
2014-11-18 10:43:40 -08:00
Travis Geiselbrecht
f75fe0b81b [app][tests] add new memory test
-Use the VMM to allocate a large chunk of uncached physical memory
-if no VMM, allocate from heap
-Do a simple own address test then a pattern and moving inversion test
2014-10-23 14:41:44 -07:00
Travis Geiselbrecht
9b7b6cdbf3 [app][tests] beef up the cache benchmark tests a little bit 2014-10-19 01:14:43 -07:00
Travis Geiselbrecht
3f7e6e5b9d [app][clock_tests] handle having current_time() divides round properly
This will probably break implementations that truncate round.
2014-09-29 16:37:54 -07:00
Travis Geiselbrecht
227c14cb6b [lib][libc] fix floating point printf for negatives 2014-09-09 13:37:30 -07:00
Travis Geiselbrecht
bba71af9ed [kernel] add real time flag for threads
Threads marked as real time do not have the preemption timer run against
them and will continue to run until they voluntarily yield or are
preempted by a higher priority thread from irq context.
2014-08-25 21:41:08 -07:00
Travis Geiselbrecht
30912e2f26 [app][tests] tests for floating point printf 2014-08-22 00:10:39 -07:00
Travis Geiselbrecht
afead3d125 [app][bench] add some quick n dirty sin/cos/sqrt benchmarks if libm is built 2014-08-20 17:42:06 -07:00
Chris Anderson
5bc6f97090 [kernel] Add resched option to sem_post 2014-07-24 17:10:02 -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
b0c5c4939d [app][tests] add tests for floating point 2014-06-11 15:01:49 -07:00
Travis Geiselbrecht
f18660a2f4 [app][tests] add quick n' dirty cache test routine 2014-06-03 21:18:09 -07:00
Travis Geiselbrecht
94920d35d1 [kernel] remove current_thread global, add get|set_current_thread() accessor
-Up to the architecture to implement the getter|setter
2014-05-03 23:58:44 -07:00
Travis Geiselbrecht
7e8770cf07 [app][fibo] print total time taken to run test 2014-05-01 19:06:57 -07:00
Travis Geiselbrecht
3b07685da8 [warnings] knock out some 64bit warnings 2014-03-11 21:04:55 -07:00
Dima Zavin
36c7735533 [libc][stdio] cleanup printf definition and clients
Move implementation to stdio.c to sit next to the other
stdio definitions that use the debug output functions. Keep
the declaration of it, though, in printf.h to sit next to
sprintf, etc.

Don't include printf.h directly in other places, rely on stdio.h
to properly pull in these functions.

Change-Id: I357cb04a5c78185b8fde908193b672326c2ee542
Signed-off-by: Dima Zavin <dima@android.com>
2013-08-05 10:04:29 -07:00
Dima Zavin
e8a9b4b7a4 [libc] move tracing out of debug into separate trace.h
Change-Id: I7476fc17b587a0ea2a42cbe3d49b72063e4c5dc8
Signed-off-by: Dima Zavin <dima@android.com>
2013-08-05 10:04:29 -07:00
Travis Geiselbrecht
2ae06216b1 [libc] fix printf edge case with signed leading digits
Fixes specific case as in printf("%03d\n", -2), which
would put the sign digit after the leading zeros.

Make sure the sign bits are before any leading zeros or spaces.

Add test case for this.
2013-07-31 11:16:01 -07:00
Travis Geiselbrecht
7643bc28c3 [make] add -Wstrict-prototypes and clean up old C style prototypes
replace all built versions of foo(); with foo(void);
2013-06-19 14:21:53 -07:00
Travis Geiselbrecht
e002c58b59 [make] rename INCLUDES -> GLOBAL_INCLUDES
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
2013-06-07 22:26:06 -07:00
Travis Geiselbrecht
5e87468584 [app][thread_tests] add a few tests for the static initializers 2013-05-25 11:35:07 -07:00
Travis Geiselbrecht
2760f146f5 [app][tests] disable printf formatting warnings for printf test 2013-05-24 20:52:16 -07:00