PCI Bus & Interrupts

Size: px
Start display at page:

Download "PCI Bus & Interrupts"

Transcription

1 PCI Bus & Interrupts

2 PCI Bus A bus is made up of both an electrical interface and a programming interface PCI (Peripheral Component Interconnect) A set of specifications of how parts of a computer should interconnect A replacement for the ISA standard (bare metal kind of bus) Goals Better performance Platform independence Simplify adding and removing peripherals to the system

3 PCI Bus

4 PCI Bus Better performance Higher clock rate (than ISA) 66 MHz/133 MHz 32-bit data bus Platform independence Supports auto detection of interface boards Jumper less Automatically configured at boot time Device driver then access the configuration information to complete initialization Without the need to perform probing

5 PCI Addressing Each PCI peripheral is identified by a 16-bit address <a 8-bit bus number, a 5-bit device number, and a 3-bit function number> Sometimes a 32-bit address (prefix with a 16-bit domain number) Linux uses pci_dev to specify PCI devices to hide the 16-bit address Workstations feature at least two PCI buses A bridge is a PCI peripheral to join two buses Overall layout of a PCI system is a tree Each bus is connected to an upper-layer bus, up to bus 0 at the root of the tree

6 PCI Addressing

7 # lspci bus number: device number: function number Example: 04:01.0

8 # lspci -tv

9 PCI Addressing A PCI device can be addressed in three ways Memory locations (shared by all) 32-bit or 64-bit Can be mapped at boot time to avoid collisions I/O ports (shared by all) 32-bit Configuration registers Uses geographical addressing Never collide A PCI driver can access its devices without probing Just read from the configuration space» 256 bytes for each device function» 4 bytes holds a unique function ID

10 Boot Time At power on A PCI device remains inactive Responds only to configuration transactions No memory and no I/O ports mapped Interrupt disabled A PCI motherboard firmware (BIOS, NVRAM, PROM) performs configuration transactions with each PCI device Allocates non-overlapping memory region

11 Configuration Registers and Initialization Each PCI device features at least a 256-byte address space First 64 bytes standardized PCI registers are always little-endian Need to watch out for byte ordering Use macros defined in <asm/byteorder.h>

12 Configuration Registers and Initialization

13 # lspci -x

14 # lspci -v

15 Configuration Registers and Initialization vendorid (16-bit register) Identifies a hardware manufacturer E.g., 0x8086 for Intel A global registry maintained by the PCI Special Interest Group deviceid (16-bit register) decided by the manufacturer A device driver signature = <vendorid, deviceid> class (16-bit value) Top 8 bits identify the base class (group) E.g., network group contains Ethernet and token ring classes

16 Configuration Registers and Initialization A PCI driver tells the kernel what kind of device it supports via a data structure #include <linux/mod_devicetable> struct pic_dev_id { u32 vendor, device; u32 subvendor, subdevice; u32 class, class_mask; kernel_ulong_t driver_data; };

17 Registering a PCI Driver To register, create struct pci_driver (see <linux/pci.h>) Some important fields /* need to be unique */ /* normally the same as the module name of the driver displayed in /sys/bus/pci/drivers/ */ const char *name; /* pointer to the pci_device_id table declared earlier */ const struct pci_device_id *id_table;

18 Registering a PCI Driver /* pointer to a probe function in the PCI driver */ /* if the PCI driver claims the PCI device, return 0 */ /* else return a negative error value */ int (*probe) (struct pci_dev *dev, const struct pci_device_id *id); /* called when the PCI device is removed from the system */ void (*remove) (struct pci_dev *dev); /* called when the PCI device is suspended */ int (*suspend) (struct pci_dev *dev, u32 state); /* called to resume from the suspended state */ int (*resume) (struct pci_dev *dev);

19 Registering a PCI Driver Creating a struct pci_driver requires initializing four fields static struct pci_driver pci_driver = { };.name = "pci_skel",.id_table = ids,.probe = probe,.remove = remove,

20 Registering a PCI Driver To register, call pci_register_driver Returns 0 on success Returns a negative error number on failure static int init pci_skel_init(void) { return pci_register_driver(&pci_driver); } To unload a PCI driver, call pci_unregister_driver Calls the remove function before it returns static void exit pci_skel_exit(void) { } return pci_unregister_driver(&pci_driver);

21 Enabling the PCI Device In the probe function, the driver must call pci_enable_device int pci_enable_device(struct pci_dev *dev); Wakes up the device Assigns its interrupt line and I/O regions

22 Accessing the I/O and Memory Spaces A PCI device implements up to six I/O address regions A region is a generic I/O address space that is either memorymapped or port-mapped Size and the current location of I/O regions are reported via 32-bit configuration registers Symbolic names PCI_BASE_ADDRESS_0 to PCI_BASE_ADDRESS_5

23 Accessing the I/O and Memory Spaces I/O regions of PCI devices have been integrated into the generic resource management Can use the following functions /* returns the first address (memory address/io port) associated with one of the six PCI IO regions */ /* set bar to 0 to 5 to select the region */ unsigned long pci_resource_start(struct pci_dev *dev, int bar);

24 Accessing the I/O and Memory Spaces /* returns the last usable address of the I/O region number bar */ unsigned long pci_resource_end(struct pci_dev *dev, int bar); /* if associated I/O regions exist, return IORESOUCE_IO or IORESOURCE_MEM in the flags */ /* returns IORESOURCE_PREFETCH in the flags to indicate whether compiler optimizations need to be disabled */ /* returns IORESOURCE_READONLY in the flags to indicate whether a memory region is write protected */ unsigned long pci_resource_flags(struct pci_dev *dev, int bar);

25 Interrupt-Driven Digital Control Digital Computer Command + Controller D/A Control Signal Plant A/D T Sampler Sensor

26 Interrupt Main Program Interrupt Service Routine

27 History of IBM PC -Wikipedia

28 8088(IBM PC/XT) Interrupt

29 8088 Interrupt

30 PC Interrupt

31 Interrupt Request by A/D board PCI bus AD board IRQ AD Converter Timer AD conversion start AD conversion end Timer AD Converter IRQ Interrupt Request T (Sampling Period)

32 Interrupt Descriptor Table

33 IDT Gate Descriptors

34 Calling the IRQ Handler

35 External Interrupts Events triggered by devices connected to the system Network packet arrivals, disk operation completion, timer updates, etc Can be mapped to any IRQ vector above the exceptions (IRQs ) External because they happen outside the CPU External logic signals CPU and notifies it which handler to execute Managed by Interrupt Controller Special device included in south bridge

36 Interrupt Controllers Translate device IRQ signals to CPU IRQ vectors Each device has only a single pin High = IRQ pending, Low = no IRQ Interrupt controller maps devices to vectors Two x86 controller classes Legacy: 8259 PIC Connected to a set of default I/O ports on CPU Modern: APIC + IOAPIC Memory mapped into each CPUs physical memory (How?) Next generation APIC (x2pic) accessed via MSRs Model specific registers control registers accessed via special instructions» WRMSR, RDMSR

37 8259 PIC Allows the mapping of 8 IRQ pins (from devices) to 8 separate vectors (to CPU) Assumes continuous numbering Assign the PIC a vector offset, Each pin index is added to that offset to calculate the vector

38 1 PIC only supports 8 device lines Often more than 8 devices in a system Solution: Add more PICs But x86 CPUs only have 1 INTR input pin X86 Solution: Chain the PICs together (master and slave) Slave PIC is attached to the 2 nd IRQ pin of the master CPU interfaces directly with master

39 80286 IBM PC/AT

40 IRQ IRQ INT Hardware Device 0 32 Timer 1 33 Keyboard 2 34 PIC Cascading 3 35 Second serial port 4 36 First serial port 6 38 Floppy Disk 8 40 System Clock Network Interface USB port, sound card PS/2 Mouse Math Coprocessor EIDE first controller EIDE second controller

41 APIC Problem: PICs don t support multiple CPUs Only one INT signal, so only one CPU can receive interrupts SMP required a new solution APIC + IOAPIC Idea: Separate the responsibility of the PIC into two components APIC = Interfaces with CPU IOAPIC = Interfaces with devices

42 PIC

43 Advanced PIC(APIC)

44 APIC Each CPU has its own local APIC In charge of keeping track of interrupts bound for its assigned CPU Since Pentium Pro, the APIC has been implemented in the CPU die APIC interfaces with CPUs interrupt pins to invoke correct IDT vector This is its primary responsibility

45 ICC Bus APICs and IOAPICs share a common communication bus ICC bus: Interrupt Controller Communication Bus Handles routing of interrupts to the correct APIC

46 Interrupt Vectors Vector Range Use 0-19 Nonmaskable interrupts and exceptions Intel-reserved External interrupts (IRQs) 128 System Call exception External interrupts (IRQs) 239 Local APIC timer interrupt 240 Local APIC thermal interrupt Reserved by Linux for future use Interprocessor interrupts 254 Local APIC error interrupt 255 Local APIC suprious interrupt

47

48 IRQ Handling 1. Monitor IRQ lines for raised signals. If multiple IRQs raised, select lowest # IRQ. 2. If raised signal detected 1. Converts raised signal into vector (0-255). 2. Stores vector in I/O port, allowing CPU to read. 3. Sends raised signal to CPU INTR pin. 4. Waits for CPU to acknowledge interrupt. 5. Kernel runs do_irq(). 6. Clears INTR line. 3. Goto step 1. Slide #48

49 do_irq 1. Kernel jumps to entry point in entry.s. 2. Entry point saves registers, calls do_irq(). 3. Finds IRQ number in saved %EAX register. 4. Looks up IRQ descriptor using IRQ #. 5. Acknowledges receipt of interrupt. 6. Disables interrupt delivery on line. 7. Calls handle_irq_event() to run handlers. 8. Cleans up and returns. 9. Jumps to ret_from_intr(). Slide #49

50 Interrupt Handlers Function kernel runs in response to interrupt. More than one handler can exist per IRQ. Must run quickly. Resume execution of interrupted code. How to deal with high work interrupts? Ex: network, hard disk Slide #50

51 Registering a Handler request_irq() Register an interrupt handler on a given line. free_irq() Unregister a given interrupt handler. Disable interrupt line if all handlers unregistered. Slide #51

52 Registering a Handler int request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, stru ct pt_regs *), unsigned long irqflags, const char * devname, void *dev_id) irqflaqs = SA_INTERRUPT SA_SAMPLE_RANDOM SA_SHIRQ Slide #52

53 Writing an Interrupt Handler irqreturn_t ih(int irq,void *devid,struct pt_regs *r) Differentiating between devices Pre-2.0: irq Current: dev_id Registers Pointer to registers before interrupt occurred. Return Values IRQ_NONE: Interrupt not for handler. IRQ_HANDLED: Interrupted handled. Slide #53

Introduction PCI Interface Booting PCI driver registration Other buses. Linux Device Drivers PCI Drivers

Introduction PCI Interface Booting PCI driver registration Other buses. Linux Device Drivers PCI Drivers Overview 1 2 PCI addressing 3 4 5 bus, The most common is the PCI (in the PC world), PCI - Peripheral Component Interconnect, bus consists of two components: electrical interface programming interface,

More information

Real Time and Embedded Systems. by Dr. Lesley Shannon Course Website:

Real Time and Embedded Systems. by Dr. Lesley Shannon   Course Website: Real Time and Embedded Systems by Dr. Lesley Shannon Email: lshannon@ensc.sfu.ca Course Website: http://www.ensc.sfu.ca/~lshannon/courses/ensc351 Simon Fraser University Slide Set: 8 Date: November 15,

More information

ECEN 449 Microprocessor System Design. Hardware-Software Communication. Texas A&M University

ECEN 449 Microprocessor System Design. Hardware-Software Communication. Texas A&M University ECEN 449 Microprocessor System Design Hardware-Software Communication 1 Objectives of this Lecture Unit Learn basics of Hardware-Software communication Memory Mapped I/O Polling/Interrupts 2 Motivation

More information

Linux Device Drivers Interrupt Requests

Linux Device Drivers Interrupt Requests Overview 1 2 3 Installation of an interrupt handler Interface /proc 4 5 6 7 primitive devices can be managed only with I/O regions, most devices require a more complicated approach, devices cooperate with

More information

Input/Output Problems. External Devices. Input/Output Module. I/O Steps. I/O Module Function Computer Architecture

Input/Output Problems. External Devices. Input/Output Module. I/O Steps. I/O Module Function Computer Architecture 168 420 Computer Architecture Chapter 6 Input/Output Input/Output Problems Wide variety of peripherals Delivering different amounts of data At different speeds In different formats All slower than CPU

More information

Systems Programming and Computer Architecture ( ) Timothy Roscoe

Systems Programming and Computer Architecture ( ) Timothy Roscoe Systems Group Department of Computer Science ETH Zürich Systems Programming and Computer Architecture (252-0061-00) Timothy Roscoe Herbstsemester 2016 AS 2016 Exceptions 1 17: Exceptions Computer Architecture

More information

+ Overview. Projects: Developing an OS Kernel for x86. ! Handling Intel Processor Exceptions: the Interrupt Descriptor Table (IDT)

+ Overview. Projects: Developing an OS Kernel for x86. ! Handling Intel Processor Exceptions: the Interrupt Descriptor Table (IDT) + Projects: Developing an OS Kernel for x86 Low-Level x86 Programming: Exceptions, Interrupts, and Timers + Overview! Handling Intel Processor Exceptions: the Interrupt Descriptor Table (IDT)! Handling

More information

Organisasi Sistem Komputer

Organisasi Sistem Komputer LOGO Organisasi Sistem Komputer OSK 5 Input Output 1 1 PT. Elektronika FT UNY Input/Output Problems Wide variety of peripherals Delivering different amounts of data At different speeds In different formats

More information

Homework / Exam. Return and Review Exam #1 Reading. Machine Projects. Labs. S&S Extracts , PIC Data Sheet. Start on mp3 (Due Class 19)

Homework / Exam. Return and Review Exam #1 Reading. Machine Projects. Labs. S&S Extracts , PIC Data Sheet. Start on mp3 (Due Class 19) Homework / Exam Return and Review Exam #1 Reading S&S Extracts 385-393, PIC Data Sheet Machine Projects Start on mp3 (Due Class 19) Labs Continue in labs with your assigned section 1 Interrupts An interrupt

More information

Operating Systems 2010/2011

Operating Systems 2010/2011 Operating Systems 2010/2011 Input/Output Systems part 1 (ch13) Shudong Chen 1 Objectives Discuss the principles of I/O hardware and its complexity Explore the structure of an operating system s I/O subsystem

More information

Interrupt Handler: Top Half. Changwoo Min

Interrupt Handler: Top Half. Changwoo Min 1 Interrupt Handler: Top Half Changwoo Min 2 Yeah! Project 3 was released! s2dsm (Super Simple Distributed Shared Memory) Part 1. Analyze userfaultfd demo code Part 2. Pairing memory regions between two

More information

Embedded Systems Programming

Embedded Systems Programming Embedded Systems Programming Input Processing in Linux (Module 17) Yann-Hang Lee Arizona State University yhlee@asu.edu (480) 727-7507 Summer 2014 Linux Input Systems An option: each attached input device

More information

PCI Interrupts for x86 Machines under FreeBSD

PCI Interrupts for x86 Machines under FreeBSD PCI Interrupts for x86 Machines under FreeBSD May 18, 2007 John Baldwin jhb@freebsd.org Introduction Hardware for PCI INTx interrupts x86 CPU interrupts PCI INTx signals x86 interrupt controllers Interrupt

More information

A Smart Port Card Tutorial --- Hardware

A Smart Port Card Tutorial --- Hardware A Smart Port Card Tutorial --- Hardware John DeHart Washington University jdd@arl.wustl.edu http://www.arl.wustl.edu/~jdd 1 References: New Links from Kits References Page Intel Embedded Module: Data Sheet

More information

Digital System Design

Digital System Design Digital System Design by Dr. Lesley Shannon Email: lshannon@ensc.sfu.ca Course Website: http://www.ensc.sfu.ca/~lshannon/courses/ensc350 Simon Fraser University i Slide Set: 15 Date: March 30, 2009 Slide

More information

Spring 2017 :: CSE 506. Device Programming. Nima Honarmand

Spring 2017 :: CSE 506. Device Programming. Nima Honarmand Device Programming Nima Honarmand read/write interrupt read/write Spring 2017 :: CSE 506 Device Interface (Logical View) Device Interface Components: Device registers Device Memory DMA buffers Interrupt

More information

8086 Interrupts and Interrupt Responses:

8086 Interrupts and Interrupt Responses: UNIT-III PART -A INTERRUPTS AND PROGRAMMABLE INTERRUPT CONTROLLERS Contents at a glance: 8086 Interrupts and Interrupt Responses Introduction to DOS and BIOS interrupts 8259A Priority Interrupt Controller

More information

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 09, SPRING 2013

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 09, SPRING 2013 CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 09, SPRING 2013 TOPICS TODAY I/O Architectures Interrupts Exceptions FETCH EXECUTE CYCLE 1.7 The von Neumann Model This is a general

More information

Generic Model of I/O Module Interface to CPU and Memory Interface to one or more peripherals

Generic Model of I/O Module Interface to CPU and Memory Interface to one or more peripherals William Stallings Computer Organization and Architecture 7 th Edition Chapter 7 Input/Output Input/Output Problems Wide variety of peripherals Delivering different amounts of data At different speeds In

More information

The K Project. Interrupt and Exception Handling. LSE Team. May 14, 2018 EPITA. The K Project. LSE Team. Introduction. Interrupt Descriptor Table

The K Project. Interrupt and Exception Handling. LSE Team. May 14, 2018 EPITA. The K Project. LSE Team. Introduction. Interrupt Descriptor Table and Exception Handling EPITA May 14, 2018 (EPITA) May 14, 2018 1 / 37 and Exception Handling Exception : Synchronous with program execution (e.g. division by zero, accessing an invalid address) : Asynchronous

More information

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto Ricardo Rocha Department of Computer Science Faculty of Sciences University of Porto Slides based on the book Operating System Concepts, 9th Edition, Abraham Silberschatz, Peter B. Galvin and Greg Gagne,

More information

Keep the work area free of clutter and clean. Food and drinks are not allowed in the work area.

Keep the work area free of clutter and clean. Food and drinks are not allowed in the work area. 29 Chapter 3 Computer Assembly Introduction This chapter addresses the process of the computer assembly process. The ability to successfully assemble a computer is a milestone for the PC Ttechnician. It

More information

An Implementation Of Multiprocessor Linux

An Implementation Of Multiprocessor Linux An Implementation Of Multiprocessor Linux This document describes the implementation of a simple SMP Linux kernel extension and how to use this to develop SMP Linux kernels for architectures other than

More information

Computer System Overview OPERATING SYSTEM TOP-LEVEL COMPONENTS. Simplified view: Operating Systems. Slide 1. Slide /S2. Slide 2.

Computer System Overview OPERATING SYSTEM TOP-LEVEL COMPONENTS. Simplified view: Operating Systems. Slide 1. Slide /S2. Slide 2. BASIC ELEMENTS Simplified view: Processor Slide 1 Computer System Overview Operating Systems Slide 3 Main Memory referred to as real memory or primary memory volatile modules 2004/S2 secondary memory devices

More information

Interrupts and System Calls

Interrupts and System Calls Interrupts and System Calls Open file hw1.txt App First lecture Ok, here s handle 4 App App Don Porter Libraries Libraries Libraries System Call Table (350 1200) Kernel User Supervisor Hardware 1 2-2 Today

More information

TABLE OF CONTENTS 1. INTRODUCTION 1.1. PREFACE KEY FEATURES PERFORMANCE LIST BLOCK DIAGRAM...

TABLE OF CONTENTS 1. INTRODUCTION 1.1. PREFACE KEY FEATURES PERFORMANCE LIST BLOCK DIAGRAM... Table of Contents TABLE OF CONTENTS 1. INTRODUCTION 1.1. PREFACE... 1-1 1.2. KEY FEATURES... 1-1 1.3. PERFORMANCE LIST... 1-3 1.4. BLOCK DIAGRAM... 1-4 1.5. INTRODUCE THE PCI - BUS... 1-5 1.6. FEATURES...

More information

Troubleshooting & Repair

Troubleshooting & Repair Chapter Troubleshooting & Repair 6.1 Introduction This chapter provides the most common problem encountered with the M785 notebook computer and some troubleshooting means. Some of the common problems are:

More information

OVERVIEW OF PERIPHERAL BUSES

OVERVIEW OF PERIPHERAL BUSES CHAPTER FIFTEEN OVERVIEW OF PERIPHERAL BUSES Wher eas Chapter 8 introduced the lowest levels of hardware contr ol, this chapter pr ovides an overview of the higher-level bus architectur es. A bus is made

More information

INPUT/OUTPUT ORGANIZATION

INPUT/OUTPUT ORGANIZATION INPUT/OUTPUT ORGANIZATION Accessing I/O Devices I/O interface Input/output mechanism Memory-mapped I/O Programmed I/O Interrupts Direct Memory Access Buses Synchronous Bus Asynchronous Bus I/O in CO and

More information

W4118: interrupt and system call. Junfeng Yang

W4118: interrupt and system call. Junfeng Yang W4118: interrupt and system call Junfeng Yang Outline Motivation for protection Interrupt System call 2 Need for protection Kernel privileged, cannot trust user processes User processes may be malicious

More information

Unit 5. Memory and I/O System

Unit 5. Memory and I/O System Unit 5 Memory and I/O System 1 Input/Output Organization 2 Overview Computer has ability to exchange data with other devices. Human-computer communication Computer-computer communication Computer-device

More information

Computer Organization ECE514. Chapter 5 Input/Output (9hrs)

Computer Organization ECE514. Chapter 5 Input/Output (9hrs) Computer Organization ECE514 Chapter 5 Input/Output (9hrs) Learning Outcomes Course Outcome (CO) - CO2 Describe the architecture and organization of computer systems Program Outcome (PO) PO1 Apply knowledge

More information

Accessing I/O Devices Interface to CPU and Memory Interface to one or more peripherals Generic Model of IO Module Interface for an IO Device: CPU checks I/O module device status I/O module returns status

More information

Device I/O Programming

Device I/O Programming Overview Device I/O Programming Don Porter CSE 506 Many artifacts of hardware evolution Configurability isn t free Bake-in some reasonable assumptions Initially reasonable assumptions get stale Find ways

More information

OS Structure. Hardware protection & privilege levels Control transfer to and from the operating system

OS Structure. Hardware protection & privilege levels Control transfer to and from the operating system OS Structure Topics Hardware protection & privilege levels Control transfer to and from the operating system Learning Objectives: Explain what hardware protection boundaries are. Explain how applications

More information

I/O Systems. Amir H. Payberah. Amirkabir University of Technology (Tehran Polytechnic)

I/O Systems. Amir H. Payberah. Amirkabir University of Technology (Tehran Polytechnic) I/O Systems Amir H. Payberah amir@sics.se Amirkabir University of Technology (Tehran Polytechnic) Amir H. Payberah (Tehran Polytechnic) I/O Systems 1393/9/15 1 / 57 Motivation Amir H. Payberah (Tehran

More information

CS 134. Operating Systems. April 8, 2013 Lecture 20. Input/Output. Instructor: Neil Rhodes. Monday, April 7, 14

CS 134. Operating Systems. April 8, 2013 Lecture 20. Input/Output. Instructor: Neil Rhodes. Monday, April 7, 14 CS 134 Operating Systems April 8, 2013 Lecture 20 Input/Output Instructor: Neil Rhodes Hardware How hardware works Operating system layer What the kernel does API What the programmer does Overview 2 kinds

More information

Smart Port Card (SPC) William Eatherton Toshiya Aramaki Edward Spitznagel Guru Parulkar Applied Research Lab Washington University in St.

Smart Port Card (SPC) William Eatherton Toshiya Aramaki Edward Spitznagel Guru Parulkar Applied Research Lab Washington University in St. Smart Port Card (SPC) William Eatherton Toshiya Aramaki Edward Spitznagel Guru Parulkar Applied Research Lab William N. Eatherton 1 Design Goals For several Gigabit Switch related projects, a processing

More information

The Washington University Smart Port Card

The Washington University Smart Port Card The Washington University Smart Port Card John DeHart Washington University jdd@arl.wustl.edu http://www.arl.wustl.edu/~jdd 1 SPC Personnel Dave Richard - Overall Hardware Design Dave Taylor - System FPGA

More information

MMX Enhanced. 586 GXM-AV Main Board. Trademarks and / or Registered trademarks are the properties of their respective owners.

MMX Enhanced. 586 GXM-AV Main Board. Trademarks and / or Registered trademarks are the properties of their respective owners. 586 GXM-AV Main Board Trademarks and / or Registered trademarks are the properties of their respective owners. User s Manual Version 1.1 The Information presented in this publication has been carefully

More information

Introduction CHAPTER 1

Introduction CHAPTER 1 CHAPTER 1 Introduction The ACTI-788 all-in-one single board computer is designed to fit a high performance Celeron based CPU and compatible for high-end computer system application with PCI/ISA bus architecture.

More information

Part I Overview Chapter 1: Introduction

Part I Overview Chapter 1: Introduction Part I Overview Chapter 1: Introduction Fall 2010 1 What is an Operating System? A computer system can be roughly divided into the hardware, the operating system, the application i programs, and dthe users.

More information

ECE 485/585 Microprocessor System Design

ECE 485/585 Microprocessor System Design Microprocessor System Design Lecture 3: Polling and Interrupts Programmed I/O and DMA Interrupts Zeshan Chishti Electrical and Computer Engineering Dept Maseeh College of Engineering and Computer Science

More information

I/O. Fall Tore Larsen. Including slides from Pål Halvorsen, Tore Larsen, Kai Li, and Andrew S. Tanenbaum)

I/O. Fall Tore Larsen. Including slides from Pål Halvorsen, Tore Larsen, Kai Li, and Andrew S. Tanenbaum) I/O Fall 2011 Tore Larsen Including slides from Pål Halvorsen, Tore Larsen, Kai Li, and Andrew S. Tanenbaum) Big Picture Today we talk about I/O characteristics interconnection devices & controllers (disks

More information

I/O. Fall Tore Larsen. Including slides from Pål Halvorsen, Tore Larsen, Kai Li, and Andrew S. Tanenbaum)

I/O. Fall Tore Larsen. Including slides from Pål Halvorsen, Tore Larsen, Kai Li, and Andrew S. Tanenbaum) I/O Fall 2010 Tore Larsen Including slides from Pål Halvorsen, Tore Larsen, Kai Li, and Andrew S. Tanenbaum) Big Picture Today we talk about I/O characteristics interconnection devices & controllers (disks

More information

REVISION HISTORY NUMBER DATE DESCRIPTION NAME

REVISION HISTORY NUMBER DATE DESCRIPTION NAME i ii REVISION HISTORY NUMBER DATE DESCRIPTION NAME iii Contents 1 Walking through the Assignment 2 1 1.1 Preparing the base code from Assignment 1..................................... 1 1.2 Dummy port

More information

ARM ARCHITECTURE. Contents at a glance:

ARM ARCHITECTURE. Contents at a glance: UNIT-III ARM ARCHITECTURE Contents at a glance: RISC Design Philosophy ARM Design Philosophy Registers Current Program Status Register(CPSR) Instruction Pipeline Interrupts and Vector Table Architecture

More information

TD220 System Resources

TD220 System Resources I- 50970232 - TD-220 System Resources Abstract: This document contains system resource information for TD-220 systems. Information: TD220 System Resources September 16, 1997 Document Changes Date Description

More information

1 PC Hardware Basics Microprocessors (A) PC Hardware Basics Fal 2004 Hadassah College Dr. Martin Land

1 PC Hardware Basics Microprocessors (A) PC Hardware Basics Fal 2004 Hadassah College Dr. Martin Land 1 2 Basic Computer Ingredients Processor(s) and co-processors RAM main memory ROM initialization/start-up routines Peripherals: keyboard/mouse, display, mass storage, general I/O (printer, network, sound)

More information

Operating System: Chap13 I/O Systems. National Tsing-Hua University 2016, Fall Semester

Operating System: Chap13 I/O Systems. National Tsing-Hua University 2016, Fall Semester Operating System: Chap13 I/O Systems National Tsing-Hua University 2016, Fall Semester Outline Overview I/O Hardware I/O Methods Kernel I/O Subsystem Performance Application Interface Operating System

More information

Mon Sep 17, 2007 Lecture 3: Process Management

Mon Sep 17, 2007 Lecture 3: Process Management Mon Sep 17, 2007 Lecture 3: Process Management September 19, 2007 1 Review OS mediates between hardware and user software QUIZ: Q: Name three layers of a computer system where the OS is one of these layers.

More information

An Interrupt is either a Hardware generated CALL (externally derived from a hardware signal)

An Interrupt is either a Hardware generated CALL (externally derived from a hardware signal) An Interrupt is either a Hardware generated CALL (externally derived from a hardware signal) OR A Software-generated CALL (internally derived from the execution of an instruction or by some other internal

More information

STANDARD I/O INTERFACES

STANDARD I/O INTERFACES STANDARD I/O INTERFACES The processor bus is the bus defied by the signals on the processor chip itself. Devices that require a very high-speed connection to the processor, such as the main memory, may

More information

The Purpose of Interrupt

The Purpose of Interrupt Interrupts 3 Introduction In this chapter, the coverage of basic I/O and programmable peripheral interfaces is expanded by examining a technique called interrupt-processed I/O. An interrupt is a hardware-initiated

More information

Introduction CHAPTER 1

Introduction CHAPTER 1 CHAPTER 1 Introduction The ROBO-667 all-in-one single board computer is designed to fit a high performance Pentium-III based CPU and compatible for high-end computer system with PCI/ISA Bus architecture.

More information

ROBO-603. User's Manual

ROBO-603. User's Manual ROBO-603 Embedded System Board User's Manual P/N: 861106030041 Version 1.0 Copyright Portwell, Inc., 2001. All rights reserved. All other brand names are registered trademarks of their respective owners.

More information

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 18

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 18 CS24: INTRODUCTION TO COMPUTING SYSTEMS Spring 2018 Lecture 18 LAST TIME: OVERVIEW Expanded on our process abstraction A special control process manages all other processes Uses the same process abstraction

More information

Windows Interrupts

Windows Interrupts Windows 2000 - Interrupts Ausgewählte Betriebssysteme Institut Betriebssysteme Fakultät Informatik 1 Interrupts Software and Hardware Interrupts and Exceptions Kernel installs interrupt trap handlers Interrupt

More information

CSCE Operating Systems Interrupts, Exceptions, and Signals. Qiang Zeng, Ph.D. Fall 2018

CSCE Operating Systems Interrupts, Exceptions, and Signals. Qiang Zeng, Ph.D. Fall 2018 CSCE 311 - Operating Systems Interrupts, Exceptions, and Signals Qiang Zeng, Ph.D. Fall 2018 Previous Class Process state transition Ready, blocked, running Call Stack Execution Context Process switch

More information

Input/Output Systems

Input/Output Systems Input/Output Systems CSCI 315 Operating Systems Design Department of Computer Science Notice: The slides for this lecture have been largely based on those from an earlier edition of the course text Operating

More information

Lecture 4: Mechanism of process execution. Mythili Vutukuru IIT Bombay

Lecture 4: Mechanism of process execution. Mythili Vutukuru IIT Bombay Lecture 4: Mechanism of process execution Mythili Vutukuru IIT Bombay Low-level mechanisms How does the OS run a process? How does it handle a system call? How does it context switch from one process to

More information

Input/Output. 198:231 Introduction to Computer Organization Lecture 15. Instructor: Nicole Hynes

Input/Output. 198:231 Introduction to Computer Organization Lecture 15. Instructor: Nicole Hynes Input/Output 198:231 Introduction to Computer Organization Instructor: Nicole Hynes nicole.hynes@rutgers.edu 1 Organization of a Typical Computer System We ve discussed processor and memory We ll discuss

More information

Computer System Overview

Computer System Overview Computer System Overview Operating Systems 2005/S2 1 What are the objectives of an Operating System? 2 What are the objectives of an Operating System? convenience & abstraction the OS should facilitate

More information

PC Interrupt Structure and 8259 DMA Controllers

PC Interrupt Structure and 8259 DMA Controllers ELEC 379 : DESIGN OF DIGITAL AND MICROCOMPUTER SYSTEMS 1998/99 WINTER SESSION, TERM 2 PC Interrupt Structure and 8259 DMA Controllers This lecture covers the use of interrupts and the vectored interrupt

More information

I/O and Device Drivers

I/O and Device Drivers I/O and Device Drivers Minsoo Ryu Real-Time Computing and Communications Lab. Hanyang University msryu@hanyang.ac.kr Topics Covered I/O Components I/O Interface I/O Operations Device Drivers 2 I/O Components

More information

Emulation 2. G. Lettieri. 15 Oct. 2014

Emulation 2. G. Lettieri. 15 Oct. 2014 Emulation 2 G. Lettieri 15 Oct. 2014 1 I/O examples In an emulator, we implement each I/O device as an object, or a set of objects. The real device in the target system is connected to the CPU via an interface

More information

Chapter 5 Input/Output Organization. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Chapter 5 Input/Output Organization. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan Chapter 5 Input/Output Organization Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan Outline Accessing I/O Devices Interrupts Direct Memory Access Buses Interface

More information

ECE 391 Exam 1 Review Session - Spring Brought to you by HKN

ECE 391 Exam 1 Review Session - Spring Brought to you by HKN ECE 391 Exam 1 Review Session - Spring 2018 Brought to you by HKN DISCLAIMER There is A LOT (like a LOT) of information that can be tested for on the exam, and by the nature of the course you never really

More information

Operating systems for embedded systems

Operating systems for embedded systems Operating systems for embedded systems Embedded operating systems How do they differ from desktop operating systems? Programming model Process-based Event-based How is concurrency handled? How are resource

More information

Hardware OS & OS- Application interface

Hardware OS & OS- Application interface CS 4410 Operating Systems Hardware OS & OS- Application interface Summer 2013 Cornell University 1 Today How my device becomes useful for the user? HW-OS interface Device controller Device driver Interrupts

More information

INTERRUPTS in microprocessor systems

INTERRUPTS in microprocessor systems INTERRUPTS in microprocessor systems Microcontroller Power Supply clock fx (Central Proccesor Unit) CPU Reset Hardware Interrupts system IRQ Internal address bus Internal data bus Internal control bus

More information

EE108B Lecture 17 I/O Buses and Interfacing to CPU. Christos Kozyrakis Stanford University

EE108B Lecture 17 I/O Buses and Interfacing to CPU. Christos Kozyrakis Stanford University EE108B Lecture 17 I/O Buses and Interfacing to CPU Christos Kozyrakis Stanford University http://eeclass.stanford.edu/ee108b 1 Announcements Remaining deliverables PA2.2. today HW4 on 3/13 Lab4 on 3/19

More information

Introduction to Operating Systems. Device Drivers. John Franco. Dept. of Electrical Engineering and Computing Systems University of Cincinnati

Introduction to Operating Systems. Device Drivers. John Franco. Dept. of Electrical Engineering and Computing Systems University of Cincinnati Introduction to Operating Systems Device Drivers John Franco Dept. of Electrical Engineering and Computing Systems University of Cincinnati Basic Computer Architecture CPU Main Memory System Bus Channel

More information

User s Manual. MMX Enhanced MediaGX System Board. MMX Enhanced MediaGX System Board

User s Manual. MMX Enhanced MediaGX System Board. MMX Enhanced MediaGX System Board MMX Enhanced MediaGX System Board MMX Enhanced MediaGX System Board Trademarks and / or Registered trademarks are the properties of their respective owners. User s Manual IBM, PC/AT and PC/XT are trademarks

More information

Chapter 13: I/O Systems. Operating System Concepts 9 th Edition

Chapter 13: I/O Systems. Operating System Concepts 9 th Edition Chapter 13: I/O Systems Silberschatz, Galvin and Gagne 2013 Chapter 13: I/O Systems Overview I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations

More information

Embedded Systems Programming

Embedded Systems Programming Embedded Systems Programming x86 Memory and Interrupt (Module 8) Yann-Hang Lee Arizona State University yhlee@asu.edu (480) 727-7507 Summer 2014 X86 ISA Data Representations Little-endian byte ordering

More information

Embedded Systems Programming

Embedded Systems Programming Embedded Systems Programming Interrupt Processing in Linux (Module 14) Yann-Hang Lee Arizona State University yhlee@asu.edu (480) 727-7507 Summer 2014 Example of I2C Devices Two Wii nunchuck devices one

More information

Interrupts & System Calls

Interrupts & System Calls Interrupts & System Calls Nima Honarmand Previously on CSE306 Open file hw1.txt App Ok, here s handle App 4 App Libraries Libraries Libraries User System Call Table (350 1200) Supervisor Kernel Hardware

More information

Introduction to I/O. 1-Slide Overview to File Management

Introduction to I/O. 1-Slide Overview to File Management Introduction to I/O 1-Slide Overview to File Management I/O Hardware I/O Application Interface I/O Subsystem Issues Note: much material in this set of slides comes directly from Solomon&Russinovich, Inside

More information

Intel Corporation. About This Release MV85010A.86A.0069.P PXE 2.1 [Intel Boot Agent Version ] for ICH2 LAN Controller

Intel Corporation. About This Release MV85010A.86A.0069.P PXE 2.1 [Intel Boot Agent Version ] for ICH2 LAN Controller Intel Corporation DATE: April 21, 2003 SUBJECT: MV850.10A.86A Production BIOS P25-0069 About This Release MV85010A.86A.0069.P25.0304170949 PXE 2.1 [Intel Boot Agent Version 4.1.09] for ICH2 LAN Controller

More information

Scuola Superiore Sant Anna. I/O subsystem. Giuseppe Lipari

Scuola Superiore Sant Anna. I/O subsystem. Giuseppe Lipari Scuola Superiore Sant Anna I/O subsystem Giuseppe Lipari Input Output and Device Drivers ERI Gennaio 2008 2 Objectives of the I/O subsystem To hide the complexity From the variability of the devices Provide

More information

Celeron EPIC Computer with GUI and Dual Ethernet SBC4685

Celeron EPIC Computer with GUI and Dual Ethernet SBC4685 Celeron EPIC Computer with GUI and Dual SBC4685 Features Ready to run Celeron/Pentium III computer Color flat-panel support Four serial ports CAN Bus interface PC/104 & PC/104-Plus expansion The SBC4685

More information

... Application Note AN-531. PCI Express System Interconnect Software Architecture. Notes Introduction. System Architecture.

... Application Note AN-531. PCI Express System Interconnect Software Architecture. Notes Introduction. System Architecture. PCI Express System Interconnect Software Architecture Application Note AN-531 Introduction By Kwok Kong A multi-peer system using a standard-based PCI Express (PCIe ) multi-port switch as the system interconnect

More information

Operating systems for embedded systems. Embedded Operating Systems

Operating systems for embedded systems. Embedded Operating Systems Operating systems for embedded systems Embedded operating systems How do they differ from desktop operating systems? Programming model Process-based Event-based How is concurrency handled? How are resource

More information

CS 550 Operating Systems Spring Interrupt

CS 550 Operating Systems Spring Interrupt CS 550 Operating Systems Spring 2019 Interrupt 1 Revisit -- Process MAX Stack Function Call Arguments, Return Address, Return Values Kernel data segment Kernel text segment Stack fork() exec() Heap Data

More information

Computer Hardware Trouble Shooting or The computer won t work!!! Now what am I going to do?

Computer Hardware Trouble Shooting or The computer won t work!!! Now what am I going to do? Computer Hardware Trouble Shooting or The computer won t work!!! Now what am I going to do? Basic steps for diagnosing computer problems: 1. Look and listen the computer will give you some hints about

More information

Introduction Electrical Considerations Data Transfer Synchronization Bus Arbitration VME Bus Local Buses PCI Bus PCI Bus Variants Serial Buses

Introduction Electrical Considerations Data Transfer Synchronization Bus Arbitration VME Bus Local Buses PCI Bus PCI Bus Variants Serial Buses Introduction Electrical Considerations Data Transfer Synchronization Bus Arbitration VME Bus Local Buses PCI Bus PCI Bus Variants Serial Buses 1 Most of the integrated I/O subsystems are connected to the

More information

Input/Output. Today. Next. Principles of I/O hardware & software I/O software layers Disks. Protection & Security

Input/Output. Today. Next. Principles of I/O hardware & software I/O software layers Disks. Protection & Security Input/Output Today Principles of I/O hardware & software I/O software layers Disks Next Protection & Security Operating Systems and I/O Two key operating system goals Control I/O devices Provide a simple,

More information

Computer Labs: I/O and Interrupts

Computer Labs: I/O and Interrupts Computer Labs: I/O and Interrupts 2 o MIEIC Pedro F. Souto (pfs@fe.up.pt) October 3, 2010 I/O Operation I/O devices are the interface between the computer and its environment Most of the time, the processor

More information

Embedded Systems Programming

Embedded Systems Programming Embedded Systems Programming x86 System Architecture and PCI Bus (Module 9) Yann-Hang Lee Arizona State University yhlee@asu.edu (480) 727-7507 Summer 2014 Interrupt in 8086 Two pins: NMI and INTR Interrupt

More information

These three counters can be programmed for either binary or BCD count.

These three counters can be programmed for either binary or BCD count. S5 KTU 1 PROGRAMMABLE TIMER 8254/8253 The Intel 8253 and 8254 are Programmable Interval Timers (PTIs) designed for microprocessors to perform timing and counting functions using three 16-bit registers.

More information

TABLE OF CONTENTS 1. INTRODUCTION 2. SPECIFICATION 3. HARDWARE INSTALLATION 6EM 1.1. PREFACE KEY FEATURES PERFORMANCE LIST...

TABLE OF CONTENTS 1. INTRODUCTION 2. SPECIFICATION 3. HARDWARE INSTALLATION 6EM 1.1. PREFACE KEY FEATURES PERFORMANCE LIST... 6EM TABLE OF CONTENTS 1. INTRODUCTION 1.1. PREFACE...1-1 1.2. KEY FEATURES...1-1 1.3. PERFORMANCE LIST...1-2 1.4. BLOCK DIAGRAM...1-3 1.5. INTRODUCE THE Pentium II Processor & AGP...1-4 1.6 What is AGP?...1-6

More information

Operating Systems Engineering Recitation #3 (part 2): Interrupt and Exception Handling on the x86. (heavily) based on MIT 6.

Operating Systems Engineering Recitation #3 (part 2): Interrupt and Exception Handling on the x86. (heavily) based on MIT 6. 236366 Operating Systems Engineering Recitation #3 (part 2): Interrupt and Exception Handling on the x86 (heavily) based on MIT 6.828 (2005, lec8) x86 Interrupt Nomenclature Hardware Interrupt (external)

More information

COSC 243. Input / Output. Lecture 13 Input/Output. COSC 243 (Computer Architecture)

COSC 243. Input / Output. Lecture 13 Input/Output. COSC 243 (Computer Architecture) COSC 243 Input / Output 1 Introduction This Lecture Source: Chapter 7 (10 th edition) Next Lecture (until end of semester) Zhiyi Huang on Operating Systems 2 Memory RAM Random Access Memory Read / write

More information

Input Components C H A P T E R 1 4. See also: System FAQs for WHQL Testing on

Input Components C H A P T E R 1 4. See also: System FAQs for WHQL Testing on Part 4 Device Design Guidelines C H A P T E R 1 4 Input Components This chapter presents the requirements and recommendations for standard input devices and connections under the Microsoft Windows family

More information

Interrupts. Chapter 20 S. Dandamudi. Outline. Exceptions

Interrupts. Chapter 20 S. Dandamudi. Outline. Exceptions Interrupts Chapter 20 S. Dandamudi Outline What are interrupts? Types of interrupts Software interrupts Hardware interrupts Exceptions Interrupt processing Protected mode Real mode Software interrupts

More information

Master Thesis. Interconnecting a Linux Host with a FPGA Board through PCI-Express

Master Thesis. Interconnecting a Linux Host with a FPGA Board through PCI-Express NATIONAL AND KAPODISTRIAN UNIVERISTY OF ATHENS FACULTY OF PHYSICS DEPARTMENT OF ELECTRONICS, COMPUTERS, TELECOMMUNICATION AND CONTROLL Master Thesis Interconnecting a Linux Host with a FPGA Board through

More information

Computer Architecture

Computer Architecture Instruction Cycle Computer Architecture Program Execution and Instruction Sets INFO 2603 Platform Technologies The basic function performed by a computer is the execution of a program, which is a set of

More information

Homework. Reading. Machine Projects. Labs. Intel 8254 Programmable Interval Timer (PIT) Data Sheet. Continue on MP3

Homework. Reading. Machine Projects. Labs. Intel 8254 Programmable Interval Timer (PIT) Data Sheet. Continue on MP3 Homework Reading Intel 8254 Programmable Interval Timer (PIT) Data Sheet Machine Projects Continue on MP3 Labs Continue in labs with your assigned section 1 Restrictions on ISR Code Software that was executing

More information