18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci * Copyright 2003-2011 NetLogic Microsystems, Inc. (NetLogic). All rights
38c2ecf20Sopenharmony_ci * reserved.
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * This software is available to you under a choice of one of two
68c2ecf20Sopenharmony_ci * licenses.  You may choose to be licensed under the terms of the GNU
78c2ecf20Sopenharmony_ci * General Public License (GPL) Version 2, available from the file
88c2ecf20Sopenharmony_ci * COPYING in the main directory of this source tree, or the NetLogic
98c2ecf20Sopenharmony_ci * license below:
108c2ecf20Sopenharmony_ci *
118c2ecf20Sopenharmony_ci * Redistribution and use in source and binary forms, with or without
128c2ecf20Sopenharmony_ci * modification, are permitted provided that the following conditions
138c2ecf20Sopenharmony_ci * are met:
148c2ecf20Sopenharmony_ci *
158c2ecf20Sopenharmony_ci * 1. Redistributions of source code must retain the above copyright
168c2ecf20Sopenharmony_ci *    notice, this list of conditions and the following disclaimer.
178c2ecf20Sopenharmony_ci * 2. Redistributions in binary form must reproduce the above copyright
188c2ecf20Sopenharmony_ci *    notice, this list of conditions and the following disclaimer in
198c2ecf20Sopenharmony_ci *    the documentation and/or other materials provided with the
208c2ecf20Sopenharmony_ci *    distribution.
218c2ecf20Sopenharmony_ci *
228c2ecf20Sopenharmony_ci * THIS SOFTWARE IS PROVIDED BY NETLOGIC ``AS IS'' AND ANY EXPRESS OR
238c2ecf20Sopenharmony_ci * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
248c2ecf20Sopenharmony_ci * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
258c2ecf20Sopenharmony_ci * ARE DISCLAIMED. IN NO EVENT SHALL NETLOGIC OR CONTRIBUTORS BE LIABLE
268c2ecf20Sopenharmony_ci * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
278c2ecf20Sopenharmony_ci * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
288c2ecf20Sopenharmony_ci * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
298c2ecf20Sopenharmony_ci * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
308c2ecf20Sopenharmony_ci * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
318c2ecf20Sopenharmony_ci * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
328c2ecf20Sopenharmony_ci * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
338c2ecf20Sopenharmony_ci */
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci#ifndef _ASM_NETLOGIC_BOOTINFO_H
368c2ecf20Sopenharmony_ci#define _ASM_NETLOGIC_BOOTINFO_H
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_cistruct psb_info {
398c2ecf20Sopenharmony_ci	uint64_t boot_level;
408c2ecf20Sopenharmony_ci	uint64_t io_base;
418c2ecf20Sopenharmony_ci	uint64_t output_device;
428c2ecf20Sopenharmony_ci	uint64_t uart_print;
438c2ecf20Sopenharmony_ci	uint64_t led_output;
448c2ecf20Sopenharmony_ci	uint64_t init;
458c2ecf20Sopenharmony_ci	uint64_t exit;
468c2ecf20Sopenharmony_ci	uint64_t warm_reset;
478c2ecf20Sopenharmony_ci	uint64_t wakeup;
488c2ecf20Sopenharmony_ci	uint64_t online_cpu_map;
498c2ecf20Sopenharmony_ci	uint64_t master_reentry_sp;
508c2ecf20Sopenharmony_ci	uint64_t master_reentry_gp;
518c2ecf20Sopenharmony_ci	uint64_t master_reentry_fn;
528c2ecf20Sopenharmony_ci	uint64_t slave_reentry_fn;
538c2ecf20Sopenharmony_ci	uint64_t magic_dword;
548c2ecf20Sopenharmony_ci	uint64_t uart_putchar;
558c2ecf20Sopenharmony_ci	uint64_t size;
568c2ecf20Sopenharmony_ci	uint64_t uart_getchar;
578c2ecf20Sopenharmony_ci	uint64_t nmi_handler;
588c2ecf20Sopenharmony_ci	uint64_t psb_version;
598c2ecf20Sopenharmony_ci	uint64_t mac_addr;
608c2ecf20Sopenharmony_ci	uint64_t cpu_frequency;
618c2ecf20Sopenharmony_ci	uint64_t board_version;
628c2ecf20Sopenharmony_ci	uint64_t malloc;
638c2ecf20Sopenharmony_ci	uint64_t free;
648c2ecf20Sopenharmony_ci	uint64_t global_shmem_addr;
658c2ecf20Sopenharmony_ci	uint64_t global_shmem_size;
668c2ecf20Sopenharmony_ci	uint64_t psb_os_cpu_map;
678c2ecf20Sopenharmony_ci	uint64_t userapp_cpu_map;
688c2ecf20Sopenharmony_ci	uint64_t wakeup_os;
698c2ecf20Sopenharmony_ci	uint64_t psb_mem_map;
708c2ecf20Sopenharmony_ci	uint64_t board_major_version;
718c2ecf20Sopenharmony_ci	uint64_t board_minor_version;
728c2ecf20Sopenharmony_ci	uint64_t board_manf_revision;
738c2ecf20Sopenharmony_ci	uint64_t board_serial_number;
748c2ecf20Sopenharmony_ci	uint64_t psb_physaddr_map;
758c2ecf20Sopenharmony_ci	uint64_t xlr_loaderip_config;
768c2ecf20Sopenharmony_ci	uint64_t bldr_envp;
778c2ecf20Sopenharmony_ci	uint64_t avail_mem_map;
788c2ecf20Sopenharmony_ci};
798c2ecf20Sopenharmony_ci
808c2ecf20Sopenharmony_ci/* This is what netlboot passes and linux boot_mem_map is subtly different */
818c2ecf20Sopenharmony_ci#define NLM_BOOT_MEM_MAP_MAX	32
828c2ecf20Sopenharmony_cistruct nlm_boot_mem_map {
838c2ecf20Sopenharmony_ci	int nr_map;
848c2ecf20Sopenharmony_ci	struct nlm_boot_mem_map_entry {
858c2ecf20Sopenharmony_ci		uint64_t addr;		/* start of memory segment */
868c2ecf20Sopenharmony_ci		uint64_t size;		/* size of memory segment */
878c2ecf20Sopenharmony_ci		uint32_t type;		/* type of memory segment */
888c2ecf20Sopenharmony_ci	} map[NLM_BOOT_MEM_MAP_MAX];
898c2ecf20Sopenharmony_ci};
908c2ecf20Sopenharmony_ci#define NLM_BOOT_MEM_RAM	1
918c2ecf20Sopenharmony_ci
928c2ecf20Sopenharmony_ci/* Pointer to saved boot loader info */
938c2ecf20Sopenharmony_ciextern struct psb_info nlm_prom_info;
948c2ecf20Sopenharmony_ci
958c2ecf20Sopenharmony_ci#endif
96