1, Will spi_flash_mmap decrypt data unconditional if Flash Encryption is on?I mean no matter the area is in partitions or not.
2, As We know, Not all of the flash is encrypted. Is it possible to save data in area which is not support now using spi_flash_write_encrypted and read them using spi_flash_mmap?
some questions about spi_flash_mmap
Re: some questions about spi_flash_mmap
Memory-mapped reads from flash are always decrypted if flash encryption is on, that is how the flash MMU is designed.
Therefore you can't use memory mapping to read from unencrypted partitions in flash, if flash encryption is on. (Or rather, you can, but such reads will produce garbage)
Therefore you can't use memory mapping to read from unencrypted partitions in flash, if flash encryption is on. (Or rather, you can, but such reads will produce garbage)
-
- Posts: 30
- Joined: Thu Dec 10, 2015 5:27 am
Re: some questions about spi_flash_mmap
And question 2?ESP_igrr wrote:Memory-mapped reads from flash are always decrypted if flash encryption is on, that is how the flash MMU is designed.
Therefore you can't use memory mapping to read from unencrypted partitions in flash, if flash encryption is on. (Or rather, you can, but such reads will produce garbage)
Is it possible to save data in area which is not supportted now (unused area, not in partitions) using spi_flash_write_encrypted and read them using spi_flash_mmap?
Re: some questions about spi_flash_mmap
All area of the flash chip is supported, in the sense that it can be accessed via spi_flash_* APIs and esp_partition_* APIs (in the latter case, provided that you define a partition for respective area). Yes, you can write to unpartitioned space using spi_flash_write_encrypted and then use spi_flash_mmap to read.Is it possible to save data in area which is not supportted now (unused area, not in partitions) using spi_flash_write_encrypted and read them using spi_flash_mmap?
But this is not recommended, in general. Most applications should use esp_partition_* APIs. That is the best way to ensure that your application is future proof and will not conflict with other components.
Who is online
Users browsing this forum: No registered users and 291 guests