Uclinux-2008r1-rc8 (bf561) to VDSP5 transplantation (in): __EBSS_L1

Source: Internet
Author: User

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).
 */

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.