You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
734 B

/*
* Copyright (c) Hisilicon Technologies Co., Ltd. 2014-2020. All rights reserved.
* Description: mmu
* Author: SmartMedia_BSP
* Create: 2014-06-04
*/
#ifndef MMUH
#define MMUH
#include <stddef.h>
#include <cache.h>
#define SECTION_COUNT 4096
#define SECTION_SIZE _1M
#define SECTION_SHIFT 20
#define PAGE_RW (3 << 10)
#define PAGE_DOMAIN (0 << 5)
#define PAGE_SECTION (1 << 1)
#define PAGE_XN (1 << 4)
#define PAGE_B (1 << 2)
#define PAGE_C (1 << 3)
int mmu_init(unsigned int pgt_offset);
void mmu_set(uint32 start, uint32 size, uint32 attrib);
int mmu_cache_enable(void);
int mmu_cache_disable(void);
int cache_flush_all(void);
#endif /* MMUH */