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>
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>
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>
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>
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>
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>
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>
Since we're in VHE mode, we can pretend to be in EL1 - but this will
allow us to really run in EL1 if we want to in the future.
Signed-off-by: Hector Martin <marcan@marcan.st>