Descriptor Table & Register

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
Operating Systems.
Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU
Computer Organization and Assembly Languages Yung-Yu Chuang
Unit 4 Chapter-1 Multitasking. The Task State Segment.
16.317: Microprocessor System Design I
4/14/2017 Discussed Earlier segmentation - the process address space is divided into logical pieces called segments. The following are the example of types.
Intel MP.
IA-32 Processor Architecture
X86 segmentation, page tables, and interrupts 3/17/08 Frans Kaashoek MIT
Memory Management (II)
Venturing into protected-mode
CS2422 Assembly Language & System Programming September 22, 2005.
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Fall 2012 Lecture 15: Protected mode intro.
Protected Mode. Protected Mode (1 of 2) 4 GB addressable RAM –( to FFFFFFFFh) Each program assigned a memory partition which is protected from.
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.
Intel MP (32-bit microprocessor) Designed to overcome the limits of its predecessor while maintaining the software compatibility with the.
Address Translation Mechanism of 80386
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.
Virtual Memory Expanding Memory Multiple Concurrent Processes.
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 月.
Virtual 8086 Mode  The supports execution of one or more 8086, 8088, 80186, or programs in an protected-mode environment.  An 8086.
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.
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.
80386DX.
D P L s G D X U P Segment Descriptor A T Y P E
1 Microprocessors CSE Protected Mode Memory Addressing Remember using real mode addressing we were previously able to address 1M Byte of memory.
Microprocessor and Assembly Language Addressing Models
Information Security - 2. Task Switching Every process has an associated Task State Segment, whose starting point is stored in the Task register. A task.
Memory Management Unit and Segment Description and Paging
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.
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
16.317: Microprocessor System Design I
Microprocessor Systems Design I
Microprocessor and Assembly Language
Microprocessor Systems Design I
Microprocessor Systems Design I
Anton Burtsev February, 2017
Address Translation Mechanism of 80386
Microprocessor Systems Design I
Protection UQ: Explain the protection mechanism of X86 Intel family microprocessor(10 Marks)
contains 8086 processor and several additional functional chips: clock generator 2 independent DMA channels PIC 3 programmable 16-bit timers.
x86 segmentation, page tables, and interrupts
System Segment Descriptor
Subject Name: Microprocesor Subject Code: 10CS45
Operating Modes UQ: State and explain the operating modes of X86 family of processors. Show the mode transition diagram highlighting important features.(10.
Computer-System Architecture
Module 2: Computer-System Structures
Microprocessor and Assembly Language Addressing Models
Lecture 36 Syed Mansoor Sarwar
Module 2: Computer-System Structures
Lecture 37 Syed Mansoor Sarwar
Information Security - 2
Module 2: Computer-System Structures
Assembly Language for Intel-Based Computers, 5th Edition
Module 2: Computer-System Structures
Presentation transcript:

Descriptor Table & Register Unit 2 Descriptor Table & Register

Descriptor tables The segment descriptors are grouped together and placed in a continuous memory location and this group arrangement is known as descriptor tables . Each descriptor requires 8 bytes in order to store the data of particular segment. Total descriptors =8192 and Max length(Size) =64KB. E.g: 65535 bytes There are 3 types of descriptor tables. 1)GDT 2) LDT 3) IDT

Global Descriptor Table (GDT) Main table & most important one The same GDT can be used by all programs to refer to the segment of memory. 80386 processor in protected mode can have many LDT’s but only one GDT. It may contain special system descriptors.

Global Descriptor Table Register (GDTR) and GDT

Global Descriptor Table Register (GDTR) 48 bit register. Used to point GDT. Divided into two components viz. Base and limit. Base value( 32 bit) indicates the starting address of GDT. Limit value(16 bit) indicates the size of GDT. Used by OS only(GDTR). Initialized in real mode. Defines characteristics of global address space. It has no cache register.

47 16 15 BASE LIMIT LIMIT -> 16 bit field. Indicates the length of GDT in terms of bytes . The maximum size of GDT is 65536 bytes. Limit = Size -1 e.g. if LIMIT = 00FF H then size of GDT = 256 bytes BASE -> 32 bit field. Gives 32 bit physical starting address of GDT.

Local Descriptor Table (LDT) Multitasking system is defined on a per task basis. Each task can have access to own private descriptor table(LDT) in addition to GDT. It can also be shared with other tasks. Each task can have its own segment of local memory. So there may be many LDT’s in protected mode, say LDT-0 to LDT-n. It can be smaller or larger than the GDT Function: Expand the total number of available descriptors.

Local Descriptor Table (LDT) The LDT is also called as “private table” which defines a local memory address space for use by the task. Contains descriptors that provide access to code and data in segments of memory. for loading the value in the GDTR, LDTR, IDTR the 80386 provides the instructions LGDT, LLDT, LIDT. Similarly for storing we have SGDT, SLDT and SIDT

Local Descriptor Table Register (LDTR) 16 bit register. Used as a local selector. Points LDT descriptor stored in GDT. GDT contains many LDT descriptors. Each LDT has LDT descriptor in GDT. Points only one LDT descriptor at a time. Used to change LDT. Provides 48 bit cache register. A 48 bit cache register is used to hold current LDT descriptor.

LDTR Lower 3 bits are always zeros. Upper 13 bits are used as Index Value Index value is multiplied by 8 and added into base address stored in GDTR. Physical Address of LDT descriptor in GDT = Base address in GDTR + (Index value8). 15 3 2 13 bit Index Value 0 0 0

LDTR CACHE REGISTER This Register is not available for user. It holds LDT descriptor of current LDT. Base address is the physical address of LDT. Limit indicates the size of LDT. Limit = Size -1 Access right provides protection mechanism. 32 BIT BASE Address of LDT 16 BIT LIMIT Access Right

Interrupt Descriptor Table (IDT) Holds the descriptors that are used Trap Gate Descriptor Interrupt Gate Descriptor Task Gate Descriptor The user program can never select a descriptor in IDT like GDT or the LDT It Maintains ISR The default value that 80386 loads into IDTR as Base address=0, Limit = 03FFH

Interrupt Descriptor Table (IDT) Defines interrupt & Exception handling. IDT can also be up to 64KB But 386 only supports up to 256 interrupts and exceptions(2KB). One for each interrupt vector. 255 Interrupt Descriptor Table (IDT) Interrupt Descriptor Table Register(IDTR) MAX: 2k bytes 256 entries 47 16 15 BASE LIMIT 1

Interrupt Descriptor Table Rgeister (IDTR) 48 bit register. Points IDT. Divided into two components viz. Base and limit. Base value( 32 bit) indicates the starting address of IDT. Limit value(16 bit) indicates the size of IDT. Used by interrupts and exceptions only. ISRs are invoked via IDT. It has no cache register. The descriptors used in the IDT are called as “interrupt gates” which gives the beginning of an interrupt-service routine(ISR).

IDTR Base address is the physical address of IDT. Limit value indicates the size of IDT. Limit = Size –1. The maximum size of IDT is 256  8 47 16 15 32 bit Base address of IDT Limit 16 bit Not more than 256*8-1

Interrupt Descriptor Table Register (IDTR) and IDT

Descriptor tables and descriptors