octeon_boot.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. uint32_t stack_addr;
  24. uint32_t code_addr;
  25. uint32_t app_start_func_addr;
  26. uint32_t k0_val;
  27. uint32_t flags;
  28. uint32_t boot_info_addr;
  29. uint32_t pad;
  30. uint32_t pad2;
  31. };
  32. /* similar to bootloader's linux_app_boot_info but without global data */
  33. struct linux_app_boot_info {
  34. uint32_t labi_signature;
  35. uint32_t start_core0_addr;
  36. uint32_t avail_coremask;
  37. uint32_t pci_console_active;
  38. uint32_t icache_prefetch_disable;
  39. uint32_t InitTLBStart_addr;
  40. uint32_t start_app_addr;
  41. uint32_t cur_exception_base;
  42. uint32_t no_mark_private_data;
  43. uint32_t compact_flash_common_base_addr;
  44. uint32_t compact_flash_attribute_base_addr;
  45. uint32_t led_display_base_addr;
  46. };
  47. /* If not to copy a lot of bootloader's structures
  48. here is only offset of requested member */
  49. #define AVAIL_COREMASK_OFFSET_IN_LINUX_APP_BOOT_BLOCK 0x765c
  50. /* hardcoded in bootloader */
  51. #define LABI_ADDR_IN_BOOTLOADER 0x700
  52. #define LINUX_APP_BOOT_BLOCK_NAME "linux-app-boot"
  53. #define LABI_SIGNATURE 0xAABBCCDD
  54. /* from uboot-headers/octeon_mem_map.h */
  55. #define EXCEPTION_BASE_INCR (4 * 1024)
  56. /* Increment size for exception base addresses (4k minimum) */
  57. #define EXCEPTION_BASE_BASE 0
  58. #define BOOTLOADER_PRIV_DATA_BASE (EXCEPTION_BASE_BASE + 0x800)
  59. #define BOOTLOADER_BOOT_VECTOR (BOOTLOADER_PRIV_DATA_BASE)
  60. #endif /* __OCTEON_BOOT_H__ */