Namespaces

Enumerations

enum class Arch
Name Value
kX64 0
kArm64 1
kRiscv64 2

Defined at line 12 of file ../../src/firmware/paver/config.h

enum class PartitionScheme
Name Value
kNew 0
kLegacy 1

Whether the device uses the new or legacy partition scheme.

Defined at line 35 of file ../../src/firmware/paver/device-partitioner.h

enum class Partition
Name Value
kUnknown 0
kBootloaderA 1
kBootloaderB 2
kBootloaderR 3
kZirconA 4
kZirconB 5
kZirconR 6
kSysconfig 7
kVbMetaA 8
kVbMetaB 9
kVbMetaR 10
kAbrMeta 11
kFuchsiaVolumeManager 12

Defined at line 37 of file ../../src/firmware/paver/device-partitioner.h

Records

Functions

  • fuchsia_system_state::SystemPowerState GetShutdownSystemState (fidl::UnownedClientEnd<fuchsia_io::Directory> svc_dir)

    Retrieve current System Power State from `fuchsia.system.state.SystemStateTransition`.

    `fuchsia.system.state.SystemPowerState.kFullyOn` is returned if state can't be retrieved.

    Defined at line 18 of file ../../src/firmware/paver/system_shutdown_state.cc

  • void Warn (const char * problem, const char * action)

    Warn users about issues in a way that is intended to stand out from

    typical error logs. These errors typically require user intervention,

    or may result in data loss.

    Defined at line 19 of file ../../src/firmware/paver/pave-logging.h

  • Arch GetCurrentArch ()

    Get the architecture of the currently running platform.

    Defined at line 19 of file ../../src/firmware/paver/config.h

  • template <typename T>
    std::unique_ptr<T> WrapUnique (T * ptr)

    Helper function to auto-deduce type.

    Defined at line 29 of file ../../src/firmware/paver/utils.h

  • zx::result<std::unique_ptr<VolumeConnector>> OpenBlockPartition (const paver::BlockDevices & devices, std::optional<uuid::Uuid> unique_guid, std::optional<uuid::Uuid> type_guid, zx_duration_t timeout)

    Defined at line 38 of file ../../src/firmware/paver/utils.cc

  • zx::result<std::unique_ptr<VolumeConnector>> OpenSkipBlockPartition (const paver::BlockDevices & devices, const uuid::Uuid & type_guid, zx_duration_t timeout)

    Defined at line 81 of file ../../src/firmware/paver/utils.cc

  • bool SpecMatches (const PartitionSpec & a, const PartitionSpec & b)

    Defined at line 90 of file ../../src/firmware/paver/device-partitioner.h

  • zx::result<std::string> GetBoardName (fidl::UnownedClientEnd<fuchsia_io::Directory> svc_root)

    Defined at line 97 of file ../../src/firmware/paver/utils.cc

  • void utf16_to_cstring (char * dst, const uint8_t * src, size_t charcount)

    TODO(69527): Remove this and migrate usages to |utf16_to_utf8|

    Defined at line 101 of file ../../src/firmware/paver/gpt.h

  • bool FilterByType (const GptPartitionMetadata & part, const uuid::Uuid & type)

    Defined at line 109 of file ../../src/firmware/paver/gpt.h

  • zx::result<> IsBoard (fidl::UnownedClientEnd<fuchsia_io::Directory> svc_root, std::string_view board_name)

    Defined at line 115 of file ../../src/firmware/paver/utils.cc

  • std::optional<uuid::Uuid> PartitionTypeGuid (Partition partition, PartitionScheme scheme)

    Defined at line 136 of file ../../src/firmware/paver/device-partitioner.cc

  • bool FilterByName (const GptPartitionMetadata & part, std::string_view name)

    Defined at line 82 of file ../../src/firmware/paver/gpt.cc

  • bool FilterByTypeAndName (const GptPartitionMetadata & part, const uuid::Uuid & type, std::string_view name)

    Defined at line 92 of file ../../src/firmware/paver/gpt.cc

  • bool IsFuchsiaSystemPartition (const PaverConfig & config, const GptPartitionMetadata & part)

    Defined at line 97 of file ../../src/firmware/paver/gpt.cc

  • bool IsFvmPartition (const GptPartitionMetadata & part)

    Defined at line 118 of file ../../src/firmware/paver/gpt.h

  • bool IsZirconPartitionSpec (const PartitionSpec & spec)

    Returns true if the spec partition is Zircon A/B/R.

    Defined at line 126 of file ../../src/firmware/paver/gpt.h

  • const char * PartitionName (Partition partition, PartitionScheme scheme)

    Defined at line 128 of file ../../src/firmware/paver/device-partitioner.cc

  • bool IsEfiSystemPartition (const GptPartitionMetadata & part)

    Defined at line 131 of file ../../src/firmware/paver/gpt.h

  • zx::result<> WriteSparse (PartitionClient & partition, const PartitionSpec & spec, zx::vmo payload_vmo, size_t payload_size)

    Writes the Android Sparse-formatted image from `payload_vmo` into `partition`.

    Defined at line 183 of file ../../src/firmware/paver/sparse.cc

  • bool ExtractZbiPayload (std::span<const uint8_t> data, const zbi_header_t ** header, std::span<const uint8_t> * payload)

    Extract the payload out of the given ZBI image.

    Return "true" on success, or "false" if the input data is invalid.

    On success, sets "header" to the header of the ZBI image, and

    "payload" to the payload of the ZBI. Both are guaranteed to be

    completed contained in "data".

    Defined at line 68 of file ../../src/firmware/paver/validation.cc

  • bool IsValidKernelZbi (Arch arch, std::span<const uint8_t> data)

    Perform some basic safety checks to ensure the given payload is a valid ZBI

    for the given architecture.

    Defined at line 105 of file ../../src/firmware/paver/validation.cc

  • bool IsValidAndroidKernel (std::span<const uint8_t> data)

    Perform some basic safety checks to ensure the given payload is a valid Android image.

    Defined at line 149 of file ../../src/firmware/paver/validation.cc

  • bool IsValidAndroidVendorKernel (std::span<const uint8_t> data)

    Defined at line 153 of file ../../src/firmware/paver/validation.cc

  • bool IsValidChromeOsKernel (std::span<const uint8_t> data)

    Perform some basic safety checks to ensure the given payload is a valid ChromeOS

    kernel image.

    Defined at line 157 of file ../../src/firmware/paver/validation.cc

Variables

zx_duration_t g_wipe_timeout

Defined at line 36 of file ../../src/firmware/paver/utils.cc