octeon_boot.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /*
  2. * (C) Copyright 2004, 2005 Cavium Networks
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License as
  6. * published by the Free Software Foundation; either version 2 of
  7. * the License, or (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  17. * MA 02111-1307 USA
  18. */
  19. #ifndef __OCTEON_BOOT_H__
  20. #define __OCTEON_BOOT_H__
  21. #include <linux/types.h>
  22. struct boot_init_vector {
  23. /* First stage address - in ram instead of flash */
  24. uint64_t code_addr;
  25. /* Setup code for application, NOT application entry point */
  26. uint32_t app_start_func_addr;
  27. /* k0 is used for global data - needs to be passed to other cores */
  28. uint32_t k0_val;
  29. /* Address of boot info block structure */
  30. uint64_t boot_info_addr;
  31. uint32_t flags; /* flags */
  32. uint32_t pad;
  33. };
  34. /* similar to bootloader's linux_app_boot_info but without global data */
  35. struct linux_app_boot_info {
  36. #ifdef __BIG_ENDIAN_BITFIELD
  37. uint32_t labi_signature;
  38. uint32_t start_core0_addr;
  39. uint32_t avail_coremask;
  40. uint32_t pci_console_active;
  41. uint32_t icache_prefetch_disable;
  42. uint32_t padding;
  43. uint64_t InitTLBStart_addr;
  44. uint32_t start_app_addr;
  45. uint32_t cur_exception_base;
  46. uint32_t no_mark_private_data;
  47. uint32_t compact_flash_common_base_addr;
  48. uint32_t compact_flash_attribute_base_addr;
  49. uint32_t led_display_base_addr;
  50. #else
  51. uint32_t start_core0_addr;
  52. uint32_t labi_signature;
  53. uint32_t pci_console_active;
  54. uint32_t avail_coremask;
  55. uint32_t padding;
  56. uint32_t icache_prefetch_disable;
  57. uint64_t InitTLBStart_addr;
  58. uint32_t cur_exception_base;
  59. uint32_t start_app_addr;
  60. uint32_t compact_flash_common_base_addr;
  61. uint32_t no_mark_private_data;
  62. uint32_t led_display_base_addr;
  63. uint32_t compact_flash_attribute_base_addr;
  64. #endif
  65. };
  66. /* If not to copy a lot of bootloader's structures
  67. here is only offset of requested member */
  68. #define AVAIL_COREMASK_OFFSET_IN_LINUX_APP_BOOT_BLOCK 0x765c
  69. /* hardcoded in bootloader */
  70. #define LABI_ADDR_IN_BOOTLOADER 0x700
  71. #define LINUX_APP_BOOT_BLOCK_NAME "linux-app-boot"
  72. #define LABI_SIGNATURE 0xAABBCC01
  73. /* from uboot-headers/octeon_mem_map.h */
  74. #define EXCEPTION_BASE_INCR (4 * 1024)
  75. /* Increment size for exception base addresses (4k minimum) */
  76. #define EXCEPTION_BASE_BASE 0
  77. #define BOOTLOADER_PRIV_DATA_BASE (EXCEPTION_BASE_BASE + 0x800)
  78. #define BOOTLOADER_BOOT_VECTOR (BOOTLOADER_PRIV_DATA_BASE)
  79. #endif /* __OCTEON_BOOT_H__ */