Information Security - 2. Memory Segmentation Segment Descriptors – 80886 to 80386+ In 8086, the program is not expected to generate a non- existent memory.

Slides:



Advertisements
Similar presentations
Memory Management Unit
Advertisements

Types of Code Segments Conforming Code Segment
Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU
Introduction to The x86 Microprocessor
FEATURES OF 80386: Two versions of are commonly available: 1) 80386DX
Virtual Memory Chapter 18 S. Dandamudi To be used with S. Dandamudi, “Fundamentals of Computer Organization and Design,” Springer,  S. Dandamudi.
Intel MP.
CSC 221 Computer Organization and Assembly Language
Azir ALIU 1 What is an assembly language?. Azir ALIU 2 Inside the CPU.
Operating Systems: Segments 1 Segmentation Hardware Support single user program system: – wish somehow to relocate address 0 to after operating system.
1 Hardware and Software Architecture Chapter 2 n The Intel Processor Architecture n History of PC Memory Usage (Real Mode)
Chapter 8.3: Memory Management
Linux Vs. Windows NT Memory Management Hitesh Kumar
1 ICS 51 Introductory Computer Organization Fall 2006 updated: Oct. 2, 2006.
CE6105 Linux 作業系統 Linux Operating System 許 富 皓. Chapter 2 Memory Addressing.
3-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL Intel 8088 (8086) Microprocessor.
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Fall 2012 Lecture 15: Protected mode intro.
80x86 Processor Architecture
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
Memory Addressing in Linux  Logical Address machine language instruction location  Linear address (virtual address) a single 32 but unsigned integer.
The Pentium Processor.
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 Pentium Processor Chapter 3 S. Dandamudi.
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.
CSC 660: Advanced Operating SystemsSlide #1 CSC 660: Advanced OS Memory Addressing / Kernel Modules.
1 Linux Operating System 許 富 皓. 2 Memory Addressing.
Memory Addressing in Linux (Chap. 2, Understanding the Linux Kernel) J. H. Wang Oct. 20, 2008.
System Address Registers/Memory Management Registers Four memory management registers are used to specify the locations of data structures which control.
2003 Dominic Swayne1 Microsoft Disk Operating System and PC DOS CS-550-1: Operating Systems Fall 2003 Dominic Swayne.
80386DX.
ADVANCED PROCESSORS & CONTROLLERS
Microprocessor Microprocessor (cont..) It is a 16 bit μp has a 20 bit address bus can access upto 220 memory locations ( 1 MB). It can support.
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.
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.
The Pentium Processor Chapter 7 S. Dandamudi To be used with S. Dandamudi, “Fundamentals of Computer Organization and Design,” Springer, 
Intel 8086 (8088) Microprocessor Structure
Information Security - 2. Other Registers EFLAGS – 32 Bit Register CFPFAFZFSFTFIFDFOFIO PL IO PL NTRFVM Bits 1,3,5,15,22-31 are RESERVED. 18: AC, 19:VIF,
8051 Micro Controller. Microcontroller versus general-purpose microprocessor.
Microprocessor and Assembly Language Addressing Models
Information Security - 2. CISC Vs RISC X86 is CISC while ARM is RISC CISC is Compiler’s heaven while RISC is Architecture’s heaven Orthogonal ISA in RISC.
The Microprocessor & Its Architecture A Course in Microprocessor Electrical Engineering Department Universitas 17 Agustus 1945 Jakarta.
Privilege Check for Control Transfer(Code Access) Control transfers (except interrupts) are accomplished by the instructions JMP, CALL, and RET The "near"
I NTEL 8086 M icroprocessor بسم الله الرحمن الرحيم 1.
EEL 4709C Prof. Watson Herman Group 4 Ali Alshamma, Derek Montgomery, David Ortiz 11/11/2008.
1 Classification of instructions 4-address instructions 3-address instructions 2-address instructions 1-address instructions 0-address instructions.
CS 140 Lecture Notes: Virtual Memory
Introduction to The x86 Microprocessor
Lecture on Real Mode Memory Addressing
COMBINED PAGING AND SEGMENTATION
Address Translation Mechanism of 80386
Protection UQ: Explain the protection mechanism of X86 Intel family microprocessor(10 Marks)
Copyright © 2011, Elsevier Inc. All rights Reserved.
System Segment Descriptor
CS 140 Lecture Notes: Virtual Memory
Operating Modes UQ: State and explain the operating modes of X86 family of processors. Show the mode transition diagram highlighting important features.(10.
Introduction to Intel IA-32 and IA-64 Instruction Set Architectures
Microprocessor and Assembly Language Addressing Models
Page Replacement Implementation Issues
CS 140 Lecture Notes: Virtual Memory
Introduction to the Intel x86’s support for “virtual” memory
Computer Instructions
CS 140 Lecture Notes: Virtual Memory
Computer Architecture and System Programming Laboratory
CS444/544 Operating Systems II Virtual Memory
Presentation transcript:

Information Security - 2

Memory Segmentation Segment Descriptors – to In 8086, the program is not expected to generate a non- existent memory address. If it does, then the processor shall try to access the same and read bogus data, or crash In (and above) the segment attributes (base, limit, privilege etc) are programmable and no matter how privileged the code may be, it cannot access an area of memory unless that area is described to it.

Insight into segments Segments are – Areas of memory – Defined by the programmer – Used for different purposes, such as code, data and stack Segments are not – All the same size – Necessarily paragraph aligned – Limited to 64KB

Structure of a Descriptor

Segment Descriptors Describes a segment using 64-bits (0-63) Must be created for every segment Is created by the programmer Determines a segment’s base address (32-bits) (Bits 16-39, 56-63) Determines a segment’s size (20-bits) (Bits 0- 15, 48-51)

Segment Descriptors (Cont’d) Defines whether a segment is a system segment (=0) or non-system (=1) (code, data or stack) segment (System bit) (Bit 44) Determines a segment’s use/type (3-bits) (Bits 41-43) after the above classification Determines a segment’s privilege level (2 bits) (Bits 45-46) – DPL (Descriptor Privilege Level) Bits

Segment Descriptor (Cont’d) Accessed (A)-bit: Bit 40, automatically set and not cleared by the processor when a memory reference is made to the segment described by this descriptor. Present (P)-bit: Bit 47, indicates whether the segment described by this descriptor is currently available in physical memory or not. Bits of the descriptor is called the Access Right Byte of the descriptor. User (U)-bit and X bit: Bit 52 (U-bit) not used and Bit 53 (X-bit) reserved by Intel

Segment Descriptor (Cont’d) Default size (D)-bit: Bit 54, when this bit is cleared, operands contained within this segment are assumed to be 16 bits in size. When it is set, operands are assumed to be 32-bits. Granularity (G)-bit: Bit 55, when this bit is cleared the 20-bit limit field is assumed to be measured in units of 1byte. If it is set, the limit field is in units of 4096 bytes.

Types of non-system segment descriptors System bit S = 1 – 000 – Data, Read only – 001 – Data, Read/Write – 010 – Stack (expand down), Read only – 011 – Stack (expand down), Read/Write – 100 – Code, Execute only – 101 – Code, Execute/Read – 110 – Conforming Code, Execute only – Conforming Code, Execute/Read

D-bit for different descriptors Code segment – D = 0 then 16-bit code – D = 1 then 32-bit code Stack Segment – D = 0 then stack operations are 16-bit wide, SP is used as a stack pointer, maximum stack size is FFFF (64 KB) – D = 1 then stack operations are 32-bit wide, ESP is used as a stack pointer, maximum stack size is FFFFFFFF (4 GB)

G-bit for descriptors – G = 0 then a limit field in descriptor of value p indicates we can access p-1 bytes from base – G = 1 then a limit field in descriptor of value p indicates we can access (p * 4096) - 1 bytes from base

Stack/expand down segments All offsets must be greater than limit. In stack descriptor, D and G bits are to be the same, else contradiction. Base FFFF Addressa ble area Base FFFF Addressa ble area Stack/expand-downNon-stack Limit

End of Session-15 Thank You