Virtual Efuses Not Working
Posted: Sat Mar 04, 2023 10:05 pm
I have an existing project that runs as desired. I am looking to enable Secure Boot and so I would like to use virtual efuses to test. Before enabling Secure Boot I decided to just enable virtual efuses to make sure everything still ran the same but it does not. In fact it doesn't run at all now. But what is strange is that the efuses shown in the boot output are not the correct state of my efuses at all.
When I dump my efuses this is the output I get:
And then when I boot my device I see the following:
I did erase the virtual efuse region of memory so it shouldn't be reading random garbage. I confirmed this by dumping the region with esptool and saw all 0xFF. I do have flash encryption enabled. Not sure if that has any effect. A few questions.
1. Why don't the efuses read from flash match?
2. Do I need to mark the efuse_em partition as encrypted? (it is currently not)
3. Can the efuse_em partition be anywhere in the partition table? If not, where does it specifically need to go.
I appreciate any help.
When I dump my efuses this is the output I get:
Code: Select all
Detecting chip type... ESP32
BLOCK0 ( ) [0 ] read_regs: 00110080 6d31ca18 0024e89f 0000ad00 00000436 f015de26 00000344
BLOCK1 (flash_encryption) [1 ] read_regs: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
BLOCK2 (secure_boot_v1 s) [2 ] read_regs: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
BLOCK3 ( ) [3 ] read_regs: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
EFUSE_REG_DEC_STATUS 0x00000000
Code: Select all
W (85) efuse: Loading virtual efuse blocks from flash
EFUSE_BLKx:
0) 0x023c8564 0xa1701079 0x10f4f5f8 0xa1a402fa 0x023c8564 0xa1701079 0x10f4f5f8
1) 0x65778af8 0xd1407f74 0xfa268f21 0x24b18f14 0x65778af8 0xd1407f74 0xfa268f21 0x24b18f14
2) 0xedf0e0c3 0xbf46abd3 0xf6955dfa 0x4319559a 0xedf0e0c3 0xbf46abd3 0xf6955dfa 0x4319559a
3) 0x89d94c1c 0xd589f44d 0x29a97c06 0xcba24d68 0x89d94c1c 0xd589f44d 0x29a97c06 0xcba24d68
1. Why don't the efuses read from flash match?
2. Do I need to mark the efuse_em partition as encrypted? (it is currently not)
3. Can the efuse_em partition be anywhere in the partition table? If not, where does it specifically need to go.
I appreciate any help.