My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
pt_p4k_a39.h
Go to the documentation of this file.
1 /*
2  * OpenVirtualization:
3  * For additional details and support contact developer@sierraware.com.
4  * Additional documentation can be found at www.openvirtualization.org
5  *
6  * Copyright (C) 2010-2014 SierraWare
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21  *
22  */
23 #ifndef __ARMV8_INC_P4K_A39_H__
24 #define __ARMV8_INC_P4K_A39_H__
25 
26 #define PAGE_SIZE 4096
27 #define PAGE_SHIFT 12
28 #define ADDR_SIZE_BITS 39
29 #define START_LEVEL 1
30 #define BLOCKMAP_LEVEL 2
31 #define BLOCK_SIZE 0x200000
32 
33 #define BOOT_PTABLE_SIZE 16384
34 
35 #define LEVEL0_OFFSET_MASK 0x0000ff8000000000
36 #define LEVEL_OFFSET_BITS 9
37 
38 #define OA_TABLE_MASK 0x0000fffffffff000
39 #define OA_BLOCK_MASK 0x0000ffffffe00000
40 #define OA_PAGE_MASK 0x0000fffffffff000
41 
42 #ifdef CONFIG_BOARD_IPS_40
43 
44 #if defined __KERNEL_EL1__
45 /* PS/IPS - 40 bit
46  * TxSZ - 0x19 ( 64 - 39 = 25)
47  * ORGN - 0b01(Normal Memory Outer Writeback Write Allocate Cacheable)
48  * IRGN - 0b01(Normal Memory Inner Writeback Write Allocate Cacheable)
49  * SH - 0b11(Inner shareable)
50  * TG - 0b00(4k ) for ttbr0 and 0b10(4k) for ttbr1
51  */
52 #define BOOT_TCR 0x00000002B5193519
53 #else
54 #define BOOT_TCR 0x0000000000022519
55 #endif
56 
57 #else /* CONFIG_BOARD_IPS_40 */
58 
59 #error "Unsupported Physical address size"
60 
61 #endif
62 
63 #endif /* __ARMV8_INC_P4K_A39_H__ */