‘Identify Device’ A mandatory command that allows device-drivers to query any standard IDE/ATA hard disk for its parameters.

Slides:



Advertisements
Similar presentations
Intro to WinHex CSC 414.
Advertisements

Base 10 Denary Decimal
The ATA/IDE Interface Can we write a character-mode device driver for the hard disk?
Processing Data.
Binary and Hexadecimal Numbers
The ‘ioctl’ driver-function On implementing a way to query and modify our UART’s baudrate via the ‘device-file’ abstraction.
Who Wants to be a Millionaire. $2,000  What is RAM? A. Rubies And Money B. Rough Acting Mom C. Random Access Memory D. Rude And Mad.
Units of Storage What is Storage. A look at Storage We know computers can store large amounts of data. We measure the storage capacity of different storage.
Introduction to Information Technology
IT-101 Section 001 Lecture #4 Introduction to Information Technology.
Backing Storage Devices.  We are learning to:  Make comparisons between different backing storage devices using their features.  Identify appropriate.
 Method of representing or encoding numbers  Two main notation types  Sign-value  Roman numerals  Positional (place-value)  Modern decimal notation.
Representing Information in Binary (Continued)
Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes.
Bits and Bytes.
Communications Technology 2104 Mercedes Lahey. Bit 1. bit=From a shortening of the words “binary digit” 2. the basic unit of information for computers.
Computer Storage & Representing Numbers CE 311 K - Introduction to Computer Methods Daene C. McKinney.
CS 111 – Aug – 1.3 –Information arranged in memory –Types of memory –Disk properties Commitment for next day: –Read pp , In other.
Windows XP Basics By Jane Maringer-Cantu CSIS 572.
Copyright © 2003 by Prentice Hall Module 5 Central Processing Unit 1. Binary representation of data 2. The components of the CPU 3. CPU and Instruction.
Files and Folders What’s the difference?. What are files ? Collections of digital information created on or for computers click the mouse or press the.
Fill in the blanks: (1) _________ has only two possible values 0 and 1. (2) There are __________bits in a byte. (3) 1 kilobyte of memory space can store.
Why does it matter how data is stored on a computer? Example: Perform each of the following calculations in your head. a = 4/3 b = a – 1 c = 3*b e = 1.
Lecture Binary and Hexadecimal Numbers. How Machines Think Computers handle two types of information: –Instructions –Data The "words" of a machine language.
The Hexadecimal Number System and Memory Addressing ISAT 121.
1 3 Computing System Fundamentals 3.2 Computer Architecture.
Bits and Bytes IGCSE. A binary number is either a 0 or a 1 and is known as a 'bit' or b inary dig it. However, the CPU cannot deal with just one bit at.
 Bits & Bytes Bits & Bytes  Units of data Units of data  Storage devices Storage devices  Storage Types Storage Types  Secondary Storage Secondary.
Computer Foundations Dr. John P. Abraham Professor UTPA.
Working with 8-bit bytes and hexadecimal
GCSE ICT Storing data - Internal memory, backing storage, and measuring memory.
DECIMALBINARY a) b) c) d) e) f) Revision Exercise DECIMALBINARY a) b) c)
CS101 Storage Information Storage The zeros and ones in the input devices, output devices and process devices are in _______ form and are lost when the.
Computers - The Journey Inside continues…
Storage of Data Instructions and data are held in main memory which is divided into millions of addressable storage.
OFF = 0 ON = 1 = 63 BINARY system
Business Programming I Fall – 2000 By Jim Payne Lecture 05Jim Payne - University of Tulsa2 Alphanumeric Storage Numbers that are not numbers? Alphabetic.
Unit C-Hardware & Software1 GNVQ Foundation Unit C Bits & Bytes.
ASCII AND EBCDIC CODES By : madam aisha.
Journal Entry: Unit #5 Entry #3 Define the following words from ch2 in your journals: Binary, bit, discrete, unambiguous signals, digital, analog signal,
Technology Education THE PERSONAL COMPUTER (PC) HARDWARE PART 2
 Method of representing or encoding numbers  Two main notation types  Sign-value  Roman numerals  Positional (place-value)  Modern decimal notation.
 Computers are 2-state devices › Pulse – No pulse › On – Off  Represented by › 1 – 0  BINARY.
Binary a. express numbers in binary, binary-coded decimal (BCD), octal and hexadecimal;
Once you have been through these notes you will need to complete the workbook.
© OCR 2016 Unit 2.6 Data Representation Lesson 1 ‒ Numbers.
CS101 Storage Information.
Binary and Hard Disk PEOPLE Program
Unit 2.6 Data Representation Lesson 1 ‒ Numbers
STORAGE DEVICES Towards the end of this unit you will be able to identify the type of storage devices and their storage capacity.
How do Computers Work ?.
Bits and bytes September 19, 2017.
Memory Parts of a computer
Information Support and Services
STORAGE DEVICES Towards the end of this unit you will be able to identify the type of storage devices and their storage capacity.
Secondary Storage Backups & Crashes.
COMPUTER MEMORY & DATA STORAGE
COMPUTER MEMORY & DATA STORAGE
Data Representation Numbers
STORAGE DEVICES Towards the end of this unit you will be able to identify the type of storage devices and their storage capacity.
How do computers work? Storage.
Computer Systems Chapter 11 Section 1.
Binary and Hexadecimal Numbers
Information Representation
CS101 Storage Information.
Binary Data representation
Bits and Bytes Key Revision Points.
Binary System.
Unit 2- Lesson 1 & 2- Bytes and File Sizes / Text Compression
Presentation transcript:

‘Identify Device’ A mandatory command that allows device-drivers to query any standard IDE/ATA hard disk for its parameters

Uses PIO data-in protocol Our ‘mbr.c’ driver-module reads sector 0 using a well-documented device protocol The IDENTIFY_DEVICE command (0xEC) uses the same basic protocol, except that only a 1-bit parameter is needed, to select the desired device (master=0, slave=1) You can quickly modify our ‘mbr.c’ module to create a ‘hdid.c’ driver for disk-ID info

Some items of interest The IDENTIFY-DEVICE command returns 256 words of information (i.e., 512 bytes) Words 10-19: Hard Disk’s Serial-Number (it consists of 20 ASCII characters) Words 23-26: Firmware Revision Number (it consists of 8 ASCII characters) Words 27-46: Hard Disk’s Model Number (it consists of 40 ASCII characters)

Important item: disk’s capacity Words 60-61: The total number of sectors a device-driver can access (32-bit value) Allows for disk-capacities up to 2 terabytes (2 32 sectors)*(512 bytes/sect) = 2 41 bytes 2 10 : 1 kilobyte = 1024 bytes 2 20 : 1 megabyte = 1024 kilobytes 2 30 : 1 gigabyte = 1024 megabytes 2 40 : 1 terabyte = 1024 gigabytes

C programming “hints” unsigned shortidinfo[ 256 ]; unsigned longn_sectors; unsigned long longn_bytes; for (i=0; i<256; i++) idinfo[ i ] = inw( IDE_DATA ); n_sectors = *(unsigned long*)&idinfo[ 60 ]; n_bytes = 512LL * n_sectors; printf( “disk capacity: %llu bytes ”, n_bytes); printf( “(= 0x%llX bytes) \n”, n_bytes );

In-class exercise #1 Copy our ‘mbr.c’ module from the website, remame it as ‘hdid.c’, then modify a few of its lines as appropriate, so as to create a character-mode device-driver for the Hard Disk’s 256 words of device information Use our ‘fileview’ utility to browse through this device-file (named ‘/dev/hd’), copying down the number of disk-sectors (in hex)

In-class exercise #2 Write a short C++ application program that will display these important items of Hard Disk information (in appropriate formats): –Hard Disk’s Serial Number –Firmware’s Revision Number –Hard Disk’s Model ID Number –Number of accessible sectors (hexadecimal) –Disk’s storage capacity in bytes (decimal)