kernel-entry-init.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Chris Dearman (chris@mips.com)
  7. * Copyright (C) 2007 Mips Technologies, Inc.
  8. */
  9. #ifndef __ASM_MACH_MIPS_KERNEL_ENTRY_INIT_H
  10. #define __ASM_MACH_MIPS_KERNEL_ENTRY_INIT_H
  11. .macro kernel_entry_setup
  12. #ifdef CONFIG_MIPS_MT_SMTC
  13. mfc0 t0, CP0_CONFIG
  14. bgez t0, 9f
  15. mfc0 t0, CP0_CONFIG, 1
  16. bgez t0, 9f
  17. mfc0 t0, CP0_CONFIG, 2
  18. bgez t0, 9f
  19. mfc0 t0, CP0_CONFIG, 3
  20. and t0, 1<<2
  21. bnez t0, 0f
  22. 9:
  23. /* Assume we came from YAMON... */
  24. PTR_LA v0, 0x9fc00534 /* YAMON print */
  25. lw v0, (v0)
  26. move a0, zero
  27. PTR_LA a1, nonmt_processor
  28. jal v0
  29. PTR_LA v0, 0x9fc00520 /* YAMON exit */
  30. lw v0, (v0)
  31. li a0, 1
  32. jal v0
  33. 1: b 1b
  34. __INITDATA
  35. nonmt_processor:
  36. .asciz "SMTC kernel requires the MT ASE to run\n"
  37. __FINIT
  38. 0:
  39. #endif
  40. .endm
  41. /*
  42. * Do SMP slave processor setup necessary before we can safely execute C code.
  43. */
  44. .macro smp_slave_setup
  45. .endm
  46. #endif /* __ASM_MACH_MIPS_KERNEL_ENTRY_INIT_H */