本書爲程序開發者提供了遵循ARM ARMv7-A架構的的ARM Cortex-A系列處理器的介紹。v7指的是架構的第7版,A指的是描述應用處理器的架構分目。它包含了Cortex-A5,Cortex-A7,Cortex-A8,Cortex-A9和Cortex-A15處理器。本書是做爲一個補充不能替代諸如其餘的Cortex-A系列處理器的ARM文檔--每一個不一樣分目本身的ARM Technical Reference Manuals(TRMs,ARM技術索引手冊),每一個設備或是板級的文檔和最重量級的ARM Architecture Reference Manual(ARM ARM,ARM架構索引手冊)。 linux
本書的目的是向爲Cortex-A系列處理器開發應用的程序開發者提供把普遍的不一樣類別的資源收集到一塊兒集成爲一本指南。咱們將會涵蓋那些對應用代碼開發者有價值的緩存,內存管理等概念。本書的目的是爲C\編開發者提供有用的信息。咱們將會着手於像liunx那樣複雜的操做系統如何使用ARM的特性,如何所有用起ARM處理器的不少高級特性,特別是爲多核處理器編碼和使用帶有SIMD功能的設備。 git
儘管也適應於其餘的ARM處理器,可是咱們沒有明確說本書覆蓋了架構早期版本的處理器實現。Cortex-R系列和M系列會被說起可是不展開說。咱們專一爲ARM架構特性集細節提供通俗的介紹和爲使Cortex-A處理器有效運行的C和彙編代碼的編寫提供實用的建議。 程序員
本書不是入門型的書籍,咱們假設讀者有C和微處理器方面的知識。可是並不須要任何與ARM相關的背景知識。由於篇幅有限咱們不可能對每個專題詳細展開。在有些章節咱們建議(書目或是網絡資源)進一步閱讀關於這個主題的更深層次的知識。可是本書專一於ARM特有的細節。咱們不會假定默認使用特定的工具鏈。因此過程當中會對GNU和ARM工具鏈都有提到。咱們但願本書可以讓有PC桌面電腦或是X86背景的程序員適應踏入ARM處理器世界的第一步。 算法
本書的第一章描述了Cortex-A系列處理器的基本特性。第二章提供了ARM架構基礎知識和個別處理器的一些背景。第三章爲步入ARM世界的程序員簡單概述了一些工具和不一樣平臺的可用工具。第4、五章和第六章簡單的介紹了ARM彙編語言而且覆蓋了不一樣寄存器,模式和彙編指令的知識。第7、八章是浮點數和ARM高級SIMD拓展(NEON)。以上章節僅僅是相關主題的介紹,若是要詳細討論強大的NEON全部功能和如何在通常的信號處理應用的算法將花費很長的篇幅。以後咱們將把主題轉移到存儲系統和緩存中,存儲管理和內存字節序的第9、10、十一章。十二到十四章將會介紹終端和其它的異常。 編程
剩下的章節提供了編程更高級的信息。十五章提供了啓動代碼的一覽。十六章專一於從其餘架構或是ARM更舊的架構到ARMv7架構上C語言和彙編代碼的移植。十七章覆蓋了ABI應用二進制接口和對C和彙編程序員有用的知識。代碼剖析和代碼優化會在十8、十九章中介紹。不少技術並不侷限於ARM架構。咱們另外提到了不少特定處理器的信息。 緩存
二十一到二十四章覆蓋了多處理器部分。咱們詳細討論了ARM是如何實現的和如何讓你的代碼使用它。二十一章介紹了對ARM編程相當重要的電源管理。本書的最後對ARM 安全拓展(TrustZone)、虛擬化拓展(二十七章)、大小核技術(二十八章)和程序員可用的強大的硬件調試特性(二十九章)做了簡要介紹。附錄A、B總結了ARM、NEON、VFP指令集。附錄C一步步介紹了配置和創建ARM上的linux系統的步驟。 安全
Cohen,D."On Holy Wars and a Plea for peace",USC/ISI IEN April,1980,http://www.ietf.org/rfc/ien/ien137.txt. 網絡
Furber,Steve."ARM System-on-chip Architecture",2nd edition,Addison-Wesley,2000,ISBN:9780201675191 架構
Hohl,William,"ARM Assembly Language:Fundamentals and Techniques"CRC Press,2009.ISBN:9781558608740. ide
ANSI/IEEE Std 754-1985,"IEEE Standard for Binary Floating-Point Arithmetic".
ANSI/IEEE Std 754-2008,"IEEE Standard for Binary Floating-Point Arithmetic".
ANSI/IEEE Std 1003.1-1990,"Standard for Infomation Technology - Portable Operating System Interface(POSIX) Base Specifications,Issue 7".
ANSI/IEEE Std 1149.1-2001,"IEEE Stanard Test Access Port and Boundary-Scan Architecture".
ARM架構參考手冊(縮寫爲ARM ARM)是任何嚴謹ARM程序員的必讀之物。他能夠在註冊後從ARM站點獲得。它完整描述了ARMv7指令架構,編程模型,系統寄存器,調試特性和存儲模型。對於任何AMR處理器必須聽從的模型實現它描述了詳細的規範。
本書中引用ARM架構參考手冊的中的:
ARM Architecture Reference Manual -ARMv7-A和ARMv7-R版(ARM DDI 0406).
---------------------------------------注意---------------------------------------------
若是本書中的內容有和ARM ARM衝突,ARM ARM做爲最終的解釋和優先斷言。在多數狀況下ARM ARM和Cortex-A Programer's Guide表述了ARM世界的不一樣視角的觀察。ARM ARM爲實現者(IC designer)提供信息,本書是爲程序員提供的。最顯而易見的場景就是本書描述的內容並不覆蓋全部的架構約定行爲-或是說其實是對實際的抽象。
-----------------------------------------------------------------------------------------
ARM Generic Interrupt Controller Architecture Specification(ARM IHI 0048).
ARM Compiler Toolchian Assembler Reference(DUI 0489).
ARM C Language Extensions(IHI 0053)
對於各自不一樣的處理器技術參考手冊提供了處理器的詳細描述。它們能夠從ARM站點文檔區得到 http://infocenter.arm.com.
本書使用以下排版約定:
斜體 強調了重要的說明,介紹了特比的技術,指定了內部交叉引用和篇外引用
粗體 在適當的位置的,描述列表使用
等款字體 指示鍵盤可敲出的文本,例如命令行,文件和程序名,指令名,參數和源碼(譯文使用微軟雅黑)
等寬斜體 知識等寬字段中可被指定值替代的參數(譯文中使用微軟雅黑斜體)
<and> 代碼或是代碼片斷中出現的彙編語法字段使用尖括號包圍,如:
MRC p15, 0, <Rd>, <CRn>, <CRm>, <Opcode_2>
咱們努力保持Cortex-A Serices Programer's Guide是本書即易於閱讀有使本書覆蓋材料的深度適中,來對使用AMR處理器進行綜合的介紹。
若是你對本書有任何想法。不理解咱們的闡述,或是認爲某些地方存在缺失,或是存在不正確的地方請發送郵件給errta@arm.com並給出如下信息:
ARM一樣歡迎附加的非針對性的建議和改善。
此處定義本書用到的術語和縮略詞
AAPCS ARM Architecture Produre Call Standard. ABI Application Binary Interface. ACP Accelerator Coherency Port. AHB Advanced High-Performance Bus. AMBA Advanced Microcontroller Bus Architecture. AMP Asymmetric Multi-Processing. APB Advances Peripheral Bus ARM ARM The ARM Architecture Reference Manual. ASIC Application Specific Integrated Circuit. APSR Application Program Status Register. ASID Address Space ID. ATPCS ARM Thumb Procedure Call Standard. AXI Advanced eXtensible Interface. BE8 Byte Invariant Big-Endian Mode. BIU Bus Interface Unit. BSP Board Support Package. BTAC Branch Target Address Cache. BTB Branch Target Buffer. CISC Complex Instruction Set Computer. CP15 Coprocessor 15 - System control coprocessor. CPSR Current Program Status Register. DAP Debug Access Port. DBX Direct Bytecode Execution. DDR Double Data Rate(SDRAM). DMA Direct Memoey Access. DMB Data Memory Barrier. DPU Data Processing Unit. DS-5 The ARM Development Studio. DSB Data Synchronization Barrier. DSP Digital Signal Processing. DSTREAM An ARM debug and trace unit. DVFS Dynamic Voltage/Frequecy Scaling. EABI Embedded ABI. ECC Error Crrecting Code. ECT Embedded Trace Marocell. FIQ An interrupt type(formerly fast interrupt). FPSCR Floating-Point Status and Control Register. GCC GNU Complier Collection. GIC Generic Interrupt Controller. GIF Graphics Interchange Format. GPIO General Purpose Input/Output. Gprof GUN profiler. Harvard architecture Architecture with physically separate storage and signal pathways for instructions and data. HCR Hyp Configuration Register. ICU Instruction Cache Unit. IDE Integrated development environment. I/F Interface(abbreviation used in some diagrams). IPA Intermediate Physical Adderss. IRQ Interrupt Request(normally external interrupts.) ISA Instruction Set Architecture. ISB Instruction Synchronization Barrier. ISR Interrupt Service Routine. Jazelle The ARM bytecode acceleration technology. JIT Just In Time. L1/L2 Level 1/level 2. LPAE Large Physical Address Extension. LSB Least Significant Bit. MESI A cache coherency protocol with for state;Modified,Exclusive,Shared and Invalid. MMU Memory Management Unit. MPU Memory Protection Unit. MSB Most Significant Bit. NEON The ARM Advanced SIMD Extensions. NMI Non-Maskable Interrupt. Oprofile A Linux system profiler. QEMU A processor emulator. PCI Peripheral Component Interconnect.A computer bus standard. PCS Procedure Call Standard. PFU Prefetch Unit. PIPT Physically Indexed,Physically Tagged. PLE Preload Engine. PLI Preload Instruction. PMU Performance Monitor Unit. PoC Point of Coherency PoU Point of Unification. PPI Private Peripheral Input. PSR Program Status Register. PTE Page Table Entry. RCT Runtime Complier Target. RISC Reduced Instryction Set Computer. RVCT RealView Compilation Tools(The "ARM Compiler"). SBZP Should Be Preserved. SCU Snoop Control Unit. SGI Software Generated Interrupt. SIMD Single Instruction,Multiple Data. SiP System in Package. SMP Symmetric Multi-Processing. SoC System on Chip. SP Stack Pointer. SPI Shared Peripheral Interrupt. SPSR Saved Program Status Register. Streamline A graphical performance analysis tool. SVC Supervisor call instruction.(Perviously SWI) SWI Software Interrupt instruction.(Replaced with SVC) SYS System Mode. TAP Test Access Port(JTAG Interface). TCM Tightly Coupled Memory. TDMI Thumb,Debug,Multiplier,ICE. TEX Type Extension. Thumb An instruction set extension to ARM. Thumb-2 A technology extending the Thumb instruction set to support both 16-bit and 32-bit instructions. TLB Translation Lookaside Buffer. TLS Thread Local Storage. TrustZone The ARM security extension. TTB Translation Table Base. TTBR Translation Table Base Register. UAL Unified Assembly Language. UART Universal Asynchronous Receiver/Transmitter. UEFI Unified Extension Firmware Interface. U-Boot A Linux Bootloader. UNK Unknown. USR User mode,a non-privileged processor mode. VPF The ARM floating-point instruction set.Before ARMv7,The VPF extension was called the Vector Floating-Point architecture,and was used for Vector operations. VIC Vectored Interrupt Controller. VIPT Virtual Index,Physically Tagged. VMID Virtual Machine ID. VMSA Virtual Memory System Architecture. XN Execute Never.