加入收藏 | 设为首页 | 会员中心 | 我要投稿 应用网_丽江站长网 (http://www.0888zz.com/)- 科技、建站、数据工具、云上网络、机器学习!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

uclinux-2008R1-RC8(bf561)到VDSP5的移植(33):__ebss_l1

发布时间:2016-06-01 00:13:36 所属栏目:Linux 来源:网络整理
导读:在setup_arch函数的末尾,有这样的语句: /* Copy atomic sequences to their fixed location, and sanity check that these locations are the ones that we a

在setup_arch函数的末尾,有这样的语句:

/* Copy atomic sequences to their fixed location, and sanity check that
these locations are the ones that 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);

在这里,FIXED_CODE_START等几个定义都在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
//

而fixed_code_start则是arch/ blackfin/ kernel/fixed_code.s中定义的一个符号。在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).
 */

(编辑:应用网_丽江站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读