fixed_code.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * This file defines the fixed addresses where userspace programs
  3. * can find atomic code sequences.
  4. *
  5. * Copyright 2007-2008 Analog Devices Inc.
  6. *
  7. * Licensed under the GPL-2 or later.
  8. */
  9. #ifndef __BFIN_ASM_FIXED_CODE_H__
  10. #define __BFIN_ASM_FIXED_CODE_H__
  11. #ifdef __KERNEL__
  12. #ifndef __ASSEMBLY__
  13. #include <linux/linkage.h>
  14. #include <linux/ptrace.h>
  15. extern asmlinkage void finish_atomic_sections(struct pt_regs *regs);
  16. extern char fixed_code_start;
  17. extern char fixed_code_end;
  18. extern int atomic_xchg32(void);
  19. extern int atomic_cas32(void);
  20. extern int atomic_add32(void);
  21. extern int atomic_sub32(void);
  22. extern int atomic_ior32(void);
  23. extern int atomic_and32(void);
  24. extern int atomic_xor32(void);
  25. extern void safe_user_instruction(void);
  26. extern void sigreturn_stub(void);
  27. #endif
  28. #endif
  29. #ifndef CONFIG_PHY_RAM_BASE_ADDRESS
  30. #define CONFIG_PHY_RAM_BASE_ADDRESS 0x0
  31. #endif
  32. #define FIXED_CODE_START (CONFIG_PHY_RAM_BASE_ADDRESS + 0x400)
  33. #define SIGRETURN_STUB (CONFIG_PHY_RAM_BASE_ADDRESS + 0x400)
  34. #define ATOMIC_SEQS_START (CONFIG_PHY_RAM_BASE_ADDRESS + 0x410)
  35. #define ATOMIC_XCHG32 (CONFIG_PHY_RAM_BASE_ADDRESS + 0x410)
  36. #define ATOMIC_CAS32 (CONFIG_PHY_RAM_BASE_ADDRESS + 0x420)
  37. #define ATOMIC_ADD32 (CONFIG_PHY_RAM_BASE_ADDRESS + 0x430)
  38. #define ATOMIC_SUB32 (CONFIG_PHY_RAM_BASE_ADDRESS + 0x440)
  39. #define ATOMIC_IOR32 (CONFIG_PHY_RAM_BASE_ADDRESS + 0x450)
  40. #define ATOMIC_AND32 (CONFIG_PHY_RAM_BASE_ADDRESS + 0x460)
  41. #define ATOMIC_XOR32 (CONFIG_PHY_RAM_BASE_ADDRESS + 0x470)
  42. #define ATOMIC_SEQS_END (CONFIG_PHY_RAM_BASE_ADDRESS + 0x480)
  43. #define SAFE_USER_INSTRUCTION (CONFIG_PHY_RAM_BASE_ADDRESS + 0x480)
  44. #define FIXED_CODE_END (CONFIG_PHY_RAM_BASE_ADDRESS + 0x490)
  45. #endif