POK(kernelpart)
|
00001 /* 00002 * POK header 00003 * 00004 * The following file is a part of the POK project. Any modification should 00005 * made according to the POK licence. You CANNOT use this file or a part of 00006 * this file is this part of a file for your own project 00007 * 00008 * For more information on the POK licence, please see our LICENCE FILE 00009 * 00010 * Please follow the coding guidelines described in doc/CODING_GUIDELINES 00011 * 00012 * Copyright (c) 2007-2009 POK team 00013 * 00014 * Created by julien on Thu Jan 15 23:34:13 2009 00015 */ 00016 00022 #ifndef __POK_SPARC_SPACE_H__ 00023 #define __POK_SPARC_SPACE_H__ 00024 00025 #include <types.h> 00026 00032 #define MM_ET_INVALID 0x0 00033 #define MM_ET_PTD 0x1 00034 #define MM_ET_PTE 0x2 00042 #define MM_ACC_R (0x0 << 2) 00043 #define MM_ACC_RW (0x1 << 2) 00044 #define MM_ACC_RE (0x2 << 2) 00045 #define MM_ACC_RWE (0x3 << 2) 00046 #define MM_ACC_E (0x4 << 2) 00047 #define MM_ACC_R_S_RW (0x5 << 2) 00049 #define MM_ACC_S_RE (0x6 << 2) 00050 #define MM_ACC_S_RWE (0x7 << 2) 00058 #define MM_CACHEABLE (1 << 7) 00059 #define MM_MODIFIED (1 << 6) 00060 #define MM_REFERENCED (1 << 5) 00061 00067 #define MM_LVL1_ENTRIES_NBR 256 00068 #define MM_LVL1_PAGE_SIZE (64 * 64 * 4 * 1024) 00073 #define mm_index1(addr) (((addr) >> 24) & 0xFF) 00074 00075 #define MM_LVL2_ENTRIES_NBR 64 00076 #define MM_LVL2_PAGE_SIZE (64 * 4 * 1024) 00081 #define mm_index2(addr) (((addr) >> 18) & 0x3F) 00082 00083 #define MM_LVL3_ENTRIES_NBR 64 00084 #define MM_LVL3_PAGE_SIZE (4 * 1024) 00089 #define mm_index3(addr) (((addr) >> 12) & 0x3F) 00090 00097 #define ASI_M_MMUREGS 0x19 /* not sparc v8 compliant */ 00098 #define MMU_CTRL_REG 0x00000000 00099 #define MMU_CTXTBL_PTR 0x00000100 00100 #define MMU_CTX_REG 0x00000200 00101 #define MMU_FAULT_STATUS 0x00000300 00102 #define MMU_FAULT_ADDR 0x00000400 00103 00105 #define LEON_CTX_NBR 256 00107 typedef uint32_t pte; 00108 typedef uint32_t ptd; 00109 00110 void pok_arch_space_init (void); 00111 00112 #endif /* !__POK_PPC_SPACE_H__ */ 00113