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 disabled.
  25. @
  26. ENTRY(do_vfp)
  27. inc_preempt_count r10, r4
  28. enable_irq
  29. ldr r4, .LCvfp
  30. ldr r11, [r10, #TI_CPU] @ CPU number
  31. add r10, r10, #TI_VFPSTATE @ r10 = workspace
  32. ldr pc, [r4] @ call VFP entry point
  33. ENDPROC(do_vfp)
  34. ENTRY(vfp_null_entry)
  35. dec_preempt_count_ti r10, r4
  36. mov pc, lr
  37. ENDPROC(vfp_null_entry)
  38. .align 2
  39. .LCvfp:
  40. .word vfp_vector
  41. @ This code is called if the VFP does not exist. It needs to flag the
  42. @ failure to the VFP initialisation code.
  43. __INIT
  44. ENTRY(vfp_testing_entry)
  45. dec_preempt_count_ti r10, r4
  46. ldr r0, VFP_arch_address
  47. str r0, [r0] @ set to non-zero value
  48. mov pc, r9 @ we have handled the fault
  49. ENDPROC(vfp_testing_entry)
  50. .align 2
  51. VFP_arch_address:
  52. .word VFP_arch
  53. __FINIT