1198160Srrs/*- 2198160Srrs * Copyright (c) 2003-2009 RMI Corporation 3198160Srrs * All rights reserved. 4198160Srrs * 5198160Srrs * Redistribution and use in source and binary forms, with or without 6198160Srrs * modification, are permitted provided that the following conditions 7198160Srrs * are met: 8198160Srrs * 1. Redistributions of source code must retain the above copyright 9198160Srrs * notice, this list of conditions and the following disclaimer. 10198160Srrs * 2. Redistributions in binary form must reproduce the above copyright 11198160Srrs * notice, this list of conditions and the following disclaimer in the 12198160Srrs * documentation and/or other materials provided with the distribution. 13198160Srrs * 3. Neither the name of RMI Corporation, nor the names of its contributors, 14198160Srrs * may be used to endorse or promote products derived from this software 15198160Srrs * without specific prior written permission. 16198160Srrs * 17198160Srrs * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18198160Srrs * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19198160Srrs * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20198160Srrs * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21198160Srrs * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22198160Srrs * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23198160Srrs * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24198160Srrs * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25198160Srrs * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26198160Srrs * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27198160Srrs * SUCH DAMAGE. 28198160Srrs * 29211994Sjchandra * RMI_BSD 30211994Sjchandra * $FreeBSD$ 31211994Sjchandra */ 32198160Srrs#ifndef _SHARED_STRUCTS_H 33198160Srrs#define _SHARED_STRUCTS_H 34198160Srrs 35198160Srrs#define BOOT1_INFO_VERSION 0x0001 36198160Srrs 37198160Srrsstruct boot1_info { 38198625Srrs uint64_t boot_level; 39198625Srrs uint64_t io_base; 40198625Srrs uint64_t output_device; 41198625Srrs uint64_t uart_print; 42198625Srrs uint64_t led_output; 43198625Srrs uint64_t init; 44198625Srrs uint64_t exit; 45198625Srrs uint64_t warm_reset; 46198625Srrs uint64_t wakeup; 47198625Srrs uint64_t cpu_online_map; 48198625Srrs uint64_t master_reentry_sp; 49198625Srrs uint64_t master_reentry_gp; 50198625Srrs uint64_t master_reentry_fn; 51198625Srrs uint64_t slave_reentry_fn; 52198625Srrs uint64_t magic_dword; 53198625Srrs uint64_t uart_putchar; 54198625Srrs uint64_t size; 55198625Srrs uint64_t uart_getchar; 56198625Srrs uint64_t nmi_handler; 57198625Srrs uint64_t psb_version; 58198625Srrs uint64_t mac_addr; 59198625Srrs uint64_t cpu_frequency; 60198625Srrs uint64_t board_version; 61198625Srrs uint64_t malloc; 62198625Srrs uint64_t free; 63198625Srrs uint64_t alloc_pbuf; 64198625Srrs uint64_t free_pbuf; 65198625Srrs uint64_t psb_os_cpu_map; 66198625Srrs uint64_t userapp_cpu_map; 67198625Srrs uint64_t wakeup_os; 68198625Srrs uint64_t psb_mem_map; 69198625Srrs uint64_t board_major_version; 70198625Srrs uint64_t board_minor_version; 71198625Srrs uint64_t board_manf_revision; 72198625Srrs uint64_t board_serial_number; 73198625Srrs uint64_t psb_physaddr_map; 74198160Srrs}; 75198160Srrs 76198160Srrsextern struct boot1_info xlr_boot1_info; 77198160Srrs 78198160Srrs 79198160Srrs/* This structure is passed to all applications launched from the linux 80198160Srrs loader through K0 register 81198160Srrs */ 82198160Srrs#define XLR_LOADER_INFO_MAGIC 0x600ddeed 83198160Srrsstruct xlr_loader_info { 84198160Srrs uint32_t magic; 85198160Srrs /* xlr_loader_shared_struct_t for CPU 0 will start here */ 86198160Srrs unsigned long sh_mem_start; 87198160Srrs /* Size of the shared memory b/w linux apps and rmios apps */ 88198160Srrs uint32_t app_sh_mem_size; 89198160Srrs}; 90198160Srrs 91198160Srrs/* Boot loader uses the linux mips convention */ 92198160Srrs#define BOOT1_MEMMAP_MAX 32 93198160Srrs 94198625Srrsenum xlr_phys_memmap_t { 95198625Srrs BOOT1_MEM_RAM = 1, BOOT1_MEM_ROM_DATA, BOOT1_MEM_RESERVED 96198625Srrs}; 97198160Srrs 98198160Srrsstruct xlr_boot1_mem_map { 99198625Srrs uint32_t num_entries; 100198625Srrs struct { 101198625Srrs uint64_t addr; 102198625Srrs uint64_t size; 103198625Srrs uint32_t type; 104198625Srrs uint32_t pad; 105198625Srrs } physmem_map[BOOT1_MEMMAP_MAX]; 106198160Srrs}; 107198160Srrs 108198160Srrs 109198160Srrs#endif 110