Lecture 2. General-Purpose Computer Systems Prof. Taeweon Suh Computer Science Education Korea University ECM586 Special Topics in Embedded Systems.

Slides:



Advertisements
Similar presentations
Virtual Memory. Invented on Manchester atlas 1962 It embodied many pioneering features, which we now take for granted. These include system features such.
Advertisements

Computer Science & Engineering
Lecture 0. Course Introduction Prof. Taeweon Suh Computer Science Education Korea University ECM553 Special Topics in Computer Science 1.
CEN 226: Computer Organization & Assembly Language :CSC 225 (Lec#3) By Dr. Syed Noman.
Princess Sumaya Univ. Computer Engineering Dept. د. بســام كحـالــه Dr. Bassam Kahhaleh.
Intel MP.
Microprocessors system architectures – IA32 real and virtual-8086 mode Jakub Yaghob.
OS Memory Addressing.
Lecture 6 Machine Code: How the CPU is programmed.
1 Hardware and Software Architecture Chapter 2 n The Intel Processor Architecture n History of PC Memory Usage (Real Mode)
PC hardware and x86 3/3/08 Frans Kaashoek MIT
1 ICS 51 Introductory Computer Organization Fall 2006 updated: Oct. 2, 2006.
CS2422 Assembly Language & System Programming September 22, 2005.
Lecture 0. Course Introduction
PHY 201 (Blum) Buses Warning: some of the terminology is used inconsistently within the field.
Lecture 1. Embedded Systems vs General-Purpose Systems
Lecture 1. Embedded Systems vs General-Purpose Systems
Lecture 2. General-Purpose (GP) Computer Systems Prof. Taeweon Suh Computer Science Education Korea University COMP427 Embedded Systems.
Lecture 5. AT91 - Memory Map, Timers, and AIC -
Lecture 1. Number Systems Prof. Taeweon Suh Computer Science Education Korea University ECM585 Special Topics in Computer Design.
Lecture 1. Embedded Systems vs General- Purpose Systems Prof. Taeweon Suh Computer Science Education Korea University COM609 Topics in Embedded Systems.
Lecture 2. General-Purpose (GP) Computer Systems Prof. Taeweon Suh Computer Science Education Korea University ECM586 Special Topics in Embedded Systems.
An Introduction to 8086 Microprocessor.
6.828: PC hardware and x86 Frans Kaashoek
… but what parts does it have and how do they work? A computer looks like this...
LOGO BUS SYSTEM Members: Bui Thi Diep Nguyen Thi Ngoc Mai Vu Thi Thuy Class: 1c06.
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.
Lecture 1. x86 General-purpose vs Embedded Systems
Computer system components By Corey Burton. GPU GPU stands for ‘graphics processing unit’. The GPU can help the computer run smoothly. GPU is used for.
1 CS503: Operating Systems Spring 2014 Dongyan Xu Department of Computer Science Purdue University.
The Intel Microprocessors. Real Mode Memory Addressing Real mode, also called real address mode, is an operating mode of and later x86-compatible.
1 Fundamental of Computer Suthida Chaichomchuen : SCC
Lecture 0. Course Introduction Prof. Taeweon Suh Computer Science Education Korea University ECM585 Special Topics in Computer Design.
Chapter 2 Instruction Addressing and Execution. Lesson plan Review some concepts in the first week First assembly program with EMU8086 Related concepts.
Virtual Memory Review Goal: give illusion of a large memory Allow many processes to share single memory Strategy Break physical memory up into blocks (pages)
Lesson 3 — How a Computer Processes Data Unit 1 — Computer Basics.
Lecture 4. MIPS Instructions #2 Memory Access (Load/Store) Instructions Prof. Taeweon Suh Computer Science Education Korea University ECM534 Advanced Computer.
Lecture 0. Program Introduction Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education & Research.
Lecture 0. Course Introduction Prof. Taeweon Suh Computer Science Education Korea University ECM583 Special Topics in Computer Systems.
Chapter 2 Parts of a Computer System. 2.1 PC Hardware: Memory.
Lecture 1. General-Purpose Computer Systems
Lecture on Central Process Unit (CPU)
Intel 8086 (8088) Microprocessor Structure
1 Microprocessors CSE Protected Mode Memory Addressing Remember using real mode addressing we were previously able to address 1M Byte of memory.
X86 Assembly Language We will be using the nasm assembler (other assemblers: MASM, as, gas)
University of Sargodha, Lahore Campus Prepared by Ali Saeed.
MODULE 5 INTEL TODAY WE ARE GOING TO DISCUSS ABOUT, FEATURES OF 8086 LOGICAL PIN DIAGRAM INTERNAL ARCHITECTURE REGISTERS AND FLAGS OPERATING MODES.
Microprocessor Fundamentals Week 2 Mount Druitt College of TAFE Dept. Electrical Engineering 2008.
OS Memory Addressing. Architecture CPU – Processing units – Caches – Interrupt controllers – MMU Memory Interconnect North bridge South bridge PCI, etc.
Lecture 0. Course Introduction Prof. Taeweon Suh Computer Science Education Korea University COM515 Advanced Computer Architecture.
1 x86 Programming Model Microprocessor Computer Architectures Lab Components of any Computer System Control – logic that controls fetching/execution of.
Week 6 Dr. Muhammad Ayaz Intro. to Assembly Language.
Computer Organization & Assembly Language University of Sargodha, Lahore Campus Prepared by Ali Saeed.
BITS Pilani Pilani Campus Pawan Sharma Lecture / ES C263 INSTR/CS/EEE F241 Microprocessor Programming and Interfacing.
Lecture 01: Computer Architecture overview. Our Goals ● Have a better understanding of computer architecture – Write better (more efficient) programs.
I NTEL 8086 M icroprocessor بسم الله الرحمن الرحيم 1.
Computer Science 516 Intel x86 Overview. Intel x86 Family Eight-bit 8080, 8085 – 1970s 16-bit 8086 – was internally 16 bits, externally 8 bits.
Chapter 2 Instruction Addressing and Execution. Lesson plan Review some concepts in the first week First assembly program with EMU8086 Related concepts.
Lecture 2. A Computer System for Labs
Part of the Assembler Language Programmers Toolbox
Computer Organization & Assembly Language Chapter 3
University of Gujrat Department of Computer Science
Introduction to Assembly Language
University of Gujrat Department of Computer Science
Intel Microprocessor.
8086 Registers Module M14.2 Sections 9.2, 10.1.
SAPC Hardware Pentium CPU (or 486) 4M usable memory
CS 301 Fall 2002 Computer Organization
Presentation transcript:

Lecture 2. General-Purpose Computer Systems Prof. Taeweon Suh Computer Science Education Korea University ECM586 Special Topics in Embedded Systems

Korea Univ A General Purpose Computer System 2 CPU North Bridge South Bridge Main Memory (DDR2) FSB (Front-Side Bus) DMI (Direct Media I/F)

Korea Univ x86-based General-Purpose Computer System 3 CPU North Bridge South Bridge Main Memory (DDR2) FSB (Front-Side Bus) Hard disk Graphics card USB PCIe card BIOS ROM

Korea Univ Present and Near Future and More… 4 CPU North Bridge South Bridge Main Memory (DDR2) FSB (Front-Side Bus) DMI (Direct Media I/F) CPU North Bridge South Bridge Main Memory (DDR3) Quickpath (Intel) or Hypertransport (AMD) DMI (Direct Media I/F) Core 2 Duo –based Systems Core i7–based Systems

Korea Univ x86 History (as of 2008) 5

Korea Univ x86 History (Cont.) 6 32-bit (i386) 32-bit (i586) 64-bit (x86_64) 32-bit (i686) 8-bit16-bit4-bit Core i7 2009

Korea Univ CPU Intel takes about 80% of the PC market and AMD takes about 20%  Apple also introduced Intel-based Mac What is x86?  Generic term referring to processors from Intel, AMD and VIA  Derived from the model numbers of the first few generations of processors: 8086, 80286, 80386,  x86  Now it generally refers to processors from Intel, AMD, and VIA x86-16: 16-bit processor x86-32 (aka IA32): 32-bit processor * IA: Intel Architecture x86-64: 64-bit processor 7

Korea Univ Chipset We call North and South Bridges as Chipset Chipset has many PCIe devices inside North Bridge  Memory controller  PCI express ports to connect Graphics card  South Bridge  HDD (Hard-disk) controller  USB controller  Various peripherals connected Keyboard, mouse, timer etc  PCI express ports  Note that the landscape is being changed!  For example, memory controller is integrated into CPU 8

Korea Univ PCI, PCI Express Devices 9 PCI (Peripheral Component Interconnect)  Computer bus connecting all the peripheral devices to the computer motherboard PCIe (PCI Express)  Replaced PCI in 2004  Point-to-point connection PCI slot PCI express slots PCI express slot x16

Korea Univ General Purpose Computer System Example 10 PCI express slot

Korea Univ Another General Purpose Computer System Example 11

Korea Univ General Purpose Computer System in terms of PCIe 12 North Bridge South Bridge

Korea Univ Software Stack 13 Computer Hardware (CPU, Chipset, PCIe cards...) BIOS (AMI, Phoenix Technologies …) Operating System (Linux, Vista, Mac OS …) Applications (MS-office, Google Earth…) API (Application Program I/F) BIOS provides common I/Fs

Korea Univ How the General Purpose Computer System Works? 14 x86-based system starts to execute from the reset address 0xFFFF_FFF0  The first instruction is “jmp xxx” off from BIOS ROM BIOS (Basic Input/Output System)  Detect and initialize all the devices (including PCI devices via PCI enumeration) on the system  Provide common interfaces to OS  Hand over the control to OS OS  Manage the system resources including main memory Control and coordinate the use of the hardware among various application programs for the various users  Provide APIs for system and application programming

Korea Univ So… What? How is it different from embedded systems?  General-purpose computer systems provide programmability to end-users You can do any kinds of programming on your PC  C, C++, C#, Java etc  General-purpose systems should provide backward compatibility A new system should be able to run legacy software, which could be in the form of binaries with no source codes written 30 years ago  So, general purpose computer system becomes messy and complicated, still containing all legacy hardware functionalities 15

Korea Univ 16 x86 Operation Modes Real Mode (= real address mode)  Programming environment of the 8086 processor  8086 is a 16-bit processor from Intel Protected Mode  Native state of the 32-bit Intel processor For example, Windows is running in protected mode  32-bit mode IA-32e mode (64-bit mode)  There are 2 sub modes Compatibility mode 64-bit mode

Korea Univ Registers in 8086 Registers inside the 8086  16-bit segment registers CS, DS, SS, ES  General-purpose registers all 16-bits AX, BX, CX, DX, SP, BP, SI, DI Registers in x

Korea Univ 18 Real Mode Addressing In real mode (8086), general purpose registers are all 16-bit wide Real model  Segment registers specify the base address of each segment  Segment registers CS: Code Segment -> used to store instructions DS: Data Segment -> used to store data SS: Stack Segment -> stack ES: Extra Segment -> could be used to store more data  Addressing method Segment << 4 + offset = physical address Example: mov ax, 2000h mov ds, ax  Data segment starts from 20000h (2000h << 4)

Korea Univ 19 Data Segment in Real Mode Memory addressing in real mode (8086) 1MB Main Memory 2000h DS mov ax, 2000h mov ds, ax mov al, [100h] 100h offset 0x0 0xFFFFF 20000h = 2000h << h

Korea Univ A20M 8088/8086 allowed only 1MB memory access since they have only 20-bit physical address lines  2 20 = 1MB Memory is accessed with segment:offset in 8086/8088 (still the same though)  What if CS=0xFFFF, IP=0x0020? CS << 4 + IP = 0x But, we have only 20 address lines. So, 8088 ends up accessing 0x00010 ignoring the “1” in A21 Some (weird?) programmers took advantage of this mechanism 20

Korea Univ A20M (Cont) How about now?  Your Core 2 Duo has 48-bit physical address lines  What happens if there is no protection in the previous case Processor will access 0x100010, breaking the legacy code  So, x86 provides a mechanism called A20M (A20 Mask) to make it compatible with the old generations 21

Korea Univ A20M (Cont) 22

Korea Univ Another Example Protected mode addressing (32-bit)  As application programs become larger, 1MB main memory is too small  Intel introduced protected mode to address a larger memory (up to 4GB)  But, Intel still wants to use 16-bit segment registers for the backward compatability  How to access a 4GB space with a 16-bit register? 23

Korea Univ 24 Protected Mode Addressing Index Segment Selector TITI RPLRPL GDTLDT TI = 0 TI = 1 Segment Descriptor Base Access info Limit Hardware Inside the CPU (Registers) Main memory Visible to software Invisible to software

Korea Univ 25 Segment Descriptor Format Software (OS) creates descriptor tables (GDT, LDT)

Korea Univ 26 Address Translation in Protected Mode

Korea Univ Yet Another Example 8259 Interrupt Controller 27 IR0 IR1 IR2 IR3 IR4 IR5 IR6 IR7 INTR IR0 IR1 IR2 IR3 IR4 IR5 IR6 IR7 INTR INTA INTR 82C59A (Master) 82C59A (Slave) CPU (8086) CPU North Bridge South Bridge Main Memory (DDR) FSB (Front-Side Bus) DMI (Direct Media I/F) Still in South Bridge