History log of /fuchsia/zircon/kernel/object/rules.mk
Revision Date Author Comments
# 987b4ea0 16-Aug-2018 Christopher Anderson <cja@google.com>

[kernel] Add feature flag to disable kernel PCI

When ENABLE_USER_PCI=1 is passed to the build zircon
will build with pci syscalls stubbed out and initialize
a new, mostly-empty userspace pci process.

Test: core-tests

Change-Id: I9f35715a7c4374072491c91592966815c6d0c667


# 7d81deec 19-Apr-2018 Christopher Anderson <cja@google.com>

[kernel][rsrc] Change ResourceDispatcher model

In general, this change moves resources to a model of
"resource allocation" and "resource validation" as separate
but related concepts. On resource creation, an allocation
against physical address space is made. On resource validation,
a syscall checks that the resource provided has the correct
allocation to permit the call asked. This means that the ROOT
resource /can/ allocate resources, but does not have to if it
simply wants to pass syscall validation. This is important
so that the ROOT resource can create specific resources that
are then passed out to drivers and used to validate access
to their hardware resources.

- Change low/high to base/length and change logic to match.
- Wire in usage of PhysicalAspaceManager so MMIO/IOPORT/IRQ
resources try to allocate from the global address space.
- Change resource access so that only the root resource can
create sub-resources.
- Track ResourceDispatchers created across the system.
- Define ZX_RSRC_KIND_ROOT as a privileged resource that will
pass all validation so that platform bus implementations
like ACPI can behave as they may.
- Initialize the allocators after the heap is initialized.
- Reserve regions marked as memory by the bootloader for x86.
- Reserve regions marked as memory in the zbi structures for ARM.
- zx_vmo_create_physical calls validate_resource_mmio
- zx_ioports_request calls validate_resource_ioports
- zx_interrupt_create calls validate_resource_irq

Test: For kernel tests, 'k ut resources'.
Syscall tests are run as part of core-tests.

ZX-971 #done

Change-Id: Iac6c4aa9e95718a0a0768ef8e3036353e73de8dd


# b29cfb1a 04-Apr-2018 Nick Maniscalco <maniscalco@google.com>

[kernel] Refactor MessagePacket to use non-contiguous storage

This is a step toward eliminating variable-sized kernel heap
allocations. Prior to this change, MessagePacket allocated a single
contiguous buffer for its fields, handles, and data.

After this change it uses free lists of fixed-sized buffers.

Add BufferChain for copying to/from a list of fixed-sized buffers. In
the future, MBufChain and BufferChain will be merged.

See related bug (ZX-1852) for benchmark results.

ZX-1852 #comment use non-contiguous storage

Tested: "k ut message_packet" and "k ut buffer_chain"

Change-Id: I1c1383c5b6f321c05fe7ae6fe0e7ff75533a7225


# bf29bc81 02-May-2018 Brian Swetland <swetland@google.com>

[kernel][interrupts] cleanup, introduce VirtualInterruptDispatcher

Since we already use virtual dispatch for registering, unregistering,
masking, unmasking, and processing IRQs, let's introduce a separate
subclass for Virtual interrupts and remove is_virtual checks. Also
make the subclasses responsible for owning and managing their vectors
and so forth.

Change-Id: Ia323a39575571b2aad6248a12066860022cc0d64


# 79859a72 23-Feb-2018 Brett Wilson <brettw@chromium.org>

[threads] Add a token to suspend threads.

Suspending a thread will will return a handle to a token that allows resuming
that thread exactly once. This ensures that different clients suspending and
resuming threads don't stomp on each other's state.

Currently this is implemented as a separate API call to facilitate landing.
In the future task_suspend/resume will use the new signature and the *_token
versions will be deleted.

Refcounting is added on ThreadDispatcher for suspend/resume calls. This
will affect the legacy suspend/resume calls.

ZX-1072

Change-Id: I9ecc63409e2e7dcea733f3ec58db50c1e8b0210b


# 286261a3 14-Mar-2018 Todd Eisenberger <teisenbe@google.com>

[syscalls][bti] Introduce Pinned Memory Tokens

This introduces two system calls:
1) zx_bti_pin_new: This will replace zx_bti_pin (and be renamed to
zx_bti_pin). It is identical to zx_bti_pin, except it additionally
returns a handle to a new type of object, a Pinned Memory Token.
When this object is destroyed using zx_pmt_unpin(), the memory
pinned by zx_bti_pin_new() is unpinned.
2) zx_pmt_unpin: This will replace zx_bti_unpin. In the current
implementation, it is no different than zx_handle_close. However, in
a subsequent diff it will be used to create a quarantine for DMA
targets in the event of driver process crash.

ZX-1936 #comment Introduce the new syscalls

Change-Id: I39d9bd8ce3582cd54b323246df286bba03a54a1c


# ab55c824 04-Apr-2018 Nick Maniscalco <maniscalco@google.com>

[kernel] Add unit test for MessagePacket

Move UserMemory test helper out of mbuf_tests.cpp so it can be reused.

ZX-1881 #done

Change-Id: I89a3683f284ce26046ea49b9010e6173c709fbc1


# b4756f46 14-Mar-2018 Carlos Pizano <cpu@google.com>

[zircon] syscall boilerplate for profile

Introduces the two new syscalls
1- creates a profile object
2- set a profile to an existng object (must be a thread atm)

There is no actual meat.

Change-Id: Iebdacc04a6291520678661bda785858ca3815070


# 78ca66c4 14-Mar-2018 Nick Maniscalco <maniscalco@google.com>

[kernel] Add unit tests and comments for MBufChain

Add unit tests for MBufChain that make use of testable_user_ptr and
fake_user_ptr.

Add comments to MBufChain.

ZX-1846 #comment initial tests
ZX-1852 #comment prereq

Change-Id: I6626b5e05e56611006da3de0f8d7deae482fb474


# 5f45d5a3 12-Sep-2017 Todd Eisenberger <teisenbe@google.com>

[object][bti] Implement the BusTransactionInitiatorDispatcher

ZX-693

Change-Id: I4b2cecde4bb689c8a68a9f0eb80a5fd23dd917e9


# 038c9dc5 27-Dec-2017 Mike Voydanoff <voydanoff@google.com>

[syscalls][ddk] Interrupt syscall improvements:

It is now possible to wait for multiple interrupts on a single interrupt handle.
The zx_interrupt_bind() syscall is used to bind an interrupt vector to
an interrupt handle, allowing up to 62 interrupt vectors per handle.

The zx_interrupt_get_timestamp() syscall can now be used to retrieve a
timestamp for an interrupt.

Virtual interrupts are now supported. zx_interrupt_bind() can be used to
designate an interrupt slot as a virtual interrupt, and the virtual interrupt
can be signaled using the zx_interrupt_signal() syscall.

The zx_interrupt_complete() syscall has been removed.
Instead, zx_interrupt_wait() now handles unmasking the interrupt
at the right time depending on whether the interrupt is edge or level triggered.

Slot ZX_INTERRUPT_SLOT_USER is reserved as a virtual interrupt, and is typically
used with zx_interrupt_signal() to unblock interrupt threads so they can exit
at driver shutdown or to perform periodic work.

Currently PCI interrupt handles can only be bound to a single interrupt vector,
but it is possible to bind virtual interrupts to PCI interrupt handles.

ZX-1469 #done
ZX-1471 #done

Change-Id: I48c14183c1b9ecd437c8b1ce0d25326b7532e973


# 7b6cc1ff 10-Jan-2018 Mike Voydanoff <voydanoff@google.com>

[kernel][dpc] Move dpc code from kernel/lib/ to kernel/kernel/

Ran clang-format on the dpc files as well

Change-Id: Id333fa05b63f1758dd505cb3fd7b6d397d3b247c


# 2cce3bc2 03-Dec-2017 Carlos Pizano <cpu@chromium.org>

[zircon][object] unroll kobj deletes

Introduces a mechanism for unrolling the recursion that can
happen when refptrs to certain dispatchers are reset. This
can cause a recursive delete that is solved with one TLS
slot and the machinery of fbl_recycle()

This allows removal of the handle reaper machinery which
could clog the dpc threads, which now only do time critical
things.

Change-Id: I68fac0aa470fd2553a7b50c84f49e9827c26f634


# f27ddf4a 12-Sep-2017 Todd Eisenberger <teisenbe@google.com>

[object][iommu] Implement the IommuDispatcher

ZX-693

Change-Id: I30d91eae7a96ee88c0f865b1e861d3ceb5da47f1


# 3a828bef 06-Dec-2017 Roland McGrath <mcgrathr@google.com>

[kernel][object] Clean up Handle implementation

This moves everything into the Handle class. The code that was in
global functions before is now in class and instance methods, and
there's miscellaneous refactoring to make the code tighter.

Almost all the public API functions now use the HandleOwner smart
pointer type rather than raw Handle* pointers.

The <object/handle_owner.h> header is gone and now HandleOwner is
defined directly in <object/handle.h>, which simplifies things.

Change-Id: I578c948c347e1ffa74c3a254738387303610da79


# d363aa54 04-Oct-2017 George Kulakowski <kulakowski@google.com>

[dispatcher][state_tracker] Move the state tracker into the dispatcher

Note that all access to the old StateTracker functionality is still
mediated by the has_state_tracker function. This is used to e.g. allow
only certain objects to be user signalled.

Change-Id: If9d0413eb131c6e7d70ea19c1ed928f7bf566cc8


# c959cb90 02-Oct-2017 George Kulakowski <kulakowski@google.com>

[object][resource] Put resource functions in their own file

Change-Id: I6e775ddf67f49762088e01c5bc41188289fc35ec


# 06ee5212 26-Sep-2017 George Kulakowski <kulakowski@google.com>

[kernel][glue][handle] Split the handle table out of glue.cpp

Change-Id: Ia6004de04958f96cce38a9e63f3835a01678a069


# 59e644b1 07-Sep-2017 George Kulakowski <kulakowski@google.com>

[zircon][mxtl->fbl] Rename mxtl to fbl

Change-Id: Ie21b6498e1bfb0a7fa0315e40b9e5c3ee78646be


# 2db36fe3 06-Sep-2017 Dave Bort <dbort@google.com>

[libobject] Axe magenta.h; magenta.cpp -> glue.cpp

Change-Id: I58486667266fd25dac29c17c054f940ab4b521d6


# 8779b382 01-Sep-2017 Dave Bort <dbort@google.com>

[user_copy] Remove lib/user_copy.h and object/user_copy.h

Make everyone use user_ptr or arch_copy_{to/from}_user.

Change-Id: I599463711fcd28f96638bae8dc6e59c106a11fd4


# 388a7f68 31-Aug-2017 Dave Bort <dbort@google.com>

[lib/magenta] Rename kernel/lib/magenta to kernel/object

TODO: Rename magenta.{cpp,h} and other instances of "magenta" in this
module.

For MG-1091 "Rename kernel/lib/magenta"

Change-Id: I2abc316f543798e00d3a4d1c2c83195da26e6836