Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * (C) Copyright 2004, 2005 Cavium Networks
0004  */
0005 
0006 #ifndef __OCTEON_BOOT_H__
0007 #define __OCTEON_BOOT_H__
0008 
0009 #include <linux/types.h>
0010 
0011 struct boot_init_vector {
0012     /* First stage address - in ram instead of flash */
0013     uint64_t code_addr;
0014     /* Setup code for application, NOT application entry point */
0015     uint32_t app_start_func_addr;
0016     /* k0 is used for global data - needs to be passed to other cores */
0017     uint32_t k0_val;
0018     /* Address of boot info block structure */
0019     uint64_t boot_info_addr;
0020     uint32_t flags;     /* flags */
0021     uint32_t pad;
0022 };
0023 
0024 /* similar to bootloader's linux_app_boot_info but without global data */
0025 struct linux_app_boot_info {
0026 #ifdef __BIG_ENDIAN_BITFIELD
0027     uint32_t labi_signature;
0028     uint32_t start_core0_addr;
0029     uint32_t avail_coremask;
0030     uint32_t pci_console_active;
0031     uint32_t icache_prefetch_disable;
0032     uint32_t padding;
0033     uint64_t InitTLBStart_addr;
0034     uint32_t start_app_addr;
0035     uint32_t cur_exception_base;
0036     uint32_t no_mark_private_data;
0037     uint32_t compact_flash_common_base_addr;
0038     uint32_t compact_flash_attribute_base_addr;
0039     uint32_t led_display_base_addr;
0040 #else
0041     uint32_t start_core0_addr;
0042     uint32_t labi_signature;
0043 
0044     uint32_t pci_console_active;
0045     uint32_t avail_coremask;
0046 
0047     uint32_t padding;
0048     uint32_t icache_prefetch_disable;
0049 
0050     uint64_t InitTLBStart_addr;
0051 
0052     uint32_t cur_exception_base;
0053     uint32_t start_app_addr;
0054 
0055     uint32_t compact_flash_common_base_addr;
0056     uint32_t no_mark_private_data;
0057 
0058     uint32_t led_display_base_addr;
0059     uint32_t compact_flash_attribute_base_addr;
0060 #endif
0061 };
0062 
0063 /* If not to copy a lot of bootloader's structures
0064    here is only offset of requested member */
0065 #define AVAIL_COREMASK_OFFSET_IN_LINUX_APP_BOOT_BLOCK    0x765c
0066 
0067 /* hardcoded in bootloader */
0068 #define  LABI_ADDR_IN_BOOTLOADER             0x700
0069 
0070 #define LINUX_APP_BOOT_BLOCK_NAME "linux-app-boot"
0071 
0072 #define LABI_SIGNATURE 0xAABBCC01
0073 
0074 /*  from uboot-headers/octeon_mem_map.h */
0075 #define EXCEPTION_BASE_INCR (4 * 1024)
0076                    /* Increment size for exception base addresses (4k minimum) */
0077 #define EXCEPTION_BASE_BASE 0
0078 #define BOOTLOADER_PRIV_DATA_BASE   (EXCEPTION_BASE_BASE + 0x800)
0079 #define BOOTLOADER_BOOT_VECTOR      (BOOTLOADER_PRIV_DATA_BASE)
0080 
0081 #endif /* __OCTEON_BOOT_H__ */