2 * Copyright (c) 2003-2009 RMI Corporation
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of RMI Corporation, nor the names of its contributors,
14 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission.
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 #ifndef _SHARED_STRUCTS_H
31 #define _SHARED_STRUCTS_H
33 /* If you make any changes to the below structs, shared_structs_offsets.h
34 * should be regenerated
36 #define BOOT1_INFO_VERSION 0x0001
41 uint64_t output_device;
48 uint64_t cpu_online_map;
49 uint64_t master_reentry_sp;
50 uint64_t master_reentry_gp;
51 uint64_t master_reentry_fn;
52 uint64_t slave_reentry_fn;
54 uint64_t uart_putchar;
56 uint64_t uart_getchar;
60 uint64_t cpu_frequency;
61 uint64_t board_version;
66 uint64_t psb_os_cpu_map;
67 uint64_t userapp_cpu_map;
70 uint64_t board_major_version;
71 uint64_t board_minor_version;
72 uint64_t board_manf_revision;
73 uint64_t board_serial_number;
74 uint64_t psb_physaddr_map;
77 extern struct boot1_info xlr_boot1_info;
80 /* This structure is passed to all applications launched from the linux
81 loader through K0 register
83 #define XLR_LOADER_INFO_MAGIC 0x600ddeed
84 struct xlr_loader_info {
86 /* xlr_loader_shared_struct_t for CPU 0 will start here */
87 unsigned long sh_mem_start;
88 /* Size of the shared memory b/w linux apps and rmios apps */
89 uint32_t app_sh_mem_size;
92 /* Boot loader uses the linux mips convention */
93 #define BOOT1_MEMMAP_MAX 32
95 enum xlr_phys_memmap_t {
96 BOOT1_MEM_RAM = 1, BOOT1_MEM_ROM_DATA, BOOT1_MEM_RESERVED
99 struct xlr_boot1_mem_map {
100 uint32_t num_entries;
106 } physmem_map[BOOT1_MEMMAP_MAX];