Hector Martin
cc4a5d312d
iodev: Add new framework for I/O and console devices
...
This replaces the earlier earlycon with a single shared console buffer
for all output devices.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-04-15 23:18:57 +09:00
Hector Martin
1c518ded09
types.h: Include stdbool.h, define ssize_t
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-04-15 23:18:57 +09:00
Hector Martin
d63e84d2f7
fb: add fb_console_reserve_lines()
...
This is like fb_console_scroll(), but only scrolls if necessary to
ensure that enough free space is available at the end of the console.
This avoids spuriously scrolling during shutdown if we still have space.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-04-15 23:18:57 +09:00
Hector Martin
151c601b2a
Revert "fb: add earlycon to capture messages before fb_init"
...
This is being replaced with a global buffer in iodev.
This reverts commit 5d4067642e
.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-04-15 23:18:57 +09:00
Sven Peter
add04246e7
usb: add clock/power/phy bringup
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-15 18:39:33 +09:00
Sven Peter
59ba266b11
usb: add DWC3 CDC ACM code
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-15 18:39:33 +09:00
Sven Peter
ea362ea8f9
ringbuffer: add a simple ringbuffer data structure
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-15 18:39:33 +09:00
Sven Peter
00e862238c
usb: add usb_types.h
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-15 18:39:33 +09:00
Sven Peter
50afcd1ffe
usb: add more registers and removed linux-specific code from usb_dwc3_regs.h
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-15 18:39:33 +09:00
Sven Peter
ac13c3b17f
usb: add drivers/usb/dwc3/core.h from linux
...
This file is taken from commit 7bc5a6ba369217e0137833f5955cf0b0f08b0712 before
the license was changed to GPLv2-only.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/dwc3/core.h?id=7bc5a6ba369217e0137833f5955cf0b0f08b0712
core.h is copyright:
Copyright (C) 2010-2011 Texas Instruments Incorporated - http://www.ti.com
Authors: Felipe Balbi <balbi@ti.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
and dual-licensed under the GPLv2 and BSD3.
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-15 18:39:33 +09:00
Sven Peter
17fdc79c13
utils.h: add mdelay
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-15 18:39:33 +09:00
Sven Peter
35007b700e
proxy: add dart ops
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-15 01:36:29 +09:00
Hector Martin
6d87b3b016
chainload.py: Improve chainloading
...
- Support chainload-in-place
- Do Mach-O loading host-side
- Handle copying SEPFW (WIP, ADT not updated yet)
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-04-14 21:13:19 +09:00
Hector Martin
b40fffea20
adt.py: Add basic ADT parser
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-04-14 21:12:38 +09:00
Sven Peter
de0456b9a5
proxy: add fb console console ops
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-14 18:11:37 +09:00
Sven Peter
5d4067642e
fb: add earlycon to capture messages before fb_init
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-14 18:11:37 +09:00
Sven Peter
2873aed75a
memory: speed hack: scroll fb console before shutting down the MMU
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-14 18:11:37 +09:00
Sven Peter
fd2deed39b
fb: add framebuffer console
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-14 18:11:37 +09:00
Sven Peter
819b16fbe4
fb.c: minor cleanup
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-14 18:11:37 +09:00
Sven Peter
05e7306bf9
fb console: add Source Code Pro font
...
This font is licensed under the OFL-1.1 License and copyright:
Copyright 2010-2019 Adobe (http://www.adobe.com/ ), with Reserved Font Name 'Source'.
All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries.
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-14 18:11:37 +09:00
Sven Peter
f80933a7d3
utils.h: add is_primary_core
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-14 18:11:37 +09:00
Sven Peter
1a04590ed3
utils.h: add min and max
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-14 18:11:37 +09:00
Hector Martin
af7ad9c064
Makefile: break up OBJECTS into lines for easier merging
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-04-14 18:11:37 +09:00
Hector Martin
9fc3f0c230
exception: Print exception context for FIQ
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-04-14 17:48:02 +09:00
Hector Martin
0df6db324b
timer_test.py: More exhaustive tests
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-04-14 17:48:02 +09:00
Hector Martin
f30e91b933
asm.py: Build for ARMv8.2-A
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-04-14 17:48:01 +09:00
Sven Peter
8efff1b0ab
dart: add code to setup the DART iommu
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-14 17:40:07 +09:00
Sven Peter
1e247107aa
types: add SZ_2K/SZ_16K/SZ_1M
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-14 17:40:07 +09:00
Sven Peter
1314a426e2
proxyclient: add PMGR ops
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-11 05:26:29 +09:00
Sven Peter
b31e1265ff
pmgr: add functions to enable/disable clocks
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-11 05:26:29 +09:00
Sven Peter
95b1cb39fc
utils.h: add poll32
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-11 05:26:29 +09:00
Sven Peter
bf3830ee6d
utils.h: add dma_mb,dma_rmb,dma_wmb
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-11 05:26:29 +09:00
Sven Peter
d256b89343
malloc.h: include stddef to ensure size_t is defined
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-11 05:26:29 +09:00
Sven Peter
f17a15d19a
proxyclient/i2c: experiment with the i2c and ti usb chip
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-09 14:47:22 +09:00
Sven Peter
8aa3c69a2d
tunables: add tunables_apply_local_addr
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-08 20:32:12 +09:00
Sven Peter
a17e64f1e2
tunables: add proxy ops
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-08 20:32:12 +09:00
Sven Peter
d73276b0bc
tunables: add initial version.
...
There are at least two types in the ADT related to USB,
but there's a decent chance that there are even more
required for other devices:
* A simple tunable that applies to a whole device node
and all its MMIO ranges specified in the "reg" property.
This one seems to just be mask32.
* A slightly more complex tunable that applies to a single
MMIO range specified in the "reg" property. So far I've
only seen 32 bit masks but the format looks like it should
also support 8,16 and 64 bit masks.
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-08 20:32:12 +09:00
Sven Peter
1134a4a649
ci: add clang-format check to the CI
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-08 20:30:41 +09:00
Sven Peter
ed72fe443c
proxyclient/asm.py: allow to override compiler prefix
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-04-05 23:49:25 +09:00
Hector Martin
3a42f80a73
chainload.py: Set up sane EL1 config for timers/IRQs
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-03-28 19:31:14 +09:00
Hector Martin
cecf51f245
dts: Update with current kernel devicetree, improve build
...
Now uses the same devicetree source as the kernel, verbatim, with the
required subset of kernel dt includes.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-03-15 02:26:31 +09:00
Hector Martin
35f2b2435e
kboot: reserve m1n1 in memory
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-03-15 02:26:13 +09:00
Hector Martin
70f6bc7514
linux.py: support up to 512MB kernels
...
Some people apparently have the patience to load KASAN kernels over
serial :-)
Also bump the python-managed heap to 1GB.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-03-08 01:33:43 +09:00
Hector Martin
efa4452a47
Fix libc header dependencies
...
Turns out we had a bunch of silly dependencies on libc headers that are
not included with freestanding compilers. Fix all this and change the
CFLAGS to exclude libc headers and only include the built-in compiler
path.
Add our own versions of assert.h, errno.h, limits.h, and move malloc.h
and string.h together into a new path used as -isystem, so these headers
can be included using #include <>.
Remove a bunch of other dependencies in third-party code.
Add a strnlen function.
Disable building the libfdt overlay code for now, as it needs a strtoul
implementation. We can throw that in if/when we decide to use overlays.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-03-08 01:31:14 +09:00
Hector Martin
3c514e826c
fptest.py: test Apple floating-point controls
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-03-04 23:22:41 +09:00
Hector Martin
db49cc92f3
hacr_trap_bits.py: figure out HACR_EL2 sysreg traps
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-03-04 23:20:50 +09:00
Hector Martin
1a880518b0
chainload.py: implement chainloading at EL1
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-03-04 22:41:06 +09:00
Hector Martin
3bf3613e7d
find_all_regs: print EL2-only registers
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-03-04 22:40:25 +09:00
Hector Martin
ce2038c59c
memory: use tlbi vmalle1is
...
This works at both EL1 and EL2(with VHE) and seems to do the right
thing.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-03-04 22:39:26 +09:00
Hector Martin
b8349819fe
Implement calling code as EL1
...
This works by clearing HCR_EL2.TGE, and then doing essentially the same
thunk/return dance as for EL0 calls. However, since most EL1 exceptions
are not routed to EL2, we install hypercall vectors in EL1 to forward
them to EL2, and then short circuit the exception return to whatever
triggered the original exception.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-03-04 22:10:37 +09:00