class BufferMemoryConstraints
Defined at line 3769 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
Public Members
static const fidl_type_t * FidlType
Public Methods
bool IsEmpty ()
Returns whether no field is set.
const uint64_t & min_size_bytes ()
un-set is treated as 1
Defined at line 3776 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
bool has_min_size_bytes ()
Defined at line 3780 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
uint64_t * mutable_min_size_bytes ()
un-set is treated as 1
Defined at line 3785 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
void clear_min_size_bytes ()
Defined at line 3793 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
const uint64_t & max_size_bytes ()
un-set is treated as 0xFFFFFFFFFFFFFFFF.
Defined at line 3802 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
bool has_max_size_bytes ()
Defined at line 3806 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
uint64_t * mutable_max_size_bytes ()
un-set is treated as 0xFFFFFFFFFFFFFFFF.
Defined at line 3811 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
void clear_max_size_bytes ()
Defined at line 3819 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
const bool & physically_contiguous_required ()
When false, physical pages of a buffer VMO can be non-contiguous. When
true, physical pages of a buffer VMO must be sequentially contiguous. A
client that doesn't require physically contiguous VMOs must still accept
physically contiguous VMOs or "physical" VMOs.
Defined at line 3831 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
bool has_physically_contiguous_required ()
Defined at line 3835 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
bool * mutable_physically_contiguous_required ()
When false, physical pages of a buffer VMO can be non-contiguous. When
true, physical pages of a buffer VMO must be sequentially contiguous. A
client that doesn't require physically contiguous VMOs must still accept
physically contiguous VMOs or "physical" VMOs.
Defined at line 3843 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
void clear_physically_contiguous_required ()
Defined at line 3851 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
const bool & secure_required ()
If true, the participant requires secure memory.
When aggregating `BufferCollectionConstraints`, these values boolean-OR.
Defined at line 3862 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
bool has_secure_required ()
Defined at line 3866 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
bool * mutable_secure_required ()
If true, the participant requires secure memory.
When aggregating `BufferCollectionConstraints`, these values boolean-OR.
Defined at line 3873 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
void clear_secure_required ()
Defined at line 3881 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
const bool & cpu_domain_supported ()
When true (or when `BufferMemoryConstraints` is not present), the
participant is ok with sysmem selecting the CPU domain.
If the CPU domain is selected, participants must ensure the CPU can read
or write data to the buffer without cache operations outside of the
participant.
In other words, if a producer participant DMAs data directly to RAM on a
non-cache-coherent architecture such as arm, the producer must ensure
the CPU cache is clean wrt. the buffer before the DMA write, and
invalidate the CPU cache after the DMA write and before indicating that
the buffer is ready to any other participant. If a consumer participant
DMAs data directly from RAM on a non-cache-coherent architecture such as
arm, the consumer must flush the CPU cache wrt the buffer before the DMA
read.
CPU-only participants that don't do any DMA can just write and read the
buffers (when they should) without needing to do any CPU cache ops.
Defined at line 3907 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
bool has_cpu_domain_supported ()
Defined at line 3911 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
bool * mutable_cpu_domain_supported ()
When true (or when `BufferMemoryConstraints` is not present), the
participant is ok with sysmem selecting the CPU domain.
If the CPU domain is selected, participants must ensure the CPU can read
or write data to the buffer without cache operations outside of the
participant.
In other words, if a producer participant DMAs data directly to RAM on a
non-cache-coherent architecture such as arm, the producer must ensure
the CPU cache is clean wrt. the buffer before the DMA write, and
invalidate the CPU cache after the DMA write and before indicating that
the buffer is ready to any other participant. If a consumer participant
DMAs data directly from RAM on a non-cache-coherent architecture such as
arm, the consumer must flush the CPU cache wrt the buffer before the DMA
read.
CPU-only participants that don't do any DMA can just write and read the
buffers (when they should) without needing to do any CPU cache ops.
Defined at line 3933 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
void clear_cpu_domain_supported ()
Defined at line 3941 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
const bool & ram_domain_supported ()
When true, the participant is ok with sysmem selecting the RAM domain.
If the RAM domain is selected, producer data must be available in RAM
(with CPU cache state such that the RAM data won't get corrupted by a
dirty CPU cache line writing incorrect data to RAM), and a consumer
reading using the CPU must invalidate CPU cache before reading (the
producer doesn't guarantee zero stale "clean" cache lines).
In other words, if a producer participant uses the CPU to write data on
a non-cache-coherent architecture such as arm, the producer must flush
the data to RAM before indicating to another participant that the buffer
is ready. If a consumer participant uses the CPU to read data on a
non-cache-coherent architecture such as arm, the participant must
invalidate (typically flush+invalidate with knowledge that no cache
lines are dirty) the CPU cache before reading the buffer.
RAM-only participants that don't do any CPU accesses to a buffer can
just do DMA to/from the buffers (when they should) without needing to
do any CPU cache ops.
Defined at line 3968 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
bool has_ram_domain_supported ()
Defined at line 3972 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
bool * mutable_ram_domain_supported ()
When true, the participant is ok with sysmem selecting the RAM domain.
If the RAM domain is selected, producer data must be available in RAM
(with CPU cache state such that the RAM data won't get corrupted by a
dirty CPU cache line writing incorrect data to RAM), and a consumer
reading using the CPU must invalidate CPU cache before reading (the
producer doesn't guarantee zero stale "clean" cache lines).
In other words, if a producer participant uses the CPU to write data on
a non-cache-coherent architecture such as arm, the producer must flush
the data to RAM before indicating to another participant that the buffer
is ready. If a consumer participant uses the CPU to read data on a
non-cache-coherent architecture such as arm, the participant must
invalidate (typically flush+invalidate with knowledge that no cache
lines are dirty) the CPU cache before reading the buffer.
RAM-only participants that don't do any CPU accesses to a buffer can
just do DMA to/from the buffers (when they should) without needing to
do any CPU cache ops.
Defined at line 3995 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
void clear_ram_domain_supported ()
Defined at line 4003 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
const bool & inaccessible_domain_supported ()
When true, the participant is ok with sysmem selecting the INACCESSIBLE
domain.
If the INACCESSIBLE domain is selected, CPU reads and writes of the data
are prevented. Attempts to read/write the data with the CPU may result
in UB and/or process termination.
If the INACCESSIBLE domain is selected, participants must only operate
on the data using DMAs performed by HW, or platform-specific DMA-like
requests to a secure environment (which will do the needed CPU cache ops
similar to how a RAM domain participant would operate).
Secure heaps only support INACCESSIBLE domain, and will fail allocation
if any participant with `BufferUsage` other than `NONE_USAGE` does not
set inaccessible_domain_supported to true.
When the INACCESSIBLE domain is selected, participants (outside of
secure/DRM environments) should not attempt to map buffers, and should
not attempt to perform any CPU cache ops. In this respect, this domain
is similar to RAM domain with all participants only doing DMA and no
participant(s) doing CPU accesses.
Defined at line 4032 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
bool has_inaccessible_domain_supported ()
Defined at line 4036 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
bool * mutable_inaccessible_domain_supported ()
When true, the participant is ok with sysmem selecting the INACCESSIBLE
domain.
If the INACCESSIBLE domain is selected, CPU reads and writes of the data
are prevented. Attempts to read/write the data with the CPU may result
in UB and/or process termination.
If the INACCESSIBLE domain is selected, participants must only operate
on the data using DMAs performed by HW, or platform-specific DMA-like
requests to a secure environment (which will do the needed CPU cache ops
similar to how a RAM domain participant would operate).
Secure heaps only support INACCESSIBLE domain, and will fail allocation
if any participant with `BufferUsage` other than `NONE_USAGE` does not
set inaccessible_domain_supported to true.
When the INACCESSIBLE domain is selected, participants (outside of
secure/DRM environments) should not attempt to map buffers, and should
not attempt to perform any CPU cache ops. In this respect, this domain
is similar to RAM domain with all participants only doing DMA and no
participant(s) doing CPU accesses.
Defined at line 4061 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
void clear_inaccessible_domain_supported ()
Defined at line 4069 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
const ::std::vector< ::fuchsia::sysmem2::Heap> & permitted_heaps ()
Which heaps are acceptable to the participant. Participants that don't
care which heap memory is allocated on should leave this field un-set. A
secure heap is only selected if all participants explicitly indicate
that the secure heap is acceptable via `heap_permitted`, or specify
`NONE_USAGE`.
Defined at line 4082 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
bool has_permitted_heaps ()
Defined at line 4086 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
::std::vector< ::fuchsia::sysmem2::Heap> * mutable_permitted_heaps ()
Which heaps are acceptable to the participant. Participants that don't
care which heap memory is allocated on should leave this field un-set. A
secure heap is only selected if all participants explicitly indicate
that the secure heap is acceptable via `heap_permitted`, or specify
`NONE_USAGE`.
Defined at line 4095 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
void clear_permitted_heaps ()
Defined at line 4103 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
BufferMemoryConstraints & set_min_size_bytes (uint64_t _value)
BufferMemoryConstraints & set_max_size_bytes (uint64_t _value)
BufferMemoryConstraints & set_physically_contiguous_required (bool _value)
BufferMemoryConstraints & set_secure_required (bool _value)
BufferMemoryConstraints & set_cpu_domain_supported (bool _value)
BufferMemoryConstraints & set_ram_domain_supported (bool _value)
BufferMemoryConstraints & set_inaccessible_domain_supported (bool _value)
BufferMemoryConstraints & set_permitted_heaps (::std::vector< ::fuchsia::sysmem2::Heap> _value)
void BufferMemoryConstraints ()
void BufferMemoryConstraints (BufferMemoryConstraints && other)
void ~BufferMemoryConstraints ()
BufferMemoryConstraints & operator= (BufferMemoryConstraints && other)
::std::unique_ptr<BufferMemoryConstraints> New ()
void Encode (::fidl::Encoder * _encoder, size_t _offset, std::optional< ::fidl::HandleInformation> maybe_handle_info)
void Decode (::fidl::Decoder * _decoder, BufferMemoryConstraints * _value, size_t _offset)
zx_status_t Clone (BufferMemoryConstraints * _result)