[bug] TPM_TX_RX_TEST Load Access fault
- Dominant language
- SystemVerilog
- Stars
- 3.6k
- Forks
- 1.1k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 141
Description
### Description
I tested sending the following TPM command:
0x0B, 0xD4, 0x00,0x80,
0x80, 0x01, 0x00, 0x00.
0x00, 0x0C, 0x00, 0x00,
0x01, 0x7B, 0x00, 0x04
Which is a valid Get_random_CC
However I received a load access fault running this test.
Ony after adding this line to put the SPI device in FW mode did the write work:
static const uint32_t disable_SPI_mode[1] = {0x00000000};
mmio_region_memcpy_to_mmio32(spi_device.dev.base_addr, SPI_DEVICE_CONTROL_REG_OFFSET, disable_SPI_mode, 4 );
Not sure if I am missing something but this seems the correct way to set the test up. Thanks,
Best,
Tom :D
Contributor guide
Research direction
Reproduce the TPM_TX_RX_TEST Get_random_CC command and inspect the test initialization around SPI_DEVICE_CONTROL_REG_OFFSET. Check how the SPI device is configured before the command is sent and compare behavior with the shown FW-mode write. Done means the valid command no longer causes a load access fault under the documented test setup.
Written by the indexing model from the issue text.
Assessment
- Domain
- embedded-iot, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100