mirror of
https://github.com/apache/nuttx.git
synced 2026-06-08 01:42:58 +08:00
xtensa/esp32s3: Invalidate cache if the flash address used has a cache mapping.
Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
This commit is contained in:
committed by
Xiang Xiao
parent
e852f28710
commit
e2a82f008a
File diff suppressed because it is too large
Load Diff
@@ -42,10 +42,75 @@ extern "C"
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
/* SPI Flash map request data */
|
||||
|
||||
struct spiflash_map_req_s
|
||||
{
|
||||
/* Request mapping SPI Flash base address */
|
||||
|
||||
uint32_t src_addr;
|
||||
|
||||
/* Request mapping SPI Flash size */
|
||||
|
||||
uint32_t size;
|
||||
|
||||
/* Mapped memory pointer */
|
||||
|
||||
void *ptr;
|
||||
|
||||
/* Mapped started MMU page index */
|
||||
|
||||
uint32_t start_page;
|
||||
|
||||
/* Mapped MMU page count */
|
||||
|
||||
uint32_t page_cnt;
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp32s3_mmap
|
||||
*
|
||||
* Description:
|
||||
* Mapped SPI Flash address to ESP32-S3's address bus, so that software
|
||||
* can read SPI Flash data by reading data from memory access.
|
||||
*
|
||||
* If SPI Flash hardware encryption is enable, the read from mapped
|
||||
* address is decrypted.
|
||||
*
|
||||
* Input Parameters:
|
||||
* req - SPI Flash mapping requesting parameters
|
||||
*
|
||||
* Returned Value:
|
||||
* 0 if success or a negative value if fail.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp32s3_mmap(struct spiflash_map_req_s *req);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp32s3_ummap
|
||||
*
|
||||
* Description:
|
||||
* Unmap SPI Flash address in ESP32-S3's address bus, and free resource.
|
||||
*
|
||||
* Input Parameters:
|
||||
* req - SPI Flash mapping requesting parameters
|
||||
*
|
||||
* Returned Value:
|
||||
* None.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void esp32s3_ummap(const struct spiflash_map_req_s *req);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: spi_flash_read_encrypted
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user