blob: 0f7f84accf9a88b9fec5ccd56172ba6f74cc14e9 [file] [log] [blame]
Ralf Baechle773cb772009-06-23 10:36:38 +01001/*
2 * (C) Copyright 2004, 2005 Cavium Networks
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of
7 * the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
17 * MA 02111-1307 USA
18 */
19
20#ifndef __OCTEON_BOOT_H__
21#define __OCTEON_BOOT_H__
22
23#include <linux/types.h>
24
25struct boot_init_vector {
26 uint32_t stack_addr;
27 uint32_t code_addr;
28 uint32_t app_start_func_addr;
29 uint32_t k0_val;
30 uint32_t flags;
31 uint32_t boot_info_addr;
32 uint32_t pad;
33 uint32_t pad2;
34};
35
36/* similar to bootloader's linux_app_boot_info but without global data */
37struct linux_app_boot_info {
38 uint32_t labi_signature;
39 uint32_t start_core0_addr;
40 uint32_t avail_coremask;
41 uint32_t pci_console_active;
42 uint32_t icache_prefetch_disable;
43 uint32_t InitTLBStart_addr;
44 uint32_t start_app_addr;
45 uint32_t cur_exception_base;
46 uint32_t no_mark_private_data;
47 uint32_t compact_flash_common_base_addr;
48 uint32_t compact_flash_attribute_base_addr;
49 uint32_t led_display_base_addr;
50};
51
52/* If not to copy a lot of bootloader's structures
53 here is only offset of requested member */
54#define AVAIL_COREMASK_OFFSET_IN_LINUX_APP_BOOT_BLOCK 0x765c
55
56/* hardcoded in bootloader */
57#define LABI_ADDR_IN_BOOTLOADER 0x700
58
59#define LINUX_APP_BOOT_BLOCK_NAME "linux-app-boot"
60
61#define LABI_SIGNATURE 0xAABBCCDD
62
63/* from uboot-headers/octeon_mem_map.h */
64#define EXCEPTION_BASE_INCR (4 * 1024)
65 /* Increment size for exception base addresses (4k minimum) */
66#define EXCEPTION_BASE_BASE 0
67#define BOOTLOADER_PRIV_DATA_BASE (EXCEPTION_BASE_BASE + 0x800)
68#define BOOTLOADER_BOOT_VECTOR (BOOTLOADER_PRIV_DATA_BASE)
69
70#endif /* __OCTEON_BOOT_H__ */