omap44xx-smc.S 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * OMAP44xx secure APIs file.
  3. *
  4. * Copyright (C) 2010 Texas Instruments, Inc.
  5. * Written by Santosh Shilimkar <santosh.shilimkar@ti.com>
  6. *
  7. *
  8. * This program is free software,you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #include <linux/linkage.h>
  13. /*
  14. * This is common routine to manage secure monitor API
  15. * used to modify the PL310 secure registers.
  16. * 'r0' contains the value to be modified and 'r12' contains
  17. * the monitor API number. It uses few CPU registers
  18. * internally and hence they need be backed up including
  19. * link register "lr".
  20. * Function signature : void omap_smc1(u32 fn, u32 arg)
  21. */
  22. ENTRY(omap_smc1)
  23. stmfd sp!, {r2-r12, lr}
  24. mov r12, r0
  25. mov r0, r1
  26. dsb
  27. smc #0
  28. ldmfd sp!, {r2-r12, pc}
  29. END(omap_smc1)
  30. ENTRY(omap_modify_auxcoreboot0)
  31. stmfd sp!, {r1-r12, lr}
  32. ldr r12, =0x104
  33. dsb
  34. smc #0
  35. ldmfd sp!, {r1-r12, pc}
  36. END(omap_modify_auxcoreboot0)
  37. ENTRY(omap_auxcoreboot_addr)
  38. stmfd sp!, {r2-r12, lr}
  39. ldr r12, =0x105
  40. dsb
  41. smc #0
  42. ldmfd sp!, {r2-r12, pc}
  43. END(omap_auxcoreboot_addr)
  44. ENTRY(omap_read_auxcoreboot0)
  45. stmfd sp!, {r2-r12, lr}
  46. ldr r12, =0x103
  47. dsb
  48. smc #0
  49. mov r0, r0, lsr #9
  50. ldmfd sp!, {r2-r12, pc}
  51. END(omap_read_auxcoreboot0)