1 /*
2  * SPDX-FileCopyrightText: 2010-2022 Espressif Systems (Shanghai) CO LTD
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #pragma once
8 
9 #include "esp_bit_defs.h"
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 typedef enum {
16     MMU_MEM_CAP_EXEC  = BIT(0),
17     MMU_MEM_CAP_READ  = BIT(1),
18     MMU_MEM_CAP_WRITE = BIT(2),
19     MMU_MEM_CAP_32BIT = BIT(3),
20     MMU_MEM_CAP_8BIT  = BIT(4),
21 } mmu_mem_caps_t;
22 
23 /**
24  * MMU Page size
25  */
26 typedef enum {
27     MMU_PAGE_8KB  = 0x2000,
28     MMU_PAGE_16KB = 0x4000,
29     MMU_PAGE_32KB = 0x8000,
30     MMU_PAGE_64KB = 0x10000,
31 } mmu_page_size_t;
32 
33 /**
34  * MMU virtual address flags type
35  */
36 typedef enum {
37     MMU_VADDR_DATA        = BIT(0),
38     MMU_VADDR_INSTRUCTION = BIT(1),
39 } mmu_vaddr_t;
40 
41 /**
42  * External physical memory
43  */
44 typedef enum {
45     MMU_TARGET_FLASH0 = BIT(0),
46     MMU_TARGET_PSRAM0 = BIT(1),
47 } mmu_target_t;
48 
49 /**
50  * MMU table id
51  */
52 typedef enum {
53     MMU_TABLE_CORE0,
54     MMU_TABLE_CORE1,
55 } mmu_table_id_t;
56 
57 #ifdef __cplusplus
58 }
59 #endif
60