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
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
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
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
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
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 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
- 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
This makes the API a bit more convenient to use.
Fixed an inconsistency in the handling of cancelation errors.
We were previously checking for MX_ERR_BAD_STATE which can't happen
during cancelation.
Fixed some minor formatting inconsistencies introduced by the
mxtl->fbl rename.
Added some clarification around thread-safety.
Change-Id: If273a42eea2b869d63c79e47782c28fade339c92
- provide common header and entry structs in bootdata.h
along with documentation comments
- stop treating bootdata headers as part of bootfs
- introduce a simple header with magic and directory size
(allows easy mmap'ing of just the directory)
- align bootdata directory entries on U32 boundaries
- adjust mxio and userboot to deal with the changes
Change-Id: I09f96088f939dd541a6b23d70fcd8606d1af4f28
This implementation is sufficient to boot linux with block and balloon
devices, however Magenta guests currently fail to map PCI bars that
don't map MMIO space. For this reason we still default to using the
legacy interface for now.
Change-Id: I873f0bd2285ee1c999a90ec2819b3a512d128039
Removes special casing for usb-audio and usb-cdc-ecm.
Those drivers will instead call usb_claim_additional_interfaces,
indicating what additional interfaces they require.
usb_claim_additional_interfaces will request the list of
descriptors following the interface's existing descriptor list,
and then check whether to claim the interface.
Claiming an interface appends the descriptors to the descriptor list,
and removes any existing child device.
There can be a race condition between a device being created for a child
interface, and an interface claiming that same interface, so there is a
interface mutex and we track the current availability of an interface
via the interface_statuses array.
Change-Id: I3a9599f21c76b85e9a21f561eb259415bde97308
- Changes to support USB functions that have multiple interface descriptors
(like USB audio and CDC ethernet)
- Support for enabling/disabling endpoints when alternate interfaces are selected
- Add support for USB functions allocating string descriptors
- Add API for stalling/unstalling endpoints
- Fixes for disconnect handling
- Use new DDK dprintf() in usb-device and ums-function drivers
Change-Id: Id88e8e3816c2dba5dde83d6dbee02c2cde774bff
The USB HID spec says that if any report ID is given in the report
descriptor, it should be used in every report. We were previously
assuming that it would only be included if more than one report ID was
specified.
Change-Id: I206340ff53579ef6aa6019b97362f2198326b55d