The driver draws entropy from the host system on qemu. Since there
isn't a mechanism for the kernel to pull entropy from the driver or to
control the driver's rate of activity, for now the driver just launches
its own thread to push entropy to the kernel periodically.
Change-Id: I950518db4a5776f041856b05ad0277b970aa6bc5
Add code to manage EL2 CPU state. Currently this does the very minimum
and sets the EL2 stack for each CPU.
Next, I'll start setting up more of the EL2 state and also guest
physical address space.
Change-Id: I18b7f9d00b236e52cdc317dffe3b42fcffbcb8fe
Currently it only supports installation in processes without
an active namespace, but that's the only place we need to do
this right now.
Change-Id: If6cdc2a14cd6a654d491019afd92016655022287
Offloads tx output to another thread.
Passes TERM=uart to magenta, making linenoise skip console width check.
Make cnd_vars a little more sensible.
From this point, further work is optional.
Change-Id: I7dc4758f204057273d0444b93dc82325a45a7a7f
The userboot loader is intended to only bootstrap the first
process (usually devmgr) and does not support multiple clients.
Change-Id: I051858bf93ca2d7ea59f716a4179807c7f030a70
If there is an active loader service and it supports obtaining
a new connection, this function will return a new connection.
Change-Id: I58fe4d2450dc656340ed352424ef095ad19227fe
A process that has access to a loader will be able to use
this to obtain a new loader connection suitable for handing
off to a child -- similar to how other services, filesystem
objects, etc can be cloned.
This will allow us to eliminate the use of /dev/misc/dmctl
to obtain a global "system loader" connection.
Change-Id: Ifb92478132ca4e9793020be2f0bf853284198830
This is to disambiguate them from the EL2 exception functions that
will be used with the hypervisor.
Change-Id: Ia679397f31fc0410ef3f267a759ff80d44ab18b9
Migrate most of the logic for interacting with decoded instructions
into vcpu and out of the device implementations. The VCPU will dispatch
the appropriate read/write request based on the decoded instruction and
then handle updating any required VCPU state.
The new handle_mmio_read/handle_mmio_write functions in vcpu.cpp are
the MMIO counterparts to the existing handle_input/handle_output
methods that implement IO port accesses.
Change-Id: I7a41c2ecb32871d8ebf4568951a5c9cc8f9d3a12
We expect the segment selector registers to get zeroed on interrupts
and on context switches. The former is done by the CPU and the latter
is done by some logic in kernel/arch/x86/thread.cpp (which did not
have test coverage before).
Change-Id: Ia6940f311bf00fa96f8021cf05a896c2955339ed
Most of these functions don't care if the access is caused by a memory
trap or an IO instruction. This change normalizes on the mx_vcpu_io_t
structure for IO handlers as it's the simplest structure to describe a
sized value.
Change-Id: I9286dc03e55f3c9e25acac0c11567d8bfbce8f39
This is in line with Intel's recommendations for self-modifying code.
It will ensure visibility of changes to the instruction stream.
Change-Id: I5bbc1ab66319d3df5303d890483604c930e5cc1b
Previously recvmsg() wasn't setting MSG_TRUNC flag as it does on other
systems, so it wasn't possible to detect when packet is bigger than the
buffer. Updated mxsio_recvmsg_dgram() to detect this case and set the
flag.
NET-170
Change-Id: I91c4a657b479c4bbb459dfc740c25c59a218f1a4
Testing shows that, with the newly set parameters (bs=64, bc=512, ml=32,
ll=1, raw=true), each byte of data contributes approximately 0.58 bits
of min-entropy on the rpi3 and 0.5 bits on qemu-arm64. A safety factor
of 0.9 gives us 0.50 * 0.9 * 1000 == 450 bits of entropy per 1000 bytes
of random data.
This adds about 40ms to boot on rpi3 and 30ms on qemu-arm64.
Jitterentropy doesn't work on x86 as of this commit (the timer isn't
ready during early boot), so there should be negligible slowdown on x86.
On rpi3, about 10ms is due to the actual entropy draw from
jitterentropy, and 30ms is due to the startup testing built into
jitterentropy. Once we have entropy source testing in the kernel, we can
replace the jitterentropy testing time to reduce blocking during the
single-threaded, pre-VMM boot phase.
Change-Id: Ibf258412c7947e4e828926a88c0897f22199d7d3
To line up with all the other objects that don't require
a parent handle the policy can now deny new timers.
Change-Id: Iff69f2c6f97322a4d30661b43eef955a7d7db7c8
This allows users of the full-featured loader service to provide
their own implementations of object / interp / config loading and/or
sink publishing,
Change-Id: I371174bad56802a3012ec684a6cc8a61ea9805ec
With lld's -z rodynamic, it's now possible to do the "rodso" cases (the
vDSO and userboot) without using the scripts/rodso.ld linker script.
Change-Id: I30cb10a23e71878f524f04f30c4834c108c90efd
This is a re-land of the same toolchain as the last attempt.
New warnings it generates have been fixed in the code.
Change-Id: I60b7fe0f4e0118247bbc6d4eb4fa7a57e5d5cac0
This is the logical place for it to live and paves the way to migrate
it away from the soon-to-be-no-more mxio dispatcher.
Tidied up the API, de-mxio'd it, put it behind a common loader_service_
prefix, and broke some swiss-army-knife interfaces into more standalone
pieces, hopefully easier to understand.
Change-Id: I91acd79a44c5dcc72412484bd6e151a54d52c8a1
The _BSD_SOURCE feature-test macro is deprecated and newer
in glibc versions the headers generate a warning for using it.
_GNU_SOURCE enables everything that does and more, and our
code is compatible with it.
Change-Id: Ic049fd835d77f17e81faae0ac3349565a5b6f9b6
It looks like the upstream fix has been integrated into our prebuilt
toolchain, so we can use .cfi_return_column for clang.
Change-Id: I8abeda64e514b1be0be7a4a2e610ddef38692124
FILE->lock is atomic_int and so should be read using atomic_load.
Previously this wasn't reported, but with a new Clang this is
triggering an error because of -Wtautological-unsigned-zero-compare.
Change-Id: I3fe11f4be356a96d688e90614a9498d3c9eba05e
- RemoteContainer, WatchContainer moved to their own headers.
(Vnode be moved in a later patch).
- V_FLAG --> VFS_FLAG
- "vfs-XYZ.cpp" renamed to "XYZ.cpp" (headers too)
- WatcherBuffer (implementation detail) moved out of header.
MG-1117 #comment in-progress
Change-Id: I39471b142564d3d8bcf90a05949073d0fa1b32d3
Implements basic peripheral mode support for DWC3
Still to do for peripheral mode:
- USB 3 support
- Isochronous endpoint support
- Scatter/gather support
- OTG support for better connect/disconnect detection
and beyond peripheral mode:
- USB host support (we will layer the XHCI driver on top of this driver for host support)
- role switching between host and peripheral mode
- power management
Change-Id: I028f7af18f4434e17e1fe5fe36f0d1a83a409e55