class StubPmt

Defined at line 28 of file ../../zircon/kernel/dev/iommu/stub/include/dev/iommu/stub/stub_pmt.h

TODO(johngro) : Right now we depend on the upper level dispatcher's lock to

serialize access to this object user-mode facing API. Consider creating an

explicit lock at this level so we can make more effective use of static

annotations here.

Public Methods

zx::result<QueryAddressResult> QueryAddress (uint64_t query_offset, size_t query_size)

TODO(johngro): These lock exclusion directives are not doing much here. The

only place we access this interface is from the dispatcher which owns us

through our base PMT's vtable. At this point in time, the compiler does

not know our concrete type and cannot see the annotations. The good news is

that the dispatcher-level also does not know about our owner's lock, and

cannot be holding it, so we should be safe anyway.

Defined at line 15 of file ../../zircon/kernel/dev/iommu/stub/stub_pmt.cc

void StubPmt (fbl::RefPtr<StubBti> owner, PinnedVmObject pinned_vmo)

Defined at line 39 of file ../../zircon/kernel/dev/iommu/stub/include/dev/iommu/stub/stub_pmt.h

void StubPmt (const StubPmt & )

Defined at line 42 of file ../../zircon/kernel/dev/iommu/stub/include/dev/iommu/stub/stub_pmt.h

void StubPmt (StubPmt && )

Defined at line 43 of file ../../zircon/kernel/dev/iommu/stub/include/dev/iommu/stub/stub_pmt.h

StubPmt & operator= (const StubPmt & )

Defined at line 44 of file ../../zircon/kernel/dev/iommu/stub/include/dev/iommu/stub/stub_pmt.h

StubPmt & operator= (StubPmt && )

Defined at line 45 of file ../../zircon/kernel/dev/iommu/stub/include/dev/iommu/stub/stub_pmt.h

void ReleasePinnedMemory ()

Defined at line 74 of file ../../zircon/kernel/dev/iommu/stub/stub_pmt.cc

State state ()

state() and set_state() are used used both in logic and DEBUG_ASSERTs by

our owner-StubBti.

Defined at line 82 of file ../../zircon/kernel/dev/iommu/stub/include/dev/iommu/stub/stub_pmt.h

void set_state (State new_state)

Defined at line 83 of file ../../zircon/kernel/dev/iommu/stub/include/dev/iommu/stub/stub_pmt.h

void AssertOwnerCollectionLockHeld ()

Defined at line 85 of file ../../zircon/kernel/dev/iommu/stub/include/dev/iommu/stub/stub_pmt.h

void OnDispatcherZeroHandles ()

Defined at line 134 of file ../../zircon/kernel/dev/iommu/stub/stub_pmt.cc

zx_status_t Map (uint32_t perms, RequireContiguousMapping req_contig)

Check to make sure that the pin/map request is valid, and if so, transition

to the Active state and add ourselves to our owner's active PMT list.

Defined at line 185 of file ../../zircon/kernel/dev/iommu/stub/stub_pmt.cc

void ReleaseQuarantinedVmo ()

Unconditionally release the pinned VMO we are holding. It is illegal to

perform this operation more than once, or to do so with interrupts off or

while holding any spinlocks.

Defined at line 220 of file ../../zircon/kernel/dev/iommu/stub/stub_pmt.cc

Enumerations

enum class State
Name Value Comments
kInitial 0

PMT has been created, but not successfully mapped and added to its owner BTI

kActive 1

PMT has been created, mapped, and added to its owner BTI.

kReleased 2

PMT has been explicitly unpinned. Its pinned VMO is released and it is not on
any BTI lists.

kQuarantined 3

PMT has been quarantined. The VMO is still pinned and it is a member of its
owning BTI's quarantine list.

Defined at line 30 of file ../../zircon/kernel/dev/iommu/stub/include/dev/iommu/stub/stub_pmt.h

Friends

class RefPtr