entry.S 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * linux/arch/arm/vfp/entry.S
  3. *
  4. * Copyright (C) 2004 ARM Limited.
  5. * Written by Deep Blue Solutions Limited.
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. */
  11. #include <linux/init.h>
  12. #include <linux/linkage.h>
  13. #include <asm/thread_info.h>
  14. #include <asm/vfpmacros.h>
  15. #include <asm/assembler.h>
  16. #include <asm/asm-offsets.h>
  17. @ VFP entry point.
  18. @
  19. @ r0 = instruction opcode (32-bit ARM or two 16-bit Thumb)
  20. @ r2 = PC value to resume execution after successful emulation
  21. @ r9 = normal "successful" return address
  22. @ r10 = this threads thread_info structure
  23. @ lr = unrecognised instruction return address
  24. @ IRQs enabled.
  25. @
  26. ENTRY(do_vfp)
  27. inc_preempt_count r10, r4
  28. ldr r4, .LCvfp
  29. ldr r11, [r10, #TI_CPU] @ CPU number
  30. add r10, r10, #TI_VFPSTATE @ r10 = workspace
  31. ldr pc, [r4] @ call VFP entry point
  32. ENDPROC(do_vfp)
  33. ENTRY(vfp_null_entry)
  34. dec_preempt_count_ti r10, r4
  35. ret lr
  36. ENDPROC(vfp_null_entry)
  37. .align 2
  38. .LCvfp:
  39. .word vfp_vector
  40. @ This code is called if the VFP does not exist. It needs to flag the
  41. @ failure to the VFP initialisation code.
  42. __INIT
  43. ENTRY(vfp_testing_entry)
  44. dec_preempt_count_ti r10, r4
  45. ldr r0, VFP_arch_address
  46. str r0, [r0] @ set to non-zero value
  47. ret r9 @ we have handled the fault
  48. ENDPROC(vfp_testing_entry)
  49. .align 2
  50. VFP_arch_address:
  51. .word VFP_arch
  52. __FINIT