octeon_boot.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * (C) Copyright 2004, 2005 Cavium Networks
  4. */
  5. #ifndef __OCTEON_BOOT_H__
  6. #define __OCTEON_BOOT_H__
  7. #include <linux/types.h>
  8. struct boot_init_vector {
  9. /* First stage address - in ram instead of flash */
  10. uint64_t code_addr;
  11. /* Setup code for application, NOT application entry point */
  12. uint32_t app_start_func_addr;
  13. /* k0 is used for global data - needs to be passed to other cores */
  14. uint32_t k0_val;
  15. /* Address of boot info block structure */
  16. uint64_t boot_info_addr;
  17. uint32_t flags; /* flags */
  18. uint32_t pad;
  19. };
  20. /* similar to bootloader's linux_app_boot_info but without global data */
  21. struct linux_app_boot_info {
  22. #ifdef __BIG_ENDIAN_BITFIELD
  23. uint32_t labi_signature;
  24. uint32_t start_core0_addr;
  25. uint32_t avail_coremask;
  26. uint32_t pci_console_active;
  27. uint32_t icache_prefetch_disable;
  28. uint32_t padding;
  29. uint64_t InitTLBStart_addr;
  30. uint32_t start_app_addr;
  31. uint32_t cur_exception_base;
  32. uint32_t no_mark_private_data;
  33. uint32_t compact_flash_common_base_addr;
  34. uint32_t compact_flash_attribute_base_addr;
  35. uint32_t led_display_base_addr;
  36. #else
  37. uint32_t start_core0_addr;
  38. uint32_t labi_signature;
  39. uint32_t pci_console_active;
  40. uint32_t avail_coremask;
  41. uint32_t padding;
  42. uint32_t icache_prefetch_disable;
  43. uint64_t InitTLBStart_addr;
  44. uint32_t cur_exception_base;
  45. uint32_t start_app_addr;
  46. uint32_t compact_flash_common_base_addr;
  47. uint32_t no_mark_private_data;
  48. uint32_t led_display_base_addr;
  49. uint32_t compact_flash_attribute_base_addr;
  50. #endif
  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. /* hardcoded in bootloader */
  56. #define LABI_ADDR_IN_BOOTLOADER 0x700
  57. #define LINUX_APP_BOOT_BLOCK_NAME "linux-app-boot"
  58. #define LABI_SIGNATURE 0xAABBCC01
  59. /* from uboot-headers/octeon_mem_map.h */
  60. #define EXCEPTION_BASE_INCR (4 * 1024)
  61. /* Increment size for exception base addresses (4k minimum) */
  62. #define EXCEPTION_BASE_BASE 0
  63. #define BOOTLOADER_PRIV_DATA_BASE (EXCEPTION_BASE_BASE + 0x800)
  64. #define BOOTLOADER_BOOT_VECTOR (BOOTLOADER_PRIV_DATA_BASE)
  65. #endif /* __OCTEON_BOOT_H__ */