MPU/SoC/Application Processor/Embedded OS
Everything has its principles and mechanisms which are designed by its creator and followed by its users.
- Embedded Platform Architecture
- The key to understanding how the software interacts with the underlying platform devices is the system memory map and the associated register maps of the devices.
- Some devices are directly visible to software and mapped to physical addresses in the processor's address space, and other devices are attached over a bus, which introduces a level of indirection when we wish to access the device registers.
- SoC devices incorporate as many of the key peripherals your application needs.
- The other speical processor(controller) run special software which often is called as firmware, with robust quality of special service.
- The key capabilites required to support the execution of a multitasking OS on the processor are as follows:
- A memory subsystem for intial instruction storage and random access memory
- An interrupt controller to gather, prioritize, and control generation of interrupts to the processor
- A timer; multitasking OS typcially rely on at least on timer interrupt to trigger the OS's scheduler
- Access to I/O devices, suchas graphics controllers, network interfaces, and mouse/keypads.
- The location of the devices are presented through the memory map.
- When the processor generates a read or write, the address is decoded by the system memory address decoders and is eventually routed to the appropriate physical device to complete the transaction.
- When the OS timer/System Tick expires, the OS's scheduler is executed.
- All OS make use of at least one timer called the system tick. This timer is used to trigger timer callback functions and provide the time base to support time slicing of tasks by the OS.
- The driver must perform buffer copies between user mapped buffer and an allocated kernel buffer.
- EABI(Embedded Application Binary Interface) defines the conventions for files, data types, register mapping, stack frame and parameter passing rules.
- The memory associated with the display is known as the frame buffer. In embedded systems the frame buffer is usually allocated from system memory. The display controller copies the the contents from the memory every frame(for example 30 times per second) and output to the display across one of the many physical interface standards.
- An OS provides multiplexed access to shared resources that include peripherals, cpu, and memory. The OS provides mechanisms to interact with services through an API. It provides memory management, thread synchronization primitives, and time of day services.
- OS Service Call Design Pattern:
- Each service call has a user space library wrapper providing a function for each call.
- Each service call is assigned an OS service ID in the form of an integer. These OS service call IDs are maintained by OS. Just like uuid and vtbl in COM.So it could not break existing application or libraries, that is, it would break backward compatibility.
- The service wapper call pushes the calling arguments on to the stack, loas register( EAX) with Service Call ID, and issue a service trap or software interrupt depending on the target processor architecture.
- The trap is an instruction that causes tranition from the current user space execution to the function in the exception vector table.
- The OS services trap handler dereferences a system call table using the service call ID and tranfers control to the function bound to the table slot.
- At this point, the processor is executing the kernel system call function with kernel privileges.
- An initial root task or thread is created by the kernel. Launcher at Android, Exploer.exe in Windows.The kernel root task starts with the highest privileges. The root task subsequently creates a number of other task and then deletes itself.
- The kernel is the program that performs the most basic functions of an operating system: It controls and interface with the computer's hardware, handles allocation of memory and other resources, allows multiple programs to run at the same time( via sheduler triggered by SysTimer ), manages the file system, and so on.
- The kernel by itself doesn't provide features that are useful to users. It can't even provide a simple prompt for uers to enter basic commands. It provides no way for users to manage or edit files, communicate with other computers, or write other programs. These tasks require the use of a wide array of other programs, including command shells, file utilities, editors, and compilers. Many of these programs, in turn, use libraries of general-purpose functions, such as the library containing standard C libray functions, which are not included in the kernel.
- On GNU/Linux systems, many of these other programs and libraries are sofware developed as part of the GNU Project. A great deal of this software predates the Linux Kernel. The aim of the GNU Project is "to develop a complete UNIX-like OS which is free software".
- System Memory Map
- The memory map is a list of physical addresses of all the resources on the platform, such as the DRAM memory, the interrupt controllers, and I/O devices.The system memory map is generated from the point of view of the processor.
- When the processor generates a read or write, the address is decoded by the system memory address decoders and is eventually routed to the appropriate physical device to complete the transaction, such as hareware controller registers or data registers.
- There are two splited separate sub ranges,.The first is the address range that when decoded accesses the DRAM, and the second is arange of address that are decoded to select I/O devices, which are called as Main Memory Range and Memory Mapped I/O Range.
- The Memory Mapped I/O Range actually is further divided into subregions: Fixed Address Memory Mapped Address, such as flash device, timers controller, interrupt controller; PCIe BUS, such as Gfx Controller, USB controller, Ethernet Device, Wireless 802.11
- Interrupt Controller
- The processor requires the ability to interact with its environment through a range of input and output devices. The devices usually require a prompt response from the processor in order to service a real world event.
- The interrupt controller is a component that gathers all the hardware interrupt events from the SoC and platform and then presents the events to the processor.
- At its fundamental level, the interrupt controller routes events to the processor core for action. The interrupt controller facilitates the identification of the event that caused the interrupt so that the exception processing mechanism of the processor can transfer control to the appropriate handling function.
- It consists of three registers that can be read from or written to from the processor. The registers are composed of bit fields with a single bit allocated for each interrupt source within each register.
- When the interrupt handler comes to service the interrupt, the handler must write a logic one to the bit it wishes to acknowledge. Bits with this behavior within a device register are known as Write One to Clear.
- The first mechanism, the interrupt software handler reads the register, the register value is used as an index into a software-based vector table containing function pointers. Such as ARM devices where the architecture defines a single interrupt request line into the processor.
- The second mechanism used is one in which the CPU hardware itself generates an interrupt acknowledge cycle that automatcially retrieves the interrupt number when the interrupt request has been raised to the processor. This interrupt number is then translated to the interrupt vector that the processor will transfer control to.
- This mechanism of using a few memory-mapped registers to access a larger bank of internal device registers is a common design pattern used in IA-32 systems.
- Hardware-based timers are critical to all computer systems. A hardware-based timer generally consists of a hardware counter that counts down from a provisioned value and triggers an event such as an interrupt to the CPU when the counter reached zero.
- At least on timer is required for the OS, particularly if it is a preemptive OS. The OS timer is often called OS tick. The interrupt handler for OS tick triggers the OS scheduler to evaluate whether the current process should be suspended in favour of executing another ready task.
- The Timer in embedded OS will invole Clock Source, Timer accuracy, Free Run/One Shot, Count direction, Counters, Watchdog timers,
- Memory
- A compplete embedded system is composed of many different memory technologies.
- Intel SoC have two distinct address types.The first is for I/O devices; this is read using either IN/OUT assembly instuctions or, more likely using normal MOV instuctions to a dedicated part of the address map known as memory-mapped I/O space(MMIO). When a program reads to an MMIO space it is routed to a device.
- The other key address space is memory. The memory space is mapped to memory deivces on the SoC, such as the DRAM, a flash ROM device, or local on-die SRAM memory.
- The hardware block that converts internal memory transactions to access the memory device is known as a memory controler.
- DRAM Contollers
- SRAM Contollers
- Non-volatile Storage
- NOR Flash
- NAND Flash
- NAND Controllers
- Hard Disk Drives and Solid State Drives
- Device Interface-High Performance
- In many cases an SoC needs additional capabilities such as an external application-specific I/O device.The device interface consists of a device interface controller and a defined external interconnect to attach to an external device.
- A peripheral bus interface requires a number of capabilities:
- Transaction mapping from the processor to the device address space. Routing
- Inbound transaction
- Interrupts
- Physical standard
- PCI = Peripheral Componet Interconnect
- Bus Mastering
- Universal Serial Bus
- Programming Interface
- Linux Driver
- Device Interconnet-Low Performance
- General-purpose Input/Output = GPIO
- Power Delivery
- Embedde Processor Architecture
- Operating Systems Overview
- adsf
- sdf
- asdf
- sdf


















MPU/SoC/Application Processor/Embedded OS的更多相关文章
- Android apps for “armeabi-v7a” and “x86” architecture: SoC vs. Processor vs. ABI
INSTRUCTION SET: Processors are made of semiconductor dies, usually electronic-grade mono-crystallin ...
- iOS Application Project与OS X Application Project对于plist使用的区别
前几天因为在开源中国看到一个求源代码的问题: 模拟一个动物园系统MyZoo 1.动物园里面有三种动物:Panda,Elephant,Kangaroo 2.三种动物都有一定的数量(不止一只) 3.动物有 ...
- CPU MPU MCU SOC SOPC关系及区别
在嵌入式开过程,会经常接触到一些缩写术语概念,这些概念在嵌入式行业中使用率非常高,下面我们就解释一下这些概念之间的关系和区别: 1.CPU(Central Processing Unit),是一台计算 ...
- Single-stack real-time operating system for embedded systems
A real time operating system (RTOS) for embedded controllers having limited memory includes a contin ...
- 微软职位内部推荐-SW Engineer II for Embedded System
微软近期Open的职位: Do you have a passion for embedded devices and services?   Does the following m ...
- Coremicro Reconfigurable Embedded Smart Sensor Node
A Coremicro Reconfigurable Embedded Smart Sensor Node has the capability of hosting intelligent algo ...
- MCU与MPU的基本区别
MCU与MPU的基本区别 题记:一般来说,mpu的价格是mcu的数倍. 参考资料: http://www.elecfans.com/d/1564656.html https://zhuanlan.zh ...
- Spring boot配置文件 application.properties
http://www.tuicool.com/articles/veUjQba 本文记录Spring Boot application.propertis配置文件的相关通用属性 # ========= ...
- Android代码优化----Application节点的模板写法及UI工具类
一. MyApplication类的编写: 新建一个类MyApplication,继承自Application.代码如下: MyApplication.java: package com.smyhva ...
随机推荐
- jQuery 动画用法
jQuery动画: <head> <meta charset="UTF-8"> <title>Title</title> <s ...
- Hexo博客系列(一)-Windows系统配置Hexo v3.x个人博客环境
[原文链接]:https://www.tecchen.xyz/blog-hexo-env-01.html 我的个人博客:https://www.tecchen.xyz,博文同步发布到博客园. 由于精力 ...
- System Verilog基础(二)
这一篇笔记主要记录Procedural,Process,Task and function,Interface和Communication中值得注意的点. 1.Procedural 写testbenc ...
- [Xamarin.Android]如何引用JAR檔案 (转帖)
這個範例是如何在Xamarin.Android中去使用一個我們自行在開發的JAR檔案. 主要會執行的步驟如下 1. 在Xamarin建立一個Android Java Bindings Library ...
- 爬虫URL去重
这个要看你想抓取的网页数量是哪种规模的.如果是千万以下用hash表, set, 布隆过滤器基本可以解决,如果是海量的......嗯我也没做过海量的,不过hash表之类的就别想了,内存根本不够,分割线下 ...
- java io流 数据流 DataInputStream、DataOutputStream、ByteArrayInputStream、ByteArrayOutputStream
例子程序: package io; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import ...
- CentOS 6.4下安装 Mono 3.2 和Jexus 5.4
1.安装Mono源码安装需要的库 yum -y install gcc gcc-c++ bison pkgconfig glib2-devel gettext make libpng-devel li ...
- mysql8.0关闭log-bin功能
一.查看log-bin是否开启: mysql> show variables like 'log-bin'; 二.关闭log-bin: 在配置文件中的 [mysqld] 配置节中增加 skip- ...
- <机器学习实战>读书笔记--k邻近算法KNN
k邻近算法的伪代码: 对未知类别属性的数据集中的每个点一次执行以下操作: (1)计算已知类别数据集中的点与当前点之间的距离: (2)按照距离递增次序排列 (3)选取与当前点距离最小的k个点 (4)确定 ...
- 样式styles和主题theme
参考资料:http://blog.csdn.net/sshhbb/article/details/7219838/ /values/styles.xml <resources> <! ...







