class MockZirconBootOps
Defined at line 20 of file ../../src/firmware/lib/zircon_boot/include/lib/zircon_boot/test/mock_zircon_boot_ops.h
Public Members
static const size_t kExtraZbiItemsCapacity
Public Methods
void MockZirconBootOps ()
Defined at line 31 of file ../../src/firmware/lib/zircon_boot/include/lib/zircon_boot/test/mock_zircon_boot_ops.h
zx::result<> ReadFromPartition (const char * part, size_t offset, size_t size, void * out)
Basic ops
Defined at line 31 of file ../../src/firmware/lib/zircon_boot/test/mock_zircon_boot_ops.cc
std::optional<AbrSlotIndex> GetBootedSlot ()
Defined at line 38 of file ../../src/firmware/lib/zircon_boot/include/lib/zircon_boot/test/mock_zircon_boot_ops.h
const std::vector<uint8_t> & GetBootedImage ()
Defined at line 39 of file ../../src/firmware/lib/zircon_boot/include/lib/zircon_boot/test/mock_zircon_boot_ops.h
zx::result<> WriteToPartition (const char * part, size_t offset, size_t size, const void * payload)
Defined at line 41 of file ../../src/firmware/lib/zircon_boot/test/mock_zircon_boot_ops.cc
zx::result<size_t> GetPartitionSize (const char * part)
Defined at line 52 of file ../../src/firmware/lib/zircon_boot/test/mock_zircon_boot_ops.cc
AbrSlotIndex GetFirmwareSlot ()
Firmware ABR related
Defined at line 54 of file ../../src/firmware/lib/zircon_boot/include/lib/zircon_boot/test/mock_zircon_boot_ops.h
void SetFirmwareSlot (AbrSlotIndex slot)
Defined at line 55 of file ../../src/firmware/lib/zircon_boot/include/lib/zircon_boot/test/mock_zircon_boot_ops.h
void Boot (zbi_header_t * image, size_t capacity)
Defined at line 68 of file ../../src/firmware/lib/zircon_boot/test/mock_zircon_boot_ops.cc
AbrOps GetAbrOps ()
Defined at line 103 of file ../../src/firmware/lib/zircon_boot/test/mock_zircon_boot_ops.cc
void SetAddDeviceZbiItemsMethod (std::function<bool (zbi_header_t *, size_t, const AbrSlotIndex *)> method)
Defined at line 111 of file ../../src/firmware/lib/zircon_boot/test/mock_zircon_boot_ops.cc
void AddPartition (const char * name, size_t size)
Adds a partition to the fake disk.
Defined at line 60 of file ../../src/firmware/lib/zircon_boot/test/mock_zircon_boot_ops.cc
LockStatus GetDeviceLockStatus ()
Defined at line 61 of file ../../src/firmware/lib/zircon_boot/include/lib/zircon_boot/test/mock_zircon_boot_ops.h
void SetDeviceLockStatus (LockStatus status)
Defined at line 62 of file ../../src/firmware/lib/zircon_boot/include/lib/zircon_boot/test/mock_zircon_boot_ops.h
void RemovePartition (const char * name)
Removes an existing partition, which will cause a test failure on any
further read or write access. Useful to ensure code-under-test never
touches the given partition past a certain point.
Defined at line 64 of file ../../src/firmware/lib/zircon_boot/test/mock_zircon_boot_ops.cc
void RemoveAllPartitions ()
Removes all partitions, any further disk access will cause test failure.
Defined at line 66 of file ../../src/firmware/lib/zircon_boot/test/mock_zircon_boot_ops.cc
void SetRandomData (const std::vector<uint8_t> & data)
Defined at line 67 of file ../../src/firmware/lib/zircon_boot/include/lib/zircon_boot/test/mock_zircon_boot_ops.h
const std::vector<uint8_t> & GetKernelLoadBuffer ()
Returns the kernel load buffer for test examination.
Defined at line 74 of file ../../src/firmware/lib/zircon_boot/include/lib/zircon_boot/test/mock_zircon_boot_ops.h
void Reboot (bool force_recovery)
Defined at line 76 of file ../../src/firmware/lib/zircon_boot/test/mock_zircon_boot_ops.cc
void WriteRollbackIndex (size_t location, uint64_t rollback_index)
Verified boot related.
Defined at line 116 of file ../../src/firmware/lib/zircon_boot/test/mock_zircon_boot_ops.cc
zx::result<uint64_t> ReadRollbackIndex (size_t location)
Defined at line 120 of file ../../src/firmware/lib/zircon_boot/test/mock_zircon_boot_ops.cc
AvbAtxPermanentAttributes GetPermanentAttributes ()
Defined at line 133 of file ../../src/firmware/lib/zircon_boot/test/mock_zircon_boot_ops.cc
void SetPermanentAttributes (const AvbAtxPermanentAttributes & permanent_attribute)
Defined at line 128 of file ../../src/firmware/lib/zircon_boot/test/mock_zircon_boot_ops.cc
ZirconBootOps GetZirconBootOps ()
Defined at line 252 of file ../../src/firmware/lib/zircon_boot/test/mock_zircon_boot_ops.cc
ZirconBootOps GetZirconBootOpsWithAvb ()
Defined at line 272 of file ../../src/firmware/lib/zircon_boot/test/mock_zircon_boot_ops.cc
uint8_t * GetKernelLoadBuffer (size_t * size)
ZirconBootOps callback to provide the kernel load buffer.
Defined at line 84 of file ../../src/firmware/lib/zircon_boot/test/mock_zircon_boot_ops.cc
void SetKernelLoadBufferSize (size_t size)
Resizes the kernel load buffer; must be called before loading.
Defined at line 82 of file ../../src/firmware/lib/zircon_boot/test/mock_zircon_boot_ops.cc
Enumerations
enum LockStatus
| Name | Value |
|---|---|
| kLocked | 0 |
| kUnlocked | 1 |
Defined at line 22 of file ../../src/firmware/lib/zircon_boot/include/lib/zircon_boot/test/mock_zircon_boot_ops.h