41 Commits

Author SHA1 Message Date
Travis Geiselbrecht
f7d8e2300c [warnings] add -Wshadow which helps detect local variables that override globals
Nothing particularly bad showed up but cleaned up a bit of code.
2020-07-25 16:49:25 -07:00
Travis Geiselbrecht
3aecdda231 [includes] replace header guards with #pragma once 2019-07-13 15:46:16 -07:00
Travis Geiselbrecht
cba9e47987 [license] replace the longer full MIT license with a shorter one
Used scripts/replacelic. Everything seems to build fine.
2019-07-05 17:22:23 -07:00
Travis Geiselbrecht
d8fa82cb91 [formatting] run everything through codestyle
Almost nothing changes here except moving braces to the same line as the
function declaration. Everything else is largely whitespace changes and
a few dangling files with tab indents.

See scripts/codestyle
2019-06-19 21:02:24 -07:00
Travis Geiselbrecht
1b7a28efb8 [include][lk] fixup lk/ include path move 2019-06-19 19:46:11 -07:00
cstout
0f0b4959ad Stub display_present
R=gkalsi@google.com

Review URL: https://codereview.chromium.org/1951403002 .
2016-05-05 12:54:06 -07:00
cstout
c1255f7f47 [display] Refactor to avoid implicit framebuffer allocation.
Preparation to allow other images to be presented to the display.
Separate definitions of display and image formats.
display_get_info no longer provides a framebuffer.
display_get_framebuffer allocates a framebuffer for convenience.

Review URL: https://codereview.chromium.org/1777783003 .
2016-03-10 09:49:22 -08:00
Travis Geiselbrecht
2eb32a4369 [style] mass reformat all the non external code to 4 space indents
Ran everything through scripts/codestyle.space, which uses astyle
to generally follow K&R style.

Biggest non whitespace change is pulling brackets down on function
declarations, which I'm pretty ambivalent about, but astyle insists
on taking a stance
2016-02-14 12:24:01 -08:00
Gurjant Kalsi
7e0a4d3f90 [bio] Add a flag that allows devices to declare that they only deal with cache aligned blocks of memory 2015-11-04 17:18:15 -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
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
c7ce0b9361 [lib][display] update display_get_info to return success/failure
Update all the users to check for error.
2015-10-08 15:54:40 -07:00
Travis Geiselbrecht
8cf7991d47 [platform][armemu] fix up the armemu platform/target and get it building properly again 2015-09-01 13:26:27 -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
John Grossman
8a7219ddb1 [lib][bio] Add erase geometry to lib/bio
Extend the block i/o system to allow registered devices to advertise
an erase geometry.  Devices which do not need to be explicitly erased
may skip this.  Extent the Zynq spiflash code to publish the erase
geometry as read from the flash device.

Signed-off-by: John Grossman <johngro@google.com>
Change-Id: I42e16fbe9a0fcf8334c317f16dea1c551c203eb2
2015-06-29 17:32:10 -07:00
Travis Geiselbrecht
05f65f3bfa [platform][armemu] make armemu compile for an arm1136 2013-10-21 03:10:30 -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
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
d5cf22f40d [make] rename DEFINES to GLOBAL_DEFINES
To fix your module makefiles:
-Change DEFINES to GLOBAL_DEFINES
2013-06-07 22:26:38 -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
d7647767cb [armemu] add KEVLOG entries for interrupts and add kevlog to armemu-test project 2012-12-23 20:05:20 -08:00
Travis Geiselbrecht
a6f6a7fbe7 [platform] run platform/ through astyle 2012-10-31 22:09:01 -07:00
Travis Geiselbrecht
7c61c93d0b [platform][armemu] set MEMBASE and MEMSIZE 2012-10-27 16:32:50 -07:00
Travis Geiselbrecht
1262105ab9 [time] rename {big}time_t -> lk_{big}time_t
-This avoids a collision with posix time_t and makes gcc complain
less about printf format mismatches.
2012-10-06 11:22:15 -07:00
Travis Geiselbrecht
e307791ba2 [platform] rename all of the dputc/dgetc routines to match the new platform_ debug interface
-just a simple rename
2012-09-23 17:57:40 -07:00
Travis Geiselbrecht
97cfd0bfa4 [make] update all of the rules.mk to use the new module system 2012-08-31 15:52:24 -07:00
Travis Geiselbrecht
1a52fee786 [platform] remove the debug_dump_* routines from platform space and move into armemu 2012-06-16 16:09:51 -07:00
Travis Geiselbrecht
a95146ec5a [kernel] clean up the thread_stats stuff a bit to remove some #ifdefs 2012-04-23 17:26:42 -07:00
Travis Geiselbrecht
7ce84c60c3 [armemu] properly track number of interrupts 2012-04-23 17:00:11 -07:00
Travis Geiselbrecht
c1a26173c6 [armemu] dont draw the test pattern by default 2012-04-23 16:58:42 -07:00
Travis Geiselbrecht
0d09fed024 [armemu] read the display size from the emulator 2010-06-04 14:12:35 -07:00
Travis Geiselbrecht
841b22b8b2 [armemu][display] add driver for the display controller 2010-05-21 22:50:27 -07:00
Travis Geiselbrecht
c84b9040a2 [armemu] add block device 2010-05-06 17:25:09 -07:00
Travis Geiselbrecht
5cd3f8c68f [armemu] fix the armemu build by adding timer routine and default config file 2010-05-06 13:35:49 -07:00
Travis Geiselbrecht
37cf0c1982 [platform] fix the dgetc signature problem 2009-06-28 12:18:39 -07:00
Travis Geiselbrecht
eb9460542e [IO] rework dprintf to take a debug level, defined in DEBUGLEVEL
printf at the moment just calls dprintf, but soon will become
a seperate I/O queue.
2008-09-13 15:21:57 -07:00
Travis Geiselbrecht
f1cdea3729 [INT] fix the mask/unmask interrupt api to not take oldstate argument 2008-09-13 14:13:54 -07:00
Travis Geiselbrecht
5bfddfb66a remove lwip, never really worked anyway 2008-09-01 02:56:25 -07:00
Travis Geiselbrecht
1d0df69964 initial commit of lk (little kernel) project 2008-09-01 02:26:09 -07:00