xtensa/esp32s3: Add SPIRAM high memory support

1. Configurable mapping of virtual address to psram physical address
  2. Access SPIRAM memory at high physical address through bank switching

Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
This commit is contained in:
chenwen@espressif.com
2023-11-14 19:32:34 +08:00
committed by Xiang Xiao
parent 88dd492e4d
commit 53beaf1a67
8 changed files with 1465 additions and 7 deletions
+9 -2
View File
@@ -29,15 +29,22 @@
#include <signal.h>
#ifdef CONFIG_ESP32_SPIRAM
#if defined(CONFIG_ESP32_SPIRAM) || defined(CONFIG_ESP32S3_SPIRAM)
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
#ifdef CONFIG_ESP32S3_SPIRAM
/* ESP32S3 MMU block size */
# define ESP_HIMEM_BLKSZ (0x10000)
#else
/* ESP32 MMU block size */
#define ESP_HIMEM_BLKSZ (0x8000)
# define ESP_HIMEM_BLKSZ (0x8000)
#endif
/* Command: HIMEMIOC_ALLOC_BLOCKS
* Description: Allocate a certain number of physical RAM blocks.