GROS ( G ROS ( G ROS IS IS A R OUTING R OUTING O PERATING O PERATING S YSTEM ) Batch : 6 Guide :Sabitha. S Hemant Pillai Dean John Abraham Krishnakumar.R.

Slides:



Advertisements
Similar presentations
1 Operating Systems Input/Output Management. 2 What is the I/O System A collection of devices that different sub- systems of a computer use to communicate.
Advertisements

Managing Cisco IOS Software. Overview The router boot sequence Locating IOS software The configuration register Recovering Passwords Backing Up the Cisco.
Input and Output CS 215 Lecture #20.
FIU Chapter 7: Input/Output Jerome Crooks Panyawat Chiamprasert
1 Homework Reading –Review previous material on “interrupts” Machine Projects –MP4 Due today –Starting on MP5 (Due at start of Class 28) Labs –Continue.
Interrupts What is an interrupt? What does an interrupt do to the “flow of control” Interrupts used to overlap computation & I/O – Examples would be console.
Outline  Examine some of the H/W supplied with a typical PC and consider the software required to control it.  Introduce Commkit, a software tool that.
Network Adapter Driver NCTU High Speed Network Lab.
Introduction An interrupt is an event which informs the CPU that its service (action) is needed. Sources of interrupts: internal fault (e.g.. divide by.
ARM 7 Datapath. Has “BIGEND” input bit, which defines whether the memory is big or little endian Modes: ARM7 supports six modes of operation: (1) User.
CS335 Networking & Network Administration Tuesday, April 13, 2010.
1 Input/Output Chapter 3 TOPICS Principles of I/O hardware Principles of I/O software I/O software layers Disks Clocks Reference: Operating Systems Design.
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
Computer Organization
How Hardware and Software Work Together
COMP201 Computer Systems Exceptions and Interrupts.
3/11/2002CSE Input/Output Input/Output Control Datapath Memory Processor Input Output Memory Input Output Network Control Datapath Processor.
Interrupts. What Are Interrupts? Interrupts alter a program’s flow of control  Behavior is similar to a procedure call »Some significant differences.
Chapter 10: Input / Output Devices Dr Mohamed Menacer Taibah University
80386DX.
Interrupts and DMA CSCI The Role of the Operating System in Performing I/O Two main jobs of a computer are: –Processing –Performing I/O manage and.
1 Lecture 20: I/O n I/O hardware n I/O structure n communication with controllers n device interrupts n device drivers n streams.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Principles of I/0 hardware.
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
1-1 Embedded Network Interface (ENI) API Concepts Shared RAM vs. FIFO modes ENI API’s.
I/O Example: Disk Drives To access data: — seek: position head over the proper track (8 to 20 ms. avg.) — rotational latency: wait for desired sector (.5.
Laface Operating System Design Booting a PC to run a kernel from Low memory VGA display.
CS 342 – Operating Systems Spring 2003 © Ibrahim Korpeoglu Bilkent University1 Input/Output CS 342 – Operating Systems Ibrahim Korpeoglu Bilkent University.
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)
Interrupts Useful in dealing with: The interface: Random processes;
SAPC Hardware Pentium CPU (or 486) 4M usable memory no hard disk; boot from floppy no keyboard or monitor or mouse COM2 serial port: used for console i/o.
Interrupt driven I/O. MIPS RISC Exception Mechanism The processor operates in The processor operates in user mode user mode kernel mode kernel mode Access.
Embedded Network Interface (ENI). What is ENI? Embedded Network Interface Originally called DPO (Digital Product Option) card Printer without network.
Nevis FVTX Update Dave Winter FVTX Silicon Meeting 13 July 2006.
Bootstrapping Steve Muckle Dave Eckhardt. Carnegie Mellon University1 Synchronization Project 3 checkpoint 1 Bboard post, web page Paging, COW optional.
12/8/20151 Operating Systems Design (CS 423) Elsa L Gunter 2112 SC, UIUC Based on slides by Roy Campbell, Sam King,
GROS ( G ROS ( G ROS IS IS A R OUTING R OUTING O PERATING O PERATING S YSTEM ) Phase II Batch : 6 Guide :Sabitha. S Hemant Pillai Dean John Abraham Krishnakumar.R.
7. IRQ and PIC ENGI 3655 Lab Sessions. Richard Khoury2 Textbook Readings  Interrupts ◦ Section
Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower than CPU.
Interrupt driven I/O Computer Organization and Assembly Language: Module 12.
Lecture 5 Rootkits Hoglund/Butler (Chapters 1-3).
BIOS and DOS Interrupts Basic Input /Outpu System Disk Operating System.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
January 8, 2001 SPC Tutorial 1 Washington WASHINGTON UNIVERSITY IN ST LOUIS Agenda 9:00 SPC Hardware -- John DeHart 9:45 SPC Software -- John DeHart 10:30.
Chapter 2 Instruction Addressing and Execution. Lesson plan Review some concepts in the first week First assembly program with EMU8086 Related concepts.
Homework Reading Machine Projects
Chapter Objectives In this chapter, you will learn:
CS501 Advanced Computer Architecture
Microprocessor and Assembly Language
Introduction An interrupt is an event which informs the CPU that its service (action) is needed. Sources of interrupts: Internal fault (e.g.. divide by.
Anton Burtsev February, 2017
CSE 506: Operating Systems
Homework Reading Labs S&S Extracts ,
CS 286 Computer Organization and Architecture
CS703 - Advanced Operating Systems
8259 Chip The Intel 8259 is a family of Programmable Interrupt Controllers (PIC) designed and developed for use with the Intel 8085 and Intel 8086 microprocessors.
8253 Timer In software programming of 8085, it has been shown that a delay subroutine can be programmed to introduce a predefined time delay. The delay.
SAPC Hardware Pentium CPU (or 486) 4M usable memory
CSE 451: Operating Systems Autumn 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 596 Allen Center 1.
CSE 451: Operating Systems Winter 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 412 Sieg Hall 1.
Programmable Interrupt Controller (PIC)
Chapter 13: I/O Systems.
Interrupts and System Calls
Lecture 12 Input/Output (programmer view)
Chapter 4 The Von Neumann Model
Presentation transcript:

GROS ( G ROS ( G ROS IS IS A R OUTING R OUTING O PERATING O PERATING S YSTEM ) Batch : 6 Guide :Sabitha. S Hemant Pillai Dean John Abraham Krishnakumar.R

Phases I – Network Card Details & Booting Procedure.I – Network Card Details & Booting Procedure. II – Switching to Protected mode & Interrupt handlingII – Switching to Protected mode & Interrupt handling III – Reception & Transmission of packets.III – Reception & Transmission of packets.

PCI and ISA Network cards Two types of architectures - ISA & PCITwo types of architectures - ISA & PCI ISA - 16 bit access. PCI - 32 bit accessISA - 16 bit access. PCI - 32 bit access Started off with ISA cards, later shifted to PCI cards.Started off with ISA cards, later shifted to PCI cards. Difference of concern - IRQ conflicts.Difference of concern - IRQ conflicts. IRQ of ISA - ManuallyIRQ of ISA - Manually IRQ of PCI - PCI Bios decides.IRQ of PCI - PCI Bios decides.

Base Address Of ISA cards Base Addresses provided by Vendor. For eg. 0x220, 0x240, 0x260.Base Addresses provided by Vendor. For eg. 0x220, 0x240, 0x260. Search these addresses by looking at return value of ‘inb’ instruction.Search these addresses by looking at return value of ‘inb’ instruction. 0xff - no card, any other value - presence of card.0xff - no card, any other value - presence of card.

Base Address of PCI cards PCI BIOS decides base address of PCI cards.PCI BIOS decides base address of PCI cards. PCI BIOS : Address port - 0xCf8 and Data port - 0xCfC.PCI BIOS : Address port - 0xCf8 and Data port - 0xCfC bytes for each PCI device bytes for each PCI device. Network card - Device ID : 0x02.Network card - Device ID : 0x02. Base Addr. and IRQ in 256 bytes.Base Addr. and IRQ in 256 bytes.

Hardware Address Calculation 48 bit qty48 bit qty Stored in PROMStored in PROM It has offset from base addressIt has offset from base address Vendor provides thisVendor provides this We read the 48 bitsWe read the 48 bits

Booting Procedure Initially BIOS does POST.Initially BIOS does POST. Checks the bootability of device (0x55 and 0xAA at bytes 511 and 512).Checks the bootability of device (0x55 and 0xAA at bytes 511 and 512). Copies first 512 bytes to address location 0x7C00 and starts execution.Copies first 512 bytes to address location 0x7C00 and starts execution. GROS code here in assembly.GROS code here in assembly. Copies 20 sectors from floppy (Later changed to 15)Copies 20 sectors from floppy (Later changed to 15)

All Intel processors start as 8086 (real mode)All Intel processors start as 8086 (real mode) Load dummy IDT and GDT.Load dummy IDT and GDT. Set LSB of CR0.Set LSB of CR0. Jump to location 0.Jump to location 0. Start executing code previously copied code.Start executing code previously copied code. Switching to Protected Mode

Programming the 8259A 8259A is the PIC(Programmable Interrupt Controller). There are 2 ports - 0x20 for Master & 0xA0 for Slave. 8259A is initialized by writing the Initialization Command Words (ICW1 - ICW4) & Operational Command Words (OCW1 - OCW3).

IRQ 2 is reserved for slave PIC 8 IRQ lines for a single PIC

Key Board & Console IRQ registered is 1. Key board input through port 0x60. The interrupt handler for interrupt 1 is registered to keyb function. The character received is written to video memory. Video memory starts at 0xb8000

Initialize the Network Card The Vendor has provided some standard procedure for initialization. Initialization consists of specifying – type of access, interrupts to be serviced start page, stop page etc. Circular Q buffer ring. Receive and Transmit page is same.

Switch to promiscous modeSwitch to promiscous mode Enable interrupts.Enable interrupts.

Interrupt Capturing Of NIC Register the interrupts of network card to interrupt handler ‘net’ When interrupt comes control passes to net. Phase I – Print character ‘0’ whenever entering net. Phase II – Print the header info.

Format of Packet header Physical layer DHA SHA PT DHA – Destination Hardware Address : 6 bytes SHA - Source Hardware Address : 6 bytes PT - Packet type : 2 bytes (IP or ARP) (IP or ARP)

Read in the data from buffer offset we have provided. SZNXTST Format of Read Data SZ – Size of the received packet : 2 bytes NXT - Shows the next data starting : 1byte ST - Status (0x01 for OK) : 1byte

Switch to page 0 of remote bufferSwitch to page 0 of remote buffer Read data from Data port.Read data from Data port.

Interrupt Acknowledgement Feed Interrupt acknowledge to Interrupt register of NIC. Send EOI ( End Of Interrupt ) to 8259 Interrupt Controller.

Sending of Packet Mask all Interrupts ( This is to be done while receiving also). Feed in where to send the packet, in the send buffer (Offset). Send the packet to data port. Done By DMA. Tell card to send packet by feeding value to command register. Tcpdump

Summary Network interface Card programming.Network interface Card programming. Booting procedureBooting procedure Protected mode.Protected mode. Interrupt Handling, Key board & ConsoleInterrupt Handling, Key board & Console Initialization Reception & Transmission.Initialization Reception & Transmission. Languages and tools used.Languages and tools used.