class AcpiMemoryRegion

Defined at line 20 of file ../../src/graphics/display/drivers/intel-display/acpi-memory-region.h

A subset of an ACPI custom Operation Region mapped into this process.

Public Methods

zx::result<AcpiMemoryRegion> Create (zx::unowned_resource mmio_resource, zx_paddr_t region_base, size_t region_size)

Creates a memory region of `region_size` bytes starting at `region_base`.

`mmio_resource` must be of kind `ZX_RSRC_KIND_MMIO` and must have access

to [region_base, region_base + region_size).

The `region_base` and `region_size` should refer to memory that is entirely

contained within a memory region in the system's ACPI (Advanced

Configuration and Power Interface) tables that is marked as NVS (saved

during the Non-Volatile Sleep state)

Defined at line 28 of file ../../src/graphics/display/drivers/intel-display/acpi-memory-region.cc

void AcpiMemoryRegion ()

Creates an empty memory region without any backing VMO.

Defined at line 35 of file ../../src/graphics/display/drivers/intel-display/acpi-memory-region.h

void AcpiMemoryRegion (const AcpiMemoryRegion & )

Copying is not allowed.

Defined at line 53 of file ../../src/graphics/display/drivers/intel-display/acpi-memory-region.h

AcpiMemoryRegion & operator= (const AcpiMemoryRegion & )

Defined at line 54 of file ../../src/graphics/display/drivers/intel-display/acpi-memory-region.h

void AcpiMemoryRegion (zx::vmo region_vmo, cpp20::span<uint8_t> region_data)

Creates a representation of an already-mapped memory region.

This constructor is exposed for testing convenience. Production usage

should prefer Create(), which handles mapping physical memory.

If `region_vmo` is a valid VMO, the newly created instance keeps the VMO

alive throughout its life, and unmaps the pages that contain `region_data`

upon destruction.

If `region_vmo` is not a valid VMO, the caller must ensure that the memory

backing `region_data` stays alive while the newly created instance exists.

`region_data` must not be empty.

Defined at line 60 of file ../../src/graphics/display/drivers/intel-display/acpi-memory-region.cc

bool is_empty ()

Defined at line 62 of file ../../src/graphics/display/drivers/intel-display/acpi-memory-region.h

cpp20::span<uint8_t> data ()

The mapped memory. Empty iff this is an empty memory region.

Defined at line 65 of file ../../src/graphics/display/drivers/intel-display/acpi-memory-region.h

void AcpiMemoryRegion (AcpiMemoryRegion && rhs)

Moving is allowed so AcpiMemoryRegion can be used as a return type.

Defined at line 65 of file ../../src/graphics/display/drivers/intel-display/acpi-memory-region.cc

cpp20::span<const uint8_t> data ()

Defined at line 66 of file ../../src/graphics/display/drivers/intel-display/acpi-memory-region.h

zx::unowned_vmo vmo_for_testing ()

Defined at line 68 of file ../../src/graphics/display/drivers/intel-display/acpi-memory-region.h

AcpiMemoryRegion & operator= (AcpiMemoryRegion && rhs)

Defined at line 70 of file ../../src/graphics/display/drivers/intel-display/acpi-memory-region.cc

void ~AcpiMemoryRegion ()

Defined at line 81 of file ../../src/graphics/display/drivers/intel-display/acpi-memory-region.cc