Digression on r/w ‘/proc’ files An application of kernel module programming to Super VGA graphics device control.

Slides:



Advertisements
Similar presentations
Monitors and Sound Systems
Advertisements

Chapter 3: Installing and Configuring Output Devices By: DC, and PB.
Lecture 2 Concepts, Terms and Definitions. Display Devices They are divided into a lot of small squares called pixels (“PICture ELements”). Each pixel.
Using VMX within Linux We explore the feasibility of executing ROM-BIOS code within the Linux x86_64 kernel.
Monitors and Sound Systems lesson 5 This lesson includes the following sections:  Monitors  PC Projectors  Sound Systems.
Hardware. Basic Computer System Central Processing Unit Input Devices Output Devices Backing Storage Devices.
CS 686: Programming SuperVGA Graphics Devices Introduction: An exercise in working with graphics file formats.
Programming Super-VGA Graphics Devices Introduction to VESA graphics modes and to organization of the linear frame-buffer memory.
The Linux PCI Interface An introduction to the PCI configuration space registers.
A code-walkthrough Commentary on our ‘wfmodel.cpp’ demo-program – an initial ‘prototype’ for 3D wire-frame animations.
Java ThreadsGraphics Programming Graphics Programming: Graphics Devices.
The RealTek interface Introduction to the RTL-8139 network controller registers.
SiS 315 Graphics Engine Introduction to some capabilities of graphics accelerator hardware.
The CRT Controller How to modify CRTC registers to achieve a non-standard horizontal and vertical screen resolution.
EET Advanced Digital Display Adapters. A vital part to the system provides the visual part of the Human/Computer interface In boot process, goes.
Michener’s Algorithm An efficient scheme for drawing circles (and filling circular disks) on a raster graphics display.
The ‘ioctl’ driver-function On implementing ‘show’ and ‘hide’ for the SiS 315 hardware cursor.
Direct I/O Programming An introduction to the Pentium’s mechanism for programming peripheral hardware components.
Vertical Retrace Interval An introduction to VGA techniques for smooth graphics animation.
How to do ‘page-flipping’ The steps needed when revising our ‘wfmodel1.cpp’ prototype to achieve ‘smooth’ animation.
CS 686: Programming SuperVGA Graphics Devices Introduction: An exercise in working with graphics file formats.
A device-driver for Video Memory Introduction to basic principles of the PC’s graphics display.
VGA Color Registers How we can reprogram the Digital-to-Analog Converter’s 256 color-table registers.
Vertical Retrace Interval An introduction to VGA techniques for smooth graphics animation.
SiS 315 An introductory exploration of features of the SVGA graphics processor used in our classroom’s workstations.
11-1 Display Technologies Hi-resolution displays come in two types: –Each takes an input signal and creates a visible image Cathode ray tube (CRT) - Streams.
Notes for Lab 10 On implementing ‘show’ and ‘hide’ for the SiS 315 hardware cursor.
EET Advanced Digital Display Adapters. A vital part to the system provides the visual part of the Human/Computer interface In boot process, goes.
Terms 1. VGA VGA - Short for Video Graphics Array, VGA is a popular display standard developed by IBM and introduced in 1987 VGA provides 640 x 480 resolution.
Computer Monitors Principles of Information Technology Lytle High School Click to Continue.
CIT In this chapter you will learn how to -  Describe the workings of keyboards  Explain how to connect and use mice and other pointing devices.
Digital Graphics and Computers. Hardware and Software Working with graphic images requires suitable hardware and software to produce the best results.
Video Monitor Uses raster scanning to display images
Flash Cards Computer Technology.
Macquarie Fields College of TAFE Version 2 – 13 March HARDWARE 3.
Computer Maintenance Unit Subtitle: Basic Input/Output System (BIOS) Excerpted from 1 Copyright © Texas Education Agency, All.
systemhound © Raxco Software Belgium systemhound PC inventory software.
ROM Read Only Memory “…computer memory on which data has been prerecorded. Once data has been written onto a ROM chip, it cannot be removed and can only.
CSE 101 Spring 2000 Hardware (Bits & Bytes). Understanding the Machine Data versus Information  Data are raw facts  Information is the result of transforming/examining.
Add on cards. Also known as Expansion card or interface adapter. It can be inserted into an expansion slot of a motherboard to add functionality to a.
Translate the following message:
Raster-scan system In addition to the central processing unit a special purpose processor called the video controller or display controller is used to.
Video Monitor Uses raster scanning to display images –Beam of electrons illuminates phosphorus dots on the screen called pixels. Starting at the top of.
Bit-Mapped Graphic Data: Input (Capture) Hardware Multimedia – Section 2.
INFO Martin van Bommel What is a Computer? v Computer - electronic device that accepts input, performs calculations, and produces the.
Video Monitor CRT: Cathode Ray Tube
The Guts. CPU CPU Socket The CPU is generally a 2 inch ceramic square with a silicon chip located inside. The chip usually about the size of a thumbnail.
Monitors and Sound Systems Section 3A. Objectives List the two most commonly used types of computer monitors. Explain how a CRT monitor displays images.
1 Hardware and Software b Hardware the physical, tangible parts of a computerthe physical, tangible parts of a computer keyboard, monitor, wires, chips,
Graphics. What is a Graphic ? A Graphic is an image or a picture e.g. Pictures can be either drawn or painted. Pixel - Stands for Picture Element.
Application Block Diagram III. SOFTWARE PLATFORM Figure above shows a network protocol stack for a computer that connects to an Ethernet network and.
Lecture # 4 Output Devices. Output Devices Devices that convert machine language into human understandable form. Output can be in display form, on paper.
D75P 34 – HNC Computer Architecture Week 5 Memory Maps. © C Nyssen/Aberdeen College 2003 All images © C Nyssen/Aberdeen College except where stated Prepared.
Computer Fundamentals/ Organizing Your Work/ 1 of 16.
Color Web Design Professor Frank. Color Displays Based on cathode ray tubes (CRTs) or back- lighted flat-screen Monitors transmit light - displays use.
Video Card CES Industries, Inc. Lesson 10.  Translates computer information of binary digital data into visual information that the monitor can understand.
BMTS 242: Computer and Systems Lecture 2: Memory, and Software Yousef Alharbi Website
Computer Maintenance I
Week 9 Monitors and output to the screen. Monitors, also known as Visual display units (V.D.Us) Desktop computers contain a Cathode Ray Tube (C.R.T.)
Computer Hardware & Processing Inside the Box CSC September 16, 2010.
Fly Swatter Game Let’s Swat It Now!!. A contract that defines acceptable rules and policies for computer use:
How Much Do I Remember? Are you ready to play.....
Computer Graphics Lecture 03 Graphics Systems Cont… Taqdees A. Siddiqi
Input/Output (I/O) Important OS function – control I/O
Computer Basics.
Drill Translate the following message:
الحاسوب و البرمجيات الجاهزة
Computers: Hardware and Software
This lesson includes the following sections:
Presentation transcript:

Digression on r/w ‘/proc’ files An application of kernel module programming to Super VGA graphics device control

Super VGA Modern graphics cards have lots of vram Our class machines show only part of it Screen resolution is 1280 x 1024 ‘pixels’ Each ‘pixel’ is 32-bits of video memory Total vram for one full screen: 1280 x 1024 x 4 bytes = 5 megabytes Our class machines have 32 megabytes

SVGA ‘Start Address’ parameter Our machines use the SiS 315 svga chip Its ‘Start Address’ governs what we see It’s a 24-bit value, held in 3 byte-registers Registers accessible through i/o ports Kernel code can reprogram these registers Module-inferface gives application-access

How Start Address works VRAM visible Start_address = 0 VRAM visible Start_address = 2048

The CRT Controller Display monitor uses Cathode Ray Tube It’s operated by SVGA’s CRT Controller Old design: It has lots of 8-bit registers Two i/o port-addresses are ‘multiplrexed’ ADDRESS_PORT: 0x03D4 DATA_PORT: 0x03D5 CRTC register 13: start_address[ 7..0 ] CRTC register 12: start_address[ ]

SVGA incompatibility Many features of SVGA are now standard But vendors add their own ‘extras’ These are NOT programmed identically! You usually need manufacturer’s manual But not always easy to get (proprietary) (We found SiS information in a web ) Software for SiS chip ‘extras’ non-portable

SVGA Memory Sequencer Sequencer also has lots of 8-bit registers They’re also accessed via two i/o ports ADDRESS_PORT: 0x03C4 DATA_PORT: 0x03C5 Seq register 13: start_address[ ] SiS chip uses Seq register 5 as a ‘lock’ Write 0x86 to ‘unlock’ sequencer registers

pci_find_device() Driver must ‘detect’ the SiS SVGA device SiS chip’s VENDOR_ID is 0x1039 SiS chip’s DEVICE_ID is 0x6325 #include struct pci_dev *devp = NULL; devp = pci_find_device( VENDOR, DEVICE, devp );

Class Demo Module name is ‘sischip.c’ Creates a pseudo-file: ‘proc/sischip’ It’s a binary file (don’t use ‘cat’ command) File is both readable and writable Lets application get or set ‘start_address’ Our demo-program is ‘vgascroll.cpp’ It lets us see 16 megabytes of video ram

Today’s Class Exercise Use your knowledge of ‘ioremap()’ Draw an image in the offscreen vram Run ‘vgascroll’ to see what you’ve drawn