RTEMS CPU 架构增补

RTEMS CPU 架构增补

cpu_supplement.RTEMS_CPU架构增补.双语.V20131224.pdf
RTEMS 的cpu_supplement文档的原创翻译。

目录

前言 11
1  移植特定的信息 13
1.1  CPU型号依赖的特征 13
1.1.1  CPU型号名称 15
1.1.2  浮点单元 15
1.2  调用约定 16
1.2.1  调用机制 16
1.2.2  寄存器使用 17
1.2.3  参数传递 17
1.2.4  用户提供的例程 17
1.3  内存模型 18
1.3.1  平面内存模型 18
1.4  中断处理 19
1.4.1 中断处理程序的定向 20
1.4.2  中断级 21
1.4.3  通过RTEMS禁用中断 21
1.5  默认致命错误处理 22
1.6  板级支持包 23
1.6.1  系统复位 23
2  ARM特定的信息 25
2.1  CPU型号依赖的特征 25
2.1.1  CPU型号名称 25
2.1.2  计算前导0指令 26
2.1.3  浮点单元 26
2.2  调用约定 26
2.3  内存模型 26
2.4  中断处理 26
2.4.1  中断级 27
2.4.2  中断堆栈 27
2.5  默认致命错误处理 28
3  Atmel AVR特定的信息(未译) 29
4  Blackfin特定的信息(未译) 31
5  Intel/AMD x86特定的信息 33
5.1  CPU型号依赖的特征 33
5.1.1  bswap指令 33
5.2  调用约定 34
5.2.1  处理器背景知识 34
5.2.2  调用机制 34
5.2.3  寄存器使用 34
5.2.4  参数传递 35
5.3  内存模型 35
5.3.1  平面内存模型 36
5.4  中断处理 36
5.4.1  中断处理程序的定向 37
5.4.2  中断栈帧 37
5.4.3  中断级 38
5.4.4  中断堆栈 38
5.5  默认致命错误处理 39
5.6  板级支持包 39
5.6.1  系统复位 39
5.6.2  处理器初始化 40
6  Lattice Mico32特定的信息(未译) 43
7 M68xxx和Coldfire特定的信息(未译) 45
8  MIPS特定的信息(未译) 47
9  PowerPC特定的信息(未译) 49
10  SuperH特定的信息(未译) 51
11  SPARC特定的信息(未译) 53
12  SPARC-64 SPARC特定的信息(未译) 55
命令和变量索引 57
概念索引 59

1  Port Specific Information
1  移植特定的信息

This chapter provides a general description of the type of architecture specific information which is in each of the architecture specific chapters that follow. The outline of this chapter is identical to that of the architecture specific chapters.
本章提供在随后的每个架构特定的章中的架构特定的信息类型的一般说明。本章的大纲是与架构特定的章的大纲一致的。

In each of the architecture specific chapters, this introductory section will provide an overview of the architecture
在每个架构特定的章中,这一引言节将提供架构的概述。

Architecture Documents  架构文档
In each of the architecture specific chapters, this section will provide pointers on where to obtain documentation.
在每个架构特定的章中,这一节将提供指向获取文档所在的位置的指针。

1.1  CPU Model Dependent Features
1.1  CPU型号依赖的特征
Microprocessors are generally classified into families with a variety of CPU models or implementations within that family. Within a processor family, there is a high level of binary compatibility. This family may be based on either an architectural specification or on maintaining compatibility with a popular processor. Recent microprocessor families such as the SPARC or PowerPC are based on an architectural specification which is independent or any particular CPU model or implementation. Older families such as the Motorola 68000 and the Intel x86 evolved as the manufacturer strived to produce higher performance processor models which maintained binary compatibility with older models.
微处理器一般分为在一个家族内具有各种CPU型号或实现的家族。在一个处理器家族内,有高度的二进制兼容性。此家族可以基于架构规范或维持与一个流行的处理器的兼容性。最近的微处理器家族如SPARC或PowerPC基于独立的或任何特定的CPU型号或实现的架构规范。较老的家族如摩托罗拉68000和英特尔x86成为制造商努力生产的更高性能处理器型号,维持与较旧型号的二进制兼容性。

RTEMS takes advantage of the similarity of the various models within a CPU family. Although the models do vary in significant ways, the high level of compatibility makes it possible to share the bulk of the CPU dependent executive code across the entire family. Each processor family supported by RTEMS has a list of features which vary between CPU models within a family. For example, the most common model dependent feature regardless of CPU family is the presence or absence of a floating point unit or coprocessor. When defining the list of features present on a particular CPU model, one simply notes that floating point hardware is or is not present and defines a single constant appropriately. Conditional compilation is utilized to include the appropriate source code for this CPU model’s feature set. It is important to note that this means that RTEMS is thus compiled using the appropriate feature set and compilation flags optimal for this CPU model used. The alternative would be to generate a binary which would execute on all family members using only the features which were always present.
RTEMS利用一个CPU家族内的各种型号的相似性。虽然这些型号的行为在重大方法方面有差异,高度兼容性使它可能跨整个家族共享大多数CPU依赖的执行代码。RTEMS所支持的每个处理器家族都有在一个家族内的CPU型号之间的差异特征的列表。例如,忽略CPU家族的最常见的型号依赖特征是存在或不存在浮点单元或协处理器。当定义在特定CPU型号上存在的特征列表时,一个简单的记录是浮点硬件存在或不存在,并适当地定义单个常量。利用条件编译以包含此CPU型号特征集的适当的源代码。重要的是要注意,这意味着这样会使用适当的特征集和对此CPU型号的使用最优的编译标志来编译RTEMS。另一种方法是仅使用总是存在的特征生成在所有家族成员上执行的二进制文件。

The set of CPU model feature macros are defined in the file cpukit/score/cpu/CPU/rtems/score/cpu.h based upon the GNU tools multilib variant that is appropriate for the particular CPU model defined on the compilation command line.
根据适合于在编译命令行上定义的特定CPU型号的GNU工具multilib变体,在文件cpukit/score/cpu/CPU/rtems/score/cpu.h中定义一组CPU特征宏。

In each of the architecture specific chapters, this section presents the set of features which vary across various implementations of the architecture that may be of importance to RTEMS application developers.
在每个架构特定的章中,这一节介绍可能对RTEMS应用程序开发人员具有重要意义的跨各种架构实现的差异的特征集。

The subsections will vary amongst the target architecture chapters as the specific features may vary. However, each port will include a few common features such as the CPU Model Name and presence of a hardware Floating Point Unit. The common features are described here.
随着可能不同的特定特征,在目标架构的各章中,该小节将不同。然而,每次移植将包括几个共同特征,如CPU型号名称和存在硬件浮点单元。在这里描述共同特征。

1.1.1  CPU Model Name
1.1.1  CPU型号名称
The macro CPU_MODEL_NAME is a string which designates the name of this CPU model. For example, for the MC68020 processor model from the m68k architecture, this macro is set to the string "mc68020".
宏CPU_MODEL_NAME是指定此CPU型号名称的字符串。例如,对于来自m68k架构的MC68020处理器型号,此宏被设置为字符串“mc68020”。

1.1.2  Floating Point Unit
1.1.2  浮点单元
In most architectures, the presence of a floating point unit is an option. It does not matter whether the hardware floating point support is incorporated on-chip or is an external coprocessor as long as it appears an FPU per the ISA. However, if a hardware FPU is not present, it is possible that the floating point emulation library for this CPU is not reentrant and thus context switched by RTEMS.
在大多数架构中,浮点单元的存在是一个选项。不论硬件浮点支持是片上集成或是外部协处理器者无关紧要,只要每个ISA出现一个FPU。然而,如果不存在硬件FPU,则有可能此CPU的浮点仿真库不是可重入,因而由RTEMS切换上下文。

RTEMS provides two feature macros to indicate the FPU configuration:
RTEMS提供两个特征宏来表示FPU配置:

 CPU_HARDWARE_FP is set to TRUE to indicate that a hardware FPU is present.
 CPU_SOFTWARE_FP is set to TRUE to indicate that a hardware FPU is not present and that the FP software emulation will be context switched.

 CPU_HARDWARE_FP被设置为TRUE,表示硬件FPU存在。
 CPU_SOFTWARE_FP被设置为TRUE,表示硬件FPU不存在,将上下文切换FP软件模拟。

全文下载地址:http://download.csdn.net/detail/zhumaill/6997219

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值