16.317: Microprocessor System Design I

Slides:



Advertisements
Similar presentations
Memory Management Unit
Advertisements

O PERATING I N P ROTECTED M ODE Prof.P.C.Patil Department of Computer Engg Matoshri College of Engg.Nasik M ICROPROCESSOR A RCHITECTURE.
Types of Code Segments Conforming Code Segment
1/1/ / faculty of Electrical Engineering eindhoven university of technology Memory Management and Protection Part 3:Virtual memory, mode switching,
Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU
Chapter 2: The Microprocessor and its Architecture.
Unit 4 Chapter-1 Multitasking. The Task State Segment.
16.317: Microprocessor System Design I
Intel MP.
CSC 221 Computer Organization and Assembly Language
Operating Systems: Segments 1 Segmentation Hardware Support single user program system: – wish somehow to relocate address 0 to after operating system.
IA-32 Processor Architecture
1 Hardware and Software Architecture Chapter 2 n The Intel Processor Architecture n History of PC Memory Usage (Real Mode)
X86 segmentation, page tables, and interrupts 3/17/08 Frans Kaashoek MIT
CS2422 Assembly Language & System Programming September 22, 2005.
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Spring 2012 Lecture 2: 80386DX Internal Architecture & Data Organization.
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Fall 2012 Lecture 15: Protected mode intro.
Microprocessor Systems Design I
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Spring 2013 Lecture 4: 80386DX memory, addressing.
Protected Mode. Protected Mode (1 of 2) 4 GB addressable RAM –( to FFFFFFFFh) Each program assigned a memory partition which is protected from.
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Spring 2014 Lecture 4: x86 memory.
UNIT 2 Memory Management Unit and Segment Description and Paging
Interrupts  Interrupt is a process where an external device can get the attention of the microprocessor.  The process starts from the I/O device  The.
Address Translation Mechanism of 80386
Microprocessor system architectures – IA32 segmentation Jakub Yaghob.
The Pentium Processor.
The Pentium Processor Chapter 3 S. Dandamudi To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,
The Intel Microprocessors. Real Mode Memory Addressing Real mode, also called real address mode, is an operating mode of and later x86-compatible.
Multitasking Mr. Mahendra B. Salunke Asst. Prof. Dept. of Computer Engg., STES SITS, Narhe, Pune-41 STES Sinhgad Institute of Tech. & Science Dept. of.
System Address Registers/Memory Management Registers Four memory management registers are used to specify the locations of data structures which control.
80386DX.
1 i386 Memory Management Professor Ching-Chi Hsu 1998 年 4 月.
The Microprocessor and Its Architecture A Course in Microprocessor Electrical Engineering Department University of Indonesia.
EFLAG Register of The The only new flag bit is the AC alignment check, used to indicate that the microprocessor has accessed a word at an odd.
Microprocessor system architectures – IA32 tasks Jakub Yaghob.
80386DX. Programming Model The basic programming model consists of the following aspects: – Registers – Instruction Set – Addressing Modes – Data Types.
Memory Management CS Spring Overview Partitioning, Segmentation, and Paging External versus Internal Fragmentation Logical to Physical Address.
Segment Descriptor Segments are areas of memory defined by a programmer and can be a code, data or stack segment. In segments need not be all the.
1 Microprocessors CSE Protected Mode Memory Addressing Remember using real mode addressing we were previously able to address 1M Byte of memory.
Chapter 2 The Microprocessor Architecture Microprocessors prepared by Dr. Mohamed A. Shohla.
Microprocessor and Assembly Language Addressing Models
Information Security - 2. Descriptor Tables There are two descriptor tables – Global Descriptor Tables – Local Descriptor Tables The global descriptor.
Information Security - 2. Descriptor Tables Descriptors are stored in three tables: – Global descriptor table (GDT) Maintains a list of most segments.
contains 8086 processor and several additional functional chips: –clock generator –2 independent DMA channels –PIC –3 programmable 16-bit.
Privilege Check for Control Transfer(Code Access) Control transfers (except interrupts) are accomplished by the instructions JMP, CALL, and RET The "near"
Microprocessor Systems Design I
32- bit Microprocessor-Intel 80386
Lecture on Real Mode Memory Addressing
Descriptor Table & Register
Microprocessor Systems Design I
MICROPROCESSOR BASED SYSTEM DESIGN
Microprocessor and Assembly Language
Microprocessor Systems Design I
Microprocessor Systems Design I
Microprocessor Systems Design I
Microprocessor Systems Design I
Address Translation Mechanism of 80386
Microprocessor Systems Design I
143A: Principles of Operating Systems Lecture 5: Address translation
Protection UQ: Explain the protection mechanism of X86 Intel family microprocessor(10 Marks)
x86 segmentation, page tables, and interrupts
System Segment Descriptor
Subject Name: Microprocesor Subject Code: 10CS45
Chapter 2: The Microprocessor and its Architecture
Operating Modes UQ: State and explain the operating modes of X86 family of processors. Show the mode transition diagram highlighting important features.(10.
Microprocessor and Assembly Language Addressing Models
Lecture 36 Syed Mansoor Sarwar
Chapter 2: The Microprocessor and its Architecture
Information Security - 2
AKT211 – CAO 05 – x86 Architecture: Intel 8088 (2)
Presentation transcript:

16.317: Microprocessor System Design I 5/19/2018 16.317: Microprocessor System Design I Instructor: Dr. Michael Geiger Spring 2012 Lecture 21: Protected mode (cont.) Chapter 2

Microprocessors I: Lecture 21 Lecture outline Announcements/reminders Lab 2 due 3/28 HW 3 due 3/26 Lecture outline Review: protected mode basics Characteristics of protected mode Selectors and descriptors Global vs. local memory LDTs and local memory accesses Task switching Virtual addressing 5/19/2018 Microprocessors I: Lecture 21

Microprocessors I: Lecture 21 Review Protected mode Supports memory management, multitasking, protection Changes in control/flag registers, IP, memory accesses Selectors: pointers into descriptor tables Contains requested privilege, global/local, and table index Descriptors: provide info about segments 8 bytes in length 4 bytes: base address 2 bytes: limit (max offset within segment) Segment size = (limit + 1) bytes 2 bytes: access info (privilege, R/W, executable, etc.) 5/19/2018 Microprocessors I: Lecture 21

Microprocessors I: Lecture 21 Review (cont.) Descriptors stored in descriptor tables Specific memory range dedicated to table GDTR points to global descriptor table Contains base address, limit for GDT Global memory access Selector indicates access is global (TI == 0) GDTR points to start of GDT Index field in selector chooses descriptor from GDT Descriptor addr = (GDT base) + (selector index * 8) Descriptor provides starting address of segment 5/19/2018 Microprocessors I: Lecture 21

Illustrating global memory access MOV AX, [10H]  Logical addr = DS:10H GDT 00002000H 000020FFH DS = 0013H = 0000 0000 0001 0 11 RPL = 3 Index = 2 TI = 0  global Desc. 2 Base = 00000100H Limit = 0FFFH 00002010H GDTR = 00002000 00FF Base Limit Descriptor addr: (GDT base) + (selector index * 8) 00002000H + (0002H * 8) 00002010H Actual mem addr: (seg base) + (effective address) 00000100H + 10H 00000110H 5/19/2018 Microprocessors I: Lecture 21

Local Descriptor Table Register (LDTR) 5/19/2018 Local Descriptor Table Register (LDTR) Local descriptor table Defines local memory address space for the task Each task has its own LDT Contains local segment descriptors LDTR: 16 bit selector pointing into GDT Each LDT is essentially a segment in global memory LDTR cache automatically loads when LDTR changed LDTR cache: 48bit Lower 2 bytes define LDT LIMIT (or size) Upper 4 bytes define LDT base (physical address) 5/19/2018 Microprocessors I: Lecture 21 Chapter 8

Illustrating local memory access MOV AX, [10H]  Logical addr = DS:10H GDT 00002000H 000020FFH DS = 0027H = 0000 0000 0010 0 1 11 RPL = 3 Index = 4 TI = 1  local Desc. 7 Base = 00002100H Limit = 001FH 00002038H LDTR = 003BH = 0000 0000 0011 1 11 GDTR = 00002000 00FF Base Limit Descriptor addr: (GDT base) + (selector index * 8) 00002000H + (0007H * 8) 00002038H 5/19/2018 Microprocessors I: Lecture 21

Illustrating local memory access MOV AX, [10H]  Logical addr = DS:10H GDT 00002000H 000020FFH LDT 00002100H 0000211FH DS = 0027H = 0000 0000 0010 0 1 11 RPL = 3 Index = 4 TI = 1  local GDT descriptor 3 describes LDT for this task  LDTR cache = 00002100 001F Desc. 4 Base = 00100000H Limit = 001FH 00002120H Base Limit Descriptor addr: (LDT base) + (selector index * 8) 00002100H + (0004H * 8) 00002120H Actual mem addr: (seg base) + (effective address) 00100000 + 10H 00100010H 5/19/2018 Microprocessors I: Lecture 21

Interrupt Descriptor Table Register (IDTR) 5/19/2018 Interrupt Descriptor Table Register (IDTR) Interrupt descriptor table Up to 256 interrupt descriptors Describes segments holding interrupt service routines Described by IDTR Each entry (interrupt descriptor) takes 8 bytes IDTR: 48-bit Lower 2 bytes define LIMIT (or size) Upper 4 bytes define the base (physical address) Initialized before switching to protected mode 5/19/2018 Microprocessors I: Lecture 21 Chapter 8

Microprocessors I: Lecture 21 5/19/2018 Multitasking Most systems run multiple tasks Different programs Different threads in same program Task switch: save state of current task; transfer control to new task 80386 specifics Task state segment (TSS): saved task state (picture at right) Every TSS resides in global memory Task register (TR): selector pointing to descriptor in GDT for current TSS Limit, base of current TSS cached Task switch = jump or call instruction that changes task Figure from cs.usfca.edu/~cruse/cs630f06/lesson08.ppt 5/19/2018 Microprocessors I: Lecture 21 Chapter 8

Microprocessors I: Lecture 21 Next time Virtual memory 5/19/2018 Microprocessors I: Lecture 21