Chapter 14: 80x86 Port.

Slides:



Advertisements
Similar presentations
Programming 8086 – Part IV Stacks, Macros
Advertisements

Chapter 2 (cont.) An Introduction to the 80x86 Microprocessor Family Objectives: The different addressing modes and instruction types available The usefulness.
CS 450 Module R3. Next Week R2 is due next Friday ▫Make sure to correct all errors with R1 ▫Correct errors in the documentation as well, it will be checked.
University of Tehran 1 Microprocessor System Design Interrupt Omid Fatemi
Unit 4 Chapter-1 Multitasking. The Task State Segment.
Intel MP.
Microprocessors system architectures – IA32 real and virtual-8086 mode Jakub Yaghob.
Chapter 6 Limited Direct Execution
Tips for R3: Process Initialization When we create processes to represent our 5 test procedures we must correctly initialize its context by placing values.
Chapter 14 80x86, Large Model Port Porting to real mode and for the large model –Real mode: 1Mb memory space (pointers in this model require 32 bits) –In.
Context Switch Animation Another one by Anastasia.
8.7 Memory management Program E Program D System memory DOS INT 21, function 48H: Allocate Memory Specification: allocates a number of memory paragraphs.
Interrupt Processing Haibo Wang ECE Department
P ORTING F REE RTOS TO MCB2140 BOARD Ashwini Athalye Sravya Kusam Shruti Ponkshe.
Introduction to Computer Engineering by Richard E. Haskell Interrupts Module M17.3 Sections 11.3, 14.1.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
ΜC/OS-III Tasks Akos Ledeczi EECE 354, Fall 2010 Vanderbilt University.
Interrupts. What Are Interrupts? Interrupts alter a program’s flow of control  Behavior is similar to a procedure call »Some significant differences.
Kernel structure & Task management © P.J.Fondse April 2010.
1 / 40 Implementation of Paging in uCOS-II Ke, Dian Chia.
The  C/OS-II Real-Time Operating System.  C/OS-II Real-time kernel –Portable, scalable, preemptive RTOS –Ported to over 90 processors Pronounced “microC.
Chapter 4 Processes. Process: what is it? A program in execution A program in execution usually usually Can also have suspended or waiting processes Can.
Scheduling in µC/OS-III Akos Ledeczi EECE 6354, Fall 2015 Vanderbilt University.
Tami Meredith, Ph.D. CSCI  Devices need CPU access  E.g., NIC has a full buffer it needs to empty  These device needs are often asynchronous.
CHAPTER 6 INTERRUPTS AND THE 8259 CHIP. What happens on interrupt? Micro automatically saves (on stack) the FR (flag register), IP (instruction pointer),
Microprocesors, Advanced W hat You Need to Know About RTOSes February 1, 2012 Jack Ganssle.
INT- interrupt program execution 1. It decrements the sp by 2 and pushes the flag registers on the stack. 2. Decrement the sp by 2 and push the content.
Module R3 Process Scheduling. Module R3 involves the creation of a simple “Round Robin” dispatcher. The successful completion of this module will require.
ECGR-6185 µC/OS II Nayana Rao University of North Carolina at Charlotte.
6-1 Infineon 167 Interrupts The C167CS provides 56 separate interrupt sources that may be assigned to 16 priority levels. The C167CS uses a vectored interrupt.
Concurrency, Processes, and System calls Benefits and issues of concurrency The basic concept of process System calls.
Functions/Methods in Assembly
Ucosii porting on pxa270  粘家華 R  林育佳 R
6. HAL and IDT ENGI 3655 Lab Sessions. Richard Khoury2 Textbook Readings  Interrupts ◦ Section  Hardware Abstraction Layer ◦ Section
Implementation of Embedded OS Lab3 Porting μC/OS-II.
Information Security - 2. Task Switching Every process has an associated Task State Segment, whose starting point is stored in the Task register. A task.
Chapter 6 Limited Direct Execution Chien-Chung Shen CIS/UD
Chapter 3: Kernel Structure 1. Objectives To understand what a task is. To learn how μ C/OS-II manages tasks. To know how an interrupt service routine.
Chapter 13: Porting μC/OS-II 1. Outline Requirements Hardware Software Tasks of Porting µC/OS-II OS_CPU_C.H OS_CPU_C.C OS_CPU_A.ASM Testing a port 2.
Chapter 3: Kernel Structure 1. Objectives To understand what a task is. To learn how μ C/OS-II manages tasks. To know how an interrupt service routine.
Chapter 1: Getting Started with μC/OS-II 1. kernel Introduction 2 LinuxμC/OS-II Task (process) kernel Device driver User mode (0-3G) (Kernel mode) 3G-4G.
7-Nov Fall 2001: copyright ©T. Pearce, D. Hutchinson, L. Marshall Oct lecture23-24-hll-interrupts 1 High Level Language vs. Assembly.
ΜComputer Structure μProcessor Memory Bus System I/O Ports.
Microprocessor Architecture
Chapter 3: Kernel Structure
Chapter 1: Getting Started with μC/OS-II
Interrupts and interrupt responses
Microprocesors, Advanced What You Need to Know About RTOSes
Chapter 13: Porting μC/OS-II
CS501 Advanced Computer Architecture
Microprocessor and Assembly Language
Operating Systems Engineering
Chapter 4: Task Management
CS 6560: Operating Systems Design
Anton Burtsev February, 2017
Interrupt and Time Management in µC/OS-III
Interrupts In 8085 and 8086.
ICS143A: Principles of Operating Systems Lecture 13: Context switching
Day 08 Processes.
Day 09 Processes.
Chapter 4 Data Movement Instructions
EE3541 Introduction to Microprocessors
1st micro 1971 calculator 2300 transistors 4-bit microprocessor
3.6 Data transfer Instructions
Programming 8086 – Part IV Stacks, Macros
Scheduling in µC/OS-III
8086 Registers Module M14.2 Sections 9.2, 10.1.
CS-401 Computer Architecture & Assembly Language Programming
Data Movement Instructions
Akos Ledeczi EECE 6354, Fall 2017 Vanderbilt University
Presentation transcript:

Chapter 14: 80x86 Port

Register Model and Addressing

OS_CPU.H

OS_CPU.H

OS_CPU_C.C OSTaskStkInit OSTaskStkInit_FPE_x86 Hook functions Borland floating point emulator Hook functions OSTaskCreateHook() OSTaskDelHook() OSTaskSwHook() OSTaskIdleHook() OSTaskStatHook() OSTimeTickHook() OSInitHookBegin()

OS_CPU_C.C

OS_CPU.C – OSStkInit()

OS_CPU.C – OSStkInit() @OSTaskDel 0xFFFF

OS_CPU.C – OSStkInit() void OSTaskDelSelf() { OSTaskDel(OS_PRIO_SELF); }

OS_CPU_A.ASM OSStartHighRdy OSCtxSw OSIntCtxSw OSTickISR

OSStartHighRdy()

LDS, LES, LFS, LGS, and LSS … AX 89 BX (6F2A) 30 … 6F 2A DS:_OSTCBHighRdy … … … CS DS(1000) ES(8930) … 10000

OSCtxSw() The system call which change certain tasks state needs to activate the scheduler and throw an software interrupt. (the macro OS_TASK_SW) The software trap vectors to the OSCtxSw.

OSCtxSw()

OSCtxSw()

OSIntCtxSw() OSIntCtxSw is called by OSIntExit to perform a context switch from an ISR. All registers have been saved onto the interrupted task’s stack Stack pointer is also saved into the beginning of the ISR has already done that.

OSIntCtxSw()

OSTickISR() – the Setup Procedure void main(): Call OSInit PC_DOSSaveReturn PC_VecSet //install switch vector at vector 0x80 Create at least one application Call OSStart The first task: Install OSTickISR (Change the tick rate)

Pseudocode

OSTickISR()

OSTickISR()

Using OSTaskStkInit_FPE_x86()

ptos ptos Size-384 size pbos pbos SS:0000 before after