mp.h 948 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright 2014, Freescale Semiconductor
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #ifndef _FSL_CH3_MP_H
  7. #define _FSL_CH3_MP_H
  8. /*
  9. * Each spin table element is defined as
  10. * struct {
  11. * uint64_t entry_addr;
  12. * uint64_t status;
  13. * uint64_t lpid;
  14. * };
  15. * we pad this struct to 64 bytes so each entry is in its own cacheline
  16. * the actual spin table is an array of these structures
  17. */
  18. #define SPIN_TABLE_ELEM_ENTRY_ADDR_IDX 0
  19. #define SPIN_TABLE_ELEM_STATUS_IDX 1
  20. #define SPIN_TABLE_ELEM_LPID_IDX 2
  21. #define WORDS_PER_SPIN_TABLE_ENTRY 8 /* pad to 64 bytes */
  22. #define SPIN_TABLE_ELEM_SIZE 64
  23. #define id_to_core(x) ((x & 3) | (x >> 6))
  24. #ifndef __ASSEMBLY__
  25. extern u64 __spin_table[];
  26. extern u64 *secondary_boot_code;
  27. extern size_t __secondary_boot_code_size;
  28. int fsl_lsch3_wake_seconday_cores(void);
  29. void *get_spin_tbl_addr(void);
  30. phys_addr_t determine_mp_bootpg(void);
  31. void secondary_boot_func(void);
  32. #endif
  33. #endif /* _FSL_CH3_MP_H */