class BufferMemoryConstraints

Defined at line 3548 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.

void BufferMemoryConstraints ()
void BufferMemoryConstraints (BufferMemoryConstraints && other)
const uint64_t & min_size_bytes ()

un-set is treated as 1

Defined at line 3555 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

bool has_min_size_bytes ()

Defined at line 3559 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 3564 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

void clear_min_size_bytes ()

Defined at line 3572 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 3581 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

bool has_max_size_bytes ()

Defined at line 3585 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 3590 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

void clear_max_size_bytes ()

Defined at line 3598 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 3610 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

bool has_physically_contiguous_required ()

Defined at line 3614 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 3622 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

void clear_physically_contiguous_required ()

Defined at line 3630 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 3641 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

bool has_secure_required ()

Defined at line 3645 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 3652 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

void clear_secure_required ()

Defined at line 3660 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 3686 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

bool has_cpu_domain_supported ()

Defined at line 3690 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 3712 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

void clear_cpu_domain_supported ()

Defined at line 3720 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 3747 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

bool has_ram_domain_supported ()

Defined at line 3751 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 3774 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

void clear_ram_domain_supported ()

Defined at line 3782 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 3811 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

bool has_inaccessible_domain_supported ()

Defined at line 3815 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 3840 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

void clear_inaccessible_domain_supported ()

Defined at line 3848 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 3861 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

bool has_permitted_heaps ()

Defined at line 3865 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 3874 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

void clear_permitted_heaps ()

Defined at line 3882 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

const uint64_t & min_physical_base_alignment ()

If physically_contiguous_required is false or un-set, this field must

also be un-set.

When set, this field must be non-zero and must be a power of 2 (only 1

bit set to 1, rest all 0).

When set, this is the minimum alignment of the base physical address of

each buffer.

Defined at line 3898 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

bool has_min_physical_base_alignment ()

Defined at line 3902 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

uint64_t * mutable_min_physical_base_alignment ()

If physically_contiguous_required is false or un-set, this field must

also be un-set.

When set, this field must be non-zero and must be a power of 2 (only 1

bit set to 1, rest all 0).

When set, this is the minimum alignment of the base physical address of

each buffer.

Defined at line 3914 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

void clear_min_physical_base_alignment ()

Defined at line 3922 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)
BufferMemoryConstraints & set_min_physical_base_alignment (uint64_t _value)
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)