All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
sw_board.h
Go to the documentation of this file.
1 /*
2  * OpenVirtualization:
3  * For additional details and support contact [email protected].
4  * Additional documentation can be found at www.openvirtualization.org
5  *
6  * Copyright (C) 2011 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 
27 #ifndef _VE_BOARD_H__
28 #define _VE_BOARD_H__
29 
30 #include <sw_types.h>
31 #include <sw_board_asm.h>
32 
33 #define VE_FRAME_BASE 0x90100000
34 #define VE_FRAME_SIZE (1048576 * 3)
35 
36 #define NORMAL_WORLD_RAM_START 0x80000000
37 #define NSK_LOAD_ADDRESS NORMAL_WORLD_RAM_START
38 /* 1MB below SECURE_WORLD_RAM_START is reserved for "nsadmin" section*/
39 #define GUEST_MEM_SIZE 0x8000000
40 #define SECURE_WORLD_RAM_START (VE_FRAME_BASE + VE_FRAME_SIZE)
41 #define SECURE_WORLD_RAM_END (0x940FFFFF - 0x00100000)
42 
43 #define ELF_LOADER_START_ADDRESS ((u32 *)(0x93ffffff + 1))
44 
45 #define BASE_LOAD_ADDRESS (SECURE_WORLD_RAM_START - 0x01000000)
46 
47 #ifdef CONFIG_MULTI_GUESTS_SUPPORT
48 #define LINUX_INITRD_ADDR 0x88d00000
49 #define LINUX_INITRD_SIZE (8192 * 1024)
50 #endif
51 
52 #define VE_RS1_L2CC (0x2c100000)
53 
54 #define VE_RS1_SCU (VE_RS1_MPIC + 0x0000)
55 #define VE_RS1_MPCORE_TWD (VE_RS1_MPIC + 0x0600)
56 
57 #define VE_SYSTEM_REGS 0x1C010000
58 #define VE_CLCD_BASE 0x1C1F0000
59 #define VE_SYS_FLAGSSET_ADDR (VE_SYSTEM_REGS + 0x30)
60 #define VE_SYS_FLAGSCLR_ADDR (VE_SYSTEM_REGS + 0x34)
61 
62 /*
63  * Peripheral addresses
64  */
65 #define SYSCTL_BASE 0x1c020000
66 
67 #define TIMER0_BASE 0x1c110000
68 #define TIMER1_BASE 0x1c110020
69 #define TIMER2_BASE 0x1c120000
70 #define TIMER3_BASE 0x1c120020
71 #define TIMER_COUNT_MAX 0xFFFFFFFF
72 
73 #define UART0_ADDR 0x1C090000
74 #define UART1_ADDR 0x1C0A0000
75 #define UART2_ADDR 0x1C0B0000
76 #define UART3_ADDR 0x1C0C0000
77 /*
78  * Irqs
79  */
80 #define IRQ_GIC_START 32
81 #define GIC_NR_IRQS (IRQ_GIC_START + 64)
82 #define GIC_MAX_NR 1
83 
84 /* VE RS1 IRQs numbers definitions */
85 #define IRQ_TIMER_PAIR0 (2 + IRQ_GIC_START)
86 #define IRQ_TIMER_PAIR1 (3 + IRQ_GIC_START)
87 
88 #define FREE_RUNNING_TIMER_IRQ IRQ_TIMER_PAIR1
89 #define TICK_TIMER_IRQ IRQ_TIMER_PAIR1
90 
91 #define FREE_RUNNING_TIMER_BASE TIMER2_BASE
92 #define TICK_TIMER_BASE TIMER3_BASE
93 
94 #define SECURE_UART_BASE UART0_ADDR
95 
96 #define NO_OF_INTERRUPTS_IMPLEMENTED GIC_NR_IRQS
97 
98 #ifdef OTZONE_ASYNC_NOTIFY_SUPPORT
99 #define NS_SGI_NOTIFY_INTERRUPT 0x7
100 #endif
101 
102 #define GIC_ITLINES 2
103 
104 #ifdef SCHEDULE_HIGH_PRIORITY_GUEST
105 #define HIGH_PRIORITY_GUEST 0
106 #define LOW_PRIORITY_GUEST_UART_IRQ 37
107 #endif
108 
115 
122 
129 
133 void board_init(void);
134 
138 int board_mmc_init(void);
139 
140 
144 void unmap_init_section(void);
145 #endif