We think you have liked this presentation. If you wish to download it, please recommend it to your friends in any social system. Share buttons are a little bit lower. Thank you!
Presentation is loading. Please wait.
Published byStanley Derham
Modified over 2 years ago
Copyright © 2001, Daniel W. Lewis. All Rights Reserved. CHAPTER 11 SYSTEM INITIALIZATION
Copyright © 2001, Daniel W. Lewis. All Rights Reserved. Program’s View of Memory Heap Space Stack Space Unitialized statics (bss) Initialized statics (data) Code (text) Top of Memory Physical Address 0
Copyright © 2001, Daniel W. Lewis. All Rights Reserved. Step 1: CPU Initialization 1 st instruction is fetched from FFFFFFF0 16 –Code and initial values of data in ROM Setup Global Descriptor Table (GDT) –Use a “Flat” Memory Model Three descriptors needed: –Null descriptor (empty & not used, but required by CPU) –Code descriptor (cannot be write enabled) –Data descriptor (must be read/write) Switch to Protected Mode
Copyright © 2001, Daniel W. Lewis. All Rights Reserved. Global Descriptor Base Adrs 31..24 Base Adrs 23..0Seg Length 15..0 Byte 7Byte 6Byte 5Bytes 4,3,2Bytes 1,0 See Text Flat Memory Model: Set Base Address to 0 Set Segment Length to all 1’s (4 GB) 4 most-significant bits of segment length are stored here.
Copyright © 2001, Daniel W. Lewis. All Rights Reserved. Switching to Protected Mode RealMode: ; Arrive here in real mode… MOVEAX,CR0; Get CR0 into EAX ORAL,1; Set Protected Mode bit MOVCR0,EAX; Load new value into CR0 ; Bit 0 of register CR0 has been set. The next inter-segment ; JMP will put the processor in protected mode. DB66h; JMP must use 32-bit offset DB0EAh; Opcode = far jump DDProtMode; offset and selector of DWCODE_SELECTOR; the next instruction ProtMode: ; Execution continues here in protected mode...
Copyright © 2001, Daniel W. Lewis. All Rights Reserved. Step 2: C Run-Time Environment Setup the stack. –LINK.CMD establishes identifiers for the starting and ending addresses of the stack. Copy code and initialized statics from ROM to RAM for faster access. –LINK.CMD establishes identifiers for the starting and ending addresses of code (text) and initialized statics (data). Set all uninitialized statics to zero. –LINK.CMD establishes identifiers for the starting and ending addresses of the uninitialized statics (bss). Setup the heap. –Use all available memory above the stack.
Copyright © 2001, Daniel W. Lewis. All Rights Reserved. Step 3: 8253 Timer Chip Timer 0: Timer Tick –Program to interrupt 1000 times/sec (1 msec). Timer 1: Refresh of Dynamic RAM –Program to refresh 512 rows per 8 msec. Timer 2: Speaker Frequency
Copyright © 2001, Daniel W. Lewis. All Rights Reserved. Step 4: Interrupt System
Protected Mode. Protected Mode (1 of 2) 4 GB addressable RAM –( to FFFFFFFFh) Each program assigned a memory partition which is protected from.
Software Development and Software Loading in Embedded Systems.
Page Replacement Implementation Issues Text: –Tanenbaum ch. 4.7.
1 Hardware and Software Architecture Chapter 2 n The Intel Processor Architecture n History of PC Memory Usage (Real Mode)
Information Security - 2. Descriptor Tables Descriptors are stored in three tables: – Global descriptor table (GDT) Maintains a list of most segments.
CS2422 Assembly Language & System Programming September 22, 2005.
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.
Chapter 2 Instruction Addressing and Execution. Lesson plan Review some concepts in the first week First assembly program with EMU8086 Related concepts.
Memory Management Unit
Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU
X86 segmentation, page tables, and interrupts 3/17/08 Frans Kaashoek MIT
Microprocessor and Assembly Language Addressing Models
OS Memory Addressing. Architecture CPU – Processing units – Caches – Interrupt controllers – MMU Memory Interconnect North bridge South bridge PCI, etc.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Memory Management and Protection Part 3:Virtual memory, mode switching,
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Fall 2012 Lecture 15: Protected mode intro.
1 Overview Assignment 4: hints Memory management Assignment 3: solution.
OS Memory Addressing.
© 2017 SlidePlayer.com Inc. All rights reserved.