At the end of the Setup_arch function, there is this statement:
/* Copy atomic sequences to their fixed location, and sanity check that
These locations are the ones, we advertise to userspace. */
memcpy (void *) Fixed_code_start, &fixed_code_start,
Fixed_code_end-fixed_code_start);
BUG_ON ((char *) &sigreturn_stub-(char *) &fixed_code_start
!= Sigreturn_stub-fixed_code_start);
BUG_ON ((char *) &ATOMIC_XCHG32-(char *) &fixed_code_start
!= Atomic_xchg32-fixed_code_start);
BUG_ON ((char *) &ATOMIC_CAS32-(char *) &fixed_code_start
!= Atomic_cas32-fixed_code_start);
BUG_ON ((char *) &ATOMIC_ADD32-(char *) &fixed_code_start
!= Atomic_add32-fixed_code_start);
BUG_ON ((char *) &ATOMIC_SUB32-(char *) &fixed_code_start
!= Atomic_sub32-fixed_code_start);
BUG_ON ((char *) &atomic_ior32-(char *) &fixed_code_start
!= Atomic_ior32-fixed_code_start);
BUG_ON ((char *) &ATOMIC_AND32-(char *) &fixed_code_start
!= Atomic_and32-fixed_code_start);
BUG_ON ((char *) &atomic_xor32-(char *) &fixed_code_start
!= Atomic_xor32-fixed_code_start);
BUG_ON ((char *) &safe_user_instruction-(char *) &fixed_code_start
!= Safe_user_instruction-fixed_code_start);
Here, several definitions of Fixed_code_start are in include/asm/fixed_code.h:
///* This file defines the fixed addresses where userspace programs can find
// atomic code sequences. */
//
#define FIXED_CODE_START 0x400
//
#define SIGRETURN_STUB 0x400
//
#define ATOMIC_SEQS_START 0x410
//
#define ATOMIC_XCHG32 0x410
#define ATOMIC_CAS32 0x420
#define ATOMIC_ADD32 0x430
#define ATOMIC_SUB32 0x440
#define ATOMIC_IOR32 0x450
#define ATOMIC_AND32 0x460
#define ATOMIC_XOR32 0x470
//
#define ATOMIC_SEQS_END 0x480
//
#define SAFE_USER_INSTRUCTION 0x480
//
#define FIXED_CODE_END 0x490
//
And Fixed_code_start is a symbol defined in ARCH/BLACKFIN/KERNEL/FIXED_CODE.S. There is a description in the FIXED_CODE.S:
/*
* This file contains sequences of code that will be copied to a
* fixed location, defined in <asm/atomic_seq.h>. The interrupt
* handlers ensure that these sequences appear to be atomic when
* executed from userspace.
* These are aligned to 16 bytes, so that we have some space to replace
* these sequences with something else (e.g. kernel traps if we ever do
* BF561 SMP).
*/