Software APIs
Protected Member Functions | Protected Attributes
bootstrap_unittest_util::BootstrapTest Class Reference

Protected Member Functions

void ExpectBootstrapRequestCheck (bool requested)
 Sets an expectation for a bootstrap request check. More...
 
void ExpectSpiCmd (spi_device_cmd_t cmd)
 Sets an expectation for a spi flash command. More...
 
void ExpectSpiFlashStatusGet (bool wel)
 Sets an expectation for getting the SPI flash status register. More...
 
void ExpectFlashCtrlWriteEnable ()
 Sets an expectation for enabling write for the data partition.
 
void ExpectFlashCtrlEraseEnable ()
 Sets an expectation for enabling erase for the data partition.
 
void ExpectFlashCtrlAllDisable ()
 Sets an expectation for disabling all permissions for the data partition.
 
void ExpectFlashCtrlChipErase (rom_error_t err0, rom_error_t err1)
 Sets expectations for a chip erase. More...
 
void ExpectFlashCtrlSectorErase (rom_error_t err0, rom_error_t err1, uint32_t addr)
 Sets expectations for a sector erase. More...
 
void ExpectFlashCtrlEraseVerify (rom_error_t err0, rom_error_t err1)
 Sets expectations for a chip erase verification. More...
 

Protected Attributes

::rom_test::MockAbsMmio mmio_
 
::rom_test::MockFlashCtrl flash_ctrl_
 
::rom_test::MockOtp otp_
 
::rom_test::MockRstmgr rstmgr_
 
::rom_test::MockSpiDevice spi_device_
 
- Protected Attributes inherited from rom_test::RomTest
std::unique_ptr< testing::InSequence > seq_
 

Detailed Description

Definition at line 20 of file bootstrap_unittest_util.h.

Member Function Documentation

◆ ExpectBootstrapRequestCheck()

void bootstrap_unittest_util::BootstrapTest::ExpectBootstrapRequestCheck ( bool  requested)
protected

Sets an expectation for a bootstrap request check.

Parameters
requestedWhether bootstrap is requested.

Definition at line 30 of file bootstrap_unittest_util.cc.

◆ ExpectFlashCtrlChipErase()

void bootstrap_unittest_util::BootstrapTest::ExpectFlashCtrlChipErase ( rom_error_t  err0,
rom_error_t  err1 
)
protected

Sets expectations for a chip erase.

Parameters
err0Result of erase for the first bank.
err1Result of erase for the second bank.

Definition at line 76 of file bootstrap_unittest_util.cc.

◆ ExpectFlashCtrlEraseVerify()

void bootstrap_unittest_util::BootstrapTest::ExpectFlashCtrlEraseVerify ( rom_error_t  err0,
rom_error_t  err1 
)
protected

Sets expectations for a chip erase verification.

Parameters
err0Result of erase verification for the first bank.
err1Result of erase verification for the second bank.

Definition at line 103 of file bootstrap_unittest_util.cc.

◆ ExpectFlashCtrlSectorErase()

void bootstrap_unittest_util::BootstrapTest::ExpectFlashCtrlSectorErase ( rom_error_t  err0,
rom_error_t  err1,
uint32_t  addr 
)
protected

Sets expectations for a sector erase.

Parameters
err0Result of erase for the first page.
err1Result of erase for the second page.
addrErase start address.

Definition at line 87 of file bootstrap_unittest_util.cc.

◆ ExpectSpiCmd()

void bootstrap_unittest_util::BootstrapTest::ExpectSpiCmd ( spi_device_cmd_t  cmd)
protected

Sets an expectation for a spi flash command.

Parameters
cmdCommand struct to output.

Definition at line 42 of file bootstrap_unittest_util.cc.

◆ ExpectSpiFlashStatusGet()

void bootstrap_unittest_util::BootstrapTest::ExpectSpiFlashStatusGet ( bool  wel)
protected

Sets an expectation for getting the SPI flash status register.

Parameters
welValue of the WEL bit.

Definition at line 47 of file bootstrap_unittest_util.cc.